diff options
| author | Magnus Hagander | 2007-03-29 15:30:52 +0000 |
|---|---|---|
| committer | Magnus Hagander | 2007-03-29 15:30:52 +0000 |
| commit | 96b171903d5d52ca46b46bc3f73f13978705eae5 (patch) | |
| tree | ef3d6422c44693c74439533c8b27979952be77d2 /configure.in | |
| parent | ddcb5bbf76dd991b5a7024bc3d4e212b97d27936 (diff) | |
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.in')
| -rw-r--r-- | configure.in | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/configure.in b/configure.in index 194c56a5671..03511fbd464 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -dnl $PostgreSQL: pgsql/configure.in,v 1.506 2007/03/26 21:30:56 momjian Exp $ +dnl $PostgreSQL: pgsql/configure.in,v 1.507 2007/03/29 15:30:51 mha Exp $ dnl dnl Developers, please strive to achieve this order: dnl @@ -416,7 +416,13 @@ 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, [ --enable-thread-safety make client libraries thread-safe]) +else +# Win32 should always use threads +PGAC_ARG_BOOL(enable, thread-safety, yes, [ --enable-thread-safety make client libraries thread-safe]) +fi + PGAC_ARG_BOOL(enable, thread-safety-force, no, [ --enable-thread-safety-force force thread-safety in spite of thread test failure]) if test "$enable_thread_safety" = yes -o \ "$enable_thread_safety_force" = yes; then @@ -1108,8 +1114,8 @@ AC_FUNC_FSEEKO # 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 ACX_PTHREAD # set thread flags # Some platforms use these, so just defineed them. They can't hurt if they @@ -1137,7 +1143,9 @@ _LIBS="$LIBS" 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])]) +fi AC_CHECK_FUNCS([strerror_r getpwuid_r gethostbyname_r]) |
