From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22612 invoked by alias); 27 Jan 2012 05:25:43 -0000 Received: (qmail 22598 invoked by uid 22791); 27 Jan 2012 05:25:40 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 27 Jan 2012 05:25:27 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 019E92BB2A3; Fri, 27 Jan 2012 00:25:27 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id zTwWqqkainhs; Fri, 27 Jan 2012 00:25:26 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 6BF082BB114; Fri, 27 Jan 2012 00:25:25 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 3ECB0145615; Fri, 27 Jan 2012 09:25:15 +0400 (RET) Date: Fri, 27 Jan 2012 05:34:00 -0000 From: Joel Brobecker To: dje@google.com Cc: gdb-patches@sourceware.org, eliz@gnu.org Subject: Re: GDB 7.4 --with-python doesn't like d:/foo/bar Message-ID: <20120127052515.GW31383@adacore.com> References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="3Gf/FFewwPeBMqCJ" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00935.txt.bz2 --3Gf/FFewwPeBMqCJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1809 Hi Doug, > 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. [...] > 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? I can make the change for Eli sometime this weekend. Would it be OK with you? To me, the change would not be completely correct on Unix hosts, but I think that the chances of someone calling a local directory a single-letter followed by a colon are very small. So I think it's OK. I changed the expressions a bit replacing "[\\/]*" back into just "/" as originally used. Eli, would that still work for you? gdb/ChangeLog: * configure.ac (--with-python): Directory names starting with a letter followed by a colon are treated as non-relative. Not tested yet (that part will have to wait for the weekend). -- Joel --3Gf/FFewwPeBMqCJ Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="config-python-windows.diff" Content-length: 413 diff --git a/gdb/configure.ac b/gdb/configure.ac index 6f9a42c..2154574 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -734,7 +734,7 @@ if test "${with_python}" = no; then have_libpython=no else case "${with_python}" in - /*) + /* | [A-Za-z]:/* ) if test -d ${with_python}; then # Assume the python binary is ${with_python}/bin/python. python_prog="${with_python}/bin/python" --3Gf/FFewwPeBMqCJ--