|
|
| version 1.245, 2003/05/07 03:47:08 | version 1.267, 2003/06/23 23:51:59 |
|---|---|
| Line 65 case $host_os in | Line 65 case $host_os in |
| hpux*) template=hpux ;; | hpux*) template=hpux ;; |
| irix*) template=irix5 ;; | irix*) template=irix5 ;; |
| linux*) template=linux ;; | linux*) template=linux ;; |
| mingw*) template=win ;; | mingw*) template=win32 ;; |
| netbsd*) template=netbsd ;; | netbsd*) template=netbsd ;; |
| nextstep*) template=nextstep ;; | nextstep*) template=nextstep ;; |
| openbsd*) template=openbsd ;; | openbsd*) template=openbsd ;; |
| Line 319 for dir in $LIBRARY_DIRS $SRCH_LIB; do | Line 319 for dir in $LIBRARY_DIRS $SRCH_LIB; do |
| done | done |
| IFS=$ac_save_IFS | 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 | # Tcl/Tk |
| Line 473 AC_SUBST(with_pam) | Line 482 AC_SUBST(with_pam) |
| # | # |
| # 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 | # OpenSSL |
| # | # |
| PGAC_ARG_OPTARG(with, openssl, | PGAC_ARG_OPTARG(with, openssl, |
| Line 507 PGAC_ARG_BOOL(with, zlib, yes, | Line 527 PGAC_ARG_BOOL(with, zlib, yes, |
| [ --without-zlib do not use Zlib]) | [ --without-zlib do not use Zlib]) |
| # | |
| # Elf | |
| # | |
| # Assume system is ELF if it predefines __ELF__ as 1, | # Assume system is ELF if it predefines __ELF__ as 1, |
| # otherwise believe host_os based default. | # otherwise believe host_os based default. |
| Line 528 else | Line 551 else |
| fi]) | fi]) |
| AC_SUBST(ELF_SYS) | AC_SUBST(ELF_SYS) |
| # | |
| # Assignments | |
| # | |
| CPPFLAGS="$CPPFLAGS $INCLUDES" | CPPFLAGS="$CPPFLAGS $INCLUDES" |
| LDFLAGS="$LDFLAGS $LIBDIRS" | LDFLAGS="$LDFLAGS $LIBDIRS" |
| Line 559 AC_PATH_PROG(TAR, tar) | Line 584 AC_PATH_PROG(TAR, tar) |
| PGAC_CHECK_STRIP | PGAC_CHECK_STRIP |
| AC_CHECK_PROGS(YACC, ['bison -y']) | 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 | if test -z "$YACC"; then |
| AC_MSG_WARN([ | AC_MSG_WARN([ |
| *** Without Bison you will not be able to build PostgreSQL from CVS or | *** Without Bison you will not be able to build PostgreSQL from CVS or |
| Line 607 AC_CHECK_LIB(BSD, main) | Line 641 AC_CHECK_LIB(BSD, main) |
| AC_CHECK_LIB(gen, main) | AC_CHECK_LIB(gen, main) |
| AC_CHECK_LIB(PW, main) | AC_CHECK_LIB(PW, main) |
| AC_CHECK_LIB(resolv, main) | AC_CHECK_LIB(resolv, main) |
| AC_CHECK_LIB(wsock32, main) | |
| AC_SEARCH_LIBS(getopt_long, [getopt gnugetopt]) | AC_SEARCH_LIBS(getopt_long, [getopt gnugetopt]) |
| # QNX: | # QNX: |
| AC_CHECK_LIB(unix, main) | AC_CHECK_LIB(unix, main) |
| Line 639 fi | Line 674 fi |
| if test "$with_krb4" = yes ; then | if test "$with_krb4" = yes ; then |
| AC_CHECK_LIB(des, des_encrypt, [], [AC_MSG_ERROR([library 'des' is required for Kerberos 4])]) | AC_CHECK_LIB(des, des_encrypt, [], [AC_MSG_ERROR([library 'des' is required for Kerberos 4])]) |
| AC_CHECK_LIB(krb, krb_sendauth, [], [AC_MSG_ERROR([library 'krb' is required for Kerberos 4])]) | AC_CHECK_LIB(krb, krb_sendauth, [], [AC_MSG_ERROR([library 'krb' is required for Kerberos 4])]) |
| AC_REPLACE_FUNCS([gethostname]) | |
| fi | fi |
| if test "$with_krb5" = yes ; then | if test "$with_krb5" = yes ; then |
| Line 722 if test "$with_pam" = yes ; then | Line 758 if test "$with_pam" = yes ; then |
| [AC_MSG_ERROR([header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM.])])]) | [AC_MSG_ERROR([header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM.])])]) |
| fi | fi |
| if test "$with_rendezvous" = yes ; then | |
| AC_CHECK_HEADER(DNSServiceDiscovery/DNSServiceDiscovery.h, [], [AC_MSG_ERROR([header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Rendezvous])]) | |
| fi | |
| ## | ## |
| ## Types, structures, compiler characteristics | ## Types, structures, compiler characteristics |
| Line 734 AC_C_STRINGIZE | Line 774 AC_C_STRINGIZE |
| PGAC_C_SIGNED | PGAC_C_SIGNED |
| AC_C_VOLATILE | AC_C_VOLATILE |
| PGAC_C_FUNCNAME_SUPPORT | PGAC_C_FUNCNAME_SUPPORT |
| AC_STRUCT_TIMEZONE | PGAC_STRUCT_TIMEZONE |
| PGAC_UNION_SEMUN | PGAC_UNION_SEMUN |
| PGAC_STRUCT_SOCKADDR_UN | PGAC_STRUCT_SOCKADDR_UN |
| PGAC_STRUCT_SOCKADDR_STORAGE | |
| PGAC_STRUCT_SOCKADDR_STORAGE_SS_FAMILY | |
| PGAC_STRUCT_ADDRINFO | PGAC_STRUCT_ADDRINFO |
| AC_CHECK_TYPES([struct cmsgcred, struct fcred, struct sockcred], [], [], | AC_CHECK_TYPES([struct cmsgcred, struct fcred, struct sockcred], [], [], |
| [#include <sys/param.h> | [#include <sys/param.h> |
| #include <sys/types.h> | |
| #include <sys/socket.h> | #include <sys/socket.h> |
| #include <sys/ucred.h>]) | #include <sys/ucred.h>]) |
| Line 839 else | Line 882 else |
| AC_CHECK_FUNCS([fpclass fp_class fp_class_d class], [break]) | AC_CHECK_FUNCS([fpclass fp_class fp_class_d class], [break]) |
| fi | fi |
| AC_REPLACE_FUNCS([fseeko gethostname getopt_long getrusage inet_aton random srandom strcasecmp strdup strerror strtol strtoul]) | AC_REPLACE_FUNCS([crypt fseeko getopt getopt_long getrusage inet_aton random rint srandom strcasecmp strdup strerror strtol strtoul]) |
| # system's version of getaddrinfo(), if any, may be used only if we found | # system's version of getaddrinfo(), if any, may be used only if we found |
| # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h | # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h |
| Line 862 AC_LIBOBJ(qsort) ;; | Line 905 AC_LIBOBJ(qsort) ;; |
| esac | esac |
| # Win32 can't to rename or unlink on an open file | # Win32 can't to rename or unlink on an open file |
| case $host_os in win32*) | case $host_os in mingw*) |
| AC_LIBOBJ(dirmod) ;; | AC_LIBOBJ(dirmod) |
| AC_LIBOBJ(copydir) | |
| AC_LIBOBJ(gettimeofday) ;; | |
| esac | esac |
| # 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="" | |
| case $host_cpu in | |
| hppa1.1) | |
| if test -r /lib/pa1.1/libm.a ; then | |
| HPUXMATHLIB="-L /lib/pa1.1 -lm" | |
| fi ;; | |
| esac | |
| AC_SUBST(HPUXMATHLIB) | |
| AC_CHECK_FUNCS(rint, [], | |
| [AC_CHECK_LIB(m, rint, AC_DEFINE(HAVE_RINT), , $HPUXMATHLIB)]) | |
| if test "$with_readline" = yes; then | if test "$with_readline" = yes; then |
| PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER | PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER |
| AC_CHECK_FUNCS([rl_completion_matches rl_filename_completion_function]) | AC_CHECK_FUNCS([rl_completion_matches rl_filename_completion_function]) |
| Line 929 AC_CHECK_FUNCS(atexit, [], | Line 959 AC_CHECK_FUNCS(atexit, [], |
| AC_FUNC_FSEEKO | 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 | # 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. | # library is found by the linker, but the runtime linker can't find it. |