Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: gdb-patches@sourceware.org
Subject: GDB 7.4 --with-python doesn't like d:/foo/bar
Date: Thu, 26 Jan 2012 07:31:00 -0000	[thread overview]
Message-ID: <E1RqJbR-00068v-M2@fencepost.gnu.org> (raw)

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


             reply	other threads:[~2012-01-26  7:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-26  7:31 Eli Zaretskii [this message]
2012-01-27  5:34 ` Joel Brobecker
2012-01-27 10:02   ` Eli Zaretskii
2012-01-27 11:49     ` Joel Brobecker
2012-01-27 19:01       ` Doug Evans
2012-01-27 20:32         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1RqJbR-00068v-M2@fencepost.gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox