Bump version, adjust VC build for parallel make, fixes for CPPXT-76.
[shibboleth/cpp-xmltooling.git] / configure.ac
index 1a36fff..8e8e0ae 100644 (file)
@@ -1,11 +1,12 @@
 # Process this file with autoreconf
-AC_PREREQ([2.67])
-AC_INIT([xmltooling],[1.4],[https://bugs.internet2.edu/],[xmltooling])
+AC_PREREQ([2.50])
+AC_INIT([xmltooling],[1.5],[https://bugs.internet2.edu/],[xmltooling])
 AC_CONFIG_SRCDIR(xmltooling)
 AC_CONFIG_AUX_DIR(build-aux)
 AC_CONFIG_MACRO_DIR(m4)
 AM_INIT_AUTOMAKE
-LT_INIT
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
 
 # Docygen features
 DX_HTML_FEATURE(ON)
@@ -36,7 +37,6 @@ AC_CONFIG_FILES([Makefile xmltooling/Makefile xmltoolingtest/Makefile schemas/Ma
 
 AC_PROG_CC([gcc gcc3 cc])
 AC_PROG_CXX([g++ g++3 c++ CC])
-AC_DISABLE_STATIC
 AC_CANONICAL_HOST
 
 if test "$GCC" = "yes" ; then
@@ -84,37 +84,37 @@ fi
 
 AC_CHECK_FUNCS([pthread_rwlock_init])
 
-AC_LANG(C++)
+AC_LANG([C++])
 
 # C++ requirements
-AC_CXX_REQUIRE_STL
 AC_CXX_NAMESPACES
+AC_CXX_REQUIRE_STL
 
 # are covariant methods allowed?
 AC_LINK_IFELSE(
-       [AC_LANG_PROGRAM([[]],
-               [[
-               class base { public: virtual base *GetPtr( void ) { return this; } };
-               class derived: virtual public base { public: virtual derived *GetPtr( void ) { return this; } };
-               ]])],
-    [AC_DEFINE([HAVE_COVARIANT_RETURNS], [1], [Define to 1 if C++ compiler supports covariant virtual methods.])])
+    [AC_LANG_PROGRAM([[]],
+        [[
+        class base { public: virtual base *GetPtr( void ) { return this; } };
+        class derived: virtual public base { public: virtual derived *GetPtr( void ) { return this; } };
+        ]])],
+    [AC_DEFINE([HAVE_COVARIANT_RETURNS],[1],[Define to 1 if C++ compiler supports covariant virtual methods.])])
 
 # is nullptr supported?
 AC_COMPILE_IFELSE(
-       [AC_LANG_PROGRAM([[]],[[const char* ptr = nullptr;]])],
-       [AC_DEFINE([HAVE_NULLPTR], [1], [Define to 1 if C++ compiler supports nullptr keyword.])])
+    [AC_LANG_PROGRAM([[]],[[const char* ptr = nullptr;]])],
+    [AC_DEFINE([HAVE_NULLPTR],[1],[Define to 1 if C++ compiler supports nullptr keyword.])])
 
 # log4shib settings (favor this version over the log4cpp code)
 AC_PATH_PROG(LOG4SHIB_CONFIG,log4shib-config)
 AC_ARG_WITH(log4shib,
-    AS_HELP_STRING([--with-log4shib=PATH], [where log4shib-config is installed]),
+    AS_HELP_STRING([--with-log4shib=PATH],[where log4shib-config is installed]),
     [
     LOG4SHIB_CONFIG="${with_log4shib}"
     if ! test -f "${LOG4SHIB_CONFIG}" ; then
        LOG4SHIB_CONFIG="${with_log4shib}/bin/log4shib-config"
     fi
     ])
-if test -f "${LOG4SHIB_CONFIG}"; then
+if test -f "${LOG4SHIB_CONFIG}" ; then
     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]))
@@ -122,7 +122,7 @@ if test -f "${LOG4SHIB_CONFIG}"; then
         [AC_LANG_PROGRAM([[#include <log4shib/Category.hh>
 #include <log4shib/CategoryStream.hh>]],
             [[log4shib::Category::getInstance("foo").errorStream() << log4shib::eol]])],
-        [AC_DEFINE([XMLTOOLING_LOG4SHIB], [1], [Define to 1 if log4shib library is used.])],
+        [AC_DEFINE([XMLTOOLING_LOG4SHIB],[1],[Define to 1 if log4shib library is used.])],
         [AC_MSG_ERROR([unable to link with log4shib])])
 else
     AC_MSG_WARN([log4shib-config not found, may need to use --with-log4shib option])
@@ -131,7 +131,7 @@ else
     # log4cpp settings
     AC_PATH_PROG(LOG4CPP_CONFIG,log4cpp-config)
     AC_ARG_WITH(log4cpp,
-        AS_HELP_STRING([--with-log4cpp=PATH], [where log4cpp-config is installed]),
+        AS_HELP_STRING([--with-log4cpp=PATH],[where log4cpp-config is installed]),
         [
         LOG4CPP_CONFIG="${with_log4cpp}"
         if ! test -f "${LOG4CPP_CONFIG}" ; then
@@ -147,7 +147,7 @@ else
             [AC_LANG_PROGRAM([[#include <log4cpp/Category.hh>
 #include <log4cpp/CategoryStream.hh>]],
                 [[log4cpp::Category::getInstance("foo").errorStream() << log4cpp::eol]])],
-            [AC_DEFINE([XMLTOOLING_LOG4CPP], [1], [Define to 1 if log4cpp library is used.])],
+            [AC_DEFINE([XMLTOOLING_LOG4CPP],[1],[Define to 1 if log4cpp library is used.])],
             [AC_MSG_ERROR([unable to link with log4cpp, need version 1.0 or later])])
        else
            AC_MSG_ERROR([log4cpp-config not found, may need to use --with-log4cpp option])
@@ -267,6 +267,9 @@ if test x_$with_xmlsec != x_no; then
     AC_CHECK_DECL(EVP_sha512,
         [AC_DEFINE([XMLTOOLING_OPENSSL_HAVE_SHA2],[1],[Define to 1 if OpenSSL supports the SHA-2 hash family.])],
                ,[#include <openssl/evp.h>])
+    AC_CHECK_DECL(EVP_PKEY_set1_EC_KEY,
+        [AC_DEFINE([XMLTOOLING_OPENSSL_HAVE_EC],[1],[Define to 1 if OpenSSL has EC support.])],
+        ,[#include <openssl/evp.h>])
 
     # restore master libs
     LIBS="$save_LIBS"
@@ -301,8 +304,8 @@ int i = 0;
 
     AC_MSG_CHECKING([whether XML-Security-C has multiple CRL support])
     AC_COMPILE_IFELSE(
-        [AC_LANG_PROGRAM([[#include <xsec/dsig/DSIGKeyInfoList.hpp>]],
-            [[DSIGKeyInfoList* klist; klist->getX509CRLListSize();]])],
+        [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])])
 
@@ -320,6 +323,13 @@ int i = 0;
         [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>]],