replace AC_TRY_LINK with AC_LINK_IFELSE
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14154 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -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)
|
||||
|
@@ -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 <com_err.h>],[
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[#include <com_err.h>]],[[
|
||||
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
|
||||
|
@@ -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`
|
||||
|
15
cf/crypto.m4
15
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])
|
||||
])
|
||||
|
@@ -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"
|
||||
|
@@ -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 <sys/types.h>
|
||||
#endif
|
||||
@@ -102,8 +102,8 @@ AC_TRY_LINK([
|
||||
#ifdef HAVE_NETINET_IN6_H
|
||||
#include <netinet/in6.h>
|
||||
#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 <sys/types.h>
|
||||
#endif
|
||||
@@ -137,10 +137,10 @@ if test "$ac_cv_lib_ipv6" = yes; then
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN6_H
|
||||
#include <netinet/in6.h>
|
||||
#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])
|
||||
|
@@ -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"
|
||||
|
Reference in New Issue
Block a user