From: Tim Van Holder Date: Wed, 18 Apr 2001 16:49:11 +0000 (+0000) Subject: * acgeneral.m4: (_AC_INIT_SRCDIR) Handle backslashes (DOS paths) for $ac_confdir... X-Git-Tag: autoconf-2.50~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=faee7113d85a8f8db85e74bcaee66b0d9d4f47e3;p=thirdparty%2Fautoconf.git * acgeneral.m4: (_AC_INIT_SRCDIR) Handle backslashes (DOS paths) for $ac_confdir and $srcdir. --- diff --git a/acgeneral.m4 b/acgeneral.m4 index 318b2ddb3..c053325d2 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -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 diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 318b2ddb3..c053325d2 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -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