replace AC_TRY_COMPILE with AC_COMPILE_IFELSE
authorJohan Danielsson <joda@pdc.kth.se>
Wed, 25 Aug 2004 14:19:39 +0000 (14:19 +0000)
committerJohan Danielsson <joda@pdc.kth.se>
Wed, 25 Aug 2004 14:19:39 +0000 (14:19 +0000)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14149 ec53bebd-3082-4978-b11e-865c3cabbd6b

admin/Makefile.am
cf/c-attribute.m4
cf/check-declaration.m4
configure.in

index f687eb1951262ade75455330e855ec3b91623d0c..3776e803b5b6993a2ee4db9a6f8401abff1ad706 100644 (file)
@@ -2,7 +2,7 @@
 
 include $(top_srcdir)/Makefile.am.common
 
-INCLUDES += $(INCLUDE_readline) $(INCLUDE_des)
+AM_CPPFLAGS += $(INCLUDE_readline) $(INCLUDE_des)
 
 man_MANS = ktutil.8
 
index a263bcc4ccfac05352c714e65291c5b786e68f8f..159e820019c15a50076a4571663aae9138beb1d6 100644 (file)
@@ -9,10 +9,7 @@ dnl
 AC_DEFUN([AC_C___ATTRIBUTE__], [
 AC_MSG_CHECKING(for __attribute__)
 AC_CACHE_VAL(ac_cv___attribute__, [
-AC_TRY_COMPILE([
-#include <stdlib.h>
-],
-[
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h>]],[[
 static void foo(void) __attribute__ ((noreturn));
 
 static void
@@ -20,9 +17,9 @@ foo(void)
 {
   exit(1);
 }
-],
-ac_cv___attribute__=yes,
-ac_cv___attribute__=no)])
+]])],
+[ac_cv___attribute__=yes],
+[ac_cv___attribute__=no])])
 if test "$ac_cv___attribute__" = "yes"; then
   AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
 fi
index 76b311e533098f89525b27ba06fda47617f9d263..94fc18d63510f53e4caecded309973b11654ec17 100644 (file)
@@ -8,12 +8,10 @@ dnl AC_HAVE_DECLARATION(includes, variable)
 AC_DEFUN([AC_CHECK_DECLARATION], [
 AC_MSG_CHECKING([if $2 is properly declared])
 AC_CACHE_VAL(ac_cv_var_$2_declaration, [
-AC_TRY_COMPILE([$1
-extern struct { int foo; } $2;],
-[$2.foo = 1;],
-eval "ac_cv_var_$2_declaration=no",
-eval "ac_cv_var_$2_declaration=yes")
-])
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[$1
+extern struct { int foo; } $2;]],[[$2.foo = 1;]])],
+[eval "ac_cv_var_$2_declaration=no"],
+[eval "ac_cv_var_$2_declaration=yes"])])
 
 define(foo, [HAVE_]translit($2, [a-z], [A-Z])[_DECLARATION])
 
index be673cbf1066859ccd70fccd795738caf0d243dc..148843f12d8ead3f38423fa379567430a6d9d3e9 100644 (file)
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
 AC_REVISION($Revision$)
 AC_PREREQ(2.53)
 test -z "$CFLAGS" && CFLAGS="-g"
-AC_INIT(Heimdal, 0.7pre, heimdal-bugs@pdc.kth.se)
+AC_INIT(Heimdal,0.7pre,heimdal-bugs@pdc.kth.se)
 AC_CONFIG_SRCDIR([kuser/kinit.c])
 AM_CONFIG_HEADER(include/config.h)
 
