* configure: Rebuild.
authorTom Tromey <tromey@redhat.com>
Fri, 30 Jul 2010 15:59:41 +0000 (15:59 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 30 Jul 2010 15:59:41 +0000 (15:59 +0000)
* configure.ac: Add missing case for Python 2.7.

gdb/ChangeLog
gdb/configure
gdb/configure.ac

index 03909268d499caef2ab92ad2636f304ebf5eb1f3..2c2ab51b722805287e6494e834db1c7e7df6e735 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-30  Tom Tromey  <tromey@redhat.com>
+
+       * configure: Rebuild.
+       * configure.ac: Add missing case for Python 2.7.
+
 2010-07-29  DJ Delorie  <dj@redhat.com>
 
        * rx-tdep.c (rx_analyze_prologue): Don't require branches to have
index 35705e0a2a0d02df7a4b894a7002c01a2816affa..485c90490a6767dd0ec75599afc32c948e6e6271 100755 (executable)
@@ -10699,6 +10699,43 @@ $as_echo "${found_usable_python}" >&6; }
   elif test "${have_python_config}" != failed; then
     if test "${have_libpython}" = no; then
 
+  version=python2.7
+
+  new_CPPFLAGS=${python_includes}
+  new_LIBS="${python_libs} -lpython2.7"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5
+$as_echo_n "checking for ${version}... " >&6; }
+  save_CPPFLAGS=$CPPFLAGS
+  save_LIBS=$LIBS
+  CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
+  LIBS="$LIBS $new_LIBS"
+  found_usable_python=no
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include "${version}/Python.h"
+int
+main ()
+{
+Py_Initialize ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  have_libpython=${version}
+                  found_usable_python=yes
+else
+  CPPFLAGS=$save_CPPFLAGS
+                  LIBS=$save_LIBS
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
+$as_echo "${found_usable_python}" >&6; }
+
+    fi
+    if test "${have_libpython}" = no; then
+
   version=python2.6
 
   new_CPPFLAGS=${python_includes}
index 7067d266aa2da68b9630d5b426232394807562eb..9595daebef26d80ce4b46bdb84cf4f1eaf2c1800 100644 (file)
@@ -622,7 +622,7 @@ dnl no -   Don't include python support.
 dnl yes -  Include python support, error if it's missing.
 dnl        If we find python in $PATH, use it to fetch configure options,
 dnl        otherwise assume the compiler can find it with no help from us.
-dnl        Python 2.6, 2.5, and then 2.4 are tried in turn.
+dnl        Python 2.7, 2.6, 2.5, and then 2.4 are tried in turn.
 dnl auto - Same as "yes", but if python is missing from the system,
 dnl        fall back to "no".
 dnl /path/to/python/exec-prefix -
@@ -631,7 +631,7 @@ dnl        If /path/to/python/exec-prefix/bin/python exists, use it to find
 dnl        the compilation parameters.  Otherwise use
 dnl        -I/path/to/python/exec-prefix/include,
 dnl        -L/path/to/python/exec-prefix/lib.
-dnl        Python 2.6, 2.5, and then 2.4 are tried in turn.
+dnl        Python 2.7, 2.6, 2.5, and then 2.4 are tried in turn.
 dnl        NOTE: This case is historical.  It is what was done for 7.0/7.1
 dnl        but is deprecated.
 dnl /path/to/python/executable -
@@ -779,6 +779,10 @@ else
       ;;
     esac
   elif test "${have_python_config}" != failed; then
+    if test "${have_libpython}" = no; then
+      AC_TRY_LIBPYTHON(python2.7, have_libpython,
+                       ${python_includes}, "${python_libs} -lpython2.7")
+    fi
     if test "${have_libpython}" = no; then
       AC_TRY_LIBPYTHON(python2.6, have_libpython,
                        ${python_includes}, "${python_libs} -lpython2.6")