[krb5-auth-dialog: 3/14] autoconf: Use AC_LANG_SOURCE with AC_COMPILE_IFELSE




commit 14982325a2f123fdfd0044869da096d00902bcce
Author: Guido Günther <agx sigxcpu org>
Date:   Tue Jan 5 21:05:28 2021 +0100

    autoconf: Use AC_LANG_SOURCE with AC_COMPILE_IFELSE
    
    See https://autotools.io/forwardporting/autoconf.html

 configure.ac | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 993a5f1..2f39541 100644
--- a/configure.ac
+++ b/configure.ac
@@ -94,7 +94,7 @@ AC_CHECK_FUNCS([krb5_get_init_creds_opt_set_pkinit],
 AC_CHECK_FUNCS([krb5_get_init_creds_opt_set_pa],
                [mit_pkinit=yes],[mit_pkinit=no])
 AC_MSG_CHECKING(if a krb5_principal->realm is a char*)
-AC_COMPILE_IFELSE([
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
 $ac_includes_default
 #include <krb5.h>
 #include <string.h>
@@ -103,12 +103,12 @@ main(int argc, char **argv)
 {
        static krb5_principal foo;
        return strlen(foo->realm);
-}],[AC_DEFINE(HAVE_KRB5_PRINCIPAL_REALM_AS_STRING,1,[Define if the realm of a krb5_principal is a char*])
+}])],[AC_DEFINE(HAVE_KRB5_PRINCIPAL_REALM_AS_STRING,1,[Define if the realm of a krb5_principal is a char*])
 AC_MSG_RESULT(yes)],
 AC_MSG_RESULT(no))
 
 AC_MSG_CHECKING(if a krb5_principal->realm is a krb5_data)
-AC_COMPILE_IFELSE([
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
 $ac_includes_default
 #include <krb5.h>
 int
@@ -118,7 +118,7 @@ main(int argc, char **argv)
        static krb5_data bar;
        foo->realm = bar;
        return 0;
-}],[AC_DEFINE(HAVE_KRB5_PRINCIPAL_REALM_AS_DATA,1,[Define if the realm of a krb5_principal is a krb5_data])
+}])],[AC_DEFINE(HAVE_KRB5_PRINCIPAL_REALM_AS_DATA,1,[Define if the realm of a krb5_principal is a krb5_data])
 AC_MSG_RESULT(yes)], AC_MSG_RESULT(no))
 
 dnl pkinit


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]