mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
Use autoconf to determine whether system has POSIX signals,
instead of relying on port's os.h to tell us. (Needed for HPUX where system major version is not enough info.) configure unsets USE_TK if X libraries not found. doc/Makefile uses gzcat or zcat as found by autoconf.
This commit is contained in:
parent
92eacaf523
commit
b10a719777
@ -8,7 +8,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $Header: /cvsroot/pgsql/doc/Makefile,v 1.11 1998/10/20 23:14:35 momjian Exp $
|
# $Header: /cvsroot/pgsql/doc/Makefile,v 1.12 1998/11/29 05:30:13 tgl Exp $
|
||||||
#
|
#
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -16,6 +16,7 @@ PGDOCS= $(POSTGRESDIR)/doc
|
|||||||
SRCDIR= ../src
|
SRCDIR= ../src
|
||||||
|
|
||||||
TAR= tar
|
TAR= tar
|
||||||
|
GZCAT= zcat
|
||||||
|
|
||||||
# Pick up Makefile.global from the source area
|
# Pick up Makefile.global from the source area
|
||||||
# This is the only resource from the code source area and is optional.
|
# This is the only resource from the code source area and is optional.
|
||||||
@ -73,6 +74,6 @@ man::
|
|||||||
%: %.tar.gz
|
%: %.tar.gz
|
||||||
rm -rf ./$@ $(PGDOCS)/$*
|
rm -rf ./$@ $(PGDOCS)/$*
|
||||||
if test ! -d $(PGDOCS)/$* ; then mkdir $(PGDOCS)/$* ; fi
|
if test ! -d $(PGDOCS)/$* ; then mkdir $(PGDOCS)/$* ; fi
|
||||||
zcat $< | $(TAR) xf - -C $(PGDOCS)/$*
|
$(GZCAT) $< | (cd $(PGDOCS)/$* ; $(TAR) xf - )
|
||||||
# touch ./$*
|
# touch ./$*
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.53 1998/10/30 04:53:55 scrappy Exp $
|
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.54 1998/11/29 05:30:14 tgl Exp $
|
||||||
#
|
#
|
||||||
# NOTES
|
# NOTES
|
||||||
# Essentially all Postgres make files include this file and use the
|
# Essentially all Postgres make files include this file and use the
|
||||||
@ -209,14 +209,21 @@ CFLAGS_SL= @SHARED_LIB@
|
|||||||
LDFLAGS= @LDFLAGS@ @LIBS@
|
LDFLAGS= @LDFLAGS@ @LIBS@
|
||||||
DLSUFFIX= @DLSUFFIX@
|
DLSUFFIX= @DLSUFFIX@
|
||||||
LN_S= @LN_S@
|
LN_S= @LN_S@
|
||||||
|
TAR= @tar@
|
||||||
|
GZCAT= @GZCAT@
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# Additional platform-specific settings
|
# Additional platform-specific settings
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Name of the target platform.
|
||||||
PORTNAME= @PORTNAME@
|
PORTNAME= @PORTNAME@
|
||||||
|
|
||||||
|
# Various grungy items needed to configure some platforms.
|
||||||
|
HAVE_POSIX_SIGNALS= @HAVE_POSIX_SIGNALS@
|
||||||
|
HPUXMATHLIB= @HPUXMATHLIB@
|
||||||
|
|
||||||
include $(SRCDIR)/Makefile.port
|
include $(SRCDIR)/Makefile.port
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
652
src/configure
vendored
652
src/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -416,8 +416,7 @@ AC_ARG_WITH(CXX,
|
|||||||
[ AC_PROG_CXX])
|
[ AC_PROG_CXX])
|
||||||
AC_SUBST(HAVECXX)
|
AC_SUBST(HAVECXX)
|
||||||
|
|
||||||
INSTALLPATH="`echo /usr/ucb:$PATH | sed 's/:/ /g'`"
|
AC_PATH_PROGS(INSTALL, ginstall installbsd bsdinst scoinst install, NONE, /usr/ucb:$PATH )
|
||||||
AC_PATH_PROGS(INSTALL, ginstall installbsd bsdinst scoinst install, NONE, $INSTALLPATH )
|
|
||||||
if test "$INSTALL" = "NONE"
|
if test "$INSTALL" = "NONE"
|
||||||
then
|
then
|
||||||
# fall back on our own script
|
# fall back on our own script
|
||||||
@ -481,6 +480,7 @@ AC_PATH_PROG(xargs, xargs)
|
|||||||
AC_PATH_PROG(ipcs, ipcs)
|
AC_PATH_PROG(ipcs, ipcs)
|
||||||
AC_PATH_PROG(ipcrm, ipcrm)
|
AC_PATH_PROG(ipcrm, ipcrm)
|
||||||
AC_PATH_PROGS(TR, trbsd tr, NOT_FOUND)
|
AC_PATH_PROGS(TR, trbsd tr, NOT_FOUND)
|
||||||
|
AC_PATH_PROGS(GZCAT, gzcat zcat, gzcat)
|
||||||
|
|
||||||
dnl Check tr flags to convert from lower to upper case
|
dnl Check tr flags to convert from lower to upper case
|
||||||
TRSTRINGS="`echo ABCdef | $TR '[[a-z]]' '[[A-Z]]' 2>/dev/null | grep ABCDEF`"
|
TRSTRINGS="`echo ABCdef | $TR '[[a-z]]' '[[A-Z]]' 2>/dev/null | grep ABCDEF`"
|
||||||
@ -754,16 +754,39 @@ AC_SUBST(STRCASECMP)
|
|||||||
AC_CHECK_FUNC(cbrt,
|
AC_CHECK_FUNC(cbrt,
|
||||||
AC_DEFINE(HAVE_CBRT),
|
AC_DEFINE(HAVE_CBRT),
|
||||||
AC_CHECK_LIB(m, cbrt, AC_DEFINE(HAVE_CBRT)))
|
AC_CHECK_LIB(m, cbrt, AC_DEFINE(HAVE_CBRT)))
|
||||||
|
|
||||||
|
# On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a;
|
||||||
|
# this hackery with HPUXMATHLIB allows us to cope.
|
||||||
|
HPUXMATHLIB=""
|
||||||
AC_CHECK_FUNC(rint,
|
AC_CHECK_FUNC(rint,
|
||||||
AC_DEFINE(HAVE_RINT),
|
AC_DEFINE(HAVE_RINT),
|
||||||
[
|
[
|
||||||
# On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a
|
|
||||||
SPECIALMATHLIB=""
|
|
||||||
if [[ -r /lib/pa1.1/libm.a ]] ; then
|
if [[ -r /lib/pa1.1/libm.a ]] ; then
|
||||||
SPECIALMATHLIB="-L /lib/pa1.1 -lm"
|
HPUXMATHLIB="-L /lib/pa1.1 -lm"
|
||||||
fi
|
fi
|
||||||
AC_CHECK_LIB(m, rint, AC_DEFINE(HAVE_RINT), , $SPECIALMATHLIB)
|
AC_CHECK_LIB(m, rint, AC_DEFINE(HAVE_RINT), , $HPUXMATHLIB)
|
||||||
])
|
])
|
||||||
|
AC_SUBST(HPUXMATHLIB)
|
||||||
|
|
||||||
|
dnl Check to see if platform has POSIX signal interface.
|
||||||
|
dnl NOTE: if this test fails then POSIX signals definitely don't work.
|
||||||
|
dnl It could be that the test compiles but the POSIX routines don't
|
||||||
|
dnl really work ... in that case the platform-specific port files
|
||||||
|
dnl can unset USE_POSIX_SIGNALS and HAVE_POSIX_SIGNALS. (The former
|
||||||
|
dnl goes into config.h, the latter into Makefile.global.)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for POSIX signal interface)
|
||||||
|
AC_TRY_LINK([#include <signal.h>],
|
||||||
|
[struct sigaction act, oact;
|
||||||
|
sigemptyset(&act.sa_mask);
|
||||||
|
act.sa_flags = SA_RESTART;
|
||||||
|
sigaction(0, &act, &oact);],
|
||||||
|
[AC_DEFINE(USE_POSIX_SIGNALS)
|
||||||
|
HAVE_POSIX_SIGNALS="1"
|
||||||
|
AC_MSG_RESULT(yes)],
|
||||||
|
[HAVE_POSIX_SIGNALS=""
|
||||||
|
AC_MSG_RESULT(no)])
|
||||||
|
AC_SUBST(HAVE_POSIX_SIGNALS)
|
||||||
|
|
||||||
dnl Check for Tcl configuration script tclConfig.sh
|
dnl Check for Tcl configuration script tclConfig.sh
|
||||||
|
|
||||||
@ -858,11 +881,13 @@ if test "$USE_X" = true; then
|
|||||||
X11_LIBS=""
|
X11_LIBS=""
|
||||||
AC_CHECK_LIB(X11, XOpenDisplay, X11_LIBS="-lX11",,${X_PRE_LIBS})
|
AC_CHECK_LIB(X11, XOpenDisplay, X11_LIBS="-lX11",,${X_PRE_LIBS})
|
||||||
if test "$X11_LIBS" = ""; then
|
if test "$X11_LIBS" = ""; then
|
||||||
dnl Not having X may be fatal. Let the user fix this.
|
dnl Not having X is bad news for pgtksh. Let the user fix this.
|
||||||
AC_MSG_WARN([The X11 library '-lX11' could not be found.
|
AC_MSG_WARN([The X11 library '-lX11' could not be found,
|
||||||
Please use the configure options '--x-includes=DIR'
|
so TK support will be disabled. To enable TK support,
|
||||||
and '--x-libraries=DIR' to specify the X location.
|
please use the configure options '--x-includes=DIR'
|
||||||
See the file 'config.log' for further diagnostics.])
|
and '--x-libraries=DIR' to specify the X location.
|
||||||
|
See the file 'config.log' for further diagnostics.])
|
||||||
|
USE_TK=
|
||||||
fi
|
fi
|
||||||
AC_SUBST(X_LIBS)
|
AC_SUBST(X_LIBS)
|
||||||
AC_SUBST(X11_LIBS)
|
AC_SUBST(X11_LIBS)
|
||||||
|
@ -263,6 +263,9 @@ extern void srandom(int seed);
|
|||||||
/* Define as the base type of the last arg to accept */
|
/* Define as the base type of the last arg to accept */
|
||||||
#undef SOCKET_SIZE_TYPE
|
#undef SOCKET_SIZE_TYPE
|
||||||
|
|
||||||
|
/* Define if POSIX signal interface is available */
|
||||||
|
#undef USE_POSIX_SIGNALS
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Code below this point should not require changes
|
* Code below this point should not require changes
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#define USE_POSIX_TIME
|
#define USE_POSIX_TIME
|
||||||
#define USE_POSIX_SIGNALS
|
|
||||||
#define CLASS_CONFLICT
|
#define CLASS_CONFLICT
|
||||||
#define DISABLE_XOPEN_NLS
|
#define DISABLE_XOPEN_NLS
|
||||||
#define HAVE_ANSI_CPP
|
#define HAVE_ANSI_CPP
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#define USE_POSIX_TIME
|
#define USE_POSIX_TIME
|
||||||
#define USE_POSIX_SIGNALS
|
|
||||||
#define DISABLE_XOPEN_NLS
|
#define DISABLE_XOPEN_NLS
|
||||||
#define HAS_LONG_LONG
|
#define HAS_LONG_LONG
|
||||||
#define HAS_TEST_AND_SET
|
#define HAS_TEST_AND_SET
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#define USE_POSIX_SIGNALS
|
|
||||||
#define USE_POSIX_TIME
|
#define USE_POSIX_TIME
|
||||||
|
|
||||||
#ifndef BIG_ENDIAN
|
#ifndef BIG_ENDIAN
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
#define JMP_BUF
|
#define JMP_BUF
|
||||||
#define USE_POSIX_TIME
|
#define USE_POSIX_TIME
|
||||||
/* HPUX 10 has full POSIX signal functionality.
|
|
||||||
* On HPUX 9, we rely on BSD-compatible signal() in libBSD.
|
|
||||||
*/
|
|
||||||
#ifdef HPUX_10
|
|
||||||
#define USE_POSIX_SIGNALS
|
|
||||||
#endif
|
|
||||||
#define HAS_TEST_AND_SET
|
#define HAS_TEST_AND_SET
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#define USE_POSIX_TIME
|
#define USE_POSIX_TIME
|
||||||
#define USE_POSIX_SIGNALS
|
|
||||||
#define NO_EMPTY_STMTS
|
#define NO_EMPTY_STMTS
|
||||||
#define SYSV_DIRENT
|
#define SYSV_DIRENT
|
||||||
#define HAS_TEST_AND_SET
|
#define HAS_TEST_AND_SET
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
*/
|
*/
|
||||||
#define JMP_BUF
|
#define JMP_BUF
|
||||||
#define USE_POSIX_TIME
|
#define USE_POSIX_TIME
|
||||||
#define USE_POSIX_SIGNALS
|
|
||||||
#define HAS_TEST_AND_SET
|
#define HAS_TEST_AND_SET
|
||||||
|
|
||||||
#if defined(PPC)
|
#if defined(PPC)
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#define USE_POSIX_TIME
|
#define USE_POSIX_TIME
|
||||||
#define USE_POSIX_SIGNALS
|
|
||||||
#define NO_EMPTY_STMTS
|
#define NO_EMPTY_STMTS
|
||||||
#define SYSV_DIRENT
|
#define SYSV_DIRENT
|
||||||
#define HAS_TEST_AND_SET
|
#define HAS_TEST_AND_SET
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#define USE_POSIX_TIME
|
#define USE_POSIX_TIME
|
||||||
#define USE_POSIX_SIGNALS
|
|
||||||
#define NO_EMPTY_STMTS
|
#define NO_EMPTY_STMTS
|
||||||
#define SYSV_DIRENT
|
#define SYSV_DIRENT
|
||||||
#define HAS_TEST_AND_SET
|
#define HAS_TEST_AND_SET
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#define USE_POSIX_TIME
|
#define USE_POSIX_TIME
|
||||||
#define USE_POSIX_SIGNALS
|
|
||||||
#define NO_EMPTY_STMTS
|
#define NO_EMPTY_STMTS
|
||||||
#define SYSV_DIRENT
|
#define SYSV_DIRENT
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#define USE_POSIX_TIME
|
#define USE_POSIX_TIME
|
||||||
#define NO_EMPTY_STMTS
|
#define NO_EMPTY_STMTS
|
||||||
#define USE_POSIX_SIGNALS
|
|
||||||
#define SYSV_DIRENT
|
#define SYSV_DIRENT
|
||||||
|
|
||||||
#define HAS_TEST_AND_SET
|
#define HAS_TEST_AND_SET
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#define USE_POSIX_TIME
|
#define USE_POSIX_TIME
|
||||||
#define NO_EMPTY_STMTS
|
#define NO_EMPTY_STMTS
|
||||||
#define USE_POSIX_SIGNALS
|
|
||||||
#define SYSV_DIRENT
|
#define SYSV_DIRENT
|
||||||
|
|
||||||
#define HAS_TEST_AND_SET
|
#define HAS_TEST_AND_SET
|
||||||
|
@ -1,46 +1,26 @@
|
|||||||
HPUX_MAJOR= $(shell uname -r|sed 's/^[^.]*\.\([^.]*\).*/\1/')
|
# HP-UX 10 has a select() in libcurses, so we need to get the libc version,
|
||||||
# Distinguish HPUX 10 (and later) from HPUX 9
|
# which we do by linking -lc before -lcurses. (Unfortunately we can't
|
||||||
ifneq ($(HPUX_MAJOR), 09)
|
# just not use libcurses.) This also ensures that we get the POSIX signal
|
||||||
CFLAGS+= -DHPUX_10
|
# routines in libc, not the BSD-like ones in libBSD.
|
||||||
|
LDFLAGS:= -lc $(LDFLAGS)
|
||||||
|
|
||||||
|
# On the other hand, if we don't have POSIX signals, we need to use the
|
||||||
|
# libBSD signal routines. (HPUX 9 and early HPUX 10 releases don't have
|
||||||
|
# POSIX signals.) Make sure libBSD comes before libc in that case.
|
||||||
|
ifeq ($(HAVE_POSIX_SIGNALS),)
|
||||||
|
LDFLAGS:= -lBSD $(LDFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# HP-UX 10 has a select() in libcurses, so we need to get the libc version first
|
# On HPUX 9, rint() is provided only in the PA1.1 version of libm.
|
||||||
# We also want to be sure we get the POSIX signal routines in libc,
|
# If configure found it necessary to link against /lib/pa1.1 to find rint,
|
||||||
# not the BSD-like ones in libBSD.
|
# add -L command to make that happen.
|
||||||
ifneq ($(HPUX_MAJOR), 09)
|
# (CAUTION: you need PHSS_4630 to have a working version of rint() on 9!)
|
||||||
LDFLAGS:= -Wl,-E -lc $(LDFLAGS)
|
ifneq ($(HPUXMATHLIB),)
|
||||||
endif
|
LDFLAGS:= -L /lib/pa1.1 $(LDFLAGS)
|
||||||
|
|
||||||
# HP-UX 09 provides rint() only in PA1.1 version of libm, so add -L command
|
|
||||||
# to get that version. (CAUTION: you need PHSS_4630 to have a working version
|
|
||||||
# of rint()!) Also, libPW exists on this platform but is not helpful, so
|
|
||||||
# delete it from LDFLAGS.
|
|
||||||
# NOTE: libBSD must be loaded before libc to get BSD signal() semantics.
|
|
||||||
ifeq ($(HPUX_MAJOR), 09)
|
|
||||||
LDFLAGS:= -Wl,-E -L /lib/pa1.1 $(LDFLAGS:-lPW=)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# On all HPUX versions, embed LIBDIR as the shared library search path
|
# On all HPUX versions, embed LIBDIR as the shared library search path
|
||||||
# so that the executables don't need SHLIB_PATH to be set, and enable -z
|
# so that the executables don't need SHLIB_PATH to be set, specify -z
|
||||||
# to catch null pointer dereferences.
|
# to catch null pointer dereferences, and specify -E to make all symbols
|
||||||
LDFLAGS+= -Wl,+b -Wl,$(LIBDIR) -Wl,-z
|
# visible to dynamically linked shared libraries.
|
||||||
|
LDFLAGS+= -Wl,+b -Wl,$(LIBDIR) -Wl,-z -Wl,-E
|
||||||
# Does anyone use this stuff?
|
|
||||||
#ifdef ENFORCE_ALIGNMENT
|
|
||||||
# CFLAGS+= -DNOFIXADE
|
|
||||||
#else
|
|
||||||
# ifeq ($(HPUX_MAJOR), 08)
|
|
||||||
# CFLAGS+= +u -DHP_S500_ALIGN
|
|
||||||
# LDFLAGS+= +u
|
|
||||||
# else
|
|
||||||
# ifeq ($(HPUX_MAJOR), 09)
|
|
||||||
# ifeq ($(CC), cc)
|
|
||||||
# CFLAGS+= +u4
|
|
||||||
# LDFLAGS+= +u4
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
%.sl: %.o
|
|
||||||
$(LD) -b -o $@ $<
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user