mirror of
https://github.com/postgres/postgres.git
synced 2025-07-21 16:02:15 +03:00
Also test for 'void *' as third arg of accept() (as on Solaris 7 and 8),
but take it as 'int *' instead. Add real test for whether ld -R works on Unixware. Rename --enable-uniconv to --enable-unicode-conversion. Install shlibs mode 755 by default, since 644 causes gratuitous complaints from ldd et al. on some systems.
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
# $Header: /cvsroot/pgsql/config/ac_func_accept_argtypes.m4,v 1.2 2000/08/26 21:11:45 petere Exp $
|
# $Header: /cvsroot/pgsql/config/ac_func_accept_argtypes.m4,v 1.3 2000/11/09 18:18:42 petere Exp $
|
||||||
# This comes from the official Autoconf macro archive at
|
# This comes from the official Autoconf macro archive at
|
||||||
# <http://research.cys.de/autoconf-archive/>
|
# <http://research.cys.de/autoconf-archive/>
|
||||||
# (I removed the $ before the Id CVS keyword below.)
|
# (I removed the $ before the Id CVS keyword below.)
|
||||||
@ -32,6 +32,10 @@ dnl
|
|||||||
#
|
#
|
||||||
# arg2 can also be `const' (e.g., RH 4.2). Change the order of tests
|
# arg2 can also be `const' (e.g., RH 4.2). Change the order of tests
|
||||||
# for arg3 so that `int' is first, in case there is no prototype at all.
|
# for arg3 so that `int' is first, in case there is no prototype at all.
|
||||||
|
#
|
||||||
|
# Solaris 7 and 8 have arg3 as 'void *' (disguised as 'Psocklen_t'
|
||||||
|
# which is *not* 'socklen_t *'). If we detect that, then we assume
|
||||||
|
# 'int' as the result, because that ought to work best.
|
||||||
|
|
||||||
AC_DEFUN(AC_FUNC_ACCEPT_ARGTYPES,
|
AC_DEFUN(AC_FUNC_ACCEPT_ARGTYPES,
|
||||||
[AC_MSG_CHECKING([types of arguments for accept()])
|
[AC_MSG_CHECKING([types of arguments for accept()])
|
||||||
@ -40,7 +44,7 @@ AC_DEFUN(AC_FUNC_ACCEPT_ARGTYPES,
|
|||||||
[AC_CACHE_VAL(ac_cv_func_accept_arg3,dnl
|
[AC_CACHE_VAL(ac_cv_func_accept_arg3,dnl
|
||||||
[for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
|
[for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
|
||||||
for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
|
for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
|
||||||
for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int'; do
|
for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
|
||||||
AC_TRY_COMPILE(
|
AC_TRY_COMPILE(
|
||||||
[#ifdef HAVE_SYS_TYPES_H
|
[#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -48,7 +52,7 @@ AC_DEFUN(AC_FUNC_ACCEPT_ARGTYPES,
|
|||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
extern accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);],
|
extern int accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);],
|
||||||
[], [ac_not_found=no; break 3], [ac_not_found=yes])
|
[], [ac_not_found=no; break 3], [ac_not_found=yes])
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
@ -56,6 +60,9 @@ extern accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_acc
|
|||||||
if test "$ac_not_found" = yes; then
|
if test "$ac_not_found" = yes; then
|
||||||
AC_MSG_ERROR([could not determine argument types])
|
AC_MSG_ERROR([could not determine argument types])
|
||||||
fi
|
fi
|
||||||
|
if test "$ac_cv_func_accept_arg3" = "void"; then
|
||||||
|
ac_cv_func_accept_arg3=int
|
||||||
|
fi
|
||||||
])dnl AC_CACHE_VAL
|
])dnl AC_CACHE_VAL
|
||||||
])dnl AC_CACHE_VAL
|
])dnl AC_CACHE_VAL
|
||||||
])dnl AC_CACHE_VAL
|
])dnl AC_CACHE_VAL
|
||||||
|
26
configure.in
26
configure.in
@ -203,13 +203,17 @@ Or do not specify an argument to the option to use the default.]);;
|
|||||||
AC_SUBST(MULTIBYTE)
|
AC_SUBST(MULTIBYTE)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Unicode conversion (--enable-uniconv)
|
# Unicode conversion (--enable-unicode-conversion)
|
||||||
#
|
#
|
||||||
AC_MSG_CHECKING([whether to build with Unicode conversion support])
|
AC_MSG_CHECKING([whether to build with Unicode conversion support])
|
||||||
PGAC_ARG_BOOL(enable, uniconv, no, [ --enable-uniconv enable unicode conversion support],
|
PGAC_ARG_BOOL(enable, unicode-conversion, no,
|
||||||
[AC_DEFINE([UNICODE_CONVERSION], 1,
|
[ --enable-unicode-conversion enable unicode conversion support],
|
||||||
[Set to 1 if you want Unicode conversion support (--enable-uniconv)])])
|
[if test -z "$MULTIBYTE"; then
|
||||||
AC_MSG_RESULT([$enable_uniconv])
|
AC_MSG_ERROR([--enable-unicode-conversion only works with --enable-multibyte])
|
||||||
|
fi
|
||||||
|
AC_DEFINE([UNICODE_CONVERSION], 1,
|
||||||
|
[Set to 1 if you want Unicode conversion support (--enable-unicode-conversion)])])
|
||||||
|
AC_MSG_RESULT([$enable_unicode_conversion])
|
||||||
|
|
||||||
#
|
#
|
||||||
# Default port number (--with-pgport), default 5432
|
# Default port number (--with-pgport), default 5432
|
||||||
@ -609,7 +613,7 @@ INSTALL_SCRIPT="\${INSTALL} -m 755"
|
|||||||
# needs here if necessary.
|
# needs here if necessary.
|
||||||
case $host_os in
|
case $host_os in
|
||||||
hpux*) INSTL_SHLIB_OPTS="-m 555" ;;
|
hpux*) INSTL_SHLIB_OPTS="-m 555" ;;
|
||||||
*) INSTL_SHLIB_OPTS="-m 644" ;;
|
*) INSTL_SHLIB_OPTS="-m 755" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
INSTALL_SHLIB="\${INSTALL} $INSTL_SHLIB_OPTS"
|
INSTALL_SHLIB="\${INSTALL} $INSTL_SHLIB_OPTS"
|
||||||
@ -622,6 +626,16 @@ AC_PROG_LN_S
|
|||||||
AC_PROG_LD
|
AC_PROG_LD
|
||||||
AC_SUBST(LD)
|
AC_SUBST(LD)
|
||||||
AC_SUBST(with_gnu_ld)
|
AC_SUBST(with_gnu_ld)
|
||||||
|
case $host_os in sysv5uw*)
|
||||||
|
AC_CACHE_CHECK([whether ld -R works], [pgac_cv_prog_ld_R],
|
||||||
|
[
|
||||||
|
pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
|
||||||
|
AC_TRY_LINK([], [], [pgac_cv_prog_ld_R=yes], [pgac_cv_prog_ld_R=no])
|
||||||
|
LDFLAGS=$pgac_save_LDFLAGS
|
||||||
|
])
|
||||||
|
ld_R_works=$pgac_cv_prog_ld_R
|
||||||
|
AC_SUBST(ld_R_works)
|
||||||
|
esac
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
AC_CHECK_PROGS(LORDER, lorder)
|
AC_CHECK_PROGS(LORDER, lorder)
|
||||||
AC_PATH_PROG(TAR, tar)
|
AC_PATH_PROG(TAR, tar)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# -*-makefile-*-
|
# -*-makefile-*-
|
||||||
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.110 2000/11/05 21:04:07 petere Exp $
|
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.111 2000/11/09 18:18:42 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,
|
||||||
@ -165,6 +165,7 @@ FLEXFLAGS = @FLEXFLAGS@ $(LFLAGS)
|
|||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
LD = @LD@
|
LD = @LD@
|
||||||
with_gnu_ld = @with_gnu_ld@
|
with_gnu_ld = @with_gnu_ld@
|
||||||
|
ld_R_works = @ld_R_works@
|
||||||
LDFLAGS = @LDFLAGS@ $(LIBS)
|
LDFLAGS = @LDFLAGS@ $(LIBS)
|
||||||
LDREL = -r
|
LDREL = -r
|
||||||
LDOUT = -o
|
LDOUT = -o
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
AROPT = crs
|
AROPT = crs
|
||||||
export_dynamic = -Wl,-Bexport
|
export_dynamic = -Wl,-Bexport
|
||||||
ifneq (,$(findstring uw7.1, $(host_os)))
|
ifeq ($(ld_R_works), yes)
|
||||||
rpath = -Wl,-R$(libdir)
|
rpath = -Wl,-R$(libdir)
|
||||||
endif
|
endif
|
||||||
DLSUFFIX = .so
|
DLSUFFIX = .so
|
||||||
|
Reference in New Issue
Block a user