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 8003998458760218
parent 8002 352960f8f4cf
child 8004 13da154af020
Turn off --no-undefined on OpenBSD again. Leave it on everywhere else for now.
configure
configure.in
     1.1 --- a/configure	Sat Nov 16 12:11:19 2013 -0800
     1.2 +++ b/configure	Sat Nov 16 21:52:56 2013 -0500
     1.3 @@ -15953,30 +15953,37 @@
     1.4  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker option --no-undefined" >&5
     1.5  $as_echo_n "checking for linker option --no-undefined... " >&6; }
     1.6  have_no_undefined=no
     1.7 -save_LDFLAGS="$LDFLAGS"
     1.8 -LDFLAGS="$LDFLAGS -Wl,--no-undefined"
     1.9 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1.10 -/* end confdefs.h.  */
    1.11 -
    1.12 -
    1.13 -int
    1.14 -main ()
    1.15 -{
    1.16 -
    1.17 -
    1.18 -  ;
    1.19 -  return 0;
    1.20 -}
    1.21 -_ACEOF
    1.22 -if ac_fn_c_try_link "$LINENO"; then :
    1.23 -
    1.24 -have_no_undefined=yes
    1.25 -EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined"
    1.26 -
    1.27 -fi
    1.28 -rm -f core conftest.err conftest.$ac_objext \
    1.29 -    conftest$ac_exeext conftest.$ac_ext
    1.30 -LDFLAGS="$save_LDFLAGS"
    1.31 +case "$host" in
    1.32 +        *-*-openbsd*)
    1.33 +        ;;
    1.34 +
    1.35 +    *)
    1.36 +        save_LDFLAGS="$LDFLAGS"
    1.37 +        LDFLAGS="$LDFLAGS -Wl,--no-undefined"
    1.38 +        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1.39 +/* end confdefs.h.  */
    1.40 +
    1.41 +
    1.42 +int
    1.43 +main ()
    1.44 +{
    1.45 +
    1.46 +
    1.47 +  ;
    1.48 +  return 0;
    1.49 +}
    1.50 +_ACEOF
    1.51 +if ac_fn_c_try_link "$LINENO"; then :
    1.52 +
    1.53 +        have_no_undefined=yes
    1.54 +        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined"
    1.55 +
    1.56 +fi
    1.57 +rm -f core conftest.err conftest.$ac_objext \
    1.58 +    conftest$ac_exeext conftest.$ac_ext
    1.59 +        LDFLAGS="$save_LDFLAGS"
    1.60 +        ;;
    1.61 +esac
    1.62  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_no_undefined" >&5
    1.63  $as_echo "$have_no_undefined" >&6; }
    1.64  
     2.1 --- a/configure.in	Sat Nov 16 12:11:19 2013 -0800
     2.2 +++ b/configure.in	Sat Nov 16 21:52:56 2013 -0500
     2.3 @@ -206,15 +206,23 @@
     2.4  
     2.5  AC_MSG_CHECKING(for linker option --no-undefined)
     2.6  have_no_undefined=no
     2.7 -save_LDFLAGS="$LDFLAGS"
     2.8 -LDFLAGS="$LDFLAGS -Wl,--no-undefined"
     2.9 -AC_TRY_LINK([
    2.10 -],[
    2.11 -],[
    2.12 -have_no_undefined=yes
    2.13 -EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined"
    2.14 -])
    2.15 -LDFLAGS="$save_LDFLAGS"
    2.16 +case "$host" in
    2.17 +    dnl Skip this on platforms where it is just simply busted.
    2.18 +    *-*-openbsd*)
    2.19 +        ;;
    2.20 +
    2.21 +    *)
    2.22 +        save_LDFLAGS="$LDFLAGS"
    2.23 +        LDFLAGS="$LDFLAGS -Wl,--no-undefined"
    2.24 +        AC_TRY_LINK([
    2.25 +        ],[
    2.26 +        ],[
    2.27 +        have_no_undefined=yes
    2.28 +        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined"
    2.29 +        ])
    2.30 +        LDFLAGS="$save_LDFLAGS"
    2.31 +        ;;
    2.32 +esac
    2.33  AC_MSG_RESULT($have_no_undefined)
    2.34  
    2.35  dnl See whether we are allowed to use the system C library