@@ -844,6 +844,7 @@ Optional Features:
844
844
--enable-debug build with debugging symbols (-g)
845
845
--enable-depend turn on automatic dependency tracking
846
846
--enable-cassert enable assertion checks (for debugging)
847
+ --enable-thread-safety allow libpq and ecpg to be thread-safe
847
848
--disable-largefile omit support for large files
848
849
849
850
Optional Packages:
@@ -854,7 +855,6 @@ Optional Packages:
854
855
--with-libraries=DIRS look for additional libraries in DIRS
855
856
--with-libs=DIRS alternative spelling of --with-libraries
856
857
--with-pgport=PORTNUM change default port number 5432
857
- --enable-thread-safety allow libpq and ecpg to be thread-safe
858
858
--with-tcl build Tcl and Tk interfaces
859
859
--without-tk do not build Tk interfaces if Tcl is enabled
860
860
--with-tclconfig=DIR tclConfig.sh and tkConfig.sh are in DIR
@@ -2779,35 +2779,29 @@ echo "$as_me:$LINENO: checking allow thread-safe libpq and ecpg" >&5
2779
2779
echo $ECHO_N "checking allow thread-safe libpq and ecpg... $ECHO_C" >&6
2780
2780
2781
2781
2782
+ # Check whether --enable-thread-safety or --disable-thread-safety was given.
2783
+ if test "${enable_thread_safety+set}" = set; then
2784
+ enableval="$enable_thread_safety"
2782
2785
2783
- # Check whether --with-threads or --without-threads was given.
2784
- if test "${with_threads+set}" = set; then
2785
- withval="$with_threads"
2786
-
2787
- case $withval in
2786
+ case $enableval in
2788
2787
yes)
2789
-
2790
- cat >>confdefs.h <<\_ACEOF
2791
- #define USE_THREADS 1
2792
- _ACEOF
2793
-
2788
+ :
2794
2789
;;
2795
2790
no)
2796
2791
:
2797
2792
;;
2798
2793
*)
2799
- { { echo "$as_me:$LINENO: error: no argument expected for --with-threads option" >&5
2800
- echo "$as_me: error: no argument expected for --with-threads option" >&2;}
2794
+ { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
2795
+ echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
2801
2796
{ (exit 1); exit 1; }; }
2802
2797
;;
2803
2798
esac
2804
2799
2805
2800
else
2806
- with_threads =no
2801
+ enable_thread_safety =no
2807
2802
2808
2803
fi;
2809
2804
2810
-
2811
2805
echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
2812
2806
echo "${ECHO_T}$enable_thread_safety" >&6
2813
2807
@@ -13079,6 +13073,10 @@ functions, or libraries required for threading support.
13079
13073
" >&2;}
13080
13074
{ (exit 1); exit 1; }; }
13081
13075
fi
13076
+ else
13077
+ # do not use values from template file
13078
+ THREAD_CFLAGS=
13079
+ THREAD_LIBS=
13082
13080
fi
13083
13081
13084
13082
@@ -13096,8 +13094,8 @@ fi
13096
13094
#
13097
13095
if test "$enable_thread_safety" = yes -a "$NEED_REENTRANT_FUNC_NAMES" = yes ; then
13098
13096
_CFLAGS="$CFLAGS"
13099
- _LIB ="$LIBS"
13100
- CFLAGS="$CFLAGS $TREAD_CFLAGS "
13097
+ _LIBS ="$LIBS"
13098
+ CFLAGS="$CFLAGS $THREAD_CFLAGS "
13101
13099
LIBS="$LIBS $THREAD_LIBS"
13102
13100
13103
13101
@@ -13178,7 +13176,7 @@ fi
13178
13176
done
13179
13177
13180
13178
CFLAGS="$_CFLAGS"
13181
- LIB ="$_LIBS"
13179
+ LIBS ="$_LIBS"
13182
13180
fi
13183
13181
13184
13182
0 commit comments