From 23c052edbae638d9b4d80c5560521869ef382269 Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Sat, 8 Oct 2005 02:58:01 +0000 Subject: [PATCH] * m4/macros/check_mnttab_type.m4: move the test for MOUNT_* to the very end, after the test using getvfsbyname(). * m4/macros/expand_run_string.m4: if the string value returned is empty, consider it invalid. --- ChangeLog | 6 ++++++ m4/macros/check_mnttab_type.m4 | 39 +++++++++++++++++++--------------- m4/macros/expand_run_string.m4 | 6 +++++- 3 files changed, 33 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3a3b31b..196d501 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2005-10-07 Erez Zadok + * m4/macros/check_mnttab_type.m4: move the test for MOUNT_* to the + very end, after the test using getvfsbyname(). + + * m4/macros/expand_run_string.m4: if the string value returned is + empty, consider it invalid. + * m4/macros/check_varargs_macros.m4: rewrite macro so it'll try and compile the varargs test, not just cpp it. Some systems pass the old cpp test, but not when you actually try to compile diff --git a/m4/macros/check_mnttab_type.m4 b/m4/macros/check_mnttab_type.m4 index 5b6b489..61e1c01 100644 --- a/m4/macros/check_mnttab_type.m4 +++ b/m4/macros/check_mnttab_type.m4 @@ -115,23 +115,7 @@ do break fi - # then try to run a program that derefences a static array (bsd44) - AMU_EXPAND_RUN_STRING( - AMU_MOUNT_HEADERS( - [ - ]), - [ - if (argc > 1) - printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); - ], [ eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" - ]) - # check if need to terminate "for" loop - if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound - then - break - fi - - # finally run a test program for bsdi3 + # then run a test program for bsdi3, tru64, and others AC_TRY_RUN( [ #include @@ -150,6 +134,27 @@ main() break ] ) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi + + # finally try to run a program that derefences a static array (bsd44) + AMU_EXPAND_RUN_STRING( + AMU_MOUNT_HEADERS( + [ + ]), + [ + if (argc > 1) + printf("\"%s\"", MOUNT_$ac_upcase_fs_symbol); + ], [ eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\"" + ]) + # check if need to terminate "for" loop + if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound + then + break + fi done diff --git a/m4/macros/expand_run_string.m4 b/m4/macros/expand_run_string.m4 index 70cecc7..2cb964e 100644 --- a/m4/macros/expand_run_string.m4 +++ b/m4/macros/expand_run_string.m4 @@ -12,7 +12,11 @@ int argc; { $2 exit(0); -}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound") +}], +[ +value=`./conftest dummy 2>>config.log` +test -z "$value" && value="notfound" +], value="notfound", value="notfound") if test "$value" = notfound then : -- 2.43.0