Xerces 3 revisions.
[shibboleth/cpp-xmltooling.git] / configure.ac
index 2edc85e..c64aaf2 100644 (file)
@@ -1,8 +1,8 @@
 AC_PREREQ([2.50])
-AC_INIT([xmltooling], [1.1], [mace-opensaml-users@internet2.edu], [xmltooling])
+AC_INIT([xmltooling], [1.2], [mace-opensaml-users@internet2.edu], [xmltooling])
 AM_CONFIG_HEADER(config.h)
 AM_CONFIG_HEADER(xmltooling/config_pub.h)
-AM_INIT_AUTOMAKE([xmltooling], [1.1])
+AM_INIT_AUTOMAKE([xmltooling], [1.2])
 
 sinclude(doxygen.m4)
 sinclude(acx_pthread.m4)
@@ -169,6 +169,45 @@ AC_TRY_LINK(
         [AC_DEFINE(HAVE_LIBXERCESC,1,[Define if Xerces-C library was found])],
         [AC_MSG_ERROR([unable to link with Xerces])])
 
+AC_MSG_CHECKING([whether Xerces is 64-bit clean])
+AC_TRY_COMPILE([#include <xercesc/framework/MemBufInputSource.hpp>],
+    [using namespace XERCES_CPP_NAMESPACE;
+      XMLFilePos testvar;
+    ],
+    [AC_MSG_RESULT([yes])]
+    [AC_DEFINE(XMLTOOLING_XERCESC_64BITSAFE)],
+    [AC_MSG_RESULT([no])])
+
+AC_MSG_CHECKING([whether Xerces BinInputStream requires getContentType])
+AC_TRY_COMPILE([#include <xercesc/framework/MemBufInputSource.hpp>],
+    [using namespace XERCES_CPP_NAMESPACE;
+      char buf[1024];
+      BinMemInputStream in(buf,1024);
+      in.getContentType();
+    ],
+    [AC_MSG_RESULT([yes])]
+    [AC_DEFINE(XMLTOOLING_XERCESC_INPUTSTREAM_HAS_CONTENTTYPE)],
+    [AC_MSG_RESULT([no])])
+
+AC_MSG_CHECKING([whether Xerces DOMLS API is compliant])
+AC_TRY_COMPILE([#include <xercesc/dom/DOM.hpp>],
+    [using namespace XERCES_CPP_NAMESPACE;
+        DOMImplementation *impl = DOMImplementationRegistry::getDOMImplementation(NULL);
+        DOMLSSerializer *ls = ((DOMImplementationLS*)impl)->createLSSerializer();
+    ],
+    [AC_MSG_RESULT([yes])]
+    [AC_DEFINE(XMLTOOLING_XERCESC_COMPLIANT_DOMLS)],
+    [AC_MSG_RESULT([no])])
+
+AC_MSG_CHECKING([whether Xerces has setIdAttribute(XMLCh*, bool)])
+AC_TRY_COMPILE([#include <xercesc/dom/DOM.hpp>],
+      [using namespace XERCES_CPP_NAMESPACE;
+          DOMElement * elt;
+          elt->setIdAttribute(NULL, false);
+      ],
+      [AC_MSG_RESULT([yes])]
+      [AC_DEFINE(XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE)],
+      [AC_MSG_RESULT([no])])
 
 # XML-Security settings
 AC_ARG_WITH(xmlsec,