File tree Expand file tree Collapse file tree 2 files changed +12
-20
lines changed Expand file tree Collapse file tree 2 files changed +12
-20
lines changed Original file line number Diff line number Diff line change @@ -8581,25 +8581,21 @@ done
85818581
85828582fi
85838583
8584- # check whether 'test -ef' works
8585- if (test " $srcdir " -ef " $srcdir " ) > /dev/null 2>&1 ; then
8586- test_ef_works=yes
8587- else
8588- test_ef_works=no
8589- fi
8590-
85918584abs_top_srcdir=
85928585
85938586
8594- if test " $test_ef_works " = yes ; then
85958587# prepare build tree if outside source tree
8596- if test " $srcdir " -ef . ; then : ; else
8588+ # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
8589+ # Note 2: /bin/pwd might be better than shell's built-in at getting
8590+ # a symlink-free name.
8591+ if ( test " $srcdir " -ef . ) > /dev/null 2>&1 || test " ` cd $srcdir && /bin/pwd` " = " ` /bin/pwd` " ; then
8592+ :
8593+ else
85978594 abs_top_srcdir=` cd $srcdir && pwd`
85988595 echo $ac_n " preparing build tree... $ac_c " 1>&6
85998596 /bin/sh " $srcdir /config/prep_buildtree" " $abs_top_srcdir " " ." \
86008597 || { echo " configure: error: failed" 1>&2 ; exit 1; }
86018598 echo " $ac_t " " done" 1>&6
8602- fi
86038599fi
86048600
86058601trap ' ' 1 2 15
Original file line number Diff line number Diff line change @@ -1219,25 +1219,21 @@ if test -n "$NSGMLS"; then
12191219 AC_CHECK_PROGS(SGMLSPL, sgmlspl)
12201220fi
12211221
1222- # check whether 'test -ef' works
1223- if (test "$srcdir" -ef "$srcdir") >/dev/null 2>&1 ; then
1224- test_ef_works=yes
1225- else
1226- test_ef_works=no
1227- fi
1228-
12291222abs_top_srcdir=
12301223AC_SUBST(abs_top_srcdir)
12311224
1232- if test "$test_ef_works" = yes ; then
12331225# prepare build tree if outside source tree
1234- if test "$srcdir" -ef . ; then : ; else
1226+ # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
1227+ # Note 2: /bin/pwd might be better than shell's built-in at getting
1228+ # a symlink-free name.
1229+ if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
1230+ :
1231+ else
12351232 abs_top_srcdir=`cd $srcdir && pwd`
12361233 echo $ac_n "preparing build tree... $ac_c" 1>&6
12371234 /bin/sh "$srcdir/config/prep_buildtree" "$abs_top_srcdir" "." \
12381235 || AC_MSG_ERROR(failed)
12391236 AC_MSG_RESULT(done)
1240- fi
12411237fi
12421238
12431239AC_OUTPUT(
You can’t perform that action at this time.
0 commit comments