When testing for source and build tree equality, and test -ef doesn't work,
fall back to `cd $srcdir && /bin/pwd` = `/bin/pwd`. One of these ought to work, and if not, prep_buildtree is harmless.
This commit is contained in:
parent
7505e5d0cd
commit
ef5602d72c
16
configure
vendored
16
configure
vendored
@ -8581,25 +8581,21 @@ done
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check whether 'test -ef' works
|
|
||||||
if (test "$srcdir" -ef "$srcdir") >/dev/null 2>&1 ; then
|
|
||||||
test_ef_works=yes
|
|
||||||
else
|
|
||||||
test_ef_works=no
|
|
||||||
fi
|
|
||||||
|
|
||||||
abs_top_srcdir=
|
abs_top_srcdir=
|
||||||
|
|
||||||
|
|
||||||
if test "$test_ef_works" = yes ; then
|
|
||||||
# prepare build tree if outside source tree
|
# prepare build tree if outside source tree
|
||||||
if test "$srcdir" -ef . ; then : ; else
|
# Note 1: test -ef might not exist, but it's more reliable than `pwd`.
|
||||||
|
# Note 2: /bin/pwd might be better than shell's built-in at getting
|
||||||
|
# a symlink-free name.
|
||||||
|
if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
|
||||||
|
:
|
||||||
|
else
|
||||||
abs_top_srcdir=`cd $srcdir && pwd`
|
abs_top_srcdir=`cd $srcdir && pwd`
|
||||||
echo $ac_n "preparing build tree... $ac_c" 1>&6
|
echo $ac_n "preparing build tree... $ac_c" 1>&6
|
||||||
/bin/sh "$srcdir/config/prep_buildtree" "$abs_top_srcdir" "." \
|
/bin/sh "$srcdir/config/prep_buildtree" "$abs_top_srcdir" "." \
|
||||||
|| { echo "configure: error: failed" 1>&2; exit 1; }
|
|| { echo "configure: error: failed" 1>&2; exit 1; }
|
||||||
echo "$ac_t""done" 1>&6
|
echo "$ac_t""done" 1>&6
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trap '' 1 2 15
|
trap '' 1 2 15
|
||||||
|
16
configure.in
16
configure.in
@ -1219,25 +1219,21 @@ if test -n "$NSGMLS"; then
|
|||||||
AC_CHECK_PROGS(SGMLSPL, sgmlspl)
|
AC_CHECK_PROGS(SGMLSPL, sgmlspl)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check whether 'test -ef' works
|
|
||||||
if (test "$srcdir" -ef "$srcdir") >/dev/null 2>&1 ; then
|
|
||||||
test_ef_works=yes
|
|
||||||
else
|
|
||||||
test_ef_works=no
|
|
||||||
fi
|
|
||||||
|
|
||||||
abs_top_srcdir=
|
abs_top_srcdir=
|
||||||
AC_SUBST(abs_top_srcdir)
|
AC_SUBST(abs_top_srcdir)
|
||||||
|
|
||||||
if test "$test_ef_works" = yes ; then
|
|
||||||
# prepare build tree if outside source tree
|
# prepare build tree if outside source tree
|
||||||
if test "$srcdir" -ef . ; then : ; else
|
# Note 1: test -ef might not exist, but it's more reliable than `pwd`.
|
||||||
|
# Note 2: /bin/pwd might be better than shell's built-in at getting
|
||||||
|
# a symlink-free name.
|
||||||
|
if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
|
||||||
|
:
|
||||||
|
else
|
||||||
abs_top_srcdir=`cd $srcdir && pwd`
|
abs_top_srcdir=`cd $srcdir && pwd`
|
||||||
echo $ac_n "preparing build tree... $ac_c" 1>&6
|
echo $ac_n "preparing build tree... $ac_c" 1>&6
|
||||||
/bin/sh "$srcdir/config/prep_buildtree" "$abs_top_srcdir" "." \
|
/bin/sh "$srcdir/config/prep_buildtree" "$abs_top_srcdir" "." \
|
||||||
|| AC_MSG_ERROR(failed)
|
|| AC_MSG_ERROR(failed)
|
||||||
AC_MSG_RESULT(done)
|
AC_MSG_RESULT(done)
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_OUTPUT(
|
AC_OUTPUT(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user