]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
check for gssapi_krb5.h and gssapi/gssapi_krb5.h
authorMark Andrews <marka@isc.org>
Mon, 3 May 2021 04:03:19 +0000 (14:03 +1000)
committerMark Andrews <marka@isc.org>
Wed, 30 Jun 2021 02:14:08 +0000 (12:14 +1000)
configure
configure.ac

index bbee60e77609491a79dad11caf49fdf8758cfcd4..cf9dcb1144cb81778d9cfd7713f65b72cd804f13 100755 (executable)
--- a/configure
+++ b/configure
 
 done
         if test "" = "$ISC_PLATFORM_GSSAPIHEADER"; then
-           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: krb5-config: gssapi.h not found" >&5
-printf "%s\n" "krb5-config: gssapi.h not found" >&6; }
+           case "$use_gssapi" in
+           auto|yes)
+               { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: krb5-config: gssapi.h not found" >&5
+printf "%s\n" "krb5-config: gssapi.h not found" >&6; };;
+            *)
+               as_fn_error $? "krb5-config: gssapi.h not found" "$LINENO" 5;;
+           esac
            CPPFLAGS="$saved_cppflags"
            use_gssapi="yes"
         else
 
 done
            if test "" = "$ISC_PLATFORM_KRB5HEADER"; then
-               { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: krb5-config: krb5.h not found" >&5
-printf "%s\n" "krb5-config: krb5.h not found" >&6; }
+               case "$use_gssapi" in
+               auto|yes)
+                   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: krb5-config: krb5.h not found" >&5
+printf "%s\n" "krb5-config: krb5.h not found" >&6; };;
+               *)
+                   as_fn_error $? "krb5-config: krb5.h not found" "$LINENO" 5;;
+               esac
                CPPFLAGS="$saved_cppflags"
                use_gssapi="yes"
            else
+                      for ac_header in gssapi_krb5.h gssapi/gssapi_krb5.h
+do :
+  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
+  cat >>confdefs.h <<_ACEOF
+#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ISC_PLATFORM_GSSAPI_KRB5_HEADER="#define ISC_PLATFORM_GSSAPI_KRB5_HEADER <$ac_header>"
+fi
+
+done
                CPPFLAGS="$saved_cppflags"
                saved_libs="$LIBS"
                LIBS=$gssapi_libs
@@ -16306,9 +16329,9 @@ printf "%s\n" "krb5-config: linked" >&6; }
                        case "$use_gssapi" in
                        auto|yes)
                            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: krb5-config: could not determine proper GSSAPI linkage" >&5
-printf "%s\n" "krb5-config: could not determine proper GSSAPI linkage" >&6; } ;;
+printf "%s\n" "krb5-config: could not determine proper GSSAPI linkage" >&6; };;
                        *)
-                           as_fn_error $? "krb5-config: could not determine proper GSSAPI linkage" "$LINENO" 5 ;;
+                           as_fn_error $? "krb5-config: could not determine proper GSSAPI linkage" "$LINENO" 5;;
                        esac
                        ;;
                esac
index 5972ca33fb9396c8df2ef8706485e3a664e555a8..43bb7b8b9b03351dedb37ef6bb90f90e7fe3eba5 100644 (file)
@@ -930,17 +930,29 @@ case "$use_gssapi" in
         AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h,
            [ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <$ac_header>"])
         if test "" = "$ISC_PLATFORM_GSSAPIHEADER"; then
-           AC_MSG_RESULT([krb5-config: gssapi.h not found])
+           case "$use_gssapi" in
+           auto|yes)
+               AC_MSG_RESULT([krb5-config: gssapi.h not found]);;
+            *)
+               AC_MSG_ERROR([krb5-config: gssapi.h not found]);;
+           esac
            CPPFLAGS="$saved_cppflags"
            use_gssapi="yes"
         else
            AC_CHECK_HEADERS(krb5/krb5.h krb5.h,
                [ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER <$ac_header>"])
            if test "" = "$ISC_PLATFORM_KRB5HEADER"; then
-               AC_MSG_RESULT([krb5-config: krb5.h not found])
+               case "$use_gssapi" in
+               auto|yes)
+                   AC_MSG_RESULT([krb5-config: krb5.h not found]);;
+               *)
+                   AC_MSG_ERROR([krb5-config: krb5.h not found]);;
+               esac
                CPPFLAGS="$saved_cppflags"
                use_gssapi="yes"
            else
+               AC_CHECK_HEADERS(gssapi_krb5.h gssapi/gssapi_krb5.h,
+                   [ISC_PLATFORM_GSSAPI_KRB5_HEADER="#define ISC_PLATFORM_GSSAPI_KRB5_HEADER <$ac_header>"])
                CPPFLAGS="$saved_cppflags"
                saved_libs="$LIBS"
                LIBS=$gssapi_libs
@@ -955,9 +967,9 @@ case "$use_gssapi" in
                    no)
                        case "$use_gssapi" in
                        auto|yes)
-                           AC_MSG_RESULT([krb5-config: could not determine proper GSSAPI linkage]) ;;
+                           AC_MSG_RESULT([krb5-config: could not determine proper GSSAPI linkage]);;
                        *)
-                           AC_MSG_ERROR([krb5-config: could not determine proper GSSAPI linkage]) ;;
+                           AC_MSG_ERROR([krb5-config: could not determine proper GSSAPI linkage]);;
                        esac
                        ;;
                esac