This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix builds configured with an absolute source path (/path/to/src/configure)


Sérgio noticed that builds configured with an absolute source path (/path/to/src/configure)
are broken due to an ACX_CONFIGURE_DIR buglet.

 /bin/sh: ..//path/to/src/gdb/gnulib/configure: No such file or directory

This fixes it.  Applied.

2012-04-20  Pedro Alves  <palves@redhat.com>

	gdb/
	* acx_configure_dir.m4 (ACX_CONFIGURE_DIR): Handle absolute
	$srcdir.
	* configure: Regenerate.

	gdb/gdbserver/
	* configure: Regenerate.
---
 gdb/acx_configure_dir.m4 |    7 ++++++-
 gdb/configure            |    7 ++++++-
 gdb/gdbserver/configure  |    7 ++++++-
 3 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/gdb/acx_configure_dir.m4 b/gdb/acx_configure_dir.m4
index 57a64a6..e431875 100644
--- a/gdb/acx_configure_dir.m4
+++ b/gdb/acx_configure_dir.m4
@@ -89,7 +89,12 @@ AC_DEFUN([ACX_CONFIGURE_DIR],
   _AS_ECHO([$ac_msg])
   AS_MKDIR_P(["$ac_dir"])
 
-  ac_srcdir=../$srcdir/$in_src
+  case $srcdir in
+  [[\\/]]* | ?:[[\\/]]* )
+    ac_srcdir=$srcdir/$in_src ;;
+  *) # Relative name.
+    ac_srcdir=../$srcdir/$in_src ;;
+  esac
 
   cd "$ac_dir"
 
diff --git a/gdb/configure b/gdb/configure
index dd1c80a..54c2399 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -4648,7 +4648,12 @@ fi
   $as_echo "$ac_msg" >&6
   as_dir="$ac_dir"; as_fn_mkdir_p
 
-  ac_srcdir=../$srcdir/$in_src
+  case $srcdir in
+  [\\/]* | ?:[\\/]* )
+    ac_srcdir=$srcdir/$in_src ;;
+  *) # Relative name.
+    ac_srcdir=../$srcdir/$in_src ;;
+  esac
 
   cd "$ac_dir"
 
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 5ab1885..63e25c2 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -4391,7 +4391,12 @@ done
   $as_echo "$ac_msg" >&6
   as_dir="$ac_dir"; as_fn_mkdir_p
 
-  ac_srcdir=../$srcdir/$in_src
+  case $srcdir in
+  [\\/]* | ?:[\\/]* )
+    ac_srcdir=$srcdir/$in_src ;;
+  *) # Relative name.
+    ac_srcdir=../$srcdir/$in_src ;;
+  esac
 
   cd "$ac_dir"
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]