File tree 2 files changed +12
-20
lines changed
2 files changed +12
-20
lines changed Original file line number Diff line number Diff line change @@ -8581,25 +8581,21 @@ done
8581
8581
8582
8582
fi
8583
8583
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
-
8591
8584
abs_top_srcdir=
8592
8585
8593
8586
8594
- if test " $test_ef_works " = yes ; then
8595
8587
# 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
8597
8594
abs_top_srcdir=` cd $srcdir && pwd`
8598
8595
echo $ac_n " preparing build tree... $ac_c " 1>&6
8599
8596
/bin/sh " $srcdir /config/prep_buildtree" " $abs_top_srcdir " " ." \
8600
8597
|| { echo " configure: error: failed" 1>&2 ; exit 1; }
8601
8598
echo " $ac_t " " done" 1>&6
8602
- fi
8603
8599
fi
8604
8600
8605
8601
trap ' ' 1 2 15
Original file line number Diff line number Diff line change @@ -1219,25 +1219,21 @@ if test -n "$NSGMLS"; then
1219
1219
AC_CHECK_PROGS(SGMLSPL, sgmlspl)
1220
1220
fi
1221
1221
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
-
1229
1222
abs_top_srcdir=
1230
1223
AC_SUBST(abs_top_srcdir)
1231
1224
1232
- if test "$test_ef_works" = yes ; then
1233
1225
# 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
1235
1232
abs_top_srcdir=`cd $srcdir && pwd`
1236
1233
echo $ac_n "preparing build tree... $ac_c" 1>&6
1237
1234
/bin/sh "$srcdir/config/prep_buildtree" "$abs_top_srcdir" "." \
1238
1235
|| AC_MSG_ERROR(failed)
1239
1236
AC_MSG_RESULT(done)
1240
- fi
1241
1237
fi
1242
1238
1243
1239
AC_OUTPUT(
You can’t perform that action at this time.
0 commit comments