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.
This commit is contained in:
Peter Eisentraut 2001-03-03 15:53:41 +00:00
parent 7a2fdd9632
commit 23e41fb7fb
5 changed files with 484 additions and 422 deletions

View File

@ -15,20 +15,25 @@ elif test x"$1" = x"--help"; then
echo "$help"
exit 0
fi
sourcetree=$1
buildtree=${2:-'.'}
unset CDPATH
sourcetree=`cd $1 && pwd`
buildtree=`cd ${2:-'.'} && pwd`
for item in `find "$sourcetree" -type d \( -name CVS -prune -o -print \)`; do
subdir=`expr "$item" : "$sourcetree\(.*\)"`
if test ! -d "$buildtree/$subdir"; then
mkdir -p "$buildtree/$subdir" || exit
mkdir -p "$buildtree/$subdir" || exit 1
fi
done
for item in `find "$sourcetree" -name Makefile -o -name GNUmakefile`; do
subdir=`expr "$item" : "$sourcetree\(.*\)"`
if test ! -f "${item}.in"; then
ln -fs "$item" "$buildtree/$subdir" || exit
ln -fs "$item" "$buildtree/$subdir" || exit 1
fi
done
exit 0

858
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -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
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)
abs_top_srcdir=
AC_SUBST(abs_top_srcdir)
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(

View File

@ -1,5 +1,5 @@
# -*-makefile-*-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.120 2001/02/27 08:13:29 ishii Exp $
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.121 2001/03/03 15:53:41 petere Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
@ -33,9 +33,8 @@ VERSION = @VERSION@
# Support for VPATH builds
abs_top_srcdir = @abs_top_srcdir@
abs_top_builddir = @abs_top_builddir@
ifeq ($(abs_top_builddir), $(abs_top_srcdir))
ifndef abs_top_srcdir
top_srcdir = $(top_builddir)
srcdir = .
else

View File

@ -4,7 +4,6 @@ AROPT = cr
LD= $(AR)
LDREL= $(AROPT)
LDOUT=
LIBS= -lunix
LDFLAGS=
enable_shared = no