2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 22:15:23 +00:00

[#1884] Added some checks

This commit is contained in:
Francis Dupont
2021-05-26 16:03:14 +00:00
parent 2cbb8bdf0c
commit 57102bcdb7

View File

@@ -29,6 +29,40 @@ else
else
AC_MSG_ERROR([Unable to locate krb5-config.])
fi
# Checks
AC_CHECK_HEADERS([gssapi/gssapi.h gssapi/gssapi_krb5.h krb5/krb5.h],,
AC_MSG_ERROR([Missing required gss-api or krb5 header files]))
# Verify that GSS-API with Kerberos 5 is usable.
CXXFLAGS_SAVED="$CXXFLAGS"
LIBS_SAVED="$LIBS"
CXXFLAGS="$CXXFLAGS $GSSAPI_CFLAGS"
LIBS="$LIBS $GSSAPI_LIBS"
if test $enable_static_link = yes; then
LIBS="-static $LIBS"
fi
AC_MSG_CHECKING([checking for GSS-API with Kerberos 5 libraries])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <gssapi/gssapi_krb5.h>]],
[[gss_ctx_id_t ctx;
OM_uint32 minor;
OM_uint32 major;
major = gss_delete_sec_context(&minor, &ctx, GSS_C_NO_BUFFER);]])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([failed to link with GSS-API with Kerberos 5 libraries])])
AC_MSG_CHECKING([checking for MIT implementation vs Heimdal])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <gssapi/gssapi_krb5.h>]],
[[return (krb5_cccol_last_change_time(0, 0, 0));]])],
[AC_MSG_RESULT([Heimdal])
AC_MSG_WARN([Heimdal is not supported, please switch to the MIT implementation])],
[AC_MSG_RESULT([MIT])])
CXXFLAGS="$CXXFLAGS_SAVED"
LIBS="$LIBS_SAVED"
fi
AC_SUBST(GSSAPI_CFLAGS)