[svn] commit: r1732 - /branches/trac149/configure.ac
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Apr 19 18:16:44 UTC 2010
Author: jinmei
Date: Mon Apr 19 18:16:43 2010
New Revision: 1732
Log:
try `${PYTHON}-config --prefix`/lib for a last resort LDFLAGS for libpython (trac #149)
Modified:
branches/trac149/configure.ac
Modified: branches/trac149/configure.ac
==============================================================================
--- branches/trac149/configure.ac (original)
+++ branches/trac149/configure.ac Mon Apr 19 18:16:43 2010
@@ -51,8 +51,19 @@
PYTHON_INCLUDES=`${PYTHON}-config --includes`
AC_SUBST(PYTHON_INCLUDES)
for flag in `${PYTHON}-config --ldflags`; do
- PYTHON_LDFLAGS="$PYTHON_LDFLAGS `echo $flag | sed -ne 's/^\(\-L.*\)$/\1/p'`"
+ # add any '-L..." flags to PYTHON_INCLUDES
+ flag=`echo $flag | sed -ne 's/^\(\-L.*\)$/\1/p'`
+ if test "X${flag}" != X; then
+ PYTHON_LDFLAGS="$PYTHON_LDFLAGS ${flag}"
+ fi
done
+# on some platforms, ${PYTHON}-config --ldflags doesn't provide a -L option
+# while having the library under a non trivial directory. as a workaround
+# we try the "lib" sub directory under the common prefix for this python.
+if test -z "${PYTHON_LDFLAGS}"; then
+ PYTHON_LDFLAGS="-L`${PYTHON}-config --prefix`/lib"
+fi
+echo "python ldflags is ${PYTHON_LDFLAGS}."
AC_SUBST(PYTHON_LDFLAGS)
# Check for python library (not absolutely mandatory, but needed for
More information about the bind10-changes
mailing list