GDB 7.4 --with-python doesn't like d:/foo/bar
Eli Zaretskii
eliz@gnu.org
Thu Jan 26 07:31:00 GMT 2012
GDB 7.4 cannot be configured using --with-python-d:/foo/bar on
MS-Windows. The gdb/configure script aborts with an error message:
checking whether to use python... d:/usr/python26
configure: error: invalid value for --with-python
The culprit is this snippet from gdb/configure.ac:
if test "${with_python}" = no; then
AC_MSG_WARN([python support disabled; some features may be unavailable.])
have_libpython=no
else
case "${with_python}" in
/*) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
if test -d ${with_python}; then
# Assume the python binary is ${with_python}/bin/python.
python_prog="${with_python}/bin/python"
python_prefix=
# If python does not exit ${with_python}/bin, then try in
# ${with_python}. On Windows/MinGW, this is where the Python
# executable is.
if test ! -x "${python_prog}"; then
python_prog="${with_python}/python"
python_prefix=
fi
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
# 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.
python_prog=${with_python}
python_prefix=
else
AC_ERROR(invalid value for --with-python)
fi
;;
As can be clearly seen, it only accepts absolute file names that begin
with a forward slash.
I don't have Autoconf installed on the Windows/MinGW machine where I
did this (thus no patch), so I manually edited gdb/configure to
replace the line marked above with
[\\/]* | [A-Za-z]:[\\/]*)
Then the configure and build steps ran successfully to completion.
Since (AFAIK) [] is a quote sequence in Autoconf, could someone please
make the appropriate change in configure.ac to fix this?
TIA
More information about the Gdb-patches
mailing list