From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7276 invoked by alias); 26 Jan 2012 07:18:55 -0000 Received: (qmail 7265 invoked by uid 22791); 26 Jan 2012 07:18:52 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 26 Jan 2012 07:18:38 +0000 Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RqJbR-00068v-M2 for gdb-patches@sourceware.org; Thu, 26 Jan 2012 02:18:37 -0500 Date: Thu, 26 Jan 2012 07:31:00 -0000 Message-Id: From: Eli Zaretskii To: gdb-patches@sourceware.org Subject: GDB 7.4 --with-python doesn't like d:/foo/bar Reply-to: Eli Zaretskii X-IsSubscribed: yes 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/msg00889.txt.bz2 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