@@ -3977,9 +3977,6 @@ echo "$as_me: error: --enable-profiling is supported only when using GCC" >&2;}
39773977 fi
39783978fi
39793979
3980- { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
3981- echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
3982-
39833980# We already have this in Makefile.win32, but configure needs it too
39843981if test "$PORTNAME" = "win32"; then
39853982 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
@@ -4318,116 +4315,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
43184315
43194316
43204317
4321- # If compiler will take -Wl,--as-needed then add that to LDFLAGS.
4322- # This is much easier than trying to filter LIBS to the minimum for each
4323- # executable. (Note that shared libraries won't use this switch, though.)
4324- # On Darwin it's spelled -Wl,-dead_strip_dylibs, but don't try that elsewhere
4325- if test "$PORTNAME" != "darwin"; then
4326- { echo "$as_me:$LINENO: checking if $CC supports -Wl,--as-needed" >&5
4327- echo $ECHO_N "checking if $CC supports -Wl,--as-needed... $ECHO_C" >&6; }
4328- pgac_save_LDFLAGS=$LDFLAGS
4329- LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
4330- cat >conftest.$ac_ext <<_ACEOF
4331- /* confdefs.h. */
4332- _ACEOF
4333- cat confdefs.h >>conftest.$ac_ext
4334- cat >>conftest.$ac_ext <<_ACEOF
4335- /* end confdefs.h. */
4336-
4337- int
4338- main ()
4339- {
4340-
4341- ;
4342- return 0;
4343- }
4344- _ACEOF
4345- rm -f conftest.$ac_objext conftest$ac_exeext
4346- if { (ac_try="$ac_link"
4347- case "(($ac_try" in
4348- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4349- *) ac_try_echo=$ac_try;;
4350- esac
4351- eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4352- (eval "$ac_link") 2>conftest.er1
4353- ac_status=$?
4354- grep -v '^ *+' conftest.er1 >conftest.err
4355- rm -f conftest.er1
4356- cat conftest.err >&5
4357- echo "$as_me:$LINENO: \$? = $ac_status" >&5
4358- (exit $ac_status); } && {
4359- test -z "$ac_c_werror_flag" ||
4360- test ! -s conftest.err
4361- } && test -s conftest$ac_exeext &&
4362- $as_test_x conftest$ac_exeext; then
4363- { echo "$as_me:$LINENO: result: yes" >&5
4364- echo "${ECHO_T}yes" >&6; }
4365- else
4366- echo "$as_me: failed program was:" >&5
4367- sed 's/^/| /' conftest.$ac_ext >&5
4368-
4369- LDFLAGS="$pgac_save_LDFLAGS"
4370- { echo "$as_me:$LINENO: result: no" >&5
4371- echo "${ECHO_T}no" >&6; }
4372- fi
4373-
4374- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4375- conftest$ac_exeext conftest.$ac_ext
4376-
4377- else
4378- { echo "$as_me:$LINENO: checking if $CC supports -Wl,-dead_strip_dylibs" >&5
4379- echo $ECHO_N "checking if $CC supports -Wl,-dead_strip_dylibs... $ECHO_C" >&6; }
4380- pgac_save_LDFLAGS=$LDFLAGS
4381- LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
4382- cat >conftest.$ac_ext <<_ACEOF
4383- /* confdefs.h. */
4384- _ACEOF
4385- cat confdefs.h >>conftest.$ac_ext
4386- cat >>conftest.$ac_ext <<_ACEOF
4387- /* end confdefs.h. */
4388-
4389- int
4390- main ()
4391- {
4392-
4393- ;
4394- return 0;
4395- }
4396- _ACEOF
4397- rm -f conftest.$ac_objext conftest$ac_exeext
4398- if { (ac_try="$ac_link"
4399- case "(($ac_try" in
4400- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4401- *) ac_try_echo=$ac_try;;
4402- esac
4403- eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4404- (eval "$ac_link") 2>conftest.er1
4405- ac_status=$?
4406- grep -v '^ *+' conftest.er1 >conftest.err
4407- rm -f conftest.er1
4408- cat conftest.err >&5
4409- echo "$as_me:$LINENO: \$? = $ac_status" >&5
4410- (exit $ac_status); } && {
4411- test -z "$ac_c_werror_flag" ||
4412- test ! -s conftest.err
4413- } && test -s conftest$ac_exeext &&
4414- $as_test_x conftest$ac_exeext; then
4415- { echo "$as_me:$LINENO: result: yes" >&5
4416- echo "${ECHO_T}yes" >&6; }
4417- else
4418- echo "$as_me: failed program was:" >&5
4419- sed 's/^/| /' conftest.$ac_ext >&5
4420-
4421- LDFLAGS="$pgac_save_LDFLAGS"
4422- { echo "$as_me:$LINENO: result: no" >&5
4423- echo "${ECHO_T}no" >&6; }
4424- fi
4425-
4426- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4427- conftest$ac_exeext conftest.$ac_ext
4428-
4429- fi
4430-
44314318# Create compiler version string
44324319if test x"$GCC" = x"yes" ; then
44334320 cc_string="GCC `${CC} --version | sed q`"
@@ -5596,11 +5483,6 @@ rm -f conftest*
55965483CPPFLAGS="$CPPFLAGS $INCLUDES"
55975484LDFLAGS="$LDFLAGS $LIBDIRS"
55985485
5599- { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
5600- echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
5601- { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
5602- echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
5603-
56045486
56055487
56065488
@@ -25749,6 +25631,148 @@ echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
2574925631fi
2575025632fi
2575125633
25634+ # If compiler will take -Wl,--as-needed then add that to LDFLAGS.
25635+ # This is much easier than trying to filter LIBS to the minimum for each
25636+ # executable. (Note that shared libraries won't use this switch, though.)
25637+ # On (at least) some Red-Hat-derived systems, this switch breaks linking to
25638+ # libreadline; therefore we postpone testing it until we know what library
25639+ # dependencies readline has. The test code will try to link with $LIBS.
25640+ if test "$with_readline" = yes; then
25641+ link_test_func=readline
25642+ else
25643+ link_test_func=exit
25644+ fi
25645+ if test "$PORTNAME" != "darwin"; then
25646+ { echo "$as_me:$LINENO: checking if $CC supports -Wl,--as-needed" >&5
25647+ echo $ECHO_N "checking if $CC supports -Wl,--as-needed... $ECHO_C" >&6; }
25648+ pgac_save_LDFLAGS=$LDFLAGS
25649+ LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
25650+ cat >conftest.$ac_ext <<_ACEOF
25651+ /* confdefs.h. */
25652+ _ACEOF
25653+ cat confdefs.h >>conftest.$ac_ext
25654+ cat >>conftest.$ac_ext <<_ACEOF
25655+ /* end confdefs.h. */
25656+
25657+ /* Override any GCC internal prototype to avoid an error.
25658+ Use char because int might match the return type of a GCC
25659+ builtin and then its argument prototype would still apply. */
25660+ #ifdef __cplusplus
25661+ extern "C"
25662+ #endif
25663+ char $link_test_func ();
25664+ int
25665+ main ()
25666+ {
25667+ return $link_test_func ();
25668+ ;
25669+ return 0;
25670+ }
25671+ _ACEOF
25672+ rm -f conftest.$ac_objext conftest$ac_exeext
25673+ if { (ac_try="$ac_link"
25674+ case "(($ac_try" in
25675+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25676+ *) ac_try_echo=$ac_try;;
25677+ esac
25678+ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25679+ (eval "$ac_link") 2>conftest.er1
25680+ ac_status=$?
25681+ grep -v '^ *+' conftest.er1 >conftest.err
25682+ rm -f conftest.er1
25683+ cat conftest.err >&5
25684+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
25685+ (exit $ac_status); } && {
25686+ test -z "$ac_c_werror_flag" ||
25687+ test ! -s conftest.err
25688+ } && test -s conftest$ac_exeext &&
25689+ $as_test_x conftest$ac_exeext; then
25690+ { echo "$as_me:$LINENO: result: yes" >&5
25691+ echo "${ECHO_T}yes" >&6; }
25692+ else
25693+ echo "$as_me: failed program was:" >&5
25694+ sed 's/^/| /' conftest.$ac_ext >&5
25695+
25696+ LDFLAGS="$pgac_save_LDFLAGS"
25697+ { echo "$as_me:$LINENO: result: no" >&5
25698+ echo "${ECHO_T}no" >&6; }
25699+ fi
25700+
25701+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25702+ conftest$ac_exeext conftest.$ac_ext
25703+
25704+ else
25705+ # On Darwin it's spelled -Wl,-dead_strip_dylibs, but don't try that elsewhere
25706+ { echo "$as_me:$LINENO: checking if $CC supports -Wl,-dead_strip_dylibs" >&5
25707+ echo $ECHO_N "checking if $CC supports -Wl,-dead_strip_dylibs... $ECHO_C" >&6; }
25708+ pgac_save_LDFLAGS=$LDFLAGS
25709+ LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
25710+ cat >conftest.$ac_ext <<_ACEOF
25711+ /* confdefs.h. */
25712+ _ACEOF
25713+ cat confdefs.h >>conftest.$ac_ext
25714+ cat >>conftest.$ac_ext <<_ACEOF
25715+ /* end confdefs.h. */
25716+
25717+ /* Override any GCC internal prototype to avoid an error.
25718+ Use char because int might match the return type of a GCC
25719+ builtin and then its argument prototype would still apply. */
25720+ #ifdef __cplusplus
25721+ extern "C"
25722+ #endif
25723+ char $link_test_func ();
25724+ int
25725+ main ()
25726+ {
25727+ return $link_test_func ();
25728+ ;
25729+ return 0;
25730+ }
25731+ _ACEOF
25732+ rm -f conftest.$ac_objext conftest$ac_exeext
25733+ if { (ac_try="$ac_link"
25734+ case "(($ac_try" in
25735+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25736+ *) ac_try_echo=$ac_try;;
25737+ esac
25738+ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25739+ (eval "$ac_link") 2>conftest.er1
25740+ ac_status=$?
25741+ grep -v '^ *+' conftest.er1 >conftest.err
25742+ rm -f conftest.er1
25743+ cat conftest.err >&5
25744+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
25745+ (exit $ac_status); } && {
25746+ test -z "$ac_c_werror_flag" ||
25747+ test ! -s conftest.err
25748+ } && test -s conftest$ac_exeext &&
25749+ $as_test_x conftest$ac_exeext; then
25750+ { echo "$as_me:$LINENO: result: yes" >&5
25751+ echo "${ECHO_T}yes" >&6; }
25752+ else
25753+ echo "$as_me: failed program was:" >&5
25754+ sed 's/^/| /' conftest.$ac_ext >&5
25755+
25756+ LDFLAGS="$pgac_save_LDFLAGS"
25757+ { echo "$as_me:$LINENO: result: no" >&5
25758+ echo "${ECHO_T}no" >&6; }
25759+ fi
25760+
25761+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25762+ conftest$ac_exeext conftest.$ac_ext
25763+
25764+ fi
25765+
25766+
25767+ # Begin output steps
25768+
25769+ { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
25770+ echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
25771+ { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
25772+ echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
25773+ { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
25774+ echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
25775+
2575225776# prepare build tree if outside source tree
2575325777# Note 1: test -ef might not exist, but it's more reliable than `pwd`.
2575425778# Note 2: /bin/pwd might be better than shell's built-in at getting