Commit 23e41fb7 authored by Peter Eisentraut's avatar Peter Eisentraut

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.
parent 7a2fdd96
...@@ -15,20 +15,25 @@ elif test x"$1" = x"--help"; then ...@@ -15,20 +15,25 @@ elif test x"$1" = x"--help"; then
echo "$help" echo "$help"
exit 0 exit 0
fi 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 for item in `find "$sourcetree" -type d \( -name CVS -prune -o -print \)`; do
subdir=`expr "$item" : "$sourcetree\(.*\)"` subdir=`expr "$item" : "$sourcetree\(.*\)"`
if test ! -d "$buildtree/$subdir"; then if test ! -d "$buildtree/$subdir"; then
mkdir -p "$buildtree/$subdir" || exit mkdir -p "$buildtree/$subdir" || exit 1
fi fi
done done
for item in `find "$sourcetree" -name Makefile -o -name GNUmakefile`; do for item in `find "$sourcetree" -name Makefile -o -name GNUmakefile`; do
subdir=`expr "$item" : "$sourcetree\(.*\)"` subdir=`expr "$item" : "$sourcetree\(.*\)"`
if test ! -f "${item}.in"; then if test ! -f "${item}.in"; then
ln -fs "$item" "$buildtree/$subdir" || exit ln -fs "$item" "$buildtree/$subdir" || exit 1
fi fi
done done
exit 0
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -33,10 +33,6 @@ AC_SUBST(VERSION) ...@@ -33,10 +33,6 @@ AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(PG_VERSION, "$VERSION") AC_DEFINE_UNQUOTED(PG_VERSION, "$VERSION")
unset CDPATH 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_CANONICAL_HOST
AC_SUBST(host) AC_SUBST(host)
...@@ -688,6 +684,7 @@ AC_CHECK_LIB(BSD, main) ...@@ -688,6 +684,7 @@ AC_CHECK_LIB(BSD, main)
AC_CHECK_LIB(gen, main) AC_CHECK_LIB(gen, main)
AC_CHECK_LIB(PW, main) AC_CHECK_LIB(PW, main)
AC_CHECK_LIB(resolv, main) AC_CHECK_LIB(resolv, main)
AC_CHECK_LIB([[unix]], main)
AC_SEARCH_LIBS(crypt, crypt) AC_SEARCH_LIBS(crypt, crypt)
AC_CHECK_LIB(bind, __inet_ntoa) AC_CHECK_LIB(bind, __inet_ntoa)
dnl only consider libz to be present if we find <zlib.h> as well dnl only consider libz to be present if we find <zlib.h> as well
...@@ -1140,13 +1137,25 @@ if test -n "$NSGMLS"; then ...@@ -1140,13 +1137,25 @@ if test -n "$NSGMLS"; then
fi 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 if test "$test_ef_works" = yes ; then
echo $ac_n "preparing build tree... $ac_c" 1>&6 # prepare build tree if outside source tree
/bin/sh "$srcdir/config/prep_buildtree" "$abs_top_srcdir" "$abs_top_builddir" \ if test "$srcdir" -ef . ; then : ; else
|| AC_MSG_ERROR(failed) abs_top_srcdir=`cd $srcdir && pwd`
AC_MSG_RESULT(done) 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 fi
AC_OUTPUT( AC_OUTPUT(
......
# -*-makefile-*- # -*-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, # All PostgreSQL makefiles include this file and use the variables it sets,
...@@ -33,9 +33,8 @@ VERSION = @VERSION@ ...@@ -33,9 +33,8 @@ VERSION = @VERSION@
# Support for VPATH builds # Support for VPATH builds
abs_top_srcdir = @abs_top_srcdir@ 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) top_srcdir = $(top_builddir)
srcdir = . srcdir = .
else else
......
...@@ -4,7 +4,6 @@ AROPT = cr ...@@ -4,7 +4,6 @@ AROPT = cr
LD= $(AR) LD= $(AR)
LDREL= $(AROPT) LDREL= $(AROPT)
LDOUT= LDOUT=
LIBS= -lunix
LDFLAGS= LDFLAGS=
enable_shared = no enable_shared = no
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment