Auto-sense lib{readline,history,curses,termcap}

Autoconf bin/psql/Makefile
This commit is contained in:
Marc G. Fournier 1997-01-24 02:35:31 +00:00
parent cb31156b86
commit 18d245cda4
3 changed files with 286 additions and 184 deletions

View File

@ -7,31 +7,31 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.2 1997/01/23 23:48:08 scrappy Exp $
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.3 1997/01/24 02:35:31 scrappy Exp $
#
# NOTES
# Essentially all Postgres make files include this file and use the
# variables it sets.
# Essentially all Postgres make files include this file and use the
# variables it sets.
#
# To override the default setting, create a Makefile.custom in this
# directory and put your defines there. (Makefile.custom is included
# near the end of this file). Sometimes, a variable gets set in
# Makefile.global after Makefile.custom has been included, so you can't
# simply set that variable in Makefile.custom. In those cases, there is
# often another variable (like CUSTOM_COPT) that you can set in
# often another variable (like CUSTOM_COPT) that you can set in
# Makefile.custom that influences the later setting of the true variable
# of interest (like CFLAGS) by Makefile.global.
#
#
# If you change any of these defines you probably have to
# If you change any of these defines you probably have to
# make clean; make
# since no dependencies are created for these. (of course you can
# since no dependencies are created for these. (of course you can
# be crafty and check what files really depend on them and just remake
# those).
#
# Before including this file, you must set the SRCDIR variable to the
# path of the top of the Postgres source tree (the directory that
# contains this file).
#
# Before including this file, you must set the SRCDIR variable to the
# path of the top of the Postgres source tree (the directory that
# contains this file).
#
#-------------------------------------------------------------------------
@ -52,7 +52,7 @@
# dgux DG/UX 5.4R3.10
# hpux HP PA-RISC on HP-UX 9.0
# i386_solaris i386 Solaris
# irix5 SGI MIPS on IRIX 5.3
# irix5 SGI MIPS on IRIX 5.3 or better
# linux Intel x86 on Linux 1.2 and Linux ELF
# (For non-ELF Linux, see LINUX_ELF below).
# nextstep Motorola MC68K or Intel x86 on NeXTSTEP 3.2 or greater
@ -71,7 +71,7 @@ PORTNAME= UNDEFINED
# Ignore LINUX_ELF if you're not using Linux. But if you are, and you're
# compiling to a.out (which means you're using the dld dynamic loading
# library), set LINUX_ELF to null in Makefile.custom.
LINUX_ELF= 1
LINUX_ELF= true
LIBPQDIR:= $(SRCDIR)/libpq
@ -98,7 +98,7 @@ LIBDIR= $(POSTGRESDIR)/lib
# This is the directory where IPC utilities ipcs and ipcrm are located
#
IPCS=@ipcs@
IPCRM=@ipcrm@
IPCRM=@ipcrm@
# Where the man pages (suitable for use with "man") get installed.
POSTMANDIR= $(POSTGRESDIR)/man
@ -147,29 +147,6 @@ ENFORCE_ALIGNMENT= true
# Comment out PROFILE to generate a profile version of the binaries
#PROFILE= -p -non_shared
# About the use of readline in psql:
# psql does not require the GNU readline and history libraries. Hence, we
# do not compile with them by default. However, there are hooks in the
# program which supports the use of GNU readline and history. Should you
# decide to use them, change USE_READLINE to true and change READLINE_INCDIR
# and READLINE_LIBDIR to reflect the location of the readline and history
# headers and libraries.
#
@USE_READLINE@
# directories for the readline and history libraries.
#READLINE_INC= -I/home/tools/include
#READLINE_LIB= -L/home/tools/lib -lreadline
# use the following if your readline has a separate history lib
#HISTORY_INC= -I/home/tools/include -I/home/tools/include/readline
#HISTORY_LIB= -L/home/tools/lib -lhistory
# curses is required by readline. Ncurses has obsoleted curses, and may
# in fact be what goes by the name "curses" on this system.
CURSES_LIB= -L/home/tools/lib -lcurses
# If you plan to use Kerberos for authentication...
#
# Comment out KRBVERS if you do not use Kerberos.
@ -253,7 +230,7 @@ INSTL_LIB_OPTS= @INSTL_LIB_OPTS@
# you do echo "no newline after this\c".
DASH_N= @DASH_N@
BACKSLASH_C= @BACKSLASH_C@
BACKSLASH_C= @BACKSLASH_C@
##############################################################################
@ -296,7 +273,6 @@ endif
# Shared libraries.
# This is overridden for many PORTNAMEs below.
# NAT: autoconf needs to know about DLSUFFIX
DLSUFFIX= .so
#
@ -310,8 +286,15 @@ CC= @CC@
LEX= @LEX@
LD_ADD_BE = @LEXLIB@
# SHARED LIBRARIES
#
#----------------------------------------------------------------------
ifeq ($(PORTNAME), BSD44_derived)
# cc is gcc, but never mind about that...
INSTALL= /usr/bin/install
RANLIB= /usr/bin/ranlib
# FreeBSD 2.1R with new Flex v2.5.2 in /usr/local
CFLAGS_SL= -fpic -DPIC
%.so: %.o
@ -328,16 +311,14 @@ endif
#--------------------------------------------------------------------------
ifeq ($(PORTNAME), aix)
# might want to try installbsd instead
INSTALL= /usr/ucb/install
# the -lm is because "pow" is defined in libbsd.a and we want pow(3m)
# NAT: autoconf should look to see whether libbsd has the functions
# NAT: we need from it, and if so include it. Similarly -lm. -ll is
# NAT: for lex. -lld is the shared library stuff that needs attention.
LDADD_BE= -lm -lbsd -ll -lld
# MAKE_EXPORTS is required for svr4 loaders that want a file of
# symbol names to tell them what to export/import.
# NAT: is there any harm in always defining this? Does it have meaning
# NAT: in BSD systems? How do I write an autoconf test for this?
MAKE_EXPORTS= true
#
@ -348,22 +329,25 @@ MAKE_EXPORTS= true
# The HAVE_ANSI_CPP flag indicates that cc isn't ANSI but also doesn't
# have a Reiser (pcc-style) cpp.
#
# NAT: autoconf should test for this by building a program that tests
# NAT: the optimizer limits and the signed chars thing.
CFLAGS_BE= -qchars=signed -qmaxmem=4000
# NAT: ldexport stuff. I don't understand this.
EXPSUFF= .exp
POSTGRES_EXP= $(SRCDIR)/backend/postgres$(EXPSUFF)
MKLDEXPORT=$(SRCDIR)/backend/port/aix/mkldexport.sh
%$(EXPSUFF): %.o
$(MKLDEXPORT) $< `pwd` > $@
%.so: %.o %$(EXPSUFF)
@echo The link stage here:
$(POSTGRES_EXP):
$(MAKE) -C $(SRCDIR)/backend postgres.exp
%.so: %.o %$(EXPSUFF) $(POSTGRES_EXP)
@echo Making share library $@ from $*.o, $*$(EXPSUFF), and postgres.exp
$(LD) -H512 -T512 -o $@ -e _nostart \
-bI:$(LIBDIR)/postgres$(EXPSUFF) -bE:$*$(EXPSUFF) \
-bI:$(POSTGRES_EXP) -bE:$*$(EXPSUFF) \
$*.o -lm -lc 2>/dev/null
endif
@ -381,25 +365,23 @@ CFLAGS_BE= -DNOFIXADE
else
CFLAGS_BE= -DNOPRINTADE
endif
# NAT: autoconf should test for this. What symbol does libln.a give us?
LDADD_BE= -lln
# use the regex library
# NAT: autoconf should test for this, but how?
USE_REGEX= 1
# NAT: autoconf should tell us which of these nasty definitions to use.
%.so: %.o
$(LD) -shared -expect_unresolved '*' -o $@ $<
DASH_N=
BACKSLASH_C= '\\\\c'
endif
#---------------------------------------------------------------------------
ifeq ($(PORTNAME), bsdi)
# NAT: how should autoconf test for pre-2.1. bsdi? grep for those
# NAT: strings in the return value from uname?
PRE_BSDI_2_1= false
ifeq ($(shell uname -r), 2.0)
PRE_BSDI_2_1= true
@ -408,12 +390,13 @@ ifeq ($(shell uname -r), 2.01)
PRE_BSDI_2_1= true
endif
# NAT: autoconf needs tests for -lipc, -lcompat, -ldld, -ltermap
ifeq ($(PRE_BSDI_2_1), false)
# cc is gcc v1.42
# gcc is gcc v2.7.2
LDADD_BE= -ltermcap -ldl -lipc
LDADD_BE= -ltermcap -ldl
ifeq ($(shell uname -r), 2.1)
LDADD_BE+= -lipc
endif
else
# cc is gcc v1.42
# gcc is gcc v2.6.3
@ -429,21 +412,22 @@ endif
#--------------------------------------------------------------------------
# NAT: autoconf needs tests for -fpic
ifeq ($(PORTNAME), dgux)
CFLAGS_SL= -fpic
%.so: %.o
$(CC) -shared -o $@ $<
LDADD_BE= -ldl -lfl
LDADD_BE= -ldl
YACC= bison -y
INSTALL=/usr/bin/X11/bsdinst
endif
#----------------------------------------------------------------------------
ifeq ($(PORTNAME), hpux)
# NAT: autoconf needs to test for -W l,-E export symbols
# -W l,-E export symbols for linking with the shared libraries
# dynamic loader
@ -457,8 +441,6 @@ ifeq ($(CC), gcc)
LDADD_BE+= /usr/lib/libdld.sl
endif
# NAT: autoconf needs to check the HPUX version. How?
ifdef ENFORCE_ALIGNMENT
CFLAGS_BE= -DNOFIXADE
else
@ -478,36 +460,49 @@ else
endif
endif
# NAT: autoconf needs to check the (extended) ANSI flag
# (extended) ANSI flag for cc (-Ae is same as -Aa -D_HPUX_SOURCE)
ifeq ($(CC), cc)
CFLAGS_BE+= -Ae
endif
# NAT: shared library stuff needs to be detected by autoconf
# This is a script from the MIT X11 distribution.
INSTALL= bsdinst
# RANLIB is not used on HP-UX
RANLIB= touch
CFLAGS_SL= +z
DLSUFFIX= .sl
%.sl: %.o
$(LD) -b -o $@ $<
DASH_N= ''
BACKSLASH_C= '\\\\c'
endif
#--------------------------------------------------------------------------
ifeq ($(PORTNAME), i386_solaris)
#
# Random things that must be passed everywhere to enable
# everything to compile. :-/
#
# The extra -I flag is to scoop up extra BSD-emulating headers.
# This needs to be fixed. Things other than the backend should not be
# accessing headers in the backend directory.
CFLAGS_BE= -I$(SRCDIR)/backend/port/sparc_solaris
# NAT: autoconf needs to know about -lsocket, -lnsl
LDADD_BE= -lsocket -lnsl -ll -ldl
# cc won't work!
# RANLIB is not used on solaris
RANLIB= touch
INSTALL= /usr/ucb/install
#
# Random things that must be passed everywhere to enable
# everything to compile. :-/
#
# The extra -I flag is to scoop up extra BSD-emulating headers.
# This needs to be fixed. Things other than the backend should not be
# accessing headers in the backend directory.
CFLAGS_BE= -I$(SRCDIR)/backend/port/sparc_solaris
LDADD_BE= -lsocket -lnsl -ll -ldl
LD_ADD= -lsocket -lnsl
# NAT: autoconf needs to know about -fPIC etc
ifeq ($(CC), cc)
CFLAGS_SL= -K PIC
else
@ -517,23 +512,42 @@ endif
%.so: %.o
$(LD) -G -Bdynamic -o $@ $<
DASH_N=''
BACKSLASH_C='\\\\c'
endif
#----------------------------------------------------------------------------
ifeq ($(PORTNAME), irix5)
# NAT: autoconf needs to figure out -ll
LDADD_BE= -ll
# RANLIB is not used on IRIX 5
RANLIB= touch
#If you have GNU install, by all means set CUSTOM_INSTALL to that in
#Makefile.custom. If you read the man page for /usr/bin/X11/bsdinst,
#you will see it is not intended for end user use. It chowns the files
#it installs to root.
INSTALL= /usr/bin/X11/bsdinst
IPCSDIR= /usr/sbin
INSTLOPTS= -m 444
INSTL_EXE_OPTS= -m 555
INSTL_LIB_OPTS= -m 664
%.so: %.o
$(LD) -G -Bdynamic -o $@ $<
$(LD) -G -Bdynamic -o $@ $< $(LD_ADD)
DASH_N=''
BACKSLASH_C='\\\\c'
endif
#---------------------------------------------------------------------------
ifeq ($(PORTNAME), linux)
# NAT: how can autoconf work out the ELF stuff?
ifndef LINUX_ELF
DLSUFFIX= .o
LDADD_BE= -ldld
@ -545,27 +559,26 @@ endif
MK_NO_LORDER= true
# use the regex library
# NAT: what is the regex library and how can autoconf find it?
USE_REGEX= 1
# NAT: autoconf needs to know about -fpic and other shared library
# NAT: isms
CFLAGS_SL= -fpic
%.so: %.o
$(CC) -shared -o $@ $<
# The Linux gnulib #defines the problem away for you and calls
# the BSD routines if you give it the right flags.
# NAT: what problem, and how can autoconf test for -lbsd needed?
LDADD_BE+= -lbsd
endif
#---------------------------------------------------------------------------
ifeq ($(PORTNAME), sparc)
ifeq ($(PORTNAME), sunos4)
# cc won't work!
INSTALL= /usr/bin/install
RANLIB= /usr/bin/ranlib
# NAT: autoconf needs to know about gcc vs cc and -PIC vs -fPIC
ifeq ($(CC), cc)
CFLAGS_SL= -PIC
else
@ -573,7 +586,6 @@ CFLAGS_SL= -fPIC
endif
LDADD_BE= -lln -ldl
# NAT: autoconf also needs to know about -Bdynamic
%.so: %.o
$(LD) -dc -dp -Bdynamic -o $@ $<
endif
@ -581,88 +593,102 @@ endif
#----------------------------------------------------------------------------
ifeq ($(PORTNAME), sparc_solaris)
# cc won't work!
# NAT: autoconf needs to know about dynamic loading libraries
LDADD_BE= -ll -ldl
LDADD_BE= -lsocket -lnsl -ll -ldl
LD_ADD= -lsocket -lnsl
# RANLIB is not used on solaris
RANLIB= touch
INSTALL= /usr/ucb/install
#
# Random things that must be passed everywhere to enable
# everything to compile. :-/
#
# The extra -I flag is to scoop up extra BSD-emulating headers.
# NAT: autoconf needs to know about BSD-emulating headers (see
# NAT: the i386 port), -lsocket and -lnsl
CFLAGS_BE= -I$(SRCDIR)/backend/port/sparc_solaris
LDADD_BE+= -lsocket -lnsl
# NAT: autoconf needs to know about -K PIC vs -fPIC
ifeq ($(CC), cc)
CFLAGS_SL= -K PIC
else
CFLAGS_SL= -fPIC
endif
# NAT: autoconf needs to know about dynamic loading
%.so: %.o
$(LD) -G -Bdynamic -o $@ $<
DASH_N= ''
BACKSLASH_C= '\\\\c'
endif
#-----------------------------------------------------------------------------
ifeq ($(PORTNAME), svr4)
# NAT: autoconf needs to know about -W0 and why you need it
CFLAGS+= -W0
YACC= bison -y
# MAKE_EXPORTS is required for svr4 loaders that want a file of
# symbol names to tell them what to export/import.
# NAT: autoconf needs to know about MAKE_EXPORTS
MAKE_EXPORTS= true
# RANLIB is not used on svr4
RANLIB= touch
# GNU install
INSTALL= /home/tools/bin/install
#
# Random things that must be passed everywhere to enable
# everything to compile. :-/
#
# The extra -I flag is to scoop up extra BSD-emulating headers.
# NAT: autoconf needs to know about BSD-emulating headers,
# NAT: -lsocket, -lnsl -lc libucb -ll and -ldl
CFLAGS_BE+= -I$(SRCDIR)/backend/port/svr4
LDADD_BE= -lsocket -lnsl -lc /usr/ucblib/libucb.a -ll -ldl
# NAT: autoconf needs to know about -LD-Blargedynsym
LDFLAGS_BE= -LD-Blargedynsym
# NAT: autoconf needs to know about dynamic loading
%.so: %.o
$(LD) -G -Bdynamic -o $@ $<
DASH_N= ''
BACKSLASH_C= '\\\\c'
endif
#---------------------------------------------------------------------------
ifeq ($(PORTNAME), ultrix4)
# NAT: autoconf needs to know about the different types of alignment
# NAT: enforcement.
ifdef ENFORCE_ALIGNMENT
CFLAGS_BE= -DNOFIXADE
endif
# NAT: autoconf needs to know about dynamic loading
LDADD_BE= -ldl -lln
# NAT: autoconf needs to know about NO_BEFOREINSTL - what is it used
# NAT: for and how do I test for it?
# install creates intermediate directories
NO_BEFOREINSTL= true
# NAT: autoconf needs to know about dynamic loading
INSTALL= /usr/bin/install
RANLIB= /usr/bin/ranlib
CFLAGS_SL= -G 0
DLSUFFIX= .o
endif
ifneq ($(PORTNAME), next)
# NAT: autoconf needs to know about -lm
LDADD_BE+= -lm
#---------------------------------------------------------------------------
ifeq ($(PORTNAME), nextstep)
LDADD_BE+= -lipc
AROPT= rc
DLSUFFIX= .o
endif
#---------------------------------------------------------------------------
# All others need -lm
ifneq ($(PORTNAME), nextstep)
LD_ADD+= -lm
endif
# This goes here so that customization in Makefile.custom is effective
@ -670,7 +696,7 @@ endif
ifneq ($(CUSTOM_INSTALL),)
INSTALL= $(CUSTOM_INSTALL)
endif
endif
#
# Flags for CC and LD.
@ -747,6 +773,6 @@ CFLAGS+= -D$(PORTNAME)
# include port-specific flags
CFLAGS+= $(CFLAGS_BE)
LDADD+= $(LDADD_BE)
LD_ADD+= $(LDADD_BE)
LDFLAGS+= $(LDFLAGS_BE)

