Yes, of course, but it's unnecessarily more complex and tend to
confuse people, when it can be easily avoided.
The goal of a ./configure script is to automatically find and link all
necessary objects for you.
/opt/local is a very common location on Mac OSX and should be
searched by default IMHO. The patch only adds those folders when it
detects a darwin architecture, it doesn't affect other platforms at all.
Regards,
Alejandro Guerrieri
El 18/11/2008, a las 01:09 a.m., Alan McNatty escribió:
Hi Alejandro,
Can this not be achieved with environment variables or using the
configure options --with-cflags and --with-libs?
For example I set LDFLAGS=-L/opt/csw/lib -R/opt/csw/lib for example
for my Solaris 5.10 builds (check ldd output on binaries for
linking, etc).
Cheers,
Alan
Alejandro Guerrieri wrote:
This simple patch adds /opt/local/lib and /opt/local/include as
possible places for libraries and includes respectively on Mac OSX.
This simplifies compiling Kannel with packages from MacPorts.
------------------------------------- BEGIN
--------------------------------
Index: configure.in
===================================================================
RCS file: /home/cvs/gateway/configure.in,v
retrieving revision 1.180
diff -u -r1.180 configure.in
--- configure.in 6 Aug 2008 14:22:43 -0000 1.180
+++ configure.in 18 Nov 2008 02:57:03 -0000
@@ -153,6 +153,8 @@
CFLAGS="$CFLAGS -DDARWIN=1"
fi
LIBTOOL="libtool -static -o"
+ LIBS="$LIBS -L/opt/local/lib"
+ CFLAGS="$CFLAGS -I/opt/local/include"
;;
*-linux-*)
CFLAGS="$CFLAGS -D_XOPEN_SOURCE=600 -D_BSD_SOURCE"
------------------------------------- END
--------------------------------
After patching, autoconf needs to be run to recreate the ./
configure script
Regards,
Alejandro Guerrieri
--
Alan McNatty
Catalyst IT
DDI: +64 (0)4 8032201, or
TEL: +64 (0)4 4992267