]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1884] Checkpoint: m4 macro file added
authorFrancis Dupont <fdupont@isc.org>
Tue, 25 May 2021 16:07:50 +0000 (18:07 +0200)
committerFrancis Dupont <fdupont@isc.org>
Tue, 25 May 2021 16:07:50 +0000 (18:07 +0200)
configure.ac
m4macros/Makefile.am
m4macros/ax_gssapi.m4 [new file with mode: 0644]

index a4201b361cb6ff3eecbbcff2a8c5482869c853b5..7c74b5957fa506251bb48d68b2fa99d4f9264557 100644 (file)
@@ -1617,6 +1617,9 @@ AC_LINK_IFELSE(
 AM_CONDITIONAL(HAVE_OPTRESET, test "x$var_optreset_exists" != "xno")
 AM_COND_IF([HAVE_OPTRESET], [AC_DEFINE([HAVE_OPTRESET], [1], [Check for optreset?])])
 
+# GSS-API (from bind9)
+AX_GSS_API
+
 AC_DEFINE([CONFIG_H_WAS_INCLUDED], [1], [config.h inclusion marker])
 
 # Autoconf 2.70 has runstatedir.
@@ -2162,6 +2165,15 @@ FreeRADIUS client:
 END
 fi
 
+if test "GSSAPI_LIBS" != ""; then
+cat >> config.report << END
+
+GSS-API support:
+  GSSAPI_CFLAGS:         ${GSSAPI_CFLAGS}
+  GSSAPI_LIBS:           ${GSSAPI_LIBS}
+END
+fi
+
 cat >> config.report << END
 
 Developer:
index e2ce764833258451198a8c172f492b36c92b522a..6ec34cb22060830f4956297e21b3f195f2b08415 100644 (file)
@@ -1 +1,2 @@
 EXTRA_DIST  = ax_boost_for_kea.m4 ax_isc_rpath.m4 ax_cpp11.m4 ax_gtest.m4
+EXTRA_DIST += ax_crypto.m4 ax_gssapi.m4
diff --git a/m4macros/ax_gssapi.m4 b/m4macros/ax_gssapi.m4
new file mode 100644 (file)
index 0000000..aae9188
--- /dev/null
@@ -0,0 +1,37 @@
+AC_DEFUN([AX_GSS_API], [
+
+gssapi_path=""
+
+AC_ARG_WITH([gssapi],
+            [AS_HELP_STRING([--with-gssapi=PATH],
+                            [specify a path to krb5-config file])],
+        [gssapi_path="$withval"; enable_gssapi="yes"])
+
+#
+# Check availability of gssapi, which will be used for unit tests.
+#
+GSSAPI_CFLAGS=
+GSSAPI_LIBS=
+
+AC_MSG_CHECKING([for gssapi support])
+if test "x$gssapi_path" = "x" ; then
+    AC_MSG_RESULT([no])
+else
+    AC_MSG_RESULT([yes])
+    if test "$gssapi_path" = "yes"; then
+        AC_PATH_PROG([KRB5_CONFIG], [krb5-config])
+    else
+        KRB5_CONFIG="$gssapi_path"
+    fi
+    if test -x "${KRB5_CONFIG}" ; then        
+        GSSAPI_CFLAGS=`${KRB5_CONFIG} --cflags gssapi`
+       GSSAPI_LIBS=`${KRB5_CONFIG} --libs gssapi`
+    else
+        AC_MSG_ERROR([Unable to locate krb5-config.])
+    fi
+fi
+
+AC_SUBST(GSSAPI_CFLAGS)
+AC_SUBST(GSSAPI_LIBS)
+
+])dnl AX_GSS_API