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])
191 AM_CONDITIONAL(SHIBRESOLVER, test "x_$check_shibresolver_dir" != "x_no")
194 AC_DEFUN([AX_CHECK_OPENSAML],
195 [AC_MSG_CHECKING(for OpenSAML implementation)
198 AC_ARG_WITH(opensaml,
199 AC_HELP_STRING([--with-opensaml],
200 [Use OpenSAML (in specified installation directory)]),
201 [check_opensaml_dir="$withval"],
202 [check_opensaml_dir=])
203 if test x_$check_opensaml_dir != x_no; then
204 for dir in $check_opensaml_dir $prefix /usr /usr/local ; do
206 if test -f "$dir/include/saml/Assertion.h"; then
207 found_opensaml="yes";
208 OPENSAML_DIR="${opensamldir}"
209 OPENSAML_CXXFLAGS="-I$opensamldir/include";
214 AC_MSG_RESULT($found_opensaml)
215 if test x_$check_opensaml_dir != x_no; then
216 if test x_$found_opensaml != x_yes; then
218 ----------------------------------------------------------------------
219 Cannot find OpenSAML libraries, building without OpenSAML support.
221 Please install OpenSAML or specify installation directory with
222 --with-opensaml=(dir).
223 ----------------------------------------------------------------------
226 printf "OpenSAML found in $opensamldir\n";
227 OPENSAML_LIBS="-lsaml -lxml-security-c -lxmltooling -lxerces-c";
228 OPENSAML_LDFLAGS="-L$opensamldir/lib";
229 AC_SUBST(OPENSAML_CXXFLAGS)
230 AC_SUBST(OPENSAML_LDFLAGS)
231 AC_SUBST(OPENSAML_LIBS)
232 AC_DEFINE_UNQUOTED([HAVE_OPENSAML], 1, [Define is OpenSAML is available])
235 AM_CONDITIONAL(OPENSAML, test "x_$check_opensaml_dir" != "x_no")
238 AC_DEFUN([AX_CHECK_RADSEC],
239 [AC_MSG_CHECKING(for radsec)
243 AC_HELP_STRING([--with-radsec],
244 [Use radsec (in specified installation directory)]),
245 [check_radsec_dir="$withval"],
247 for dir in $check_radsec_dir $prefix /usr /usr/local ; do
249 if test -f "$dir/include/radsec/radsec.h"; then
251 RADSEC_DIR="${radsecdir}"
252 RADSEC_CFLAGS="-I$radsecdir/include";
256 AC_MSG_RESULT($found_radsec)
257 if test x_$found_radsec != x_yes; then
259 ----------------------------------------------------------------------
260 Cannot find radsec libraries.
262 Please install libradsec or specify installation directory with
264 ----------------------------------------------------------------------
267 printf "radsec found in $radsecdir\n";
268 RADSEC_LIBS="-lradsec";
269 RADSEC_LDFLAGS="-L$radsecdir/lib";
270 AC_SUBST(RADSEC_CFLAGS)
271 AC_SUBST(RADSEC_LDFLAGS)
272 AC_SUBST(RADSEC_LIBS)
276 AC_DEFUN([AX_CHECK_JANSSON],
277 [AC_MSG_CHECKING(for jansson)
281 AC_HELP_STRING([--with-jansson],
282 [Use jansson (in specified installation directory)]),
283 [check_jansson_dir="$withval"],
284 [check_jansson_dir=])
285 for dir in $check_jansson_dir $prefix /usr /usr/local ; do
287 if test -f "$dir/include/jansson.h"; then
289 JANSSON_DIR="${janssondir}"
290 JANSSON_CFLAGS="-I$janssondir/include";
294 AC_MSG_RESULT($found_jansson)
295 if test x_$found_jansson != x_yes; then
297 ----------------------------------------------------------------------
298 Cannot find jansson libraries.
300 Please install libjansson or specify installation directory with
301 --with-jansson=(dir).
302 ----------------------------------------------------------------------
305 printf "jansson found in $janssondir\n";
306 JANSSON_LIBS="-ljansson";
307 JANSSON_LDFLAGS="-L$janssondir/lib";
308 AC_SUBST(JANSSON_CFLAGS)
309 AC_SUBST(JANSSON_LDFLAGS)
310 AC_SUBST(JANSSON_LIBS)
314 AC_DEFUN([AX_CHECK_LIBMOONSHOT],
315 [AC_MSG_CHECKING(for Moonshot identity selector implementation)
317 found_libmoonshot="no"
318 AC_ARG_WITH(libmoonshot,
319 AC_HELP_STRING([--with-libmoonshot],
320 [Use libmoonshot (in specified installation directory)]),
321 [check_libmoonshot_dir="$withval"],
322 [check_libmoonshot_dir=])
323 for dir in $check_libmoonshot_dir $prefix /usr /usr/local ../../moonshot-ui/libmoonshot ; do
324 libmoonshotdir="$dir"
325 if test -f "$dir/include/libmoonshot.h"; then
326 found_libmoonshot="yes";
327 LIBMOONSHOT_DIR="${libmoonshotdir}"
328 LIBMOONSHOT_CFLAGS="-I$libmoonshotdir/include";
332 AC_MSG_RESULT($found_libmoonshot)
333 if test x_$found_libmoonshot != x_yes; then
335 ----------------------------------------------------------------------
336 Cannot find Moonshot identity selector libraries.
338 Please install wpa_supplicant or specify installation directory with
339 --with-libmoonshot=(dir).
340 ----------------------------------------------------------------------
343 printf "libmoonshot found in $libmoonshotdir\n";
344 LIBMOONSHOT_LIBS="-lmoonshot";
345 LIBMOONSHOT_LDFLAGS="-L$libmoonshot/lib";
346 AC_SUBST(LIBMOONSHOT_CFLAGS)
347 AC_SUBST(LIBMOONSHOT_LDFLAGS)
348 AC_SUBST(LIBMOONSHOT_LIBS)
349 AC_CHECK_LIB(moonshot, moonshot_get_identity, [AC_DEFINE_UNQUOTED([HAVE_MOONSHOT_GET_IDENTITY], 1, [Define if Moonshot identity selector is available])], [], "$LIBMOONSHOT_LIBS")