diff --git a/cf/broken2.m4 b/cf/broken2.m4 index 5558b780d..8800faf2b 100644 --- a/cf/broken2.m4 +++ b/cf/broken2.m4 @@ -6,8 +6,8 @@ dnl AC_BROKEN2(func, includes, arguments) AC_DEFUN([AC_BROKEN2], [AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(ac_cv_func_[]$1, -[AC_TRY_LINK([$2], -[ +[AC_LINK_IFELSE([AC_LANG_SOURCE([[$2]], +[[ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ @@ -16,7 +16,7 @@ choke me #else $1($3) #endif -], [eval "ac_cv_func_[]$1=yes"], [eval "ac_cv_func_[]$1=no"])]) +]])], [eval "ac_cv_func_[]$1=yes"], [eval "ac_cv_func_[]$1=no"])]) if eval "test \"\${ac_cv_func_[]$1}\" = yes"; then AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]$1), 1, define) AC_MSG_RESULT(yes) diff --git a/cf/check-compile-et.m4 b/cf/check-compile-et.m4 index d7d5d8f27..b864b48f5 100644 --- a/cf/check-compile-et.m4 +++ b/cf/check-compile-et.m4 @@ -61,11 +61,11 @@ elif test "${krb_cv_compile_et}" = "yes"; then krb_cv_save_LIBS="${LIBS}" LIBS="${LIBS} -lcom_err" AC_MSG_CHECKING(for com_err) - AC_TRY_LINK([#include ],[ + AC_LINK_IFELSE([AC_LANG_SOURCE([[#include ]],[[ const char *p; p = error_message(0); $krb_cv_com_err_need_r - ],[krb_cv_com_err="yes"],[krb_cv_com_err="no"; CPPFLAGS="${save_CPPFLAGS}"]) + ]])],[krb_cv_com_err="yes"],[krb_cv_com_err="no"; CPPFLAGS="${save_CPPFLAGS}"]) AC_MSG_RESULT(${krb_cv_com_err}) LIBS="${krb_cv_save_LIBS}" else diff --git a/cf/check-var.m4 b/cf/check-var.m4 index 67758a583..108ee6c26 100644 --- a/cf/check-var.m4 +++ b/cf/check-var.m4 @@ -5,15 +5,13 @@ AC_DEFUN([rk_CHECK_VAR], [ AC_MSG_CHECKING(for $1) AC_CACHE_VAL(ac_cv_var_$1, [ m4_ifval([$2],[ - AC_TRY_LINK([$2 - void * foo() { return &$1; }], - [foo()], - ac_cv_var_$1=yes, ac_cv_var_$1=no)]) + AC_LINK_IFELSE([AC_LANG_SOURCE([[$2 + void * foo() { return &$1; }]],[[foo()]])], + [ac_cv_var_$1=yes],[ac_cv_var_$1=no])]) if test "$ac_cv_var_$1" != yes ; then -AC_TRY_LINK([extern int $1; -int foo() { return $1; }], - [foo()], - ac_cv_var_$1=yes, ac_cv_var_$1=no) +AC_LINK_IFELSE([AC_LANG_SOURCE([[extern int $1; +int foo() { return $1; }]],[[foo()]])], + [ac_cv_var_$1=yes],[ac_cv_var_$1=no]) fi ]) ac_foo=`eval echo \\$ac_cv_var_$1` diff --git a/cf/crypto.m4 b/cf/crypto.m4 index ee2d1c5ef..cf38a85d7 100644 --- a/cf/crypto.m4 +++ b/cf/crypto.m4 @@ -87,24 +87,25 @@ if test "$crypto_lib" = "unknown" -a "$with_krb4" != "no"; then for j in $cdirs; do for k in $clibs; do LIBS="$j $k $save_LIBS" - AC_TRY_LINK(test_headers, test_body, - openssl=yes ires="$i" lres="$j $k"; break 3) + AC_LINK_IFELSE([AC_LANG_SOURCE([test_headers], + [test_body])], + [openssl=yes ires="$i" lres="$j $k"; break 3]) done done CFLAGS="$i $save_CFLAGS" for j in $cdirs; do for k in $clibs; do LIBS="$j $k $save_LIBS" - AC_TRY_LINK(test_headers, test_body, - openssl=no ires="$i" lres="$j $k"; break 3) + AC_LINK_IFELSE([AC_LANG_SOURCE([test_headers],[test_body])], + [openssl=no ires="$i" lres="$j $k"; break 3]) done done CFLAGS="-DHAVE_OLD_HASH_NAMES $i $save_CFLAGS" for j in $cdirs; do for k in $clibs; do LIBS="$j $k $save_LIBS" - AC_TRY_LINK(test_headers, test_body, - openssl=no ires="$i" lres="$j $k"; break 3) + AC_LINK_IFELSE([AC_LANG_SOURCE([test_headers],[test_body])], + [openssl=no ires="$i" lres="$j $k"; break 3]) done done done @@ -141,7 +142,7 @@ if test "$crypto_lib" = "unknown" -a "$with_openssl" != "no"; then LIB_des_so="$LIB_des" LIB_des_appl="$LIB_des" LIBS="${LIBS} ${LIB_des}" - AC_TRY_LINK(test_headers, test_body, [ + AC_LINK_IFELSE([AC_LANG_SOURCE([test_headers],[test_body])], [ crypto_lib=libcrypto openssl=yes AC_MSG_RESULT([libcrypto]) ]) diff --git a/cf/find-func-no-libs2.m4 b/cf/find-func-no-libs2.m4 index f9be91814..af42e176f 100644 --- a/cf/find-func-no-libs2.m4 +++ b/cf/find-func-no-libs2.m4 @@ -21,7 +21,7 @@ if eval "test \"\$ac_cv_func_$1\" != yes" ; then *) ac_lib="-l$ac_lib" ;; esac LIBS="$6 $ac_lib $5 $ac_save_LIBS" - AC_TRY_LINK([$3],[$1($4)],eval "if test -n \"$ac_lib\";then ac_cv_funclib_$1=$ac_lib; else ac_cv_funclib_$1=yes; fi";break) + AC_LINK_IFELSE([AC_LANG_SOURCE([[$3]],[[$1($4)]])],[eval "if test -n \"$ac_lib\";then ac_cv_funclib_$1=$ac_lib; else ac_cv_funclib_$1=yes; fi";break]) done eval "ac_cv_funclib_$1=\${ac_cv_funclib_$1-no}" LIBS="$ac_save_LIBS" diff --git a/cf/krb-ipv6.m4 b/cf/krb-ipv6.m4 index bc8901511..e56972b6b 100644 --- a/cf/krb-ipv6.m4 +++ b/cf/krb-ipv6.m4 @@ -89,7 +89,7 @@ fi ]) AC_CACHE_CHECK([for IPv6], ac_cv_lib_ipv6, [ -AC_TRY_LINK([ +AC_LINK_IFELSE([AC_LANG_SOURCE([[ #ifdef HAVE_SYS_TYPES_H #include #endif @@ -102,8 +102,8 @@ AC_TRY_LINK([ #ifdef HAVE_NETINET_IN6_H #include #endif -], -[ +]], +[[ struct sockaddr_in6 sin6; int s; @@ -113,9 +113,9 @@ AC_TRY_LINK([ sin6.sin6_port = htons(17); sin6.sin6_addr = in6addr_any; bind(s, (struct sockaddr *)&sin6, sizeof(sin6)); -], -ac_cv_lib_ipv6=yes, -ac_cv_lib_ipv6=no)]) +]])], +[ac_cv_lib_ipv6=yes], +[ac_cv_lib_ipv6=no])]) if test "$ac_cv_lib_ipv6" = yes; then AC_DEFINE(HAVE_IPV6, 1, [Define if you have IPv6.]) else @@ -125,7 +125,7 @@ fi ## test for AIX missing in6addr_loopback if test "$ac_cv_lib_ipv6" = yes; then AC_CACHE_CHECK([for in6addr_loopback],[ac_cv_var_in6addr_loopback],[ - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_SOURCE([[ #ifdef HAVE_SYS_TYPES_H #include #endif @@ -137,10 +137,10 @@ if test "$ac_cv_lib_ipv6" = yes; then #endif #ifdef HAVE_NETINET_IN6_H #include -#endif],[ +#endif]],[[ struct sockaddr_in6 sin6; sin6.sin6_addr = in6addr_loopback; -],ac_cv_var_in6addr_loopback=yes,ac_cv_var_in6addr_loopback=no)]) +]])],[ac_cv_var_in6addr_loopback=yes],[ac_cv_var_in6addr_loopback=no])]) if test "$ac_cv_var_in6addr_loopback" = yes; then AC_DEFINE(HAVE_IN6ADDR_LOOPBACK, 1, [Define if you have the in6addr_loopback variable]) diff --git a/cf/test-package.m4 b/cf/test-package.m4 index 58218d21e..bce0d7a33 100644 --- a/cf/test-package.m4 +++ b/cf/test-package.m4 @@ -91,7 +91,7 @@ if test "$with_$1" != no; then if test "$[]$1_cflags" -a "$[]$1_libs"; then CFLAGS="$[]$1_cflags $save_CFLAGS" LIBS="$[]$1_libs $save_LIBS" - AC_TRY_LINK([$2],,[ + AC_LINK_IFELSE([AC_LANG_SOURCE([[$2]],[[]])],[ INCLUDE_$1="$[]$1_cflags" LIB_$1="$[]$1_libs" AC_MSG_RESULT([from $with_$1_config]) @@ -105,7 +105,7 @@ if test "$with_$1" != no; then done for i in $lib_dirs; do LIBS="-L$i $3 $4 $save_LIBS" - AC_TRY_LINK([$2],,lres=$i;break) + AC_LINK_IFELSE([AC_LANG_SOURCE([[$2]],[[]])],[lres=$i;break]) done if test "$ires" -a "$lres" -a "$with_$1" != "no"; then INCLUDE_$1="-I$ires"