replace AC_TRY_COMPILE with AC_COMPILE_IFELSE

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14151 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
2004-08-25 14:30:18 +00:00
parent 4cd9bc7b99
commit 4560513573
10 changed files with 38 additions and 41 deletions

View File

@@ -7,9 +7,9 @@ dnl AC_HAVE_STRUCT_FIELD(struct, field, headers)
AC_DEFUN([AC_HAVE_STRUCT_FIELD], [
define(cache_val, translit(ac_cv_type_$1_$2, [A-Z ], [a-z_]))
AC_CACHE_CHECK([for $2 in $1], cache_val,[
AC_TRY_COMPILE([$3],[$1 x; x.$2;],
cache_val=yes,
cache_val=no)])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[$3]],[[$1 x; x.$2]])],
[cache_val=yes],
[cache_val=no])])
if test "$cache_val" = yes; then
define(foo, translit(HAVE_$1_$2, [a-z ], [A-Z_]))
AC_DEFINE(foo, 1, [Define if $1 has field $2.])