diff options
| author | Peter Eisentraut | 2001-03-03 15:53:41 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2001-03-03 15:53:41 +0000 |
| commit | 23e41fb7fbce0ef6ddcba3caafbde772ede62af6 (patch) | |
| tree | c0f9029f4caf339cc31b038388d8adc41c613d1d /configure.in | |
| parent | 7a2fdd96329571dc65f2d4cba8a9b441c2f202fd (diff) | |
Add configure check for -lunix, for QNX.
Recode test for equality of source and build directory using 'test -ef',
because even using pwd you might not get equal strings. Thanks, QNX.
Diffstat (limited to 'configure.in')
| -rw-r--r-- | configure.in | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/configure.in b/configure.in index 8ce2eacde24..d9511ffdc2f 100644 --- a/configure.in +++ b/configure.in @@ -33,10 +33,6 @@ AC_SUBST(VERSION) AC_DEFINE_UNQUOTED(PG_VERSION, "$VERSION") unset CDPATH -abs_top_srcdir=`cd $srcdir && pwd` -AC_SUBST(abs_top_srcdir) -abs_top_builddir=`pwd` -AC_SUBST(abs_top_builddir) AC_CANONICAL_HOST AC_SUBST(host) @@ -688,6 +684,7 @@ AC_CHECK_LIB(BSD, main) AC_CHECK_LIB(gen, main) AC_CHECK_LIB(PW, main) AC_CHECK_LIB(resolv, main) +AC_CHECK_LIB([[unix]], main) AC_SEARCH_LIBS(crypt, crypt) AC_CHECK_LIB(bind, __inet_ntoa) dnl only consider libz to be present if we find <zlib.h> as well @@ -1140,13 +1137,25 @@ if test -n "$NSGMLS"; then fi -# Finally ready to produce output files ... +# 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= +AC_SUBST(abs_top_srcdir) -if test x"$abs_top_srcdir" != x"$abs_top_builddir"; then - echo $ac_n "preparing build tree... $ac_c" 1>&6 - /bin/sh "$srcdir/config/prep_buildtree" "$abs_top_srcdir" "$abs_top_builddir" \ - || AC_MSG_ERROR(failed) - AC_MSG_RESULT(done) +if test "$test_ef_works" = yes ; then +# prepare build tree if outside source tree + if test "$srcdir" -ef . ; 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" "." \ + || AC_MSG_ERROR(failed) + AC_MSG_RESULT(done) + fi fi AC_OUTPUT( |
