summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorPeter Eisentraut2001-09-10 23:52:04 +0000
committerPeter Eisentraut2001-09-10 23:52:04 +0000
commitef5602d72c10a17997df62b531b774686433cbcc (patch)
tree1a9d32292f0902ddadb021f38cb45ca4c28c8468 /configure
parent7505e5d0cdd93a987b0318c379636febdd61c7fb (diff)
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.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 6 insertions, 10 deletions
diff --git a/configure b/configure
index 60a07b0095d..cfdd4126556 100755
--- a/configure
+++ b/configure
@@ -8581,25 +8581,21 @@ done
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=
-if test "$test_ef_works" = yes ; then
# 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`
echo $ac_n "preparing build tree... $ac_c" 1>&6
/bin/sh "$srcdir/config/prep_buildtree" "$abs_top_srcdir" "." \
|| { echo "configure: error: failed" 1>&2; exit 1; }
echo "$ac_t""done" 1>&6
- fi
fi
trap '' 1 2 15