*** pgsql/configure.in 2003/05/15 16:35:27 1.250 --- pgsql/configure.in 2003/06/23 23:51:59 1.267 *************** *** 1,5 **** dnl Process this file with autoconf to produce a configure script. ! dnl $Header: /projects/cvsroot/pgsql/configure.in,v 1.250 2003/05/15 16:35:27 momjian Exp $ dnl dnl Developers, please strive to achieve this order: dnl --- 1,5 ---- dnl Process this file with autoconf to produce a configure script. ! dnl $Header: /projects/cvsroot/pgsql/configure.in,v 1.267 2003/06/23 23:51:59 momjian Exp $ dnl dnl Developers, please strive to achieve this order: dnl *************** done *** 320,325 **** --- 320,335 ---- IFS=$ac_save_IFS # + # Enable libpq to be thread-safe + # + AC_MSG_CHECKING([allow threaded libpq]) + PGAC_ARG_BOOL(with, threads, no, [ --with-threads allow libpq and ecpg to be thread-safe], + [AC_DEFINE([USE_THREADS], 1, [Define to 1 to build libpq and ecpg to be thread-safe. (--with-threads)])]) + + AC_MSG_RESULT([$with_threads]) + AC_SUBST(with_threads) + + # # Tcl/Tk # AC_MSG_CHECKING([whether to build with Tcl]) *************** AC_SUBST(with_pam) *** 472,477 **** --- 482,498 ---- # + # Rendezvous + # + AC_MSG_CHECKING([whether to build with Rendezvous support]) + PGAC_ARG_BOOL(with, rendezvous, no, + [ --with-rendezvous build with Rendezvous support], + [AC_DEFINE([USE_RENDEZVOUS], 1, [Define to 1 to build with Rendezvous support. (--with-rendezvous)])]) + AC_MSG_RESULT([$with_rendezvous]) + AC_SUBST(with_rendezvous) + + + # # OpenSSL # PGAC_ARG_OPTARG(with, openssl, *************** PGAC_ARG_BOOL(with, zlib, yes, *** 506,511 **** --- 527,535 ---- [ --without-zlib do not use Zlib]) + # + # Elf + # # Assume system is ELF if it predefines __ELF__ as 1, # otherwise believe host_os based default. *************** else *** 527,533 **** fi]) AC_SUBST(ELF_SYS) ! CPPFLAGS="$CPPFLAGS $INCLUDES" LDFLAGS="$LDFLAGS $LIBDIRS" --- 551,559 ---- fi]) AC_SUBST(ELF_SYS) ! # ! # Assignments ! # CPPFLAGS="$CPPFLAGS $INCLUDES" LDFLAGS="$LDFLAGS $LIBDIRS" *************** AC_PATH_PROG(TAR, tar) *** 558,563 **** --- 584,598 ---- PGAC_CHECK_STRIP AC_CHECK_PROGS(YACC, ['bison -y']) + + if test "$YACC"; then + if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then + AC_MSG_WARN([ + *** The installed version of Bison is too old. PostgreSQL needs + *** Bison version 1.875 or later.]) + fi + fi + if test -z "$YACC"; then AC_MSG_WARN([ *** Without Bison you will not be able to build PostgreSQL from CVS or *************** if test "$with_pam" = yes ; then *** 723,728 **** --- 758,767 ---- [AC_MSG_ERROR([header file or is required for PAM.])])]) fi + if test "$with_rendezvous" = yes ; then + AC_CHECK_HEADER(DNSServiceDiscovery/DNSServiceDiscovery.h, [], [AC_MSG_ERROR([header file is required for Rendezvous])]) + fi + ## ## Types, structures, compiler characteristics *************** AC_C_STRINGIZE *** 735,747 **** PGAC_C_SIGNED AC_C_VOLATILE PGAC_C_FUNCNAME_SUPPORT ! AC_STRUCT_TIMEZONE PGAC_UNION_SEMUN PGAC_STRUCT_SOCKADDR_UN PGAC_STRUCT_ADDRINFO AC_CHECK_TYPES([struct cmsgcred, struct fcred, struct sockcred], [], [], [#include #include #include ]) --- 774,789 ---- PGAC_C_SIGNED AC_C_VOLATILE PGAC_C_FUNCNAME_SUPPORT ! PGAC_STRUCT_TIMEZONE PGAC_UNION_SEMUN PGAC_STRUCT_SOCKADDR_UN + PGAC_STRUCT_SOCKADDR_STORAGE + PGAC_STRUCT_SOCKADDR_STORAGE_SS_FAMILY PGAC_STRUCT_ADDRINFO AC_CHECK_TYPES([struct cmsgcred, struct fcred, struct sockcred], [], [], [#include + #include #include #include ]) *************** AC_LIBOBJ(qsort) ;; *** 863,870 **** esac # Win32 can't to rename or unlink on an open file ! case $host_os in win32*|mingw*) ! AC_LIBOBJ(dirmod) ;; esac if test "$with_readline" = yes; then --- 905,914 ---- esac # Win32 can't to rename or unlink on an open file ! case $host_os in mingw*) ! AC_LIBOBJ(dirmod) ! AC_LIBOBJ(copydir) ! AC_LIBOBJ(gettimeofday) ;; esac if test "$with_readline" = yes; then *************** AC_CHECK_FUNCS(atexit, [], *** 915,920 **** --- 959,1007 ---- AC_FUNC_FSEEKO + # + # Pthreads + # + # For each platform, we need to know about any special compile and link + # libraries, and whether the normal C function names are thread-safe. + # + NEED_REENTRANT_FUNC_NAMES=no + if test "$with_threads" = yes; then + AC_CHECK_HEADER(pthread.h, [], [AC_MSG_ERROR([pthread.h not found, required for --with-threads])]) + + if test "$SUPPORTS_THREADS" != yes; then + AC_MSG_ERROR([ + Cannot enable threads on your platform. + Please report your platform threading info to the PostgreSQL mailing lists + so it can be added to the next release. Report any compile flags, link flags, + functions, or libraries required for threading support. + ]) + fi + fi + AC_SUBST(THREAD_CFLAGS) + AC_SUBST(THREAD_LIBS) + + + # + # Check for re-entrant versions of certain functions + # + # Include special flags if threads are enabled _and_ if required for + # threading on this platform. Some platforms have *_r functions but + # their natively named funcs are threadsafe, and should be used instead. + # + # One trick here is that if the don't call AC_CHECK_FUNCS, the + # functions are marked "not found", which is perfect. + # + if test "$NEED_REENTRANT_FUNC_NAMES" = yes ; then + _CFLAGS="$CFLAGS" + _LIB="$LIBS" + CFLAGS="$CFLAGS $TREAD_CFLAGS" + LIBS="$LIBS $THREAD_LIBS" + AC_CHECK_FUNCS([strerror_r getpwuid_r gethostbyname_r]) + CFLAGS="$_CFLAGS" + LIB="$_LIBS" + fi + # This test makes sure that run tests work at all. Sometimes a shared # library is found by the linker, but the runtime linker can't find it.