diff --git a/cf/broken-getaddrinfo.m4 b/cf/broken-getaddrinfo.m4 index 6115856a7..75cbcb255 100644 --- a/cf/broken-getaddrinfo.m4 +++ b/cf/broken-getaddrinfo.m4 @@ -4,7 +4,7 @@ dnl test if getaddrinfo can handle numeric services AC_DEFUN([rk_BROKEN_GETADDRINFO],[ AC_CACHE_CHECK([if getaddrinfo handles numeric services], ac_cv_func_getaddrinfo_numserv, -AC_TRY_RUN([[#include +AC_RUN_IFELSE([AC_LANG_SOURCE([[#include #include #include #include @@ -21,4 +21,4 @@ main(int argc, char **argv) return 1; return 0; } -]], ac_cv_func_getaddrinfo_numserv=yes, ac_cv_func_getaddrinfo_numserv=no))]) +]])],[ac_cv_func_getaddrinfo_numserv=yes],[ac_cv_func_getaddrinfo_numserv=no]))]) diff --git a/cf/broken-getnameinfo.m4 b/cf/broken-getnameinfo.m4 index d7d36e1df..12e7867a7 100644 --- a/cf/broken-getnameinfo.m4 +++ b/cf/broken-getnameinfo.m4 @@ -4,7 +4,7 @@ dnl test for broken AIX getnameinfo AC_DEFUN([rk_BROKEN_GETNAMEINFO],[ AC_CACHE_CHECK([if getnameinfo is broken], ac_cv_func_getnameinfo_broken, -AC_TRY_RUN([[#include +AC_RUN_IFELSE([AC_LANG_SOURCE([[#include #include #include #include @@ -25,4 +25,4 @@ main(int argc, char **argv) return getnameinfo((struct sockaddr*)&sin, sizeof(sin), host, sizeof(host), NULL, 0, 0); } -]], ac_cv_func_getnameinfo_broken=no, ac_cv_func_getnameinfo_broken=yes))]) +]])], [ac_cv_func_getnameinfo_broken=no], [ac_cv_func_getnameinfo_broken=yes]))]) diff --git a/cf/broken-realloc.m4 b/cf/broken-realloc.m4 index 83feac796..7b4dc0320 100644 --- a/cf/broken-realloc.m4 +++ b/cf/broken-realloc.m4 @@ -6,7 +6,7 @@ dnl AC_DEFUN([rk_BROKEN_REALLOC], [ AC_CACHE_CHECK(if realloc if broken, ac_cv_func_realloc_broken, [ ac_cv_func_realloc_broken=no -AC_TRY_RUN([ +AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include @@ -14,7 +14,7 @@ int main() { return realloc(NULL, 17) == NULL; } -],:, ac_cv_func_realloc_broken=yes, :) +]])],[:], [ac_cv_func_realloc_broken=yes],[:]) ]) if test "$ac_cv_func_realloc_broken" = yes ; then AC_DEFINE(BROKEN_REALLOC, 1, [Define if realloc(NULL) doesn't work.]) diff --git a/cf/broken-snprintf.m4 b/cf/broken-snprintf.m4 index 68964c6a9..1ce230d20 100644 --- a/cf/broken-snprintf.m4 +++ b/cf/broken-snprintf.m4 @@ -3,7 +3,7 @@ dnl AC_DEFUN([AC_BROKEN_SNPRINTF], [ AC_CACHE_CHECK(for working snprintf,ac_cv_func_snprintf_working, ac_cv_func_snprintf_working=yes -AC_TRY_RUN([ +AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include int main() @@ -11,7 +11,7 @@ int main() char foo[[3]]; snprintf(foo, 2, "12"); return strcmp(foo, "1"); -}],:,ac_cv_func_snprintf_working=no,:)) +}]])],[:],[ac_cv_func_snprintf_working=no],[:])) if test "$ac_cv_func_snprintf_working" = yes; then AC_DEFINE_UNQUOTED(HAVE_SNPRINTF, 1, [define if you have a working snprintf]) @@ -24,7 +24,7 @@ fi AC_DEFUN([AC_BROKEN_VSNPRINTF],[ AC_CACHE_CHECK(for working vsnprintf,ac_cv_func_vsnprintf_working, ac_cv_func_vsnprintf_working=yes -AC_TRY_RUN([ +AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include @@ -43,7 +43,7 @@ int foo(int num, ...) int main() { return foo(0, "12"); -}],:,ac_cv_func_vsnprintf_working=no,:)) +}]])],[:],[ac_cv_func_vsnprintf_working=no],[:])) if test "$ac_cv_func_vsnprintf_working" = yes; then AC_DEFINE_UNQUOTED(HAVE_VSNPRINTF, 1, [define if you have a working vsnprintf]) diff --git a/cf/c-function.m4 b/cf/c-function.m4 index b2f1eb9b1..1396f86f9 100644 --- a/cf/c-function.m4 +++ b/cf/c-function.m4 @@ -9,7 +9,7 @@ dnl AC_DEFUN([AC_C___FUNCTION__], [ AC_MSG_CHECKING(for __FUNCTION__) AC_CACHE_VAL(ac_cv___function__, [ -AC_TRY_RUN([ +AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include static char *foo() @@ -21,10 +21,10 @@ int main() { return strcmp(foo(), "foo") != 0; } -], -ac_cv___function__=yes, -ac_cv___function__=no, -ac_cv___function__=no)]) +]])], +[ac_cv___function__=yes], +[ac_cv___function__=no], +[ac_cv___function__=no])]) if test "$ac_cv___function__" = "yes"; then AC_DEFINE(HAVE___FUNCTION__, 1, [define if your compiler has __FUNCTION__]) fi diff --git a/cf/check-getpwnam_r-posix.m4 b/cf/check-getpwnam_r-posix.m4 index 2477837e7..62d333f66 100644 --- a/cf/check-getpwnam_r-posix.m4 +++ b/cf/check-getpwnam_r-posix.m4 @@ -8,14 +8,14 @@ if test "$ac_cv_func_getpwnam_r" = yes; then AC_CACHE_CHECK(if getpwnam_r is posix,ac_cv_func_getpwnam_r_posix, ac_libs="$LIBS" LIBS="$LIBS $LIB_getpwnam_r" - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include int main() { struct passwd pw, *pwd; return getpwnam_r("", &pw, NULL, 0, &pwd) < 0; } -],ac_cv_func_getpwnam_r_posix=yes,ac_cv_func_getpwnam_r_posix=no,:) +]])],[ac_cv_func_getpwnam_r_posix=yes],[ac_cv_func_getpwnam_r_posix=no],[:]) LIBS="$ac_libs") if test "$ac_cv_func_getpwnam_r_posix" = yes; then AC_DEFINE(POSIX_GETPWNAM_R, 1, [Define if getpwnam_r has POSIX flavour.]) diff --git a/cf/db.m4 b/cf/db.m4 index d62a2e160..015211ac3 100644 --- a/cf/db.m4 +++ b/cf/db.m4 @@ -158,7 +158,7 @@ fi # unknown if test "$have_ndbm" = "yes"; then AC_MSG_CHECKING([if ndbm is implemented with db]) - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #if defined(HAVE_GDBM_NDBM_H) @@ -177,7 +177,7 @@ int main() return 1; dbm_close(d); return 0; -}],[ +}]])],[ if test -f conftest.db; then AC_MSG_RESULT([yes]) AC_DEFINE(HAVE_NEW_DB, 1, [Define if NDBM really is DB (creates files *.db)]) diff --git a/cf/krb-bigendian.m4 b/cf/krb-bigendian.m4 index 67177b6d9..29e3eb8ae 100644 --- a/cf/krb-bigendian.m4 +++ b/cf/krb-bigendian.m4 @@ -31,7 +31,7 @@ AC_CACHE_CHECK(whether byte ordering is bigendian, krb_cv_c_bigendian,[ not big endian #endif]])],[krb_cv_c_bigendian=yes],[krb_cv_c_bigendian=no]) else - AC_TRY_RUN([main () { + AC_RUN_IFELSE([AC_LANG_SOURCE([[main () { /* Are we little or big endian? From Harbison&Steele. */ union { @@ -40,8 +40,8 @@ AC_CACHE_CHECK(whether byte ordering is bigendian, krb_cv_c_bigendian,[ } u; u.l = 1; exit (u.c[sizeof (long) - 1] == 1); - }], krb_cv_c_bigendian=no, krb_cv_c_bigendian=yes, - AC_MSG_ERROR([specify either --enable-bigendian or --enable-littleendian])) + }]])],[krb_cv_c_bigendian=no],[krb_cv_c_bigendian=yes], + [AC_MSG_ERROR([specify either --enable-bigendian or --enable-littleendian])]) fi ]) if test "$krb_cv_c_bigendian" = "yes"; then diff --git a/cf/krb-func-getcwd-broken.m4 b/cf/krb-func-getcwd-broken.m4 index 6f59d7a30..a33809c87 100644 --- a/cf/krb-func-getcwd-broken.m4 +++ b/cf/krb-func-getcwd-broken.m4 @@ -10,7 +10,7 @@ AC_MSG_CHECKING(if getcwd is broken) AC_CACHE_VAL(ac_cv_func_getcwd_broken, [ ac_cv_func_getcwd_broken=no -AC_TRY_RUN([ +AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include char *getcwd(char*, int); @@ -28,7 +28,7 @@ int main() return 0; return 1; } -], ac_cv_func_getcwd_broken=yes,:,:) +]])], [ac_cv_func_getcwd_broken=yes],[:],[:]) ]) if test "$ac_cv_func_getcwd_broken" = yes; then AC_DEFINE(BROKEN_GETCWD, 1, [Define if getcwd is broken (like in SunOS 4).])dnl diff --git a/cf/telnet.m4 b/cf/telnet.m4 index 0a186d4fd..af7a8d92a 100644 --- a/cf/telnet.m4 +++ b/cf/telnet.m4 @@ -31,7 +31,7 @@ case "$host" in AC_CHECK_FUNC(getmsg) if test "$ac_cv_func_getmsg" = "yes"; then AC_CACHE_CHECK([if getmsg works], ac_cv_func_getmsg_works, - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include @@ -43,9 +43,9 @@ case "$host" in return 1; return 0; } - ], ac_cv_func_getmsg_works=yes, - ac_cv_func_getmsg_works=no, - ac_cv_func_getmsg_works=no)) + ]])], [ac_cv_func_getmsg_works=yes], + [ac_cv_func_getmsg_works=no], + [ac_cv_func_getmsg_works=no])) if test "$ac_cv_func_getmsg_works" = "yes"; then AC_DEFINE(HAVE_GETMSG, 1, [Define if you have a working getmsg.])