@@ -844,7 +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-safetyallow libpq and ecpg to be thread-safe
847
+ --enable-thread-safety make client libraries thread-safe
848
848
--disable-largefile omit support for large files
849
849
850
850
Optional Packages:
@@ -1381,7 +1381,7 @@ echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a l
1381
1381
1382
1382
else
1383
1383
1384
- # --with-template not given
1384
+ # --with-template not given
1385
1385
1386
1386
case $host_os in
1387
1387
aix*) template=aix ;;
@@ -2354,9 +2354,13 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2354
2354
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2355
2355
ac_compiler_gnu=$ac_cv_c_compiler_gnu
2356
2356
2357
+
2358
+ #
2357
2359
# Read the template
2360
+ #
2358
2361
. "$srcdir/src/template/$template" || exit
2359
2362
2363
+ # adjust CFLAGS per template
2360
2364
if test "$ac_env_CFLAGS_set" = set; then
2361
2365
CFLAGS=$ac_env_CFLAGS_value
2362
2366
fi
@@ -2773,10 +2777,10 @@ done
2773
2777
IFS=$ac_save_IFS
2774
2778
2775
2779
#
2776
- # Enablelibpq to be thread-safety
2780
+ # Enable thread-safe client libraries
2777
2781
#
2778
- echo "$as_me:$LINENO: checking allow thread-safelibpq and ecpg " >&5
2779
- echo $ECHO_N "checking allow thread-safelibpq and ecpg ... $ECHO_C" >&6
2782
+ echo "$as_me:$LINENO: checking allow thread-safeclient libraries " >&5
2783
+ echo $ECHO_N "checking allow thread-safeclient libraries ... $ECHO_C" >&6
2780
2784
2781
2785
2782
2786
# Check whether --enable-thread-safety or --disable-thread-safety was given.
@@ -5294,65 +5298,6 @@ _ACEOF
5294
5298
5295
5299
fi
5296
5300
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
-
5356
5301
echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
5357
5302
echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
5358
5303
if test "${ac_cv_search_getopt_long+set}" = set; then
@@ -5873,6 +5818,69 @@ _ACEOF
5873
5818
5874
5819
fi
5875
5820
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
5876
5884
5877
5885
if test "$with_readline" = yes; then
5878
5886