]> granicus.if.org Git - sudo/commitdiff
Use AC_LINK_IFELSE instead of AC_TRY_LINK
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 2 Apr 2013 20:56:59 +0000 (16:56 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 2 Apr 2013 20:56:59 +0000 (16:56 -0400)
Fix printing of status message for visibility checks when the test fails.

configure
configure.in

index 9410fd5254f51e86c73067283a955a462cc86f71..2b3e49be5e97cf5f3a0ebff212d318900c654d92 100755 (executable)
--- a/configure
+++ b/configure
@@ -20763,6 +20763,7 @@ if ${sudo_cv_var_gnu_ld_anon_map+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
+               sudo_cv_var_gnu_ld_anon_map=no
                cat > conftest.map <<-EOF
                {
                    global: foo;
@@ -20785,9 +20786,7 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-
-                   sudo_cv_var_gnu_ld_anon_map=yes
-
+  sudo_cv_var_gnu_ld_anon_map=yes
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
@@ -20810,6 +20809,7 @@ if ${sudo_cv_var_solaris_ld_anon_map+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
+                       sudo_cv_var_solaris_ld_anon_map=no
                        cat > conftest.map <<-EOF
                        {
                            global: foo;
@@ -20832,9 +20832,7 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-
-                           sudo_cv_var_solaris_ld_anon_map=yes
-
+  sudo_cv_var_solaris_ld_anon_map=yes
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
@@ -20856,6 +20854,7 @@ if ${sudo_cv_var_hpux_ld_symbol_export+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
+                       sudo_cv_var_hpux_ld_symbol_export=no
                        echo "+e foo" > conftest.opt
                        _CFLAGS="$CFLAGS"
                        CFLAGS="$CFLAGS $lt_prog_compiler_pic"
@@ -20877,14 +20876,13 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-
-                           sudo_cv_var_hpux_ld_symbol_export=yes
-
+  sudo_cv_var_hpux_ld_symbol_export=yes
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
                        CFLAGS="$_CFLAGS"
                        LDFLAGS="$_LDFLAGS"
+                       rm -f conftest.opt
 
 
 fi
index 58ac3489eca9e0ec79881a5bd63b907395945471..0e2e2d82116155d45161de441ea18bae8865bf33 100644 (file)
@@ -3345,6 +3345,7 @@ if test -n "$LT_LDEXPORTS"; then
        AC_CACHE_CHECK([whether ld supports anonymous map files],
            [sudo_cv_var_gnu_ld_anon_map],
            [
+               sudo_cv_var_gnu_ld_anon_map=no
                cat > conftest.map <<-EOF
                {
                    global: foo;
@@ -3355,9 +3356,8 @@ EOF
                CFLAGS="$CFLAGS $lt_prog_compiler_pic"
                _LDFLAGS="$LDFLAGS"
                LDFLAGS="$LDFLAGS -fpic -shared -Wl,--version-script,./conftest.map"
-               AC_TRY_LINK([int foo;], [], [
-                   sudo_cv_var_gnu_ld_anon_map=yes
-               ])
+               AC_LINK_IFELSE([AC_LANG_PROGRAM([[int foo;]], [[]])],
+                   [sudo_cv_var_gnu_ld_anon_map=yes])
                CFLAGS="$_CFLAGS"
                LDFLAGS="$_LDFLAGS"
            ]
@@ -3371,6 +3371,7 @@ EOF
                AC_CACHE_CHECK([whether ld supports anonymous map files],
                    [sudo_cv_var_solaris_ld_anon_map],
                    [
+                       sudo_cv_var_solaris_ld_anon_map=no
                        cat > conftest.map <<-EOF
                        {
                            global: foo;
@@ -3381,9 +3382,8 @@ EOF
                        CFLAGS="$CFLAGS $lt_prog_compiler_pic"
                        _LDFLAGS="$LDFLAGS"
                        LDFLAGS="$LDFLAGS -shared -Wl,-M,./conftest.map"
-                       AC_TRY_LINK([int foo;], [], [
-                           sudo_cv_var_solaris_ld_anon_map=yes
-                       ])
+                       AC_LINK_IFELSE([AC_LANG_PROGRAM([[int foo;]], [[]])],
+                           [sudo_cv_var_solaris_ld_anon_map=yes])
                        CFLAGS="$_CFLAGS"
                        LDFLAGS="$_LDFLAGS"
                    ]
@@ -3396,6 +3396,7 @@ EOF
                AC_CACHE_CHECK([whether ld supports controlling exported symbols],
                    [sudo_cv_var_hpux_ld_symbol_export],
                    [
+                       sudo_cv_var_hpux_ld_symbol_export=no
                        echo "+e foo" > conftest.opt
                        _CFLAGS="$CFLAGS"
                        CFLAGS="$CFLAGS $lt_prog_compiler_pic"
@@ -3405,11 +3406,11 @@ EOF
                        else
                            LDFLAGS="$LDFLAGS -Wl,-b -Wl,-c,./conftest.opt"
                        fi
-                       AC_TRY_LINK([int foo;], [], [
-                           sudo_cv_var_hpux_ld_symbol_export=yes
-                       ])
+                       AC_LINK_IFELSE([AC_LANG_PROGRAM([[int foo;]], [[]])],
+                           [sudo_cv_var_hpux_ld_symbol_export=yes])
                        CFLAGS="$_CFLAGS"
                        LDFLAGS="$_LDFLAGS"
+                       rm -f conftest.opt
                    ]
                )
                if test "$sudo_cv_var_hpux_ld_symbol_export" = "yes"; then