aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure.ac
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2010-06-03 18:58:39 +0000
committerDoug Evans <dje@google.com>2010-06-03 18:58:39 +0000
commite7a30f46472b83892b352223e7288039be23c320 (patch)
treecc447b0966f4e4eff6e82cf8152d84f760093d53 /gdb/configure.ac
parent8fe2a3694db658edffb8013eb3ad31f7a9d7d7ea (diff)
downloadfsf-binutils-gdb-e7a30f46472b83892b352223e7288039be23c320.zip
fsf-binutils-gdb-e7a30f46472b83892b352223e7288039be23c320.tar.gz
fsf-binutils-gdb-e7a30f46472b83892b352223e7288039be23c320.tar.bz2
* configure.ac: Don't fail if python is unusable when
configured with --with-python=auto. * configure: Regenerate.
Diffstat (limited to 'gdb/configure.ac')
-rw-r--r--gdb/configure.ac25
1 files changed, 18 insertions, 7 deletions
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 16789b9..d65fd49 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -664,12 +664,12 @@ else
# Assume the python binary is ${with_python}/bin/python.
python_prog="${with_python}/bin/python"
python_prefix=
- if test ! -x ${python_prog}; then
+ if test ! -x "${python_prog}"; then
# Fall back to gdb 7.0/7.1 behaviour.
python_prog=missing
python_prefix=${with_python}
fi
- elif test -x ${with_python}; then
+ elif test -x "${with_python}"; then
# While we can't run python compiled for $host (unless host == build),
# the user could write a script that provides the needed information,
# so we support that.
@@ -716,19 +716,30 @@ else
esac
if test "${python_prog}" != missing; then
+ # We have a python program to use, but it may be too old.
+ # Don't flag an error for --with-python=auto (the default).
+ have_python_config=yes
python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
if test $? != 0; then
- AC_ERROR(failure running python-config --includes)
+ have_python_config=failed
+ if test "${with_python}" != auto; then
+ AC_ERROR(failure running python-config --includes)
+ fi
fi
python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
if test $? != 0; then
- AC_ERROR(failure running python-config --ldflags)
+ have_python_config=failed
+ if test "${with_python}" != auto; then
+ AC_ERROR(failure running python-config --ldflags)
+ fi
fi
python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
if test $? != 0; then
- AC_ERROR(failure running python-config --exec-prefix)
+ have_python_config=failed
+ if test "${with_python}" != auto; then
+ AC_ERROR(failure running python-config --exec-prefix)
+ fi
fi
- have_python_config=yes
else
# Fall back to gdb 7.0/7.1 behaviour.
if test -z ${python_prefix}; then
@@ -767,7 +778,7 @@ else
AC_MSG_ERROR([unable to determine python version from ${python_libs}])
;;
esac
- else
+ elif test "${have_python_config}" != failed; then
if test "${have_libpython}" = no; then
AC_TRY_LIBPYTHON(python2.6, have_libpython,
${python_includes}, "${python_libs} -lpython2.6")