Turn off --no-undefined on OpenBSD again. Leave it on everywhere else for now.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 16 Nov 2013 21:52:56 -0500
changeset 8003 998458760218
parent 8002 352960f8f4cf
child 8004 13da154af020
Turn off --no-undefined on OpenBSD again. Leave it on everywhere else for now.
configure
configure.in
--- a/configure	Sat Nov 16 12:11:19 2013 -0800
+++ b/configure	Sat Nov 16 21:52:56 2013 -0500
@@ -15953,30 +15953,37 @@
 { $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
-/* end confdefs.h.  */
-
-
-int
-main ()
-{
-
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-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"
+case "$host" in
+        *-*-openbsd*)
+        ;;
+
+    *)
+        save_LDFLAGS="$LDFLAGS"
+        LDFLAGS="$LDFLAGS -Wl,--no-undefined"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+        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"
+        ;;
+esac
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_no_undefined" >&5
 $as_echo "$have_no_undefined" >&6; }
 
--- a/configure.in	Sat Nov 16 12:11:19 2013 -0800
+++ b/configure.in	Sat Nov 16 21:52:56 2013 -0500
@@ -206,15 +206,23 @@
 
 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