This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] use python-config if available
- From: Matthias Klose <doko at ubuntu dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 20 Dec 2012 16:43:24 +0100
- Subject: Re: [patch] use python-config if available
- References: <50D331A6.5070102@ubuntu.com>
Am 20.12.2012 16:41, schrieb Matthias Klose:
> This patch does use the python-config, which comes shipped with the python
> interpreter, and falls back to the internal copy of python-config.py.
> AC_CHECK_TOOL is used to find a possible python-config for the host.
>
> Tested with 7.5 with a native and a cross build.
>
> Matthias
>
Index: b/gdb/configure.ac
===================================================================
--- a/gdb/configure.ac 2012-12-20 15:19:47.620663038 +0000
+++ b/gdb/configure.ac 2012-12-20 15:32:59.604669244 +0000
@@ -840,29 +840,31 @@
esac
esac
+ python_config=
if test "${python_prog}" != missing; then
+ AC_CHECK_TOOL(python_config,[${python_prog}-config],[${python_prog} ${srcdir}/python/python-config.py])
# 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`
+ python_includes=`${python_config} --includes`
if test $? != 0; then
have_python_config=failed
if test "${with_python}" != auto; then
- AC_ERROR(failure running python-config --includes)
+ AC_ERROR(failure running ${python-config} --includes)
fi
fi
- python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
+ python_libs=`${python_config} --ldflags`
if test $? != 0; then
have_python_config=failed
if test "${with_python}" != auto; then
- AC_ERROR(failure running python-config --ldflags)
+ AC_ERROR(failure running ${python-config} --ldflags)
fi
fi
- python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
+ python_prefix=`${python_config} --exec-prefix`
if test $? != 0; then
have_python_config=failed
if test "${with_python}" != auto; then
- AC_ERROR(failure running python-config --exec-prefix)
+ AC_ERROR(failure running ${python-config} --exec-prefix)
fi
fi
else