*** pgsql/configure.in 2003/06/14 17:49:53 1.263 --- 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.263 2003/06/14 17:49:53 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 *************** IFS=$ac_save_IFS *** 323,330 **** # Enable libpq to be thread-safe # AC_MSG_CHECKING([allow threaded libpq]) ! PGAC_ARG_BOOL(with, threads, no, [ --with-threads allow libpq to be thread-safe], ! [AC_DEFINE([USE_THREADS], 1, [Define to 1 to build libpq with threads. (--with-threads)])]) AC_MSG_RESULT([$with_threads]) AC_SUBST(with_threads) --- 323,330 ---- # 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) *************** fi]) *** 552,597 **** AC_SUBST(ELF_SYS) # - # 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])]) - case $host_os in - netbsd*|bsdi*) - # these require no special flags or libraries - NEED_REENTRANT_FUNC_NAMES=no - ;; - freebsd2*|freebsd3*|freebsd4*) - THREAD_CFLAGS="-pthread" - NEED_REENTRANT_FUNC_NAMES=yes - ;; - freebsd*) - THREAD_LIBS="-lc_r" - NEED_REENTRANT_FUNC_NAMES=yes - ;; - linux*) THREAD_CFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS" - THREAD_LIBS="-lpthread" - NEED_REENTRANT_FUNC_NAMES=yes - ;; - *) - # other operating systems might fail because they have pthread.h but need - # special libs we don't know about yet. - 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 or link flags, - or libraries required for threading support. - ]) - esac - fi - AC_SUBST(THREAD_CFLAGS) - AC_SUBST(THREAD_LIBS) - - # # Assignments # --- 552,557 ---- *************** PGAC_STRUCT_TIMEZONE *** 818,823 **** --- 778,784 ---- 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], [], [], *************** AC_CHECK_FUNCS(atexit, [], *** 999,1004 **** --- 960,988 ---- 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