@@ -8252,7 +8252,8 @@ return com_err ();
82528252 return 0;
82538253}
82548254_ACEOF
8255- for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err; do
8255+ for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'
8256+ com_err 'com_err -lssl -lcrypto'; do
82568257 if test -z "$ac_lib"; then
82578258 ac_res="none required"
82588259 else
@@ -27133,9 +27134,10 @@ echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
2713327134fi
2713427135fi
2713527136
27136- # If compiler will take -Wl,--as-needed then add that to LDFLAGS.
27137- # This is much easier than trying to filter LIBS to the minimum for each
27138- # executable. (Note that shared library links won't use this switch, though.)
27137+ # If compiler will take -Wl,--as-needed (or various platform-specific
27138+ # spellings thereof) then add that to LDFLAGS. This is much easier than
27139+ # trying to filter LIBS to the minimum for each executable.
27140+ # (Note that shared library links won't use this switch, though.)
2713927141# On (at least) some Red-Hat-derived systems, this switch breaks linking to
2714027142# libreadline; therefore we postpone testing it until we know what library
2714127143# dependencies readline has. The test code will try to link with $LIBS.
@@ -27144,11 +27146,12 @@ if test "$with_readline" = yes; then
2714427146else
2714527147 link_test_func=exit
2714627148fi
27147- if test "$PORTNAME" != "darwin"; then
27148- { echo "$as_me:$LINENO: checking if $CC supports -Wl,--as-needed" >&5
27149- echo $ECHO_N "checking if $CC supports -Wl,--as-needed... $ECHO_C" >&6; }
27149+
27150+ if test "$PORTNAME" = "darwin"; then
27151+ { echo "$as_me:$LINENO: checking if $CC supports -Wl,-dead_strip_dylibs" >&5
27152+ echo $ECHO_N "checking if $CC supports -Wl,-dead_strip_dylibs... $ECHO_C" >&6; }
2715027153pgac_save_LDFLAGS=$LDFLAGS
27151- LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed "
27154+ LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs "
2715227155if test "$cross_compiling" = yes; then
2715327156 LDFLAGS="$pgac_save_LDFLAGS"
2715427157 { echo "$as_me:$LINENO: result: assuming no" >&5
@@ -27206,12 +27209,73 @@ fi
2720627209
2720727210
2720827211
27212+ elif test "$PORTNAME" = "openbsd"; then
27213+ { echo "$as_me:$LINENO: checking if $CC supports -Wl,-Bdynamic" >&5
27214+ echo $ECHO_N "checking if $CC supports -Wl,-Bdynamic... $ECHO_C" >&6; }
27215+ pgac_save_LDFLAGS=$LDFLAGS
27216+ LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
27217+ if test "$cross_compiling" = yes; then
27218+ LDFLAGS="$pgac_save_LDFLAGS"
27219+ { echo "$as_me:$LINENO: result: assuming no" >&5
27220+ echo "${ECHO_T}assuming no" >&6; }
2720927221else
27210- # On Darwin it's spelled -Wl,-dead_strip_dylibs, but don't try that elsewhere
27211- { echo "$as_me:$LINENO: checking if $CC supports -Wl,-dead_strip_dylibs" >&5
27212- echo $ECHO_N "checking if $CC supports -Wl,-dead_strip_dylibs... $ECHO_C" >&6; }
27222+ cat >conftest.$ac_ext <<_ACEOF
27223+ /* confdefs.h. */
27224+ _ACEOF
27225+ cat confdefs.h >>conftest.$ac_ext
27226+ cat >>conftest.$ac_ext <<_ACEOF
27227+ /* end confdefs.h. */
27228+ extern void $link_test_func (); void (*fptr) () = $link_test_func;
27229+ int
27230+ main ()
27231+ {
27232+
27233+ ;
27234+ return 0;
27235+ }
27236+ _ACEOF
27237+ rm -f conftest$ac_exeext
27238+ if { (ac_try="$ac_link"
27239+ case "(($ac_try" in
27240+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27241+ *) ac_try_echo=$ac_try;;
27242+ esac
27243+ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27244+ (eval "$ac_link") 2>&5
27245+ ac_status=$?
27246+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
27247+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27248+ { (case "(($ac_try" in
27249+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27250+ *) ac_try_echo=$ac_try;;
27251+ esac
27252+ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27253+ (eval "$ac_try") 2>&5
27254+ ac_status=$?
27255+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
27256+ (exit $ac_status); }; }; then
27257+ { echo "$as_me:$LINENO: result: yes" >&5
27258+ echo "${ECHO_T}yes" >&6; }
27259+ else
27260+ echo "$as_me: program exited with status $ac_status" >&5
27261+ echo "$as_me: failed program was:" >&5
27262+ sed 's/^/| /' conftest.$ac_ext >&5
27263+
27264+ ( exit $ac_status )
27265+ LDFLAGS="$pgac_save_LDFLAGS"
27266+ { echo "$as_me:$LINENO: result: no" >&5
27267+ echo "${ECHO_T}no" >&6; }
27268+ fi
27269+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27270+ fi
27271+
27272+
27273+
27274+ else
27275+ { echo "$as_me:$LINENO: checking if $CC supports -Wl,--as-needed" >&5
27276+ echo $ECHO_N "checking if $CC supports -Wl,--as-needed... $ECHO_C" >&6; }
2721327277pgac_save_LDFLAGS=$LDFLAGS
27214- LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs "
27278+ LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed "
2721527279if test "$cross_compiling" = yes; then
2721627280 LDFLAGS="$pgac_save_LDFLAGS"
2721727281 { echo "$as_me:$LINENO: result: assuming no" >&5
0 commit comments