X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=configure.ac;h=6786afc67e7d1ee7e896394465db4b1fc1284bc8;hb=61d4d4b600d18d35fd50c33a6a454a8f35fb71fb;hp=a08e631c68b278230974f649c312f1c57d5ce587;hpb=b94f5f9eb5bf51ad9b952bd943a3bfc5dbd1ceee;p=shibboleth%2Fxmltooling.git diff --git a/configure.ac b/configure.ac index a08e631..6786afc 100644 --- a/configure.ac +++ b/configure.ac @@ -65,8 +65,8 @@ if test "x$PKG_CONFIG" = x || test "x$PKG_CONFIG" = "xno" ; then AC_ARG_WITH(openssl, AC_HELP_STRING([--with-openssl=PATH], [where openssl is installed]), [if test x_$with_openssl != x_/usr; then - SSLLIBS="-L${with_openssl}/lib" - SSLFLAGS="-I${with_openssl}/include" + SSLLIBS="-L${with_openssl}/lib" + SSLFLAGS="-I${with_openssl}/include" fi]) SSLLIBS="$SSLLIBS -lssl -lcrypto" else @@ -139,18 +139,17 @@ AC_ARG_WITH(xerces, CPPFLAGS="-I${with_xerces}/include $CPPFLAGS" fi]) LIBS="-lxerces-c $LIBS" -AC_CHECK_HEADER([xercesc/dom/DOM.hpp],, - AC_MSG_ERROR([unable to find xerces header files])) +AC_CHECK_HEADER([xercesc/dom/DOM.hpp],,AC_MSG_ERROR([unable to find xerces header files])) AC_MSG_CHECKING([Xerces version]) AC_PREPROC_IFELSE( - [AC_LANG_PROGRAM([#include ], + [AC_LANG_PROGRAM([#include ], [#if _XERCES_VERSION != 20600 int i = 0; #else #error cannot use version 2.6.0 #endif])], - [AC_MSG_RESULT(OK)], - [AC_MSG_FAILURE([Xerces-C v2.6.0 has bugs that inhibit use with signed XML, please use special 2.6.1 tarball provided by Shibboleth Project])]) + [AC_MSG_RESULT(OK)], + [AC_MSG_FAILURE([Xerces-C v2.6.0 has bugs that inhibit use with signed XML, please use special 2.6.1 tarball provided by Shibboleth Project])]) AC_TRY_LINK( [#include ], [xercesc::XMLPlatformUtils::Initialize()], @@ -165,13 +164,34 @@ AC_ARG_WITH(xmlsec, LDFLAGS="-L${with_xmlsec}/lib $LDFLAGS" CPPFLAGS="-I${with_xmlsec}/include $CPPFLAGS" fi]) -LIBS="-lxml-security-c $LIBS" -AC_CHECK_HEADER([xsec/utils/XSECPlatformUtils.hpp],,AC_MSG_ERROR([unable to find xsec header files])) -AC_TRY_LINK( - [#include ], - [XSECPlatformUtils::Initialise()], - [AC_DEFINE(HAVE_LIBXSEC,1,[Define if XML-Sec library was found])], - [AC_MSG_ERROR([unable to link with XML-Sec])]) + +if test x_$with_xmlsec != x_no; then + if test x_$with_xmlsec != x_/usr; then + LDFLAGS="-L${with_xmlsec}/lib $LDFLAGS" + CPPFLAGS="-I${with_xmlsec}/include $CPPFLAGS" + fi + LIBS="-lxml-security-c $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_PREPROC_IFELSE( + [AC_LANG_PROGRAM([#include ], + [#if XSEC_VERSION_MAJOR > 1 || XSEC_VERSION_MEDIUM >2 +int i = 0; +#else +#error need version 1.3 or later +#endif])], + [AC_MSG_RESULT(OK)], + [AC_MSG_FAILURE([XML-Security version 1.3 or greater is required.])]) + AC_TRY_LINK( + [#include ], + [XSECPlatformUtils::Initialise()],, + [AC_MSG_ERROR([unable to link with XML-Sec])]) +else + AC_MSG_WARN([xmlsec disabled, building without signature/encryption support]) + [AC_DEFINE(XMLTOOLING_NO_XMLSEC,1, + [Define if you wish to disable XML-Security-dependent features.])] +fi +AM_CONDITIONAL(BUILD_XMLSEC,test x_$with_xmlsec != x_no) # Does the STL in use help or screw us? AC_TRY_LINK( @@ -186,7 +206,7 @@ CXXTEST="/usr/bin/cxxtestgen.pl" CXXTESTFLAGS="" AC_ARG_WITH(cxxtest, AC_HELP_STRING([--with-cxxtest=PATH], [where cxxtest is installed]), - [if test x_$with_xerces != x_/usr; then + [if test x_$with_cxxtest != x_/usr; then CXXTEST="${with_cxxtest}/cxxtestgen.pl" CXXTESTFLAGS="-I${with_cxxtest}" fi])