aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2007-03-29 15:30:52 +0000
committerMagnus Hagander <magnus@hagander.net>2007-03-29 15:30:52 +0000
commit96b171903d5d52ca46b46bc3f73f13978705eae5 (patch)
treeef3d6422c44693c74439533c8b27979952be77d2 /configure
parentddcb5bbf76dd991b5a7024bc3d4e212b97d27936 (diff)
downloadpostgresql-96b171903d5d52ca46b46bc3f73f13978705eae5.tar.gz
postgresql-96b171903d5d52ca46b46bc3f73f13978705eae5.zip
Make ECPG regression tests use native threading instead of pthreads, now that
ecpglib supports it. Change configure (patch from Bruce) and msvc build system to no longer require pthreads on win32, since all parts of postgresql can be thread-safe using the native platform functions.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure37
1 files changed, 35 insertions, 2 deletions
diff --git a/configure b/configure
index 72d66b988aa..c5a20b1e122 100755
--- a/configure
+++ b/configure
@@ -3683,6 +3683,7 @@ IFS=$ac_save_IFS
#
echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
+if test "$PORTNAME" != "win32"; then
pgac_args="$pgac_args enable_thread_safety"
@@ -3709,6 +3710,36 @@ else
fi;
+else
+# Win32 should always use threads
+
+pgac_args="$pgac_args enable_thread_safety"
+
+# Check whether --enable-thread-safety or --disable-thread-safety was given.
+if test "${enable_thread_safety+set}" = set; then
+ enableval="$enable_thread_safety"
+
+ case $enableval in
+ yes)
+ :
+ ;;
+ no)
+ :
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
+echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+
+else
+ enable_thread_safety=yes
+
+fi;
+
+fi
+
pgac_args="$pgac_args enable_thread_safety_force"
@@ -16701,8 +16732,8 @@ fi
# For each platform, we need to know about any special compile and link
# libraries, and whether the normal C function names are thread-safe.
# See the comment at the top of src/port/thread.c for more information.
-#
-if test "$enable_thread_safety" = yes; then
+# WIN32 doesn't need the pthread tests; it always uses threads
+if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
@@ -17236,6 +17267,7 @@ _LIBS="$LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LIBS="$LIBS $PTHREAD_LIBS"
+if test "$PORTNAME" != "win32"; then
if test "${ac_cv_header_pthread_h+set}" = set; then
echo "$as_me:$LINENO: checking for pthread.h" >&5
echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
@@ -17382,6 +17414,7 @@ echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >
fi
+fi