209
src/configure vendored
View File

@ -1392,7 +1392,7 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
USE_READLINE='USE_READLINE=true'
READLINE_LIB='-lreadline'
else
echo "$ac_t""no" 1>&6
fi
@ -1433,26 +1433,94 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_lib=HAVE_LIB`echo history | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
LIBS="-lhistory $LIBS"
HISTORY_LIB='-lhistory'
else
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for main in -lcurses""... $ac_c" 1>&6
echo "configure:1444: checking for main in -lcurses" >&5
ac_lib_var=`echo curses'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lcurses $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1452 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:1459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
CURSES_LIB='-lcurses'
else
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for main in -ltermcap""... $ac_c" 1>&6
echo "configure:1481: checking for main in -ltermcap" >&5
ac_lib_var=`echo termcap'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1489 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:1496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
TERMCAP_LIB='-ltermcap'
else
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:1451: checking for ANSI C header files" >&5
echo "configure:1519: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1456 "configure"
#line 1524 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@ -1460,7 +1528,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -1477,7 +1545,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 1481 "configure"
#line 1549 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@ -1495,7 +1563,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 1499 "configure"
#line 1567 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@ -1516,7 +1584,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 1520 "configure"
#line 1588 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@ -1527,7 +1595,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:1531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:1599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
@ -1551,12 +1619,12 @@ EOF
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
echo "configure:1555: checking for sys/wait.h that is POSIX.1 compatible" >&5
echo "configure:1623: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1560 "configure"
#line 1628 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@ -1572,7 +1640,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
if { (eval echo configure:1576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@ -1596,17 +1664,17 @@ for ac_hdr in fcntl.h limits.h sys/file.h sys/ioctl.h sys/time.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1600: checking for $ac_hdr" >&5
echo "configure:1668: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1605 "configure"
#line 1673 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -1636,17 +1704,17 @@ for ac_hdr in termios.h values.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1640: checking for $ac_hdr" >&5
echo "configure:1708: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1645 "configure"
#line 1713 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -1674,12 +1742,12 @@ done
echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:1678: checking for working const" >&5
echo "configure:1746: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1683 "configure"
#line 1751 "configure"
#include "confdefs.h"
int main() {
@ -1728,7 +1796,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
if { (eval echo configure:1732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@ -1749,12 +1817,12 @@ EOF
fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
echo "configure:1753: checking for uid_t in sys/types.h" >&5
echo "configure:1821: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1758 "configure"
#line 1826 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@ -1783,21 +1851,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
echo "configure:1787: checking for inline" >&5
echo "configure:1855: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
#line 1794 "configure"
#line 1862 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
if { (eval echo configure:1801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@ -1823,12 +1891,12 @@ EOF
esac
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
echo "configure:1827: checking for mode_t" >&5
echo "configure:1895: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1832 "configure"
#line 1900 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@ -1856,12 +1924,12 @@ EOF
fi
echo $ac_n "checking for off_t""... $ac_c" 1>&6
echo "configure:1860: checking for off_t" >&5
echo "configure:1928: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1865 "configure"
#line 1933 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@ -1889,12 +1957,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:1893: checking for size_t" >&5
echo "configure:1961: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1898 "configure"
#line 1966 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@ -1922,12 +1990,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:1926: checking whether time.h and sys/time.h may both be included" >&5
echo "configure:1994: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1931 "configure"
#line 1999 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@ -1936,7 +2004,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure:1940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@ -1957,12 +2025,12 @@ EOF
fi
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
echo "configure:1961: checking whether struct tm is in sys/time.h or time.h" >&5
echo "configure:2029: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1966 "configure"
#line 2034 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
@ -1970,7 +2038,7 @@ int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
if { (eval echo configure:1974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
@ -1993,13 +2061,13 @@ fi
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
echo "configure:1997: checking whether ${CC-cc} needs -traditional" >&5
echo "configure:2065: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <<EOF
#line 2003 "configure"
#line 2071 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@ -2017,7 +2085,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
#line 2021 "configure"
#line 2089 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@ -2039,7 +2107,7 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
fi
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
echo "configure:2043: checking for 8-bit clean memcmp" >&5
echo "configure:2111: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2047,7 +2115,7 @@ else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
#line 2051 "configure"
#line 2119 "configure"
#include "confdefs.h"
main()
@ -2057,7 +2125,7 @@ main()
}
EOF
if { (eval echo configure:2061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
@ -2075,12 +2143,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:2079: checking return type of signal handlers" >&5
echo "configure:2147: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2084 "configure"
#line 2152 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@ -2097,7 +2165,7 @@ int main() {
int i;
; return 0; }
EOF
if { (eval echo configure:2101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@ -2116,12 +2184,12 @@ EOF
echo $ac_n "checking for vprintf""... $ac_c" 1>&6
echo "configure:2120: checking for vprintf" >&5
echo "configure:2188: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2125 "configure"
#line 2193 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */
@ -2144,7 +2212,7 @@ vprintf();
; return 0; }
EOF
if { (eval echo configure:2148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_vprintf=yes"
else
@ -2168,12 +2236,12 @@ fi
if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
echo "configure:2172: checking for _doprnt" >&5
echo "configure:2240: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2177 "configure"
#line 2245 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */
@ -2196,7 +2264,7 @@ _doprnt();
; return 0; }
EOF
if { (eval echo configure:2200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func__doprnt=yes"
else
@ -2223,12 +2291,12 @@ fi
for ac_func in ftime getcwd gethostname gettimeofday putenv regcomp select socket strcspn strdup strerror strftime strspn strtod strtol
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2227: checking for $ac_func" >&5
echo "configure:2295: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2232 "configure"
#line 2300 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -2251,7 +2319,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -2278,12 +2346,12 @@ done
for ac_func in isinf tzset cbrt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2282: checking for $ac_func" >&5
echo "configure:2350: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2287 "configure"
#line 2355 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -2306,7 +2374,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:2310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -2433,7 +2501,7 @@ done
ac_given_srcdir=$srcdir
trap 'rm -fr `echo "GNUmakefile Makefile.global include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
trap 'rm -fr `echo "GNUmakefile Makefile.global bin/psql/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@ -2486,7 +2554,10 @@ s%@etags@%$etags%g
s%@xargs@%$xargs%g
s%@ipcs@%$ipcs%g
s%@ipcrm@%$ipcrm%g
s%@USE_READLINE@%$USE_READLINE%g
s%@READLINE_LIB@%$READLINE_LIB%g
s%@HISTORY_LIB@%$HISTORY_LIB%g
s%@CURSES_LIB@%$CURSES_LIB%g
s%@TERMCAP_LIB@%$TERMCAP_LIB%g
s%@LIBOBJS@%$LIBOBJS%g
CEOF
@ -2529,7 +2600,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile Makefile.global"}
CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile Makefile.global bin/psql/Makefile"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then

