@@ -844,7 +844,7 @@ Optional Features:
844844 --enable-debug build with debugging symbols (-g)
845845 --enable-depend turn on automatic dependency tracking
846846 --enable-cassert enable assertion checks (for debugging)
847- --enable-thread-safety allow libpq and ecpg to be thread-safe
847+ --enable-thread-safety make client libraries thread-safe
848848 --disable-largefile omit support for large files
849849
850850Optional Packages:
@@ -1381,7 +1381,7 @@ echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a l
13811381
13821382else
13831383
1384- # --with-template not given
1384+ # --with-template not given
13851385
13861386case $host_os in
13871387 aix*) template=aix ;;
@@ -2354,9 +2354,13 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23542354ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23552355ac_compiler_gnu=$ac_cv_c_compiler_gnu
23562356
2357+
2358+ #
23572359# Read the template
2360+ #
23582361. "$srcdir/src/template/$template" || exit
23592362
2363+ # adjust CFLAGS per template
23602364if test "$ac_env_CFLAGS_set" = set; then
23612365 CFLAGS=$ac_env_CFLAGS_value
23622366fi
@@ -2773,10 +2777,10 @@ done
27732777IFS=$ac_save_IFS
27742778
27752779#
2776- # Enable libpq to be thread-safety
2780+ # Enable thread-safe client libraries
27772781#
2778- echo "$as_me:$LINENO: checking allow thread-safe libpq and ecpg " >&5
2779- echo $ECHO_N "checking allow thread-safe libpq and ecpg ... $ECHO_C" >&6
2782+ echo "$as_me:$LINENO: checking allow thread-safe client libraries " >&5
2783+ echo $ECHO_N "checking allow thread-safe client libraries ... $ECHO_C" >&6
27802784
27812785
27822786# Check whether --enable-thread-safety or --disable-thread-safety was given.
@@ -5294,65 +5298,6 @@ _ACEOF
52945298
52955299fi
52965300
5297-
5298- echo "$as_me:$LINENO: checking for main in -lwsock32" >&5
5299- echo $ECHO_N "checking for main in -lwsock32... $ECHO_C" >&6
5300- if test "${ac_cv_lib_wsock32_main+set}" = set; then
5301- echo $ECHO_N "(cached) $ECHO_C" >&6
5302- else
5303- ac_check_lib_save_LIBS=$LIBS
5304- LIBS="-lwsock32 $LIBS"
5305- cat >conftest.$ac_ext <<_ACEOF
5306- #line $LINENO "configure"
5307- #include "confdefs.h"
5308-
5309-
5310- #ifdef F77_DUMMY_MAIN
5311- # ifdef __cplusplus
5312- extern "C"
5313- # endif
5314- int F77_DUMMY_MAIN() { return 1; }
5315- #endif
5316- int
5317- main ()
5318- {
5319- main ();
5320- ;
5321- return 0;
5322- }
5323- _ACEOF
5324- rm -f conftest.$ac_objext conftest$ac_exeext
5325- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5326- (eval $ac_link) 2>&5
5327- ac_status=$?
5328- echo "$as_me:$LINENO: \$? = $ac_status" >&5
5329- (exit $ac_status); } &&
5330- { ac_try='test -s conftest$ac_exeext'
5331- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5332- (eval $ac_try) 2>&5
5333- ac_status=$?
5334- echo "$as_me:$LINENO: \$? = $ac_status" >&5
5335- (exit $ac_status); }; }; then
5336- ac_cv_lib_wsock32_main=yes
5337- else
5338- echo "$as_me: failed program was:" >&5
5339- cat conftest.$ac_ext >&5
5340- ac_cv_lib_wsock32_main=no
5341- fi
5342- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5343- LIBS=$ac_check_lib_save_LIBS
5344- fi
5345- echo "$as_me:$LINENO: result: $ac_cv_lib_wsock32_main" >&5
5346- echo "${ECHO_T}$ac_cv_lib_wsock32_main" >&6
5347- if test $ac_cv_lib_wsock32_main = yes; then
5348- cat >>confdefs.h <<_ACEOF
5349- #define HAVE_LIBWSOCK32 1
5350- _ACEOF
5351-
5352- LIBS="-lwsock32 $LIBS"
5353-
5354- fi
5355-
53565301echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
53575302echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
53585303if test "${ac_cv_search_getopt_long+set}" = set; then
@@ -5873,6 +5818,69 @@ _ACEOF
58735818
58745819fi
58755820
5821+ # WIN32:
5822+ if test "$PORTNAME" = "win32"
5823+ then
5824+
5825+ echo "$as_me:$LINENO: checking for main in -lwsock32" >&5
5826+ echo $ECHO_N "checking for main in -lwsock32... $ECHO_C" >&6
5827+ if test "${ac_cv_lib_wsock32_main+set}" = set; then
5828+ echo $ECHO_N "(cached) $ECHO_C" >&6
5829+ else
5830+ ac_check_lib_save_LIBS=$LIBS
5831+ LIBS="-lwsock32 $LIBS"
5832+ cat >conftest.$ac_ext <<_ACEOF
5833+ #line $LINENO "configure"
5834+ #include "confdefs.h"
5835+
5836+
5837+ #ifdef F77_DUMMY_MAIN
5838+ # ifdef __cplusplus
5839+ extern "C"
5840+ # endif
5841+ int F77_DUMMY_MAIN() { return 1; }
5842+ #endif
5843+ int
5844+ main ()
5845+ {
5846+ main ();
5847+ ;
5848+ return 0;
5849+ }
5850+ _ACEOF
5851+ rm -f conftest.$ac_objext conftest$ac_exeext
5852+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5853+ (eval $ac_link) 2>&5
5854+ ac_status=$?
5855+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
5856+ (exit $ac_status); } &&
5857+ { ac_try='test -s conftest$ac_exeext'
5858+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5859+ (eval $ac_try) 2>&5
5860+ ac_status=$?
5861+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
5862+ (exit $ac_status); }; }; then
5863+ ac_cv_lib_wsock32_main=yes
5864+ else
5865+ echo "$as_me: failed program was:" >&5
5866+ cat conftest.$ac_ext >&5
5867+ ac_cv_lib_wsock32_main=no
5868+ fi
5869+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5870+ LIBS=$ac_check_lib_save_LIBS
5871+ fi
5872+ echo "$as_me:$LINENO: result: $ac_cv_lib_wsock32_main" >&5
5873+ echo "${ECHO_T}$ac_cv_lib_wsock32_main" >&6
5874+ if test $ac_cv_lib_wsock32_main = yes; then
5875+ cat >>confdefs.h <<_ACEOF
5876+ #define HAVE_LIBWSOCK32 1
5877+ _ACEOF
5878+
5879+ LIBS="-lwsock32 $LIBS"
5880+
5881+ fi
5882+
5883+ fi
58765884
58775885if test "$with_readline" = yes; then
58785886
0 commit comments