am-utils-6.2 - convert AC_TRY_RUN to AC_RUN_IFELSE From: Ian Kent autoconf 2.71 autoreconf tells us AC_TRY_RUN is obsolete. Convert to use the AC_RUN_IFELSE instead. Signed-off-by: Ian Kent --- m4/macros/check_fs_mntent.m4 | 7 ++++--- m4/macros/check_gnu_getopt.m4 | 6 ++++-- m4/macros/check_libwrap_severity.m4 | 14 ++++++++------ m4/macros/check_mnttab_type.m4 | 7 ++++--- m4/macros/check_mount_type.m4 | 7 ++++--- m4/macros/expand_cpp_hex.m4 | 7 ++++--- m4/macros/expand_cpp_int.m4 | 7 ++++--- m4/macros/expand_cpp_string.m4 | 7 ++++--- m4/macros/expand_run_string.m4 | 7 ++++--- m4/macros/func_bad_hasmntopt.m4 | 5 +++-- 10 files changed, 43 insertions(+), 31 deletions(-) diff --git a/m4/macros/check_fs_mntent.m4 b/m4/macros/check_fs_mntent.m4 index 6146c7ee..e612b4ec 100644 --- a/m4/macros/check_fs_mntent.m4 +++ b/m4/macros/check_fs_mntent.m4 @@ -144,8 +144,9 @@ do fi # run a test program for bsdi3 - AC_TRY_RUN( - [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE( + [[ #include #include main() @@ -158,7 +159,7 @@ main() else exit(0); } - ], [eval "ac_cv_fs_$ac_fs_name=yes" + ]])], [eval "ac_cv_fs_$ac_fs_name=yes" break ] ) diff --git a/m4/macros/check_gnu_getopt.m4 b/m4/macros/check_gnu_getopt.m4 index 76315321..6ac6440c 100644 --- a/m4/macros/check_gnu_getopt.m4 +++ b/m4/macros/check_gnu_getopt.m4 @@ -3,7 +3,9 @@ dnl Do we have a GNUish getopt AC_DEFUN([AMU_CHECK_GNU_GETOPT], [ AC_CACHE_CHECK([for GNU getopt], ac_cv_sys_gnu_getopt, [ -AC_TRY_RUN([ +AC_RUN_IFELSE( +[AC_LANG_SOURCE( +[[ #include #include int main() @@ -29,7 +31,7 @@ int main() fprintf(rf, isGNU ? "yes" : "no"); exit(0); } -],[ +]])],[ ac_cv_sys_gnu_getopt="`cat conftestresult`" ],[ ac_cv_sys_gnu_getopt="fail" diff --git a/m4/macros/check_libwrap_severity.m4 b/m4/macros/check_libwrap_severity.m4 index 955ba55a..f57ffcb1 100644 --- a/m4/macros/check_libwrap_severity.m4 +++ b/m4/macros/check_libwrap_severity.m4 @@ -8,22 +8,24 @@ AC_CACHE_CHECK([if libwrap wants caller to define allow_severity and deny_severi SAVEDLIBS="$LIBS" LIBS="$LIBS -lwrap" # run program one without defining our own severity variables -AC_TRY_RUN( -[ +AC_RUN_IFELSE( +[AC_LANG_SOURCE( +[[ int main() { exit(0); } -],[ac_tmp_val1="yes"],[ac_tmp_val1="no"]) +]])],[ac_tmp_val1="yes"],[ac_tmp_val1="no"]) # run program two with defining our own severity variables -AC_TRY_RUN( -[ +AC_RUN_IFELSE( +[AC_LANG_SOURCE( +[[ int deny_severity, allow_severity, rfc931_timeout; int main() { exit(0); } -],[ac_tmp_val2="yes"],[ac_tmp_val2="no"]) +]])],[ac_tmp_val2="yes"],[ac_tmp_val2="no"]) # restore original value of $LIBS LIBS="$SAVEDLIBS" # now decide what to do diff --git a/m4/macros/check_mnttab_type.m4 b/m4/macros/check_mnttab_type.m4 index 61e1c01b..a840991e 100644 --- a/m4/macros/check_mnttab_type.m4 +++ b/m4/macros/check_mnttab_type.m4 @@ -116,8 +116,9 @@ do fi # then run a test program for bsdi3, tru64, and others - AC_TRY_RUN( - [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE( + [[ #include #include main() @@ -130,7 +131,7 @@ main() else exit(0); } - ], [eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + ]])], [eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" break ] ) diff --git a/m4/macros/check_mount_type.m4 b/m4/macros/check_mount_type.m4 index 9b08def7..c779e0bf 100644 --- a/m4/macros/check_mount_type.m4 +++ b/m4/macros/check_mount_type.m4 @@ -135,8 +135,9 @@ do fi # run a test program for bsdi3 - AC_TRY_RUN( - [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE( + [[ #include #include main() @@ -149,7 +150,7 @@ main() else exit(0); } - ], [eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" + ]])], [eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\"" break ] ) diff --git a/m4/macros/expand_cpp_hex.m4 b/m4/macros/expand_cpp_hex.m4 index 0c7a9e42..13c7c832 100644 --- a/m4/macros/expand_cpp_hex.m4 +++ b/m4/macros/expand_cpp_hex.m4 @@ -10,8 +10,9 @@ AC_EGREP_CPP(0x, [$1] $2, value="notfound" -AC_TRY_RUN( -[ +AC_RUN_IFELSE( +[AC_LANG_SOURCE( +[[ [$1] main(argc) int argc; @@ -24,7 +25,7 @@ exit(0); # error no such option $2 #endif exit(1); -}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") +}]])], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") , value="notfound" ) diff --git a/m4/macros/expand_cpp_int.m4 b/m4/macros/expand_cpp_int.m4 index 37253769..e58649e8 100644 --- a/m4/macros/expand_cpp_int.m4 +++ b/m4/macros/expand_cpp_int.m4 @@ -12,8 +12,9 @@ AC_EGREP_CPP( [$1] $2, value="notfound" -AC_TRY_RUN( -[ +AC_RUN_IFELSE( +[AC_LANG_SOURCE( +[[ [$1] main(argc) int argc; @@ -26,7 +27,7 @@ exit(0); # error no such option $2 #endif exit(1); -}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") +}]])], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") , value="notfound" ) diff --git a/m4/macros/expand_cpp_string.m4 b/m4/macros/expand_cpp_string.m4 index 51293c4f..e014b7e4 100644 --- a/m4/macros/expand_cpp_string.m4 +++ b/m4/macros/expand_cpp_string.m4 @@ -10,8 +10,9 @@ AC_EGREP_CPP(\".*\", [$1] $2, value="notfound" -AC_TRY_RUN( -[ +AC_RUN_IFELSE( +[AC_LANG_SOURCE( +[[ [$1] main(argc) int argc; @@ -24,7 +25,7 @@ exit(0); # error no such option $2 #endif exit(1); -}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") +}]])], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") , value="notfound" ) diff --git a/m4/macros/expand_run_string.m4 b/m4/macros/expand_run_string.m4 index 2cb964e1..f9390020 100644 --- a/m4/macros/expand_run_string.m4 +++ b/m4/macros/expand_run_string.m4 @@ -4,15 +4,16 @@ dnl Takes: (header, code-to-run, [action-if-found, [action-if-not-found]]) AC_DEFUN([AMU_EXPAND_RUN_STRING], [ value="notfound" -AC_TRY_RUN( -[ +AC_RUN_IFELSE( +[AC_LANG_SOURCE( +[[ $1 main(argc) int argc; { $2 exit(0); -}], +}]])], [ value=`./conftest dummy 2>>config.log` test -z "$value" && value="notfound" diff --git a/m4/macros/func_bad_hasmntopt.m4 b/m4/macros/func_bad_hasmntopt.m4 index d458bd30..9071e595 100644 --- a/m4/macros/func_bad_hasmntopt.m4 +++ b/m4/macros/func_bad_hasmntopt.m4 @@ -3,7 +3,8 @@ dnl Check if we have as buggy hasmntopt() libc function AC_DEFUN([AMU_FUNC_BAD_HASMNTOPT], [ AC_CACHE_CHECK([for working hasmntopt], ac_cv_func_hasmntopt_working, -[AC_TRY_RUN( +[AC_RUN_IFELSE( +[AC_LANG_SOURCE( AMU_MOUNT_HEADERS( [[ #ifdef HAVE_MNTENT_H @@ -47,7 +48,7 @@ int main() exit(1); exit(0); } -]]), +]]))], [ac_cv_func_hasmntopt_working=yes], [ac_cv_func_hasmntopt_working=no] )])