Browse Source

Turn off --no-undefined on OpenBSD again. Leave it on everywhere else for now.

Ryan C. Gordon 11 years ago
parent
commit
923709a699
2 changed files with 30 additions and 15 deletions
  1. 13 6
      configure
  2. 17 9
      configure.in

+ 13 - 6
configure

@@ -15953,9 +15953,14 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker option --no-undefined" >&5
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker option --no-undefined" >&5
 $as_echo_n "checking for linker option --no-undefined... " >&6; }
 $as_echo_n "checking for linker option --no-undefined... " >&6; }
 have_no_undefined=no
 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.  */
 /* end confdefs.h.  */
 
 
 
 
@@ -15970,13 +15975,15 @@ main ()
 _ACEOF
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
 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
 fi
 rm -f core conftest.err conftest.$ac_objext \
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
     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 "$as_me:${as_lineno-$LINENO}: result: $have_no_undefined" >&5
 $as_echo "$have_no_undefined" >&6; }
 $as_echo "$have_no_undefined" >&6; }
 
 

+ 17 - 9
configure.in

@@ -206,15 +206,23 @@ fi
 
 
 AC_MSG_CHECKING(for linker option --no-undefined)
 AC_MSG_CHECKING(for linker option --no-undefined)
 have_no_undefined=no
 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)
 AC_MSG_RESULT($have_no_undefined)
 
 
 dnl See whether we are allowed to use the system C library
 dnl See whether we are allowed to use the system C library