diff --git a/configure b/configure index d6b9b293f..d5bcc80d7 100755 --- a/configure +++ b/configure @@ -15953,9 +15953,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker option --no-undefined" >&5 $as_echo_n "checking for linker option --no-undefined... " >&6; } have_no_undefined=no -save_LDFLAGS="$LDFLAGS" -LDFLAGS="$LDFLAGS -Wl,--no-undefined" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +case "$host" in + *-*-openbsd*) + ;; + + *) + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,--no-undefined" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -15970,13 +15975,15 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -have_no_undefined=yes -EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined" + have_no_undefined=yes + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" + ;; +esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_no_undefined" >&5 $as_echo "$have_no_undefined" >&6; } diff --git a/configure.in b/configure.in index 100d6b2a7..993964f7a 100644 --- a/configure.in +++ b/configure.in @@ -206,15 +206,23 @@ fi AC_MSG_CHECKING(for linker option --no-undefined) have_no_undefined=no -save_LDFLAGS="$LDFLAGS" -LDFLAGS="$LDFLAGS -Wl,--no-undefined" -AC_TRY_LINK([ -],[ -],[ -have_no_undefined=yes -EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined" -]) -LDFLAGS="$save_LDFLAGS" +case "$host" in + dnl Skip this on platforms where it is just simply busted. + *-*-openbsd*) + ;; + + *) + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,--no-undefined" + AC_TRY_LINK([ + ],[ + ],[ + have_no_undefined=yes + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined" + ]) + LDFLAGS="$save_LDFLAGS" + ;; +esac AC_MSG_RESULT($have_no_undefined) dnl See whether we are allowed to use the system C library