[svn] commit: r1794 - in /trunk: ./ configure.ac src/lib/cc/ src/lib/dns/ src/lib/dns/rdata/generic/rrsig_46.cc src/lib/dns/tests/
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Apr 23 00:51:45 UTC 2010
Author: jinmei
Date: Fri Apr 23 00:51:44 2010
New Revision: 1794
Log:
check for the availability of ${python}-config. if unavailable warn about it.
trac ticket #159.
Modified:
trunk/ (props changed)
trunk/configure.ac
trunk/src/lib/cc/ (props changed)
trunk/src/lib/dns/ (props changed)
trunk/src/lib/dns/rdata/generic/rrsig_46.cc (props changed)
trunk/src/lib/dns/tests/ (props changed)
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri Apr 23 00:51:44 2010
@@ -48,21 +48,30 @@
AC_SUBST(pkgpyexecdir)
fi
-PYTHON_INCLUDES=`${PYTHON}-config --includes`
+# Check for python development environments
+if test -x ${PYTHON}-config; then
+ PYTHON_INCLUDES=`${PYTHON}-config --includes`
+
+ for flag in `${PYTHON}-config --ldflags`; do
+ # add any '-L..." flags to PYTHON_LDFLAGS
+ 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
+else
+ if test "X$PYTHON_INCLUDES" = X -o "X$PYTHON_LDFLAGS" = X; then
+ AC_MSG_WARN([${PYTHON}-config does not exist or is not executable, so we could not detect python development environment. Your system may require an additional package (e.g. "python3-dev"). Alternatively, if you are sure you have python headers and libraries, define PYTHON_INCLUDES and PYTHON_LDFLAGS and run this script.])
+ fi
+fi
AC_SUBST(PYTHON_INCLUDES)
-for flag in `${PYTHON}-config --ldflags`; do
- # add any '-L..." flags to PYTHON_LDFLAGS
- 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
AC_SUBST(PYTHON_LDFLAGS)
# Check for python library (not absolutely mandatory, but needed for
More information about the bind10-changes
mailing list