+ [AC_MSG_FAILURE([XML-Security version 1.4.0 or greater is required.])])
+
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#include <xsec/utils/XSECPlatformUtils.hpp>]],
+ [[XSECPlatformUtils::Initialise()]])],,
+ [AC_MSG_ERROR([unable to link with XML-Security])])
+ AC_CHECK_TYPE([xsecsize_t],[AC_DEFINE([HAVE_XSECSIZE_T],[1],[Define to 1 if you have the 'xsecsize_t' type.])])
+
+ AC_MSG_CHECKING([whether XML-Security-C has multiple CRL support])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <xsec/dsig/DSIGKeyInfoX509.hpp>]],
+ [[DSIGKeyInfoX509* klist; klist->getX509CRLListSize();]])],
+ [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XMLSEC_MULTIPLECRL],[1],[Define to 1 if XML-Security-C handles multiple CRLs.])],
+ [AC_MSG_RESULT([no])])
+
+ AC_MSG_CHECKING([whether XML-Security-C exposes the signature algorithm URI])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <xsec/dsig/DSIGSignature.hpp>]],
+ [[DSIGSignature* sig; sig->getAlgorithmURI();]])],
+ [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XMLSEC_SIGALGORITHM],[1],[Define to 1 if XML-Security-C exposes the signature algorithm URI.])],
+ [AC_MSG_RESULT([no])])
+
+ AC_MSG_CHECKING([whether XML-Security-C includes ECC support])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <xsec/dsig/DSIGKeyInfoValue.hpp>]],
+ [[DSIGKeyInfoValue* info; info->getECNamedCurve();]])],
+ [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XMLSEC_ECC],[1],[Define to 1 if XML-Security-C includes ECC support.])],
+ [AC_MSG_RESULT([no])])
+
+ AC_MSG_CHECKING([whether XML-Security-C includes C14N 1.1 support])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <xsec/dsig/DSIGConstants.hpp>]],
+ [[transformType t = TRANSFORM_C14N11;]])],
+ [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XMLSEC_C14N11],[1],[Define to 1 if XML-Security-C includes C14N 1.1 support.])],
+ [AC_MSG_RESULT([no])])
+
+ AC_MSG_CHECKING([whether XML-Security-C includes debug logging support])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <xsec/utils/XSECPlatformUtils.hpp>]],
+ [[XSECPlatformUtils::SetReferenceLoggingSink(NULL)]])],
+ [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XMLSEC_DEBUGLOGGING],[1],[Define to 1 if XML-Security-C includes debug logging support.])],
+ [AC_MSG_RESULT([no])])
+
+ # restore master libs
+ LIBS="$save_LIBS"
+
+ # libcurl settings
+ AC_PATH_PROG(CURL_CONFIG,curl-config)
+ AC_ARG_WITH(curl,
+ AS_HELP_STRING([--with-curl=PATH], [where curl-config is installed]),
+ [
+ CURL_CONFIG="${with_curl}"
+ if ! test -f "${CURL_CONFIG}" ; then
+ CURL_CONFIG="${with_curl}/bin/curl-config"
+ fi
+ ])
+ if test -f "${CURL_CONFIG}" ; then
+ CPPFLAGS="`${CURL_CONFIG} --cflags` $CPPFLAGS"
+ XMLSEC_LIBS="`${CURL_CONFIG} --libs` $XMLSEC_LIBS"
+ else
+ AC_MSG_ERROR([curl-config not found, may need to use --with-curl option])
+ fi
+
+ # save and append master libs
+ save_LIBS="$LIBS"
+ LIBS="$XMLSEC_LIBS $LIBS"
+
+ AC_CHECK_HEADER([curl/curl.h],,AC_MSG_ERROR([unable to find libcurl header files]))
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#include <curl/curl.h>]],
+ [[curl_global_init(CURL_GLOBAL_ALL)]])],,
+ [AC_MSG_ERROR([unable to link with libcurl])])
+ AC_MSG_CHECKING([for CURLOPT_SSL_CTX_FUNCTION in curl.h])
+ AC_EGREP_HEADER([CURLOPT_SSL_CTX_FUNCTION], [curl/curl.h],
+ [AC_MSG_RESULT(yes)],
+ [AC_MSG_ERROR([need libcurl that supports CURLOPT_SSL_CTX_FUNCTION])])
+ AC_CHECK_TYPE([curl_off_t],[AC_DEFINE([HAVE_CURL_OFF_T],[1],[Define to 1 if you have the 'curl_off_t' type.])],,[[#include <curl/curl.h>]])
+
+ # restore master libs
+ LIBS="$save_LIBS"
+
+ AC_SUBST(XMLSEC_LIBS)