View File

@ -68,9 +68,14 @@ dnl if the library readline is present,
dnl set the shell variable USE_READLINE
dnl to have the value USE_READLINE=true
dnl and substitute it into the makefiles
AC_CHECK_LIB(readline, readline, USE_READLINE='USE_READLINE=true')
AC_SUBST(USE_READLINE)
AC_CHECK_LIB(history, history)
AC_CHECK_LIB(readline, readline, READLINE_LIB='-lreadline')
AC_SUBST(READLINE_LIB)
AC_CHECK_LIB(history, history, HISTORY_LIB='-lhistory')
AC_SUBST(HISTORY_LIB)
AC_CHECK_LIB(curses, main, CURSES_LIB='-lcurses')
AC_SUBST(CURSES_LIB)
AC_CHECK_LIB(termcap, main, TERMCAP_LIB='-ltermcap')
AC_SUBST(TERMCAP_LIB)
dnl Checks for header files.
AC_HEADER_STDC
@ -98,4 +103,4 @@ AC_CHECK_FUNCS(isinf tzset cbrt)
#AC_OUTPUT(backend/optimizer/path/Makefile libpq++/man/Makefile backend/port/sparc_solaris/Makefile backend/utils/misc/Makefile backend/port/ultrix4/Makefile bin/psql/Makefile backend/utils/init/Makefile tutorial/C-code/Makefile test/examples/Makefile backend/utils/adt/Makefile bin/destroyuser/Makefile Makefile tutorial/Makefile bin/pg_dump/Makefile bin/cleardbdir/Makefile backend/optimizer/plan/Makefile backend/access/heap/Makefile backend/storage/page/Makefile backend/port/svr4/Makefile backend/optimizer/Makefile backend/utils/hash/Makefile backend/storage/large_object/Makefile backend/access/hash/Makefile test/Makefile backend/optimizer/prep/Makefile bin/initdb/Makefile bin/pg_version/Makefile bin/ipcclean/Makefile bin/pg4_dump/Makefile backend/postmaster/Makefile backend/access/Makefile test/regress/Makefile backend/storage/Makefile backend/port/bsdi/Makefile libpq++/Makefile backend/lib/Makefile backend/libpq/Makefile backend/access/gist/Makefile backend/nodes/Makefile libpgtcl/Makefile libpq/Makefile bin/destroydb/Makefile backend/access/nbtree/Makefile bin/Makefile bin/createuser/Makefile backend/port/Makefile backend/port/irix5/Makefile backend/utils/sort/Makefile backend/utils/error/Makefile backend/utils/time/Makefile backend/Makefile backend/utils/Makefile backend/commands/Makefile bin/pg_id/Makefile backend/tioga/Makefile backend/utils/cache/Makefile backend/port/aix/Makefile backend/storage/lmgr/Makefile test/bench/Makefile bin/monitor/Makefile backend/access/index/Makefile backend/port/hpux/Makefile utils/Makefile backend/port/i386_solaris/Makefile backend/catalog/Makefile backend/storage/smgr/Makefile backend/bootstrap/Makefile backend/storage/buffer/Makefile backend/storage/ipc/Makefile backend/rewrite/Makefile backend/access/rtree/Makefile backend/port/linux/Makefile backend/storage/file/Makefile man/Makefile libpq++/examples/Makefile backend/main/Makefile bin/pgtclsh/Makefile backend/access/common/Makefile bin/createdb/Makefile backend/port/dgux/Makefile backend/utils/fmgr/Makefile backend/parser/Makefile backend/port/sparc/Makefile backend/executor/Makefile backend/optimizer/util/Makefile tools/mkldexport/Makefile backend/utils/mmgr/Makefile backend/tcop/Makefile backend/port/BSD44_derived/Makefile backend/access/transam/Makefile backend/port/alpha/Makefile backend/regex/Makefile)
AC_OUTPUT(GNUmakefile Makefile.global)
AC_OUTPUT(GNUmakefile Makefile.global bin/psql/Makefile)