1
dnl Based on the one from the Boinc project by Reinhard
3
AC_DEFUN([AX_CHECK_WINDOWS],
4
[AC_MSG_CHECKING(for windows)
6
AC_CHECK_HEADER(windows.h,[target_windows="yes"],[target_windows="no"])
7
AC_MSG_RESULT($target_windows)
8
AM_CONDITIONAL(TARGET_WINDOWS,test "x$target_windows" = "xyes")
11
AC_DEFUN([AX_CHECK_KRB5],
12
[AC_MSG_CHECKING(for GSS-API and Kerberos implementation)
16
AC_HELP_STRING([--with-krb5],
17
[Use krb5 (in specified installation directory)]),
18
[check_krb5_dir="$withval"],
20
for dir in $check_krb5_dir $prefix /usr/local /usr ; do
22
if test -x "$dir/bin/krb5-config"; then
24
if test "x$target_windows" = "xyes"; then
25
KRB5_CFLAGS=-I"$check_krb5_dir/include";
26
KRB5_LDFLAGS="-L$check_krb5_dir/lib/";
27
KRB5_LIBS="-lkrb5_32 -lgssapi32";
28
COMPILE_ET="$check_krb5_dir/bin/compile_et";
31
KRB5_CFLAGS=`$dir/bin/krb5-config gssapi --cflags`;
32
KRB5_LDFLAGS="-L$dir/lib";
33
KRB5_LIBS=`$dir/bin/krb5-config gssapi --libs`
35
AC_PATH_PROG(COMPILE_ET, [compile_et], [compile_et], [$dir/bin$PATH_SEPARATOr])
40
if test x_$found_krb5 != x_yes; then
41
AC_MSG_RESULT($found_krb5)
43
----------------------------------------------------------------------
44
Cannot find GSS-API/Kerberos libraries.
46
Please install MIT or Heimdal or specify installation directory with
48
----------------------------------------------------------------------
51
printf "Kerberos found in $krb5dir\n";
53
AC_SUBST(KRB5_LDFLAGS)
56
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")
57
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")
58
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")
59
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")
60
AM_CONDITIONAL(HEIMDAL, test "x$heimdal" != "xno")
64
AC_DEFUN([AX_CHECK_EAP],
65
[AC_MSG_CHECKING(for EAP implementation)
69
AC_HELP_STRING([--with-eap],
70
[Use eap (in specified installation directory)]),
71
[check_eap_dir="$withval"],
73
for dir in $check_eap_dir $prefix /usr /usr/local ../libeap ; do
75
if test -f "$dir/src/eap_peer/eap.h"; then
78
EAP_CFLAGS="-I$eapdir/src/common -I$eapdir/src -I$eapdir/src/utils";
82
AC_MSG_RESULT($found_eap)
83
if test x_$found_eap != x_yes; then
85
----------------------------------------------------------------------
86
Cannot find EAP libraries.
88
Please install wpa_supplicant or specify installation directory with
90
----------------------------------------------------------------------
93
printf "EAP found in $eapdir\n";
94
EAP_CFLAGS="$EAP_CFLAGS \
108
-DEAP_SERVER_IDENTITY \
113
-DEAP_SERVER_MSCHAPV2 \
119
-DEAP_SERVER_GPSK_SHA256 \
121
EAP_LIBS="-leap -lutils -lcrypto -ltls -lssl";
122
EAP_LDFLAGS="-L$eapdir/eap_example -L$eapdir/src/utils -L$eapdir/src/crypto -L$eapdir/src/tls";
124
AC_SUBST(EAP_LDFLAGS)
129
AC_DEFUN([AX_CHECK_SHIBSP],
130
[AC_MSG_CHECKING(for Shibboleth implementation)
134
AC_HELP_STRING([--with-shibsp],
135
[Use shibspboleth (in specified installation directory)]),
136
[check_shibsp_dir="$withval"],
138
for dir in $check_shibsp_dir $prefix /usr /usr/local ; do
140
if test -f "$dir/include/shibsp/SPConfig.h"; then
142
SHIBSP_DIR="${shibspdir}"
143
SHIBSP_CXXFLAGS="-I$shibspdir/include";
147
AC_MSG_RESULT($found_shibsp)
148
if test x_$found_shibsp != x_yes; then
150
----------------------------------------------------------------------
151
Cannot find Shibboleth libraries.
153
Please install Shibboleth or specify installation directory with
155
----------------------------------------------------------------------
158
printf "Shibboleth found in $shibspdir\n";
159
SHIBSP_LIBS="-lshibsp -lsaml -lxml-security-c -lxmltooling -lxerces-c";
160
SHIBSP_LDFLAGS="-L$shibspdir/lib";
161
AC_SUBST(SHIBSP_CXXFLAGS)
162
AC_SUBST(SHIBSP_LDFLAGS)
163
AC_SUBST(SHIBSP_LIBS)
164
AC_DEFINE_UNQUOTED([HAVE_SHIBSP], 1, [Define is Shibboleth SP is available])
168
AC_DEFUN([AX_CHECK_SHIBRESOLVER],
169
[AC_MSG_CHECKING(for Shibboleth resolver implementation)
171
found_shibresolver="no"
172
AC_ARG_WITH(shibresolver,
173
AC_HELP_STRING([--with-shibresolver],
174
[Use Shibboleth resolver (in specified installation directory)]),
175
[check_shibresolver_dir="$withval"],
176
[check_shibresolver_dir=])
177
if test x_$check_shibresolver_dir != x_no; then
178
for dir in $check_shibresolver_dir $prefix /usr /usr/local ; do
179
shibresolverdir="$dir"
180
if test -f "$dir/include/shibresolver/resolver.h"; then
181
found_shibresolver="yes";
182
SHIBRESOLVER_DIR="${shibresolverdir}"
183
SHIBRESOLVER_CXXFLAGS="-I$shibresolverdir/include";
188
AC_MSG_RESULT($found_shibresolver)
189
if test x_$check_shibresolver_dir != x_no; then
190
if test x_$found_shibresolver != x_yes; then
192
----------------------------------------------------------------------
193
Cannot find Shibboleth resolver libraries, building without
196
Please install Shibboleth or specify installation directory with
197
--with-shibresolver=(dir).
198
----------------------------------------------------------------------
201
printf "Shibboleth resolver found in $shibresolverdir\n";
202
SHIBRESOLVER_LIBS="-lshibresolver";
203
SHIBRESOLVER_LDFLAGS="-L$shibresolverdir/lib";
204
AC_SUBST(SHIBRESOLVER_CXXFLAGS)
205
AC_SUBST(SHIBRESOLVER_LDFLAGS)
206
AC_SUBST(SHIBRESOLVER_LIBS)
207
AC_DEFINE_UNQUOTED([HAVE_SHIBRESOLVER], 1, [Define is Shibboleth resolver is available])
212
AC_DEFUN([AX_CHECK_OPENSAML],
213
[AC_MSG_CHECKING(for OpenSAML implementation)
216
AC_ARG_WITH(opensaml,
217
AC_HELP_STRING([--with-opensaml],
218
[Use OpenSAML (in specified installation directory)]),
219
[check_opensaml_dir="$withval"],
220
[check_opensaml_dir=])
221
if test x_$check_opensaml_dir != x_no; then
222
for dir in $check_opensaml_dir $prefix /usr /usr/local ; do
224
if test -f "$dir/include/saml/Assertion.h"; then
225
found_opensaml="yes";
226
OPENSAML_DIR="${opensamldir}"
227
OPENSAML_CXXFLAGS="-I$opensamldir/include";
232
AC_MSG_RESULT($found_opensaml)
233
if test x_$check_opensaml_dir != x_no; then
234
if test x_$found_opensaml != x_yes; then
236
----------------------------------------------------------------------
237
Cannot find OpenSAML libraries, building without OpenSAML support.
239
Please install OpenSAML or specify installation directory with
240
--with-opensaml=(dir).
241
----------------------------------------------------------------------
244
printf "OpenSAML found in $opensamldir\n";
245
OPENSAML_LIBS="-lsaml -lxml-security-c -lxmltooling -lxerces-c";
246
OPENSAML_LDFLAGS="-L$opensamldir/lib";
247
AC_SUBST(OPENSAML_CXXFLAGS)
248
AC_SUBST(OPENSAML_LDFLAGS)
249
AC_SUBST(OPENSAML_LIBS)
250
AC_DEFINE_UNQUOTED([HAVE_OPENSAML], 1, [Define is OpenSAML is available])
255
AC_DEFUN([AX_CHECK_OPENSSL],
256
[AC_MSG_CHECKING(for OpenSSL)
260
AC_HELP_STRING([--with-openssl],
261
[Use OpenSSL (in specified installation directory)]),
262
[check_openssl_dir="$withval"],
263
[check_openssl_dir=])
264
for dir in $check_openssl_dir $prefix /usr /usr/local ; do
266
if test -f "$dir/include/openssl/opensslv.h"; then
268
OPENSSL_DIR="${openssldir}"
269
OPENSSL_CFLAGS="-I$openssldir/include";
273
AC_MSG_RESULT($found_openssl)
274
if test x_$found_openssl != x_yes; then
276
----------------------------------------------------------------------
277
Cannot find OpenSSL libraries.
279
Please install libssl or specify installation directory with
280
--with-openssl=(dir).
281
----------------------------------------------------------------------
284
printf "OpenSSL found in $openssldir\n";
285
OPENSSL_LIBS="-lssl -lcrypto";
286
OPENSSL_LDFLAGS="-L$openssldir/lib";
287
AC_SUBST(OPENSSL_CFLAGS)
288
AC_SUBST(OPENSSL_LDFLAGS)
289
AC_SUBST(OPENSSL_LIBS)
293
AC_DEFUN([AX_CHECK_RADSEC],
294
[AC_MSG_CHECKING(for radsec)
298
AC_HELP_STRING([--with-radsec],
299
[Use radsec (in specified installation directory)]),
300
[check_radsec_dir="$withval"],
302
for dir in $check_radsec_dir $prefix /usr /usr/local ; do
304
if test -f "$dir/include/radsec/radsec.h"; then
306
RADSEC_DIR="${radsecdir}"
307
RADSEC_CFLAGS="-I$radsecdir/include";
311
AC_MSG_RESULT($found_radsec)
312
if test x_$found_radsec != x_yes; then
314
----------------------------------------------------------------------
315
Cannot find radsec libraries.
317
Please install libradsec or specify installation directory with
319
----------------------------------------------------------------------
322
printf "radsec found in $radsecdir\n";
323
RADSEC_LIBS="-lradsec";
324
RADSEC_LDFLAGS="-L$radsecdir/lib";
325
AC_SUBST(RADSEC_CFLAGS)
326
AC_SUBST(RADSEC_LDFLAGS)
327
AC_SUBST(RADSEC_LIBS)
331
AC_DEFUN([AX_CHECK_JANSSON],
332
[AC_MSG_CHECKING(for jansson)
336
AC_HELP_STRING([--with-jansson],
337
[Use jansson (in specified installation directory)]),
338
[check_jansson_dir="$withval"],
339
[check_jansson_dir=])
340
for dir in $check_jansson_dir $prefix /usr /usr/local ; do
342
if test -f "$dir/include/jansson.h"; then
344
JANSSON_DIR="${janssondir}"
345
JANSSON_CFLAGS="-I$janssondir/include";
349
AC_MSG_RESULT($found_jansson)
350
if test x_$found_jansson != x_yes; then
352
----------------------------------------------------------------------
353
Cannot find jansson libraries.
355
Please install libjansson or specify installation directory with
356
--with-jansson=(dir).
357
----------------------------------------------------------------------
360
printf "jansson found in $janssondir\n";
361
JANSSON_LIBS="-ljansson";
362
JANSSON_LDFLAGS="-L$janssondir/lib";
363
AC_SUBST(JANSSON_CFLAGS)
364
AC_SUBST(JANSSON_LDFLAGS)
365
AC_SUBST(JANSSON_LIBS)
369
AC_DEFUN([AX_CHECK_LIBMOONSHOT],
370
[AC_MSG_CHECKING(for Moonshot identity selector implementation)
375
found_libmoonshot="no"
376
AC_ARG_WITH(libmoonshot,
377
AC_HELP_STRING([--with-libmoonshot],
378
[Use libmoonshot (in specified installation directory)]),
379
[check_libmoonshot_dir="$withval"],
380
[check_libmoonshot_dir=])
381
for dir in $check_libmoonshot_dir $prefix /usr /usr/local ; do
382
libmoonshotdir="$dir"
383
if test -f "$dir/include/libmoonshot.h"; then
384
found_libmoonshot="yes";
385
LIBMOONSHOT_DIR="${libmoonshotdir}"
386
LIBMOONSHOT_CFLAGS="-I$libmoonshotdir/include";
390
AC_MSG_RESULT($found_libmoonshot)
391
if test x_$found_libmoonshot = x_yes; then
392
printf "libmoonshot found in $libmoonshotdir\n";
393
LIBMOONSHOT_LIBS="-lmoonshot";
394
LIBMOONSHOT_LDFLAGS="-L$libmoonshot/lib";
395
AC_CHECK_LIB(moonshot, moonshot_get_identity, [AC_DEFINE_UNQUOTED([HAVE_MOONSHOT_GET_IDENTITY], 1, [Define if Moonshot identity selector is available])], [], "$LIBMOONSHOT_LIBS")
397
AC_SUBST(LIBMOONSHOT_CFLAGS)
398
AC_SUBST(LIBMOONSHOT_LDFLAGS)
399
AC_SUBST(LIBMOONSHOT_LIBS)
400
AM_CONDITIONAL(LIBMOONSHOT, test "x$found_libmoonshot" != "xno")