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_DEFUN([AC_BROKEN2],
|
||||||
[AC_MSG_CHECKING([for $1])
|
[AC_MSG_CHECKING([for $1])
|
||||||
AC_CACHE_VAL(ac_cv_func_[]$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
|
/* The GNU C library defines this for functions which it implements
|
||||||
to always fail with ENOSYS. Some functions are actually named
|
to always fail with ENOSYS. Some functions are actually named
|
||||||
something starting with __ and the normal name is an alias. */
|
something starting with __ and the normal name is an alias. */
|
||||||
@@ -16,7 +16,7 @@ choke me
|
|||||||
#else
|
#else
|
||||||
$1($3)
|
$1($3)
|
||||||
#endif
|
#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
|
if eval "test \"\${ac_cv_func_[]$1}\" = yes"; then
|
||||||
AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]$1), 1, define)
|
AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]$1), 1, define)
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
|
@@ -61,11 +61,11 @@ elif test "${krb_cv_compile_et}" = "yes"; then
|
|||||||
krb_cv_save_LIBS="${LIBS}"
|
krb_cv_save_LIBS="${LIBS}"
|
||||||
LIBS="${LIBS} -lcom_err"
|
LIBS="${LIBS} -lcom_err"
|
||||||
AC_MSG_CHECKING(for com_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;
|
const char *p;
|
||||||
p = error_message(0);
|
p = error_message(0);
|
||||||
$krb_cv_com_err_need_r
|
$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})
|
AC_MSG_RESULT(${krb_cv_com_err})
|
||||||
LIBS="${krb_cv_save_LIBS}"
|
LIBS="${krb_cv_save_LIBS}"
|
||||||
else
|
else
|
||||||
|
@@ -5,15 +5,13 @@ AC_DEFUN([rk_CHECK_VAR], [
|
|||||||
AC_MSG_CHECKING(for $1)
|
AC_MSG_CHECKING(for $1)
|
||||||
AC_CACHE_VAL(ac_cv_var_$1, [
|
AC_CACHE_VAL(ac_cv_var_$1, [
|
||||||
m4_ifval([$2],[
|
m4_ifval([$2],[
|
||||||
AC_TRY_LINK([$2
|
AC_LINK_IFELSE([AC_LANG_SOURCE([[$2
|
||||||
void * foo() { return &$1; }],
|
void * foo() { return &$1; }]],[[foo()]])],
|
||||||
[foo()],
|
[ac_cv_var_$1=yes],[ac_cv_var_$1=no])])
|
||||||
ac_cv_var_$1=yes, ac_cv_var_$1=no)])
|
|
||||||
if test "$ac_cv_var_$1" != yes ; then
|
if test "$ac_cv_var_$1" != yes ; then
|
||||||
AC_TRY_LINK([extern int $1;
|
AC_LINK_IFELSE([AC_LANG_SOURCE([[extern int $1;
|
||||||
int foo() { return $1; }],
|
int foo() { return $1; }]],[[foo()]])],
|
||||||
[foo()],
|
[ac_cv_var_$1=yes],[ac_cv_var_$1=no])
|
||||||
ac_cv_var_$1=yes, ac_cv_var_$1=no)
|
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
ac_foo=`eval echo \\$ac_cv_var_$1`
|
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 j in $cdirs; do
|
||||||
for k in $clibs; do
|
for k in $clibs; do
|
||||||
LIBS="$j $k $save_LIBS"
|
LIBS="$j $k $save_LIBS"
|
||||||
AC_TRY_LINK(test_headers, test_body,
|
AC_LINK_IFELSE([AC_LANG_SOURCE([test_headers],
|
||||||
openssl=yes ires="$i" lres="$j $k"; break 3)
|
[test_body])],
|
||||||
|
[openssl=yes ires="$i" lres="$j $k"; break 3])
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
CFLAGS="$i $save_CFLAGS"
|
CFLAGS="$i $save_CFLAGS"
|
||||||
for j in $cdirs; do
|
for j in $cdirs; do
|
||||||
for k in $clibs; do
|
for k in $clibs; do
|
||||||
LIBS="$j $k $save_LIBS"
|
LIBS="$j $k $save_LIBS"
|
||||||
AC_TRY_LINK(test_headers, test_body,
|
AC_LINK_IFELSE([AC_LANG_SOURCE([test_headers],[test_body])],
|
||||||
openssl=no ires="$i" lres="$j $k"; break 3)
|
[openssl=no ires="$i" lres="$j $k"; break 3])
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
CFLAGS="-DHAVE_OLD_HASH_NAMES $i $save_CFLAGS"
|
CFLAGS="-DHAVE_OLD_HASH_NAMES $i $save_CFLAGS"
|
||||||
for j in $cdirs; do
|
for j in $cdirs; do
|
||||||
for k in $clibs; do
|
for k in $clibs; do
|
||||||
LIBS="$j $k $save_LIBS"
|
LIBS="$j $k $save_LIBS"
|
||||||
AC_TRY_LINK(test_headers, test_body,
|
AC_LINK_IFELSE([AC_LANG_SOURCE([test_headers],[test_body])],
|
||||||
openssl=no ires="$i" lres="$j $k"; break 3)
|
[openssl=no ires="$i" lres="$j $k"; break 3])
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
@@ -141,7 +142,7 @@ if test "$crypto_lib" = "unknown" -a "$with_openssl" != "no"; then
|
|||||||
LIB_des_so="$LIB_des"
|
LIB_des_so="$LIB_des"
|
||||||
LIB_des_appl="$LIB_des"
|
LIB_des_appl="$LIB_des"
|
||||||
LIBS="${LIBS} ${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
|
crypto_lib=libcrypto openssl=yes
|
||||||
AC_MSG_RESULT([libcrypto])
|
AC_MSG_RESULT([libcrypto])
|
||||||
])
|
])
|
||||||
|
@@ -21,7 +21,7 @@ if eval "test \"\$ac_cv_func_$1\" != yes" ; then
|
|||||||
*) ac_lib="-l$ac_lib" ;;
|
*) ac_lib="-l$ac_lib" ;;
|
||||||
esac
|
esac
|
||||||
LIBS="$6 $ac_lib $5 $ac_save_LIBS"
|
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
|
done
|
||||||
eval "ac_cv_funclib_$1=\${ac_cv_funclib_$1-no}"
|
eval "ac_cv_funclib_$1=\${ac_cv_funclib_$1-no}"
|
||||||
LIBS="$ac_save_LIBS"
|
LIBS="$ac_save_LIBS"
|
||||||
|
@@ -89,7 +89,7 @@ fi
|
|||||||
])
|
])
|
||||||
|
|
||||||
AC_CACHE_CHECK([for IPv6], ac_cv_lib_ipv6, [
|
AC_CACHE_CHECK([for IPv6], ac_cv_lib_ipv6, [
|
||||||
AC_TRY_LINK([
|
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -102,8 +102,8 @@ AC_TRY_LINK([
|
|||||||
#ifdef HAVE_NETINET_IN6_H
|
#ifdef HAVE_NETINET_IN6_H
|
||||||
#include <netinet/in6.h>
|
#include <netinet/in6.h>
|
||||||
#endif
|
#endif
|
||||||
],
|
]],
|
||||||
[
|
[[
|
||||||
struct sockaddr_in6 sin6;
|
struct sockaddr_in6 sin6;
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
@@ -113,9 +113,9 @@ AC_TRY_LINK([
|
|||||||
sin6.sin6_port = htons(17);
|
sin6.sin6_port = htons(17);
|
||||||
sin6.sin6_addr = in6addr_any;
|
sin6.sin6_addr = in6addr_any;
|
||||||
bind(s, (struct sockaddr *)&sin6, sizeof(sin6));
|
bind(s, (struct sockaddr *)&sin6, sizeof(sin6));
|
||||||
],
|
]])],
|
||||||
ac_cv_lib_ipv6=yes,
|
[ac_cv_lib_ipv6=yes],
|
||||||
ac_cv_lib_ipv6=no)])
|
[ac_cv_lib_ipv6=no])])
|
||||||
if test "$ac_cv_lib_ipv6" = yes; then
|
if test "$ac_cv_lib_ipv6" = yes; then
|
||||||
AC_DEFINE(HAVE_IPV6, 1, [Define if you have IPv6.])
|
AC_DEFINE(HAVE_IPV6, 1, [Define if you have IPv6.])
|
||||||
else
|
else
|
||||||
@@ -125,7 +125,7 @@ fi
|
|||||||
## test for AIX missing in6addr_loopback
|
## test for AIX missing in6addr_loopback
|
||||||
if test "$ac_cv_lib_ipv6" = yes; then
|
if test "$ac_cv_lib_ipv6" = yes; then
|
||||||
AC_CACHE_CHECK([for in6addr_loopback],[ac_cv_var_in6addr_loopback],[
|
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
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -137,10 +137,10 @@ if test "$ac_cv_lib_ipv6" = yes; then
|
|||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_NETINET_IN6_H
|
#ifdef HAVE_NETINET_IN6_H
|
||||||
#include <netinet/in6.h>
|
#include <netinet/in6.h>
|
||||||
#endif],[
|
#endif]],[[
|
||||||
struct sockaddr_in6 sin6;
|
struct sockaddr_in6 sin6;
|
||||||
sin6.sin6_addr = in6addr_loopback;
|
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
|
if test "$ac_cv_var_in6addr_loopback" = yes; then
|
||||||
AC_DEFINE(HAVE_IN6ADDR_LOOPBACK, 1,
|
AC_DEFINE(HAVE_IN6ADDR_LOOPBACK, 1,
|
||||||
[Define if you have the in6addr_loopback variable])
|
[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
|
if test "$[]$1_cflags" -a "$[]$1_libs"; then
|
||||||
CFLAGS="$[]$1_cflags $save_CFLAGS"
|
CFLAGS="$[]$1_cflags $save_CFLAGS"
|
||||||
LIBS="$[]$1_libs $save_LIBS"
|
LIBS="$[]$1_libs $save_LIBS"
|
||||||
AC_TRY_LINK([$2],,[
|
AC_LINK_IFELSE([AC_LANG_SOURCE([[$2]],[[]])],[
|
||||||
INCLUDE_$1="$[]$1_cflags"
|
INCLUDE_$1="$[]$1_cflags"
|
||||||
LIB_$1="$[]$1_libs"
|
LIB_$1="$[]$1_libs"
|
||||||
AC_MSG_RESULT([from $with_$1_config])
|
AC_MSG_RESULT([from $with_$1_config])
|
||||||
@@ -105,7 +105,7 @@ if test "$with_$1" != no; then
|
|||||||
done
|
done
|
||||||
for i in $lib_dirs; do
|
for i in $lib_dirs; do
|
||||||
LIBS="-L$i $3 $4 $save_LIBS"
|
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
|
done
|
||||||
if test "$ires" -a "$lres" -a "$with_$1" != "no"; then
|
if test "$ires" -a "$lres" -a "$with_$1" != "no"; then
|
||||||
INCLUDE_$1="-I$ires"
|
INCLUDE_$1="-I$ires"
|
||||||
|
Reference in New Issue
Block a user