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 -f "$dir/include/krb5.h"; then
17 KRB5_CFLAGS="-I$krb5dir/include";
21 AC_MSG_RESULT($found_krb5)
22 if test x_$found_krb5 != x_yes; then
24 ----------------------------------------------------------------------
25 Cannot find GSS-API/Kerberos libraries.
27 Please install MIT or Heimdal or specify installation directory with
29 ----------------------------------------------------------------------
32 printf "Kerberos found in $krb5dir\n";
33 KRB5_LIBS="-lgssapi_krb5 -lkrb5 -lk5crypto";
34 KRB5_LDFLAGS="-L$krb5dir/lib";
36 AC_SUBST(KRB5_LDFLAGS)
38 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_LDFLAGS")
42 AC_DEFUN([AX_CHECK_EAP],
43 [AC_MSG_CHECKING(for EAP implementation)
47 AC_HELP_STRING([--with-eap],
48 [Use eap (in specified installation directory)]),
49 [check_eap_dir="$withval"],
51 for dir in $check_eap_dir /usr /usr/local ; do
53 if test -f "$dir/src/eap_peer/eap.h"; then
56 EAP_CFLAGS="-I$eapdir/src/common -I$eapdir/src -I$eapdir/src/utils";
60 AC_MSG_RESULT($found_eap)
61 if test x_$found_eap != x_yes; then
63 ----------------------------------------------------------------------
64 Cannot find EAP libraries.
66 Please install wpa_supplicant or specify installation directory with
68 ----------------------------------------------------------------------
71 printf "EAP found in $eapdir\n";
72 EAP_CFLAGS="$EAP_CFLAGS \
86 -DEAP_SERVER_IDENTITY \
91 -DEAP_SERVER_MSCHAPV2 \
97 -DEAP_SERVER_GPSK_SHA256 \
99 EAP_LIBS="-leap -lutils -lcrypto -ltls";
100 EAP_LDFLAGS="-L$eapdir/eap_example -L$eapdir/src/utils -L$eapdir/src/crypto -L$eapdir/src/tls";
102 AC_SUBST(EAP_LDFLAGS)
107 AC_DEFUN([AX_CHECK_SHIBSP],
108 [AC_MSG_CHECKING(for Shibboleth implementation)
112 AC_HELP_STRING([--with-shibsp],
113 [Use shibspboleth (in specified installation directory)]),
114 [check_shibsp_dir="$withval"],
116 for dir in $check_shibsp_dir /usr /usr/local ; do
118 if test -f "$dir/include/shibsp/SPConfig.h"; then
120 SHIBSP_DIR="${shibspdir}"
121 SHIBSP_CXXFLAGS="-I$shibspdir/include";
125 AC_MSG_RESULT($found_shibsp)
126 if test x_$found_shibsp != x_yes; then
128 ----------------------------------------------------------------------
129 Cannot find Shibboleth/OpenSAML libraries.
131 Please install Shibboleth or specify installation directory with
133 ----------------------------------------------------------------------
136 printf "Shibboleth found in $shibspdir\n";
137 SHIBSP_LIBS="-lshibsp -llog4shib -lsaml -lxml-security-c -lxmltooling -lxerces-c";
138 SHIBSP_LDFLAGS="-L$shibspdir/lib";
139 AC_SUBST(SHIBSP_CXXFLAGS)
140 AC_SUBST(SHIBSP_LDFLAGS)
141 AC_SUBST(SHIBSP_LIBS)
145 AC_DEFUN([AX_CHECK_SHIBRESOLVER],
146 [AC_MSG_CHECKING(for Shibboleth resolver implementation)
148 found_shibresolver="no"
149 AC_ARG_WITH(shibresolver,
150 AC_HELP_STRING([--with-shibresolver],
151 [Use Shibboleth resolver (in specified installation directory)]),
152 [check_shibresolver_dir="$withval"],
153 [check_shibresolver_dir=])
154 for dir in $check_shibresolver_dir /usr /usr/local ; do
155 shibresolverdir="$dir"
156 if test -f "$dir/include/shibresolver/resolver.h"; then
157 found_shibresolver="yes";
158 SHIBRESOLVER_DIR="${shibresolverdir}"
159 SHIBRESOLVER_CXXFLAGS="-I$shibresolverdir/include";
163 AC_MSG_RESULT($found_shibresolver)
164 if test x_$found_shibresolver != x_yes; then
166 ----------------------------------------------------------------------
167 Cannot find Shibboleth resolver libraries.
169 Please install Shibboleth or specify installation directory with
170 --with-shibresolver=(dir).
171 ----------------------------------------------------------------------
174 printf "Shibboleth resolver found in $shibresolverdir\n";
175 SHIBRESOLVER_LIBS="-lshibresolver";
176 SHIBRESOLVER_LDFLAGS="-L$shibresolverdir/lib";
177 AC_SUBST(SHIBRESOLVER_CXXFLAGS)
178 AC_SUBST(SHIBRESOLVER_LDFLAGS)
179 AC_SUBST(SHIBRESOLVER_LIBS)