]> granicus.if.org Git - postgresql/blobdiff - configure.in
Add YAML to list of EXPLAIN formats. Greg Sabino Mullane, reviewed by Takahiro Itagaki.
[postgresql] / configure.in
index 0342b60bfd77d19928d2db528b8faa1dd6711f25..97c3c76b9e97c6cf6f3ebee84de37f6edf61c114 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-dnl $PostgreSQL: pgsql/configure.in,v 1.612 2009/10/01 01:58:57 tgl Exp $
+dnl $PostgreSQL: pgsql/configure.in,v 1.615 2009/12/02 14:07:25 momjian Exp $
 dnl
 dnl Developers, please strive to achieve this order:
 dnl
@@ -558,20 +558,7 @@ IFS=$ac_save_IFS
 # Enable thread-safe client libraries
 #
 AC_MSG_CHECKING([allow thread-safe client libraries])
-if test "$PORTNAME" != "win32"; then
-PGAC_ARG_BOOL(enable, thread-safety, no, [make client libraries thread-safe])
-else
-# Win32 should always use threads
-PGAC_ARG_BOOL(enable, thread-safety, yes, [make client libraries thread-safe])
-fi
-
-PGAC_ARG_BOOL(enable, thread-safety-force, no, [force thread-safety despite thread test failure])
-if test "$enable_thread_safety" = yes -o \
-        "$enable_thread_safety_force" = yes; then
-  enable_thread_safety="yes"   # for 'force'
-  AC_DEFINE([ENABLE_THREAD_SAFETY], 1,
-          [Define to 1 to build client libraries as thread-safe code. (--enable-thread-safety)])
-fi
+PGAC_ARG_BOOL(enable, thread-safety, yes, [disable thread-safety in client libraries])
 AC_MSG_RESULT([$enable_thread_safety])
 AC_SUBST(enable_thread_safety)
 
@@ -1404,13 +1391,7 @@ PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEM
 if test "$PTHREAD_CC" != "$CC"; then
 AC_MSG_ERROR([
 PostgreSQL does not support platforms that require a special compiler
-for thread safety.])
-fi
-
-if test "$THREAD_SUPPORT" = no; then
-AC_MSG_ERROR([cannot enable threads on this platform
-This platform is known to not support thread-safe programs.  For details,
-compile and run src/bin/pg_thread_test.])
+for thread safety;  use --disable-thread-safety to disable thread safety.])
 fi
 
 # Check for *_r functions
@@ -1420,7 +1401,8 @@ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 LIBS="$LIBS $PTHREAD_LIBS"
 
 if test "$PORTNAME" != "win32"; then
-AC_CHECK_HEADER(pthread.h, [], [AC_MSG_ERROR([pthread.h not found, required for --enable-thread-safety])])
+AC_CHECK_HEADER(pthread.h, [], [AC_MSG_ERROR([
+pthread.h not found;  use --disable-thread-safety to disable thread safety])])
 fi
 
 AC_CHECK_FUNCS([strerror_r getpwuid_r gethostbyname_r])
@@ -1666,7 +1648,7 @@ PGAC_FUNC_POSIX_SIGNALS
 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
   AC_MSG_ERROR([
 Thread-safety requires POSIX signals, which are not supported by this
-operating system.])
+operating system;  use --disable-thread-safety to disable thread safety.])
 fi
 fi
 
@@ -1755,18 +1737,7 @@ AC_CHECK_PROGS(OSX, [osx sgml2xml sx])
 # We have to run the thread test near the end so we have all our symbols
 # defined.  Cross compiling throws a warning.
 #
-if test "$enable_thread_safety_force" = yes; then
-if test "$PORTNAME" != "win32"
-then
-  AC_MSG_WARN([
-*** Skipping thread test program.  --enable-thread-safety-force was used.
-*** Run the program in src/test/thread on the your machine and add proper
-*** locking function calls to your applications to guarantee thread safety.
-])
-else
-AC_MSG_WARN([*** skipping thread test on Win32])
-fi
-elif test "$enable_thread_safety" = yes; then
+if test "$enable_thread_safety" = yes; then
 if test "$PORTNAME" != "win32"
 then
 AC_MSG_CHECKING([thread safety of required library functions])
@@ -1779,13 +1750,9 @@ AC_TRY_RUN([#include "$srcdir/src/test/thread/thread_test.c"],
   [AC_MSG_RESULT(yes)],
   [AC_MSG_RESULT(no)
   AC_MSG_ERROR([thread test program failed
-This platform is not thread-safe.  Check the file 'config.log' for the
-exact reason.
-
-You can use the configure option --enable-thread-safety-force to force
-threads to be enabled.  But you must then run the program in
-src/test/thread and add locking function calls to your applications to
-guarantee thread safety.])],
+This platform is not thread-safe.  Check the file 'config.log' or compile
+and run src/test/thread/thread_test for the exact reason.
+Use --disable-thread-safety to disable thread safety.])],
   [AC_MSG_RESULT(maybe)
   AC_MSG_WARN([
 *** Skipping thread test program because of cross-compile build.