@@ -76,11 +76,11 @@ if test "$with_krb4" != "no"; then
        EXTRA_LIB45=lib45.a
        AC_SUBST(EXTRA_LIB45)
        AC_CACHE_CHECK(for four valued krb_put_int, ac_cv_func_krb_put_int_four,
-               [AC_TRY_COMPILE([#include <krb.h>],[
+               [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <krb.h>]], [[
                char tmp[4];
-               krb_put_int(17, tmp, 4, sizeof(tmp));],
-               ac_cv_func_krb_put_int_four=yes,
-               ac_cv_func_krb_put_int_four=no)
+               krb_put_int(17, tmp, 4, sizeof(tmp));]])],
+               [ac_cv_func_krb_put_int_four=yes],
+               [ac_cv_func_krb_put_int_four=no])
        ])
        if test "$ac_cv_func_krb_put_int_four" = yes; then
                AC_DEFINE(HAVE_FOUR_VALUED_KRB_PUT_INT, 1,
@@ -93,10 +93,10 @@ if test "$with_krb4" != "no"; then
 #endif
 ])
        AC_CACHE_CHECK(for KRB_VERIFY_SECURE, ac_cv_func_krb_verify_secure,
-               [AC_TRY_COMPILE([#include <krb.h>],[
-               int x = KRB_VERIFY_SECURE],
-               ac_cv_func_krb_verify_secure=yes,
-               ac_cv_func_krb_verify_secure=no)
+               [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <krb.h>]], [[
+               int x = KRB_VERIFY_SECURE]])],
+               [ac_cv_func_krb_verify_secure=yes],
+               [ac_cv_func_krb_verify_secure=no])
        ])
        if test "$ac_cv_func_krb_verify_secure" != yes; then
                AC_DEFINE(KRB_VERIFY_SECURE, 1,
@@ -106,10 +106,10 @@ if test "$with_krb4" != "no"; then
        fi
        AC_CACHE_CHECK(for KRB_VERIFY_NOT_SECURE,
                ac_cv_func_krb_verify_not_secure,
-               [AC_TRY_COMPILE([#include <krb.h>],[
-               int x = KRB_VERIFY_NOT_SECURE],
-               ac_cv_func_krb_verify_not_secure=yes,
-               ac_cv_func_krb_verify_not_secure=no)
+               [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <krb.h>]], [[
+               int x = KRB_VERIFY_NOT_SECURE]])],
+               [ac_cv_func_krb_verify_not_secure=yes],
+               [ac_cv_func_krb_verify_not_secure=no])
        ])
        if test "$ac_cv_func_krb_verify_not_secure" != yes; then
                AC_DEFINE(KRB_VERIFY_NOT_SECURE, 0,
@@ -130,11 +130,11 @@ if test "$with_krb4" != "no"; then
 #endif])
        AC_CACHE_CHECK([for KRB_SENDAUTH_VERS],
                ac_cv_func_krb_sendauth_vers,
-               [AC_TRY_COMPILE([#include <krb.h>
-                       #include <prot.h>],[
-               char *x = KRB_SENDAUTH_VERS],
-               ac_cv_func_krb_sendauth_vers=yes,
-               ac_cv_func_krb_sendauth_vers=no)
+               [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <krb.h>
+                       #include <prot.h>]], [[
+               char *x = KRB_SENDAUTH_VERS]])],
+               [ac_cv_func_krb_sendauth_vers=yes],
+               [ac_cv_func_krb_sendauth_vers=no])
        ])
        if test "$ac_cv_func_krb_sendauth_vers" != yes; then
                AC_DEFINE(KRB_SENDAUTH_VERS, ["AUTHV0.1"],
@@ -142,12 +142,12 @@ if test "$with_krb4" != "no"; then
        fi
        AC_CACHE_CHECK(for krb_mk_req with const arguments,
                ac_cv_func_krb_mk_req_const,
-               [AC_TRY_COMPILE([#include <krb.h>
+               [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <krb.h>
                int krb_mk_req(KTEXT a, const char *s, const char *i,
                               const char *r, int32_t checksum)
-               { return 17; }], [],
-               ac_cv_func_krb_mk_req_const=yes,
-               ac_cv_func_krb_mk_req_const=no)
+               { return 17; }]], [[]])],
+               [ac_cv_func_krb_mk_req_const=yes],
+               [ac_cv_func_krb_mk_req_const=no])
        ])
        if test "$ac_cv_func_krb_mk_req_const" = "yes"; then
                AC_DEFINE(KRB_MK_REQ_CONST, 1,