Re: GDB 7.4 --with-python doesn't like d:/foo/bar

Doug Evans
2012-01-27T18:27:19Z

On Fri, Jan 27, 2012 at 2:28 AM, Joel Brobecker <brobecker@adacore.com> wrote:
>> This is a standard way of Autoconf's catering to DOS and Windows
>> platforms.  You can see it at work elsewhere in the configure script,
>> because it's part of AC_PROG_PATH.  In fact, you can find it just a
>> few lines below the test that failed.
>
> You're right. I wasn't thinking clearly in the morning. For some
> reason, I was seeing both expressions as equivalent, when clearly
> they are not! So your proposed change is on the table instead.

Hi.
I copied over the same test that autoconf uses and committed that.
[ref: autoconf 2.64, programs.m4, _AC_PATH_PROG]
Tested with an absolute path on amd64-linux.

2012-01-27 Doug Evans <dje@google.com>

* configure.ac (with_python): Fix absolute path handling for win32.
* configure: Regenerate.

Index: configure
===================================================================
RCS file: /cvs/src/src/gdb/configure,v
retrieving revision 1.341
diff -u -p -r1.341 configure
--- configure 20 Jan 2012 09:47:32 -0000 1.341
+++ configure 27 Jan 2012 18:20:21 -0000
@@ -10814,7 +10814,7 @@ $as_echo "$as_me: WARNING: python suppor
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"
Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/configure.ac,v
retrieving revision 1.156
diff -u -p -r1.156 configure.ac
--- configure.ac 20 Jan 2012 09:47:32 -0000 1.156
+++ configure.ac 27 Jan 2012 18:20:21 -0000
@@ -734,7 +734,7 @@ if test "${with_python}" = no; then
have_libpython=no
else
case "${with_python}" in
- /*)
+ [[\\/]]* | ?:[[\\/]]*)