1 dnl Based on the one from the Boinc project by Reinhard
3 AC_DEFUN([AX_CHECK_KRB5],
4 [AC_MSG_CHECKING(for GSS-API and Kerberos implementation)
8 AC_HELP_STRING([--with-krb5],
9 [Use krb5 (in specified installation directory)]),
10 [check_krb5_dir="$withval"],
12 for dir in $check_krb5_dir /usr /usr/local ; do
14 if test -x "$dir/bin/krb5-config"; then
16 KRB5_CFLAGS=`$dir/bin/krb5-config gssapi --cflags`;
17 KRB5_LIBS=`$dir/bin/krb5-config gssapi --libs`;
18 COMPILE_ET="$dir/bin/compile_et";
22 AC_MSG_RESULT($found_krb5)
23 if test x_$found_krb5 != x_yes; then
25 ----------------------------------------------------------------------
26 Cannot find GSS-API/Kerberos libraries.
28 Please install MIT or Heimdal or specify installation directory with
30 ----------------------------------------------------------------------
33 printf "Kerberos found in $krb5dir\n";
37 AC_CHECK_LIB(gssapi_krb5, GSS_C_NT_COMPOSITE_EXPORT, [AC_DEFINE_UNQUOTED([HAVE_GSS_C_NT_COMPOSITE_EXPORT], 1, [Define if GSS-API library supports recent naming extensions draft])], [], "$KRB5_LIBS")
38 AC_CHECK_LIB(gssapi_krb5, gss_inquire_attrs_for_mech, [AC_DEFINE_UNQUOTED([HAVE_GSS_INQUIRE_ATTRS_FOR_MECH], 1, [Define if GSS-API library supports RFC 5587])], [], "$KRB5_LIBS")
39 AC_CHECK_LIB(gssapi_krb5, gss_krb5_import_cred, [AC_DEFINE_UNQUOTED([HAVE_GSS_KRB5_IMPORT_CRED], 1, [Define if GSS-API library supports gss_krb5_import_cred])], [], "$KRB5_LIBS")
40 AC_CHECK_LIB(krb5, heimdal_version, [AC_DEFINE_UNQUOTED([HAVE_HEIMDAL_VERSION], 1, [Define if building against Heimdal Kerberos implementation]), heimdal=yes], [heimdal=no], "$KRB5_LIBS")
41 AM_CONDITIONAL(HEIMDAL, test "x$heimdal" != "xno")
45 AC_DEFUN([AX_CHECK_EAP],
46 [AC_MSG_CHECKING(for EAP implementation)
50 AC_HELP_STRING([--with-eap],
51 [Use eap (in specified installation directory)]),
52 [check_eap_dir="$withval"],
54 for dir in $check_eap_dir /usr /usr/local ; do
56 if test -f "$dir/src/eap_peer/eap.h"; then
59 EAP_CFLAGS="-I$eapdir/src/common -I$eapdir/src -I$eapdir/src/utils";
63 AC_MSG_RESULT($found_eap)
64 if test x_$found_eap != x_yes; then
66 ----------------------------------------------------------------------
67 Cannot find EAP libraries.
69 Please install wpa_supplicant or specify installation directory with
71 ----------------------------------------------------------------------
74 printf "EAP found in $eapdir\n";
75 EAP_CFLAGS="$EAP_CFLAGS \
89 -DEAP_SERVER_IDENTITY \
94 -DEAP_SERVER_MSCHAPV2 \
100 -DEAP_SERVER_GPSK_SHA256 \
102 EAP_LIBS="-leap -lutils -lcrypto -ltls";
103 EAP_LDFLAGS="-L$eapdir/eap_example -L$eapdir/src/utils -L$eapdir/src/crypto -L$eapdir/src/tls";
105 AC_SUBST(EAP_LDFLAGS)
110 AC_DEFUN([AX_CHECK_SHIBSP],
111 [AC_MSG_CHECKING(for Shibboleth implementation)
115 AC_HELP_STRING([--with-shibsp],
116 [Use shibspboleth (in specified installation directory)]),
117 [check_shibsp_dir="$withval"],
119 for dir in $check_shibsp_dir /usr /usr/local ; do
121 if test -f "$dir/include/shibsp/SPConfig.h"; then
123 SHIBSP_DIR="${shibspdir}"
124 SHIBSP_CXXFLAGS="-I$shibspdir/include";
128 AC_MSG_RESULT($found_shibsp)
129 if test x_$found_shibsp != x_yes; then
131 ----------------------------------------------------------------------
132 Cannot find Shibboleth/OpenSAML libraries.
134 Please install Shibboleth or specify installation directory with
136 ----------------------------------------------------------------------
139 printf "Shibboleth found in $shibspdir\n";
140 SHIBSP_LIBS="-lshibsp -llog4shib -lsaml -lxml-security-c -lxmltooling -lxerces-c";
141 SHIBSP_LDFLAGS="-L$shibspdir/lib";
142 AC_SUBST(SHIBSP_CXXFLAGS)
143 AC_SUBST(SHIBSP_LDFLAGS)
144 AC_SUBST(SHIBSP_LIBS)
148 AC_DEFUN([AX_CHECK_SHIBRESOLVER],
149 [AC_MSG_CHECKING(for Shibboleth resolver implementation)
151 found_shibresolver="no"
152 AC_ARG_WITH(shibresolver,
153 AC_HELP_STRING([--with-shibresolver],
154 [Use Shibboleth resolver (in specified installation directory)]),
155 [check_shibresolver_dir="$withval"],
156 [check_shibresolver_dir=])
157 for dir in $check_shibresolver_dir /usr /usr/local ; do
158 shibresolverdir="$dir"
159 if test -f "$dir/include/shibresolver/resolver.h"; then
160 found_shibresolver="yes";
161 SHIBRESOLVER_DIR="${shibresolverdir}"
162 SHIBRESOLVER_CXXFLAGS="-I$shibresolverdir/include";
166 AC_MSG_RESULT($found_shibresolver)
167 if test x_$found_shibresolver != x_yes; then
169 ----------------------------------------------------------------------
170 Cannot find Shibboleth resolver libraries.
172 Please install Shibboleth or specify installation directory with
173 --with-shibresolver=(dir).
174 ----------------------------------------------------------------------
177 printf "Shibboleth resolver found in $shibresolverdir\n";
178 SHIBRESOLVER_LIBS="-lshibresolver";
179 SHIBRESOLVER_LDFLAGS="-L$shibresolverdir/lib";
180 AC_SUBST(SHIBRESOLVER_CXXFLAGS)
181 AC_SUBST(SHIBRESOLVER_LDFLAGS)
182 AC_SUBST(SHIBRESOLVER_LIBS)
186 AC_DEFUN([AX_CHECK_RADSEC],
187 [AC_MSG_CHECKING(for radsec)
191 AC_HELP_STRING([--with-radsec],
192 [Use radsec (in specified installation directory)]),
193 [check_radsec_dir="$withval"],
195 for dir in $check_radsec_dir /usr /usr/local ; do
197 if test -f "$dir/include/radsec/radsec.h"; then
199 RADSEC_DIR="${radsecdir}"
200 RADSEC_CFLAGS="-I$radsecdir/include";
204 AC_MSG_RESULT($found_radsec)
205 if test x_$found_radsec != x_yes; then
207 ----------------------------------------------------------------------
208 Cannot find radsec libraries.
210 Please install libradsec or specify installation directory with
212 ----------------------------------------------------------------------
215 printf "radsec found in $radsecdir\n";
216 RADSEC_LIBS="-lradsec";
217 RADSEC_LDFLAGS="-L$radsecdir/lib";
218 AC_SUBST(RADSEC_CFLAGS)
219 AC_SUBST(RADSEC_LDFLAGS)
220 AC_SUBST(RADSEC_LIBS)