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 $prefix /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(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(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(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 $prefix /usr /usr/local ../libeap ; 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 $prefix /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 libraries.
134 Please install Shibboleth or specify installation directory with
136 ----------------------------------------------------------------------
139 printf "Shibboleth found in $shibspdir\n";
140 SHIBSP_LIBS="-lshibsp -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)
145 AC_DEFINE_UNQUOTED([HAVE_SHIBSP], 1, [Define is Shibboleth SP is available])
149 AC_DEFUN([AX_CHECK_SHIBRESOLVER],
150 [AC_MSG_CHECKING(for Shibboleth resolver implementation)
152 found_shibresolver="no"
153 AC_ARG_WITH(shibresolver,
154 AC_HELP_STRING([--with-shibresolver],
155 [Use Shibboleth resolver (in specified installation directory)]),
156 [check_shibresolver_dir="$withval"],
157 [check_shibresolver_dir=])
158 if test x_$check_shibresolver_dir != x_no; then
159 for dir in $check_shibresolver_dir $prefix /usr /usr/local ; do
160 shibresolverdir="$dir"
161 if test -f "$dir/include/shibresolver/resolver.h"; then
162 found_shibresolver="yes";
163 SHIBRESOLVER_DIR="${shibresolverdir}"
164 SHIBRESOLVER_CXXFLAGS="-I$shibresolverdir/include";
169 AC_MSG_RESULT($found_shibresolver)
170 if test x_$check_shibresolver_dir != x_no; then
171 if test x_$found_shibresolver != x_yes; then
173 ----------------------------------------------------------------------
174 Cannot find Shibboleth resolver libraries, building without
177 Please install Shibboleth or specify installation directory with
178 --with-shibresolver=(dir).
179 ----------------------------------------------------------------------
182 printf "Shibboleth resolver found in $shibresolverdir\n";
183 SHIBRESOLVER_LIBS="-lshibresolver";
184 SHIBRESOLVER_LDFLAGS="-L$shibresolverdir/lib";
185 AC_SUBST(SHIBRESOLVER_CXXFLAGS)
186 AC_SUBST(SHIBRESOLVER_LDFLAGS)
187 AC_SUBST(SHIBRESOLVER_LIBS)
188 AC_DEFINE_UNQUOTED([HAVE_SHIBRESOLVER], 1, [Define is Shibboleth resolver is available])
193 AC_DEFUN([AX_CHECK_OPENSAML],
194 [AC_MSG_CHECKING(for OpenSAML implementation)
197 AC_ARG_WITH(opensaml,
198 AC_HELP_STRING([--with-opensaml],
199 [Use OpenSAML (in specified installation directory)]),
200 [check_opensaml_dir="$withval"],
201 [check_opensaml_dir=])
202 if test x_$check_opensaml_dir != x_no; then
203 for dir in $check_opensaml_dir $prefix /usr /usr/local ; do
205 if test -f "$dir/include/saml/Assertion.h"; then
206 found_opensaml="yes";
207 OPENSAML_DIR="${opensamldir}"
208 OPENSAML_CXXFLAGS="-I$opensamldir/include";
213 AC_MSG_RESULT($found_opensaml)
214 if test x_$check_opensaml_dir != x_no; then
215 if test x_$found_opensaml != x_yes; then
217 ----------------------------------------------------------------------
218 Cannot find OpenSAML libraries, building without OpenSAML support.
220 Please install OpenSAML or specify installation directory with
221 --with-opensaml=(dir).
222 ----------------------------------------------------------------------
225 printf "OpenSAML found in $opensamldir\n";
226 OPENSAML_LIBS="-lsaml -lxml-security-c -lxmltooling -lxerces-c";
227 OPENSAML_LDFLAGS="-L$opensamldir/lib";
228 AC_SUBST(OPENSAML_CXXFLAGS)
229 AC_SUBST(OPENSAML_LDFLAGS)
230 AC_SUBST(OPENSAML_LIBS)
231 AC_DEFINE_UNQUOTED([HAVE_OPENSAML], 1, [Define is OpenSAML is available])
236 AC_DEFUN([AX_CHECK_RADSEC],
237 [AC_MSG_CHECKING(for radsec)
241 AC_HELP_STRING([--with-radsec],
242 [Use radsec (in specified installation directory)]),
243 [check_radsec_dir="$withval"],
245 for dir in $check_radsec_dir $prefix /usr /usr/local ; do
247 if test -f "$dir/include/radsec/radsec.h"; then
249 RADSEC_DIR="${radsecdir}"
250 RADSEC_CFLAGS="-I$radsecdir/include";
254 AC_MSG_RESULT($found_radsec)
255 if test x_$found_radsec != x_yes; then
257 ----------------------------------------------------------------------
258 Cannot find radsec libraries.
260 Please install libradsec or specify installation directory with
262 ----------------------------------------------------------------------
265 printf "radsec found in $radsecdir\n";
266 RADSEC_LIBS="-lradsec";
267 RADSEC_LDFLAGS="-L$radsecdir/lib";
268 AC_SUBST(RADSEC_CFLAGS)
269 AC_SUBST(RADSEC_LDFLAGS)
270 AC_SUBST(RADSEC_LIBS)
274 AC_DEFUN([AX_CHECK_JANSSON],
275 [AC_MSG_CHECKING(for jansson)
279 AC_HELP_STRING([--with-jansson],
280 [Use jansson (in specified installation directory)]),
281 [check_jansson_dir="$withval"],
282 [check_jansson_dir=])
283 for dir in $check_jansson_dir $prefix /usr /usr/local ; do
285 if test -f "$dir/include/jansson.h"; then
287 JANSSON_DIR="${janssondir}"
288 JANSSON_CFLAGS="-I$janssondir/include";
292 AC_MSG_RESULT($found_jansson)
293 if test x_$found_jansson != x_yes; then
295 ----------------------------------------------------------------------
296 Cannot find jansson libraries.
298 Please install libjansson or specify installation directory with
299 --with-jansson=(dir).
300 ----------------------------------------------------------------------
303 printf "jansson found in $janssondir\n";
304 JANSSON_LIBS="-ljansson";
305 JANSSON_LDFLAGS="-L$janssondir/lib";
306 AC_SUBST(JANSSON_CFLAGS)
307 AC_SUBST(JANSSON_LDFLAGS)
308 AC_SUBST(JANSSON_LIBS)
312 AC_DEFUN([AX_CHECK_LIBMOONSHOT],
313 [AC_MSG_CHECKING(for Moonshot identity selector implementation)
315 found_libmoonshot="no"
316 AC_ARG_WITH(libmoonshot,
317 AC_HELP_STRING([--with-libmoonshot],
318 [Use libmoonshot (in specified installation directory)]),
319 [check_libmoonshot_dir="$withval"],
320 [check_libmoonshot_dir=])
321 for dir in $check_libmoonshot_dir $prefix /usr /usr/local ../../moonshot-ui/libmoonshot ; do
322 libmoonshotdir="$dir"
323 if test -f "$dir/include/libmoonshot.h"; then
324 found_libmoonshot="yes";
325 LIBMOONSHOT_DIR="${libmoonshotdir}"
326 LIBMOONSHOT_CFLAGS="-I$libmoonshotdir/include";
330 AC_MSG_RESULT($found_libmoonshot)
331 if test x_$found_libmoonshot != x_yes; then
333 ----------------------------------------------------------------------
334 Cannot find Moonshot identity selector libraries.
336 Please install wpa_supplicant or specify installation directory with
337 --with-libmoonshot=(dir).
338 ----------------------------------------------------------------------
341 printf "libmoonshot found in $libmoonshotdir\n";
342 LIBMOONSHOT_LIBS="-lmoonshot";
343 LIBMOONSHOT_LDFLAGS="-L$libmoonshot/lib";
344 AC_SUBST(LIBMOONSHOT_CFLAGS)
345 AC_SUBST(LIBMOONSHOT_LDFLAGS)
346 AC_SUBST(LIBMOONSHOT_LIBS)
347 AC_CHECK_LIB(moonshot, moonshot_get_identity, [AC_DEFINE_UNQUOTED([HAVE_MOONSHOT_GET_IDENTITY], 1, [Define if Moonshot identity selector is available])], [], "$LIBMOONSHOT_LIBS")