X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=acinclude.m4;h=242a1f0bd1983cee89d6addbb1483ca50ac6cb1a;hb=163856b1a70d7773c46d4ea5495b85c4dce0f089;hp=7de99ccb7334ad6b72c71e835888c9d16371622a;hpb=70b02ff081eff826695916c70e166b128769f4ca;p=mech_eap.orig diff --git a/acinclude.m4 b/acinclude.m4 index 7de99cc..242a1f0 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -11,10 +11,11 @@ AC_ARG_WITH(krb5, [check_krb5_dir=]) for dir in $check_krb5_dir /usr /usr/local ; do krb5dir="$dir" - if test -f "$dir/include/krb5.h"; then + if test -x "$dir/bin/krb5-config"; then found_krb5="yes"; - KRB5_DIR="${krb5dir}" - KRB5_CFLAGS="-I$krb5dir/include"; + KRB5_CFLAGS=`$dir/bin/krb5-config gssapi --cflags`; + KRB5_LIBS=`$dir/bin/krb5-config gssapi --libs`; + COMPILE_ET="$dir/bin/compile_et"; break; fi done @@ -30,11 +31,13 @@ if test x_$found_krb5 != x_yes; then ]) else printf "Kerberos found in $krb5dir\n"; - KRB5_LIBS="-lgssapi_krb5 -lkrb5"; - KRB5_LDFLAGS="-L$krb5dir/lib"; AC_SUBST(KRB5_CFLAGS) - AC_SUBST(KRB5_LDFLAGS) 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, heimdal_version, [AC_DEFINE_UNQUOTED([HAVE_HEIMDAL_VERSION], 1, [Define if building against Heimdal Kerberos implementation])], [], "$KRB5_LIBS") fi ])dnl @@ -133,10 +136,86 @@ if test x_$found_shibsp != x_yes; then ]) else printf "Shibboleth found in $shibspdir\n"; - SHIBSP_LIBS="-lshibspsp -lsaml -lxml-security-c -lxmltooling -lxerces-c"; + SHIBSP_LIBS="-lshibsp -llog4shib -lsaml -lxml-security-c -lxmltooling -lxerces-c"; SHIBSP_LDFLAGS="-L$shibspdir/lib"; AC_SUBST(SHIBSP_CXXFLAGS) AC_SUBST(SHIBSP_LDFLAGS) AC_SUBST(SHIBSP_LIBS) fi ])dnl + +AC_DEFUN([AX_CHECK_SHIBRESOLVER], +[AC_MSG_CHECKING(for Shibboleth resolver implementation) +SHIBRESOLVER_DIR= +found_shibresolver="no" +AC_ARG_WITH(shibresolver, + AC_HELP_STRING([--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 + shibresolverdir="$dir" + if test -f "$dir/include/shibresolver/resolver.h"; then + found_shibresolver="yes"; + SHIBRESOLVER_DIR="${shibresolverdir}" + SHIBRESOLVER_CXXFLAGS="-I$shibresolverdir/include"; + break; + fi +done +AC_MSG_RESULT($found_shibresolver) +if test x_$found_shibresolver != x_yes; then + AC_MSG_ERROR([ +---------------------------------------------------------------------- + Cannot find Shibboleth resolver libraries. + + Please install Shibboleth or specify installation directory with + --with-shibresolver=(dir). +---------------------------------------------------------------------- +]) +else + printf "Shibboleth resolver found in $shibresolverdir\n"; + SHIBRESOLVER_LIBS="-lshibresolver"; + SHIBRESOLVER_LDFLAGS="-L$shibresolverdir/lib"; + AC_SUBST(SHIBRESOLVER_CXXFLAGS) + AC_SUBST(SHIBRESOLVER_LDFLAGS) + AC_SUBST(SHIBRESOLVER_LIBS) +fi +])dnl + +AC_DEFUN([AX_CHECK_RADSEC], +[AC_MSG_CHECKING(for radsec) +RADSEC_DIR= +found_radsec="no" +AC_ARG_WITH(radsec, + AC_HELP_STRING([--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 + radsecdir="$dir" + if test -f "$dir/include/radsec/radsec.h"; then + found_radsec="yes"; + RADSEC_DIR="${radsecdir}" + RADSEC_CFLAGS="-I$radsecdir/include"; + break; + fi +done +AC_MSG_RESULT($found_radsec) +if test x_$found_radsec != x_yes; then + AC_MSG_ERROR([ +---------------------------------------------------------------------- + Cannot find radsec libraries. + + Please install libradsec or specify installation directory with + --with-radsec=(dir). +---------------------------------------------------------------------- +]) +else + printf "radsec found in $radsecdir\n"; + RADSEC_LIBS="-lradsec"; + RADSEC_LDFLAGS="-L$radsecdir/lib"; + AC_SUBST(RADSEC_CFLAGS) + AC_SUBST(RADSEC_LDFLAGS) + AC_SUBST(RADSEC_LIBS) +fi +])dnl