]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acgeneral.m4: (_AC_INIT_SRCDIR) Handle backslashes (DOS paths) for $ac_confdir...
authorTim Van Holder <tim.van.holder@pandora.be>
Wed, 18 Apr 2001 16:49:11 +0000 (16:49 +0000)
committerTim Van Holder <tim.van.holder@pandora.be>
Wed, 18 Apr 2001 16:49:11 +0000 (16:49 +0000)
acgeneral.m4
lib/autoconf/general.m4

index 318b2ddb37f0bb95b72f5517646321f601dc893e..c053325d25fdeb289530122403e310bd35f746af 100644 (file)
@@ -773,7 +773,8 @@ if test -z "$srcdir"; then
   ac_srcdir_defaulted=yes
   # Try the directory containing this script, then its parent.
   ac_prog=$[0]
-  ac_confdir=`echo "$ac_prog" | sed 's%/[[^/][^/]]*$%%'`
+dnl FIXME: should use AS_DIRNAME here once it is made DOS-friendly.
+  ac_confdir=`echo "$ac_prog" | sed 's%[[\\/][^\\/][^\\/]]*$%%'`
   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
   srcdir=$ac_confdir
   if test ! -r $srcdir/$ac_unique_file; then
@@ -791,7 +792,7 @@ if test ! -r $srcdir/$ac_unique_file; then
 fi
 dnl Double slashes in pathnames in object file debugging info
 dnl mess up M-x gdb in Emacs.
-srcdir=`echo "$srcdir" | sed 's%\([[^/]]\)/*$%\1%'`
+srcdir=`echo "$srcdir" | sed 's%\([[^\\/]]\)[[\\/]]*$%\1%'`
 m4_divert_pop([PARSE_ARGS])dnl
 ])# _AC_INIT_SRCDIR
 
index 318b2ddb37f0bb95b72f5517646321f601dc893e..c053325d25fdeb289530122403e310bd35f746af 100644 (file)
@@ -773,7 +773,8 @@ if test -z "$srcdir"; then
   ac_srcdir_defaulted=yes
   # Try the directory containing this script, then its parent.
   ac_prog=$[0]
-  ac_confdir=`echo "$ac_prog" | sed 's%/[[^/][^/]]*$%%'`
+dnl FIXME: should use AS_DIRNAME here once it is made DOS-friendly.
+  ac_confdir=`echo "$ac_prog" | sed 's%[[\\/][^\\/][^\\/]]*$%%'`
   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
   srcdir=$ac_confdir
   if test ! -r $srcdir/$ac_unique_file; then
@@ -791,7 +792,7 @@ if test ! -r $srcdir/$ac_unique_file; then
 fi
 dnl Double slashes in pathnames in object file debugging info
 dnl mess up M-x gdb in Emacs.
-srcdir=`echo "$srcdir" | sed 's%\([[^/]]\)/*$%\1%'`
+srcdir=`echo "$srcdir" | sed 's%\([[^\\/]]\)[[\\/]]*$%\1%'`
 m4_divert_pop([PARSE_ARGS])dnl
 ])# _AC_INIT_SRCDIR