Commit 6b70f386 authored by Peter Eisentraut's avatar Peter Eisentraut

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.
parent 343f615e
# $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
# <http://research.cys.de/autoconf-archive/>
# (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
# 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_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
[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_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(
[#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
......@@ -48,7 +52,7 @@ AC_DEFUN(AC_FUNC_ACCEPT_ARGTYPES,
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#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])
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
AC_MSG_ERROR([could not determine argument types])
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
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -203,13 +203,17 @@ Or do not specify an argument to the option to use the default.]);;
AC_SUBST(MULTIBYTE)
#
# Unicode conversion (--enable-uniconv)
# Unicode conversion (--enable-unicode-conversion)
#
AC_MSG_CHECKING([whether to build with Unicode conversion support])
PGAC_ARG_BOOL(enable, uniconv, no, [ --enable-uniconv enable unicode conversion support],
[AC_DEFINE([UNICODE_CONVERSION], 1,
[Set to 1 if you want Unicode conversion support (--enable-uniconv)])])
AC_MSG_RESULT([$enable_uniconv])
PGAC_ARG_BOOL(enable, unicode-conversion, no,
[ --enable-unicode-conversion enable unicode conversion support],
[if test -z "$MULTIBYTE"; then
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
......@@ -609,7 +613,7 @@ INSTALL_SCRIPT="\${INSTALL} -m 755"
# needs here if necessary.
case $host_os in
hpux*) INSTL_SHLIB_OPTS="-m 555" ;;
*) INSTL_SHLIB_OPTS="-m 644" ;;
*) INSTL_SHLIB_OPTS="-m 755" ;;
esac
INSTALL_SHLIB="\${INSTALL} $INSTL_SHLIB_OPTS"
......@@ -622,6 +626,16 @@ AC_PROG_LN_S
AC_PROG_LD
AC_SUBST(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_CHECK_PROGS(LORDER, lorder)
AC_PATH_PROG(TAR, tar)
......
# -*-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,
......@@ -165,6 +165,7 @@ FLEXFLAGS = @FLEXFLAGS@ $(LFLAGS)
LIBS = @LIBS@
LD = @LD@
with_gnu_ld = @with_gnu_ld@
ld_R_works = @ld_R_works@
LDFLAGS = @LDFLAGS@ $(LIBS)
LDREL = -r
LDOUT = -o
......
AROPT = crs
export_dynamic = -Wl,-Bexport
ifneq (,$(findstring uw7.1, $(host_os)))
ifeq ($(ld_R_works), yes)
rpath = -Wl,-R$(libdir)
endif
DLSUFFIX = .so
......
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