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])], [], "$KRB5_LIBS")
44 AC_DEFUN([AX_CHECK_EAP],
45 [AC_MSG_CHECKING(for EAP implementation)
49 AC_HELP_STRING([--with-eap],
50 [Use eap (in specified installation directory)]),
51 [check_eap_dir="$withval"],
53 for dir in $check_eap_dir /usr /usr/local ; do
55 if test -f "$dir/src/eap_peer/eap.h"; then
58 EAP_CFLAGS="-I$eapdir/src/common -I$eapdir/src -I$eapdir/src/utils";
62 AC_MSG_RESULT($found_eap)
63 if test x_$found_eap != x_yes; then
65 ----------------------------------------------------------------------
66 Cannot find EAP libraries.
68 Please install wpa_supplicant or specify installation directory with
70 ----------------------------------------------------------------------
73 printf "EAP found in $eapdir\n";
74 EAP_CFLAGS="$EAP_CFLAGS \
88 -DEAP_SERVER_IDENTITY \
93 -DEAP_SERVER_MSCHAPV2 \
99 -DEAP_SERVER_GPSK_SHA256 \
101 EAP_LIBS="-leap -lutils -lcrypto -ltls";
102 EAP_LDFLAGS="-L$eapdir/eap_example -L$eapdir/src/utils -L$eapdir/src/crypto -L$eapdir/src/tls";
104 AC_SUBST(EAP_LDFLAGS)
109 AC_DEFUN([AX_CHECK_SHIBSP],
110 [AC_MSG_CHECKING(for Shibboleth implementation)
114 AC_HELP_STRING([--with-shibsp],
115 [Use shibspboleth (in specified installation directory)]),
116 [check_shibsp_dir="$withval"],
118 for dir in $check_shibsp_dir /usr /usr/local ; do
120 if test -f "$dir/include/shibsp/SPConfig.h"; then
122 SHIBSP_DIR="${shibspdir}"
123 SHIBSP_CXXFLAGS="-I$shibspdir/include";
127 AC_MSG_RESULT($found_shibsp)
128 if test x_$found_shibsp != x_yes; then
130 ----------------------------------------------------------------------
131 Cannot find Shibboleth/OpenSAML libraries.
133 Please install Shibboleth or specify installation directory with
135 ----------------------------------------------------------------------
138 printf "Shibboleth found in $shibspdir\n";
139 SHIBSP_LIBS="-lshibsp -llog4shib -lsaml -lxml-security-c -lxmltooling -lxerces-c";
140 SHIBSP_LDFLAGS="-L$shibspdir/lib";
141 AC_SUBST(SHIBSP_CXXFLAGS)
142 AC_SUBST(SHIBSP_LDFLAGS)
143 AC_SUBST(SHIBSP_LIBS)
147 AC_DEFUN([AX_CHECK_SHIBRESOLVER],
148 [AC_MSG_CHECKING(for Shibboleth resolver implementation)
150 found_shibresolver="no"
151 AC_ARG_WITH(shibresolver,
152 AC_HELP_STRING([--with-shibresolver],
153 [Use Shibboleth resolver (in specified installation directory)]),
154 [check_shibresolver_dir="$withval"],
155 [check_shibresolver_dir=])
156 for dir in $check_shibresolver_dir /usr /usr/local ; do
157 shibresolverdir="$dir"
158 if test -f "$dir/include/shibresolver/resolver.h"; then
159 found_shibresolver="yes";
160 SHIBRESOLVER_DIR="${shibresolverdir}"
161 SHIBRESOLVER_CXXFLAGS="-I$shibresolverdir/include";
165 AC_MSG_RESULT($found_shibresolver)
166 if test x_$found_shibresolver != x_yes; then
168 ----------------------------------------------------------------------
169 Cannot find Shibboleth resolver libraries.
171 Please install Shibboleth or specify installation directory with
172 --with-shibresolver=(dir).
173 ----------------------------------------------------------------------
176 printf "Shibboleth resolver found in $shibresolverdir\n";
177 SHIBRESOLVER_LIBS="-lshibresolver";
178 SHIBRESOLVER_LDFLAGS="-L$shibresolverdir/lib";
179 AC_SUBST(SHIBRESOLVER_CXXFLAGS)
180 AC_SUBST(SHIBRESOLVER_LDFLAGS)
181 AC_SUBST(SHIBRESOLVER_LIBS)
185 AC_DEFUN([AX_CHECK_RADSEC],
186 [AC_MSG_CHECKING(for radsec)
190 AC_HELP_STRING([--with-radsec],
191 [Use radsec (in specified installation directory)]),
192 [check_radsec_dir="$withval"],
194 for dir in $check_radsec_dir /usr /usr/local ; do
196 if test -f "$dir/include/radsec/radsec.h"; then
198 RADSEC_DIR="${radsecdir}"
199 RADSEC_CFLAGS="-I$radsecdir/include";
203 AC_MSG_RESULT($found_radsec)
204 if test x_$found_radsec != x_yes; then
206 ----------------------------------------------------------------------
207 Cannot find radsec libraries.
209 Please install libradsec or specify installation directory with
211 ----------------------------------------------------------------------
214 printf "radsec found in $radsecdir\n";
215 RADSEC_LIBS="-lradsec";
216 RADSEC_LDFLAGS="-L$radsecdir/lib";
217 AC_SUBST(RADSEC_CFLAGS)
218 AC_SUBST(RADSEC_LDFLAGS)
219 AC_SUBST(RADSEC_LIBS)