]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
(_AC_INIT_SRCDIR): Reject FOO if "cd FOO" and "ls FOO" talk about
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 31 Aug 2002 05:47:02 +0000 (05:47 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 31 Aug 2002 05:47:02 +0000 (05:47 +0000)
different directories; this catches problems when POSIX 1003.1-2001
"cd" fails due to symlink spaghetti.

lib/autoconf/general.m4

index 64672cfa8135151a84f16988c8f297c8e87bf81d..4c8f5337f5fe6d397ed50d653e6f405bd50ce12c 100644 (file)
@@ -537,6 +537,8 @@ if test ! -r $srcdir/$ac_unique_file; then
     AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $srcdir])
   fi
 fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+  AC_MSG_ERROR([sources are in $srcdir, but `cd $srcdir' does not work])
 dnl Double slashes in pathnames in object file debugging info
 dnl mess up M-x gdb in Emacs.
 srcdir=`echo "$srcdir" | sed 's%\([[^\\/]]\)[[\\/]]*$%\1%'`