* acgeneral.m4: (_AC_INIT_SRCDIR) Handle backslashes (DOS paths) for $ac_confdir and $srcdir.

This commit is contained in:
Tim Van Holder 2001-04-18 16:49:11 +00:00
parent ca6e40c20d
commit faee7113d8
2 changed files with 6 additions and 4 deletions

View 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

View 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