X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=acinclude.m4;h=8ecdd9ca352b83fc52f5e6fc9c7338bd1bd4b3d7;hb=4c123aad7e1129ebf4cfa4ffa40de35a7d5abb33;hp=a53d3bd2737939f3aaca94b140c13b41d38a06eb;hpb=242b00bb56011b7e370c1b34c11dbad690722b09;p=mech_eap.orig diff --git a/acinclude.m4 b/acinclude.m4 index a53d3bd..8ecdd9c 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -9,7 +9,7 @@ AC_ARG_WITH(krb5, [Use krb5 (in specified installation directory)]), [check_krb5_dir="$withval"], [check_krb5_dir=]) -for dir in $check_krb5_dir /usr /usr/local ; do +for dir in $check_krb5_dir $prefix /usr /usr/local ; do krb5dir="$dir" if test -x "$dir/bin/krb5-config"; then found_krb5="yes"; @@ -34,9 +34,9 @@ else AC_SUBST(KRB5_CFLAGS) AC_SUBST(KRB5_LIBS) AC_SUBST(COMPILE_ET) - 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") - 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") - 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") + 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") + 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") + 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") 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") AM_CONDITIONAL(HEIMDAL, test "x$heimdal" != "xno") fi @@ -51,7 +51,7 @@ AC_ARG_WITH(eap, [Use eap (in specified installation directory)]), [check_eap_dir="$withval"], [check_eap_dir=]) -for dir in $check_eap_dir /usr /usr/local ; do +for dir in $check_eap_dir $prefix /usr /usr/local ../libeap ; do eapdir="$dir" if test -f "$dir/src/eap_peer/eap.h"; then found_eap="yes"; @@ -116,7 +116,7 @@ AC_ARG_WITH(shibsp, [Use shibspboleth (in specified installation directory)]), [check_shibsp_dir="$withval"], [check_shibsp_dir=]) -for dir in $check_shibsp_dir /usr /usr/local ; do +for dir in $check_shibsp_dir $prefix /usr /usr/local ; do shibspdir="$dir" if test -f "$dir/include/shibsp/SPConfig.h"; then found_shibsp="yes"; @@ -129,7 +129,7 @@ AC_MSG_RESULT($found_shibsp) if test x_$found_shibsp != x_yes; then AC_MSG_ERROR([ ---------------------------------------------------------------------- - Cannot find Shibboleth/OpenSAML libraries. + Cannot find Shibboleth libraries. Please install Shibboleth or specify installation directory with --with-shibsp=(dir). @@ -137,11 +137,12 @@ if test x_$found_shibsp != x_yes; then ]) else printf "Shibboleth found in $shibspdir\n"; - SHIBSP_LIBS="-lshibsp -lsaml -lxml-security-c -lxmltooling -lxerces-c"; + SHIBSP_LIBS="-lshibsp -lsaml -lxml-security-c -lxmltooling -lxerces-c"; SHIBSP_LDFLAGS="-L$shibspdir/lib"; AC_SUBST(SHIBSP_CXXFLAGS) AC_SUBST(SHIBSP_LDFLAGS) AC_SUBST(SHIBSP_LIBS) + AC_DEFINE_UNQUOTED([HAVE_SHIBSP], 1, [Define is Shibboleth SP is available]) fi ])dnl @@ -154,7 +155,8 @@ AC_ARG_WITH(shibresolver, [Use Shibboleth resolver (in specified installation directory)]), [check_shibresolver_dir="$withval"], [check_shibresolver_dir=]) -for dir in $check_shibresolver_dir /usr /usr/local ; do +if test x_$check_shibresolver_dir != x_no; then +for dir in $check_shibresolver_dir $prefix /usr /usr/local ; do shibresolverdir="$dir" if test -f "$dir/include/shibresolver/resolver.h"; then found_shibresolver="yes"; @@ -163,11 +165,14 @@ for dir in $check_shibresolver_dir /usr /usr/local ; do break; fi done +fi AC_MSG_RESULT($found_shibresolver) +if test x_$check_shibresolver_dir != x_no; then if test x_$found_shibresolver != x_yes; then - AC_MSG_ERROR([ + AC_MSG_WARN([ ---------------------------------------------------------------------- - Cannot find Shibboleth resolver libraries. + Cannot find Shibboleth resolver libraries, building without + Shibboleth support. Please install Shibboleth or specify installation directory with --with-shibresolver=(dir). @@ -180,6 +185,51 @@ else AC_SUBST(SHIBRESOLVER_CXXFLAGS) AC_SUBST(SHIBRESOLVER_LDFLAGS) AC_SUBST(SHIBRESOLVER_LIBS) + AC_DEFINE_UNQUOTED([HAVE_SHIBRESOLVER], 1, [Define is Shibboleth resolver is available]) +fi +fi +])dnl + +AC_DEFUN([AX_CHECK_OPENSAML], +[AC_MSG_CHECKING(for OpenSAML implementation) +OPENSAML_DIR= +found_opensaml="no" +AC_ARG_WITH(opensaml, + AC_HELP_STRING([--with-opensaml], + [Use OpenSAML (in specified installation directory)]), + [check_opensaml_dir="$withval"], + [check_opensaml_dir=]) +if test x_$check_opensaml_dir != x_no; then +for dir in $check_opensaml_dir $prefix /usr /usr/local ; do + opensamldir="$dir" + if test -f "$dir/include/saml/Assertion.h"; then + found_opensaml="yes"; + OPENSAML_DIR="${opensamldir}" + OPENSAML_CXXFLAGS="-I$opensamldir/include"; + break; + fi +done +fi +AC_MSG_RESULT($found_opensaml) +if test x_$check_opensaml_dir != x_no; then +if test x_$found_opensaml != x_yes; then + AC_MSG_WARN([ +---------------------------------------------------------------------- + Cannot find OpenSAML libraries, building without OpenSAML support. + + Please install OpenSAML or specify installation directory with + --with-opensaml=(dir). +---------------------------------------------------------------------- +]) +else + printf "OpenSAML found in $opensamldir\n"; + OPENSAML_LIBS="-lsaml -lxml-security-c -lxmltooling -lxerces-c"; + OPENSAML_LDFLAGS="-L$opensamldir/lib"; + AC_SUBST(OPENSAML_CXXFLAGS) + AC_SUBST(OPENSAML_LDFLAGS) + AC_SUBST(OPENSAML_LIBS) + AC_DEFINE_UNQUOTED([HAVE_OPENSAML], 1, [Define is OpenSAML is available]) +fi fi ])dnl @@ -192,7 +242,7 @@ AC_ARG_WITH(radsec, [Use radsec (in specified installation directory)]), [check_radsec_dir="$withval"], [check_radsec_dir=]) -for dir in $check_radsec_dir /usr /usr/local ; do +for dir in $check_radsec_dir $prefix /usr /usr/local ; do radsecdir="$dir" if test -f "$dir/include/radsec/radsec.h"; then found_radsec="yes"; @@ -220,3 +270,81 @@ else AC_SUBST(RADSEC_LIBS) fi ])dnl + +AC_DEFUN([AX_CHECK_JANSSON], +[AC_MSG_CHECKING(for jansson) +JANSSON_DIR= +found_jansson="no" +AC_ARG_WITH(jansson, + AC_HELP_STRING([--with-jansson], + [Use jansson (in specified installation directory)]), + [check_jansson_dir="$withval"], + [check_jansson_dir=]) +for dir in $check_jansson_dir $prefix /usr /usr/local ; do + janssondir="$dir" + if test -f "$dir/include/jansson.h"; then + found_jansson="yes"; + JANSSON_DIR="${janssondir}" + JANSSON_CFLAGS="-I$janssondir/include"; + break; + fi +done +AC_MSG_RESULT($found_jansson) +if test x_$found_jansson != x_yes; then + AC_MSG_ERROR([ +---------------------------------------------------------------------- + Cannot find jansson libraries. + + Please install libjansson or specify installation directory with + --with-jansson=(dir). +---------------------------------------------------------------------- +]) +else + printf "jansson found in $janssondir\n"; + JANSSON_LIBS="-ljansson"; + JANSSON_LDFLAGS="-L$janssondir/lib"; + AC_SUBST(JANSSON_CFLAGS) + AC_SUBST(JANSSON_LDFLAGS) + AC_SUBST(JANSSON_LIBS) +fi +])dnl + +AC_DEFUN([AX_CHECK_LIBMOONSHOT], +[AC_MSG_CHECKING(for Moonshot identity selector implementation) +LIBMOONSHOT_DIR= +found_libmoonshot="no" +AC_ARG_WITH(libmoonshot, + AC_HELP_STRING([--with-libmoonshot], + [Use libmoonshot (in specified installation directory)]), + [check_libmoonshot_dir="$withval"], + [check_libmoonshot_dir=]) +for dir in $check_libmoonshot_dir $prefix /usr /usr/local ../../moonshot-ui/libmoonshot ; do + libmoonshotdir="$dir" + if test -f "$dir/include/libmoonshot.h"; then + found_libmoonshot="yes"; + LIBMOONSHOT_DIR="${libmoonshotdir}" + LIBMOONSHOT_CFLAGS="-I$libmoonshotdir/include"; + break; + fi +done +AC_MSG_RESULT($found_libmoonshot) +if test x_$found_libmoonshot != x_yes; then + AC_MSG_ERROR([ +---------------------------------------------------------------------- + Cannot find Moonshot identity selector libraries. + + Please install wpa_supplicant or specify installation directory with + --with-libmoonshot=(dir). +---------------------------------------------------------------------- +]) +else + printf "libmoonshot found in $libmoonshotdir\n"; + LIBMOONSHOT_LIBS="-lmoonshot"; + LIBMOONSHOT_LDFLAGS="-L$libmoonshot/lib"; + AC_SUBST(LIBMOONSHOT_CFLAGS) + AC_SUBST(LIBMOONSHOT_LDFLAGS) + AC_SUBST(LIBMOONSHOT_LIBS) + AC_CHECK_LIB(moonshot, moonshot_get_identity, [AC_DEFINE_UNQUOTED([HAVE_MOONSHOT_GET_IDENTITY], 1, [Define if Moonshot identity selector is available])], [], "$LIBMOONSHOT_LIBS") +fi +])dnl +