From: Tom Tromey Date: Sun, 23 Feb 1997 07:19:32 +0000 (+0000) Subject: bug fix X-Git-Tag: Release-1-1m~28 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=02d42b0b4930498f7d9679714d6c3817e5a8113f;p=automake.git bug fix --- diff --git a/ChangeLog b/ChangeLog index 0d467cc8..05fc88f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Feb 23 00:10:36 1997 Tom Tromey + + * m4/sanity.m4: Pass -L to ls if possible. + Sat Feb 22 15:22:31 1997 Tom Tromey * dist-vars.am (DISTFILES): Don't distribute MANS. diff --git a/m4/sanity.m4 b/m4/sanity.m4 index 65ca9999..df1c0540 100644 --- a/m4/sanity.m4 +++ b/m4/sanity.m4 @@ -5,9 +5,19 @@ AC_DEFUN(AM_SANITY_CHECK, [AC_MSG_CHECKING([whether build environment is sane]) echo timestamp > conftestfile -# Do this in a subshell so we don't clobber the current shell's -# arguments. FIXME: maybe try `-L' hack like GETLOADAVG test? -if (set X `ls -t $srcdir/configure conftestfile`; test "[$]2" = conftestfile) +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + if test "$@" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + test "[$]2" = conftestfile + ) then # Ok. :