AC_DISABLE_STATIC
AC_PROG_LIBTOOL
-AC_PATH_PROG(PKG_CONFIG, pkg-config)
AC_LANG(C)
SSLFLAGS="-I${with_openssl}/include"
fi])
-if test "x$SSLFLAGS" = "x" ; then
+if test "x$with_openssl" = "x" ; then
+ AC_PATH_PROG(PKG_CONFIG, pkg-config)
if test "x$PKG_CONFIG" != x && test "x$PKG_CONFIG" != "xno" ; then
if pkg-config openssl ; then
SSLFLAGS="`$PKG_CONFIG --cflags openssl`"
fi
])
if test -f "${LOG4SHIB_CONFIG}"; then
- LDFLAGS="`${LOG4SHIB_CONFIG} --libs` $LDFLAGS"
+ LIBS="`${LOG4SHIB_CONFIG} --libs` $LIBS"
CPPFLAGS="`${LOG4SHIB_CONFIG} --cflags` $CPPFLAGS"
AC_CHECK_HEADER([log4shib/CategoryStream.hh],,AC_MSG_ERROR([unable to find log4shib header files]))
AC_TRY_LINK(
])
if test -f "${LOG4CPP_CONFIG}"; then
AC_MSG_WARN([will try to use log4cpp, note that most non-Internet2 supplied versions are not thread-safe])
- LDFLAGS="`${LOG4CPP_CONFIG} --libs` $LDFLAGS"
+ LIBS="`${LOG4CPP_CONFIG} --libs` $LIBS"
CPPFLAGS="`${LOG4CPP_CONFIG} --cflags` $CPPFLAGS"
AC_CHECK_HEADER([log4cpp/CategoryStream.hh],,AC_MSG_ERROR([unable to find log4cpp header files]))
AC_TRY_LINK(
[if test x_$with_xmltooling != x_/usr; then
LDFLAGS="-L${with_xmltooling}/lib $LDFLAGS"
CPPFLAGS="-I${with_xmltooling}/include $CPPFLAGS"
- export PKG_CONFIG_PATH="${with_xmltooling}/lib/pkgconfig"
fi])
LITE_LIBS="-lxmltooling-lite"
XMLSEC_LIBS="-lxmltooling"
LIBS="$XMLSEC_LIBS $LIBS"
AC_TRY_LINK(
- [#include <xmltooling/io/HTTPResponse.h>],
- [xmltooling::HTTPResponse::sanitizeURL("http://test")],
+ [
+#include <xmltooling/XMLToolingConfig.h>
+#include <xmltooling/version.h>
+ ],
+ [
+#if _XMLTOOLING_VERSION >= 10400
+xmltooling::XMLToolingConfig::getConfig();
+#else
+#error Need XMLTooling version 1.4 or higher
+#endif
+ ],
[AC_DEFINE(HAVE_XMLTOOLING,1,[Define if xmltooling library was found])],
- [AC_MSG_ERROR([unable to link with XMLTooling, or version was too old])])
+ [AC_MSG_ERROR([unable to link with XMLTooling, or version was too old])]
+ )
# restore master libs
LIBS="$save_LIBS"
-# Determine xmltooling version.
-XMLTOOLINGVER="1.4"
-AC_ARG_WITH(xmltoolingver,
- AC_HELP_STRING([--with-xmltoolingver=VERSION], [xmltooling version, normally derived via pkg-config]),
- [XMLTOOLINGVER="$with_xmltoolingver"],
- [if test "x$PKG_CONFIG" != "x" && test "x$PKG_CONFIG" != "xno" ; then
- if pkg-config xmltooling ; then
- XMLTOOLINGVER="`$PKG_CONFIG --modversion xmltooling`"
- fi
- fi])
-
# Establish location of xmltooling catalog.
XMLTOOLINGXMLDIR=""
if test "x$with_xmltooling" = "x" ; then
with_xmltooling="/usr"
fi
-if test -f $with_xmltooling/share/xml/xmltooling-$XMLTOOLINGVER/catalog.xml ; then
+if test -f $with_xmltooling/share/xml/xmltooling/catalog.xml ; then
XMLTOOLINGXMLDIR="$with_xmltooling"
-elif test -f $with_xerces/share/xml/xmltooling-$XMLTOOLINGVER/catalog.xml ; then
+elif test -f $with_xerces/share/xml/xmltooling/catalog.xml ; then
XMLTOOLINGXMLDIR="$with_xerces"
-elif test -f $with_log4shib/share/xml/xmltooling-$XMLTOOLINGVER/catalog.xml ; then
+elif test -f $with_log4shib/share/xml/xmltooling/catalog.xml ; then
XMLTOOLINGXMLDIR="$with_log4shib"
fi
if test "x$XMLTOOLINGXMLDIR" = "x" ; then
AC_MSG_ERROR([xmltooling XML catalog not found, may need to use --with-xmltooling option])
fi
-XMLTOOLINGXMLDIR="$XMLTOOLINGXMLDIR/share/xml/xmltooling-$XMLTOOLINGVER"
+XMLTOOLINGXMLDIR="$XMLTOOLINGXMLDIR/share/xml/xmltooling"
AC_SUBST(XMLTOOLINGXMLDIR)
# XML-Security settings
save_LIBS="$LIBS"
LIBS="$XMLSEC_LIBS $LIBS"
-AC_CHECK_HEADER([xsec/utils/XSECPlatformUtils.hpp],,AC_MSG_ERROR([unable to find XML-Security header files]))
-AC_MSG_CHECKING([XML-Security version])
+AC_CHECK_HEADER([xsec/utils/XSECPlatformUtils.hpp],,AC_MSG_ERROR([unable to find XML-Security-C header files]))
+AC_MSG_CHECKING([XML-Security-C version])
AC_PREPROC_IFELSE(
[AC_LANG_PROGRAM([#include <xsec/utils/XSECPlatformUtils.hpp>],
[#if XSEC_VERSION_MAJOR > 1 || (XSEC_VERSION_MAJOR == 1 && XSEC_VERSION_MEDIUM > 3)
#error need version 1.4.0 or later
#endif])],
[AC_MSG_RESULT(OK)],
- [AC_MSG_FAILURE([XML-Security version 1.4.0 or greater is required.])])
+ [AC_MSG_FAILURE([XML-Security-C version 1.4.0 or greater is required.])])
AC_TRY_LINK(
[#include <xsec/utils/XSECPlatformUtils.hpp>],
[XSECPlatformUtils::Initialise()],,
[AC_MSG_ERROR([unable to link with XML-Security])])
+
+AC_MSG_CHECKING([whether XML-Security-C supports white/blacklisting of algorithms])
+AC_TRY_COMPILE([#include <xsec/framework/XSECAlgorithmMapper.hpp>],
+ [XSECAlgorithmMapper* mapper; mapper->whitelistAlgorithm(NULL);],
+ [AC_MSG_RESULT([yes])]
+ [AC_DEFINE([SHIBSP_XMLSEC_WHITELISTING], [1], [Define to 1 if XML-Security-C supports white/blacklisting algorithms.])],
+ [AC_MSG_RESULT([no])])
+
+
# restore master libs
LIBS="$save_LIBS"
AC_CHECK_HEADER([saml/saml2/metadata/Metadata.h],,
AC_MSG_ERROR([unable to find OpenSAML header files]))
AC_TRY_LINK(
- [#include <saml/SAMLConfig.h>
-#include <saml/version.h>],
- [#if _OPENSAML_VERSION >= 20200
+ [
+#include <saml/SAMLConfig.h>
+#include <saml/version.h>
+ ],
+ [
+#if _OPENSAML_VERSION >= 20400
opensaml::SAMLConfig::getConfig();
#else
-#error Need OpenSAML version 2.2 or higher
-#endif],
- [AC_DEFINE(HAVE_SAML,1,[Define if saml library was found])],
- [AC_MSG_ERROR([unable to link with OpenSAML, or version was too old])])
+#error Need OpenSAML version 2.4 or higher
+#endif
+ ],
+ [AC_DEFINE(HAVE_SAML,1,[Define if saml library was found])],
+ [AC_MSG_ERROR([unable to link with OpenSAML, or version was too old])]
+ )
# restore master libs
LIBS="$save_LIBS"
-# Determine opensaml version.
-OPENSAMLVER="2.4"
-AC_ARG_WITH(samlver,
- AC_HELP_STRING([--with-samlver=VERSION], [opensaml version, normally derived via pkg-config]),
- [OPENSAMLVER="$with_samlver"],
- [if test "x$PKG_CONFIG" != "x" && test "x$PKG_CONFIG" != "xno" ; then
- if pkg-config opensaml ; then
- OPENSAMLVER="`$PKG_CONFIG --modversion opensaml`"
- fi
- fi])
-
# Establish location of opensaml catalogs.
OPENSAMLXMLDIR=""
if test "x$with_saml" = "x" ; then
with_saml="/usr"
fi
-if test -f $with_saml/share/xml/opensaml-$OPENSAMLVER/saml20-catalog.xml ; then
+if test -f $with_saml/share/xml/opensaml/saml20-catalog.xml ; then
OPENSAMLXMLDIR="$with_saml"
-elif test -f $with_xmltooling/share/xml/opensaml-$OPENSAMLVER/saml20-catalog.xml ; then
+elif test -f $with_xmltooling/share/xml/opensaml/saml20-catalog.xml ; then
OPENSAMLXMLDIR="$with_xmltooling"
-elif test -f $with_xerces/share/xml/opensaml-$OPENSAMLVER/saml20-catalog.xml ; then
+elif test -f $with_xerces/share/xml/opensaml/saml20-catalog.xml ; then
OPENSAMLXMLDIR="$with_xerces"
-elif test -f $with_log4shib/share/xml/opensaml-$OPENSAMLVER/saml20-catalog.xml ; then
+elif test -f $with_log4shib/share/xml/opensaml/saml20-catalog.xml ; then
OPENSAMLXMLDIR="$with_log4shib"
fi
if test "x$OPENSAMLXMLDIR" = "x" ; then
AC_MSG_ERROR([opensaml XML catalogs not found, may need to use --with-saml option])
fi
-OPENSAMLXMLDIR="$OPENSAMLXMLDIR/share/xml/opensaml-$OPENSAMLVER"
+OPENSAMLXMLDIR="$OPENSAMLXMLDIR/share/xml/opensaml"
AC_SUBST(OPENSAMLXMLDIR)
AC_SUBST(LITE_LIBS)
# extract settings we need from APXS2 -q
APXS2_CC="`$APXS2 -q CC`"
- APXS2_CFLAGS="`$APXS2 -q CPPFLAGS` `$APXS2 -q CFLAGS` $APU_CFLAGS"
+ APXS2_CFLAGS="`$APXS2 -q CPPFLAGS` `$APXS2 -q CFLAGS` $APR_CFLAGS $APU_CFLAGS"
APXS2_INCLUDE="`$APXS2 -q INCLUDEDIR`"
fi