aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure152
1 files changed, 6 insertions, 146 deletions
diff --git a/configure b/configure
index c9388f27d8e..481096ca894 100755
--- a/configure
+++ b/configure
@@ -652,7 +652,6 @@ LDAP_LIBS_BE
LDAP_LIBS_FE
PTHREAD_CFLAGS
PTHREAD_LIBS
-PTHREAD_CC
acx_pthread_config
have_win32_dbghelp
HAVE_IPV6
@@ -12437,8 +12436,9 @@ _ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
# Check both linking and compiling, because they might tolerate different options.
if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
- # we continue with more flags because Linux needs -lpthread
- # for libpq builds on PostgreSQL. The test above only
+ # The original macro breaks out of the loop at this point,
+ # but we continue trying flags because Linux needs -lpthread
+ # too to build libpq successfully. The test above only
# tests for building binaries, not shared libraries.
PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
@@ -12454,144 +12454,13 @@ $as_echo "$acx_pthread_ok" >&6; }
done
fi
-# Various other checks:
-if test "x$acx_pthread_ok" = xyes; then
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
- # Detect AIX lossage: threads are created detached by default
- # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
-$as_echo_n "checking for joinable pthread attribute... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-int
-main ()
-{
-int attr=PTHREAD_CREATE_JOINABLE;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ok=PTHREAD_CREATE_JOINABLE
-else
- ok=unknown
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test x"$ok" = xunknown; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-int
-main ()
-{
-int attr=PTHREAD_CREATE_UNDETACHED;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ok=PTHREAD_CREATE_UNDETACHED
-else
- ok=unknown
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
- if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
-
-$as_echo "#define PTHREAD_CREATE_JOINABLE \$ok" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ok}" >&5
-$as_echo "${ok}" >&6; }
- if test x"$ok" = xunknown; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: we do not know how to create joinable pthreads" >&5
-$as_echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
-$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
- flag=no
-# We always add these in PostgreSQL
-# case "${host_cpu}-${host_os}" in
-# *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
-# *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
-# esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
-$as_echo "${flag}" >&6; }
- if test "x$flag" != xno; then
- PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
- fi
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-
-# Supporting cc_r would require a special CC in all places that
-# use libpq, and that is ugly, so we don't do it. Users can still
-# define their compiler as cc_r to do thread builds of everything.
- # More AIX lossage: must compile with cc_r
- # Extract the first word of "cc_r", so it can be a program name with args.
-set dummy cc_r; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_PTHREAD_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$PTHREAD_CC"; then
- ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_PTHREAD_CC="cc_r"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
-fi
-fi
-PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
-if test -n "$PTHREAD_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
-$as_echo "$PTHREAD_CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-else
- PTHREAD_CC="$CC"
-fi
+# The original macro has a bunch of other tests here, which we have removed
+# because (a) Postgres doesn't need them, and (b) $acx_pthread_ok is not
+# meaningful at this point.
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$acx_pthread_ok" = xyes; then
-
-$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
-
- :
-else
- acx_pthread_ok=no
-
-fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -12605,15 +12474,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# enables 5-arg getpwuid_r, among other things.
PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
-
-# At this point, we don't want to muck with the compiler name for threading.
-# Let's see who fails, perhaps AIX. 2004-04-23
-if test "$PTHREAD_CC" != "$CC"; then
-as_fn_error $? "
-PostgreSQL does not support platforms that require a special compiler
-for thread safety; use --disable-thread-safety to disable thread safety." "$LINENO" 5
-fi
-
# Check for *_r functions
_CFLAGS="$CFLAGS"
_LIBS="$LIBS"