[PATCH 3/3] Detect Fink automatically.

Richard Kettlewell rjk at terraraq.org.uk
Sun Jul 10 12:23:45 BST 2011


Saves a bit of manual labour when building on OSX.

Signed-off-by: Richard Kettlewell <rjk at terraraq.org.uk>
---
 README.mac   |    2 +-
 configure    |    6 ++++++
 configure.in |    6 ++++++
 3 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/README.mac b/README.mac
index d6d60a8..d8b70ab 100644
--- a/README.mac
+++ b/README.mac
@@ -6,7 +6,7 @@ How to install secnet on a Fink-equipped OS X system:
     make
     sudo make install
   - Build secnet:
-    ./configure CPPFLAGS=-I/sw/include LDFLAGS=-L/sw/lib
+    ./configure
     make
     sudo make install
   - Install tuntap for OSX from http://tuntaposx.sourceforge.net/
diff --git a/configure b/configure
index 0bb23b6..761971c 100755
--- a/configure
+++ b/configure
@@ -2263,6 +2263,12 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
+# Use Fink if available
+if test -d /sw; then
+  CPPFLAGS="-I/sw/include ${CPPFLAGS}"
+  LDFLAGS="-L/sw/lib ${LDFLAGS}"
+fi
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
diff --git a/configure.in b/configure.in
index a548dac..03e27a6 100644
--- a/configure.in
+++ b/configure.in
@@ -11,6 +11,12 @@ AC_REVISION($Id: configure.in,v 1.4 2002/09/09 22:05:02 steve Exp $)
 
 AC_LANG_C
 
+# Use Fink if available
+if test -d /sw; then
+  CPPFLAGS="-I/sw/include ${CPPFLAGS}"
+  LDFLAGS="-L/sw/lib ${LDFLAGS}"
+fi
+
 AC_PROG_MAKE_SET
 AC_PROG_CC
 AC_PROG_INSTALL
-- 
1.6.4.2




More information about the sgo-software-discuss mailing list