# HG changeset patch # User brad@comstyle.com # Date 1270352458 0 # Node ID 4839a889f7053dd0a2991e435819ed0002be7c21 # Parent c7bfe4f1358e1a6ddb37f4d3167c515ad0b751ab Fix Python overrideability in configure script. Closes #11625. Previously, overriding the path only affected one of the two checks. Patch from Brad Smith. committer: Paul Aurich diff -r c7bfe4f1358e -r 4839a889f705 ChangeLog --- a/ChangeLog Sun Apr 04 00:27:15 2010 +0000 +++ b/ChangeLog Sun Apr 04 03:40:58 2010 +0000 @@ -17,6 +17,7 @@ priority can be overridden by using "*" as the host. See the GnuTLS manual for documentation on the format of the priority strings. + * Fix autoconf detection of Python. (Brad Smith) Pidgin: * Moved the "Debugging Information" section of the About box to a diff -r c7bfe4f1358e -r 4839a889f705 configure.ac --- a/configure.ac Sun Apr 04 00:27:15 2010 +0000 +++ b/configure.ac Sun Apr 04 03:40:58 2010 +0000 @@ -1402,7 +1402,7 @@ [which python interpreter to use for dbus code generation]), PYTHON=$withval) -if test "x$enable_dbus" = "xyes" ; then +if test "x$enable_dbus" = "xyes" || test "x$enable_consoleui" = "xyes" ; then if test -z "$PYTHON" -o "x$PYTHON" = "xyes"; then AC_PATH_PROG([PYTHON], [python], [no]) fi @@ -1411,9 +1411,7 @@ AC_MSG_WARN([python interpreter not found in your path]) enable_dbus=no fi -fi -if test "x$enable_dbus" = "xyes" ; then if $PYTHON -c "import sys; sys.exit(sys.version[[:3]] >= '2.4')" ; then AC_MSG_WARN([python version >= 2.4 required]) enable_dbus=no @@ -1484,14 +1482,13 @@ dnl Check for Python headers (currently useful only for libgnt) dnl (Thanks to XChat) -AC_PATH_PROG(pythonpath, python) -if test "_$pythonpath" != _ ; then +if test "x$enable_consoleui" = "xyes" -a ! -z "$PYTHON" -a x"$PYTHON" != x"no" ; then AC_MSG_CHECKING(for Python compile flags) - PY_PREFIX=`$pythonpath -c 'import sys ; print sys.prefix'` - PY_EXEC_PREFIX=`$pythonpath -c 'import sys ; print sys.exec_prefix'` + PY_PREFIX=`$PYTHON -c 'import sys ; print sys.prefix'` + PY_EXEC_PREFIX=`$PYTHON -c 'import sys ; print sys.exec_prefix'` changequote(<<, >>)dnl - PY_VERSION=`$pythonpath -c 'import sys ; print sys.version[0:3]'` - PY_MAJOR=`$pythonpath -c 'import sys ; print sys.version[0:2]'` + PY_VERSION=`$PYTHON -c 'import sys ; print sys.version[0:3]'` + PY_MAJOR=`$PYTHON -c 'import sys ; print sys.version[0:2]'` changequote([, ])dnl if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h -a "$PY_MAJOR" = "2."; then AC_MSG_RESULT()