Add POSIX flag to Solaris build
[shibboleth/cpp-xmltooling.git] / configure.ac
1 # Process this file with autoreconf
2 AC_PREREQ([2.50])
3 AC_INIT([xmltooling],[1.5],[https://issues.shibboleth.net/],[xmltooling])
4 AC_CONFIG_SRCDIR(xmltooling)
5 AC_CONFIG_AUX_DIR(build-aux)
6 AC_CONFIG_MACRO_DIR(m4)
7 AM_INIT_AUTOMAKE
8 AC_DISABLE_STATIC
9 AC_PROG_LIBTOOL
10
11 # Docygen features
12 DX_HTML_FEATURE(ON)
13 DX_CHM_FEATURE(OFF)
14 DX_CHI_FEATURE(OFF)
15 DX_MAN_FEATURE(OFF)
16 DX_RTF_FEATURE(OFF)
17 DX_XML_FEATURE(OFF)
18 DX_PDF_FEATURE(OFF)
19 DX_PS_FEATURE(OFF)
20 DX_INIT_DOXYGEN(xmltooling, doxygen.cfg, doc/api)
21
22 AC_ARG_ENABLE(debug,
23     AS_HELP_STRING([--enable-debug],[Have GCC compile with symbols (Default = no)]),
24     enable_debug=$enableval, enable_debug=no)
25
26 if test "$enable_debug" = "yes" ; then
27     GCC_CFLAGS="$CFLAGS -g -D_DEBUG"
28     GCC_CXXFLAGS="$CXXFLAGS -g -D_DEBUG"
29 else
30     GCC_CFLAGS="$CFLAGS -O2 -DNDEBUG"
31     GCC_CXXFLAGS="$CXXFLAGS -O2 -DNDEBUG"
32 fi
33
34 AC_CONFIG_HEADERS([config.h xmltooling/config_pub.h])
35 AC_CONFIG_FILES([xmltooling.spec])
36 AC_CONFIG_FILES([Makefile xmltooling/Makefile xmltoolingtest/Makefile schemas/Makefile doc/Makefile])
37
38 AC_PROG_CC([gcc gcc3 cc])
39 AC_PROG_CXX([g++ g++3 c++ CC])
40 AC_CANONICAL_HOST
41
42 if test "$GCC" = "yes" ; then
43 #    AC_HAVE_GCC_VERSION(4,0,0,0,
44 #        [
45 #        AC_DEFINE(GCC_HASCLASSVISIBILITY,1,
46 #            [Define to enable class visibility control in gcc.])
47 #        GCC_CFLAGS="$GCC_CFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
48 #        GCC_CXXFLAGS="$GCC_CXXFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
49 #        ])
50     CFLAGS="-Wall $GCC_CFLAGS"
51     CXXFLAGS="-Wall $GCC_CXXFLAGS"
52 fi
53
54 # Fix for Sun Workshop compiler in debug mode, may be Sun case #6360993
55 # Also enables POSIX semantics for some functions.
56 case "${host_cpu}-${host_os}" in
57     *solaris*)
58         CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS"
59         CXXFLAGS="$CXXFLAGS -D_POSIX_PTHREAD_SEMANTICS"
60         if test "$CXX" = "CC" ; then
61                 CXXFLAGS="$CXXFLAGS -Qoption ccfe -stabs=no%dfltlit+no%dflthlp"
62         fi
63     ;;
64 esac
65
66 # Checks for typedefs, structures, and compiler characteristics.
67 AC_C_CONST
68 AC_TYPE_SIZE_T
69 AC_CHECK_SIZEOF([long])
70
71 # Checks for library functions.
72 AC_CHECK_FUNCS([strchr strdup strstr timegm strcasecmp])
73 AC_CHECK_HEADERS([dlfcn.h])
74 AC_CHECK_FUNC(dlclose, , [ AC_CHECK_LIB(dl, dlopen) ])
75
76 # checks for pthreads
77 ACX_PTHREAD([enable_threads="pthread"],[enable_threads="no"])
78 if test $enable_threads != "pthread"; then
79     AC_MSG_ERROR([unable to find pthreads, currently this is required])
80 else
81     AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])
82         AM_CONDITIONAL(BUILD_PTHREAD,test "$enable_threads" = "pthread")
83     LIBS="$PTHREAD_LIBS $LIBS"
84     CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
85     CXXFLAGS="$PTHREAD_CFLAGS $CXXFLAGS"
86 fi
87
88 AC_CHECK_FUNCS([pthread_rwlock_init])
89
90 AC_LANG([C++])
91
92 # C++ requirements
93 AC_CXX_NAMESPACES
94 AC_CXX_REQUIRE_STL
95
96 # Boost
97 BOOST_REQUIRE
98 BOOST_STRING_ALGO
99 BOOST_LAMBDA
100
101 # are covariant methods allowed?
102 AC_LINK_IFELSE(
103     [AC_LANG_PROGRAM([[]],
104         [[
105         class base { public: virtual base *GetPtr( void ) { return this; } };
106         class derived: virtual public base { public: virtual derived *GetPtr( void ) { return this; } };
107         ]])],
108     [AC_DEFINE([HAVE_COVARIANT_RETURNS],[1],[Define to 1 if C++ compiler supports covariant virtual methods.])])
109
110 # is nullptr supported?
111 AC_COMPILE_IFELSE(
112     [AC_LANG_PROGRAM([[]],[[const char* ptr = nullptr;]])],
113     [AC_DEFINE([HAVE_NULLPTR],[1],[Define to 1 if C++ compiler supports nullptr keyword.])])
114
115 # log4shib settings (favor this version over the log4cpp code)
116 AC_PATH_PROG(LOG4SHIB_CONFIG,log4shib-config)
117 AC_ARG_WITH(log4shib,
118     AS_HELP_STRING([--with-log4shib=PATH],[where log4shib-config is installed]),
119     [
120     LOG4SHIB_CONFIG="${with_log4shib}"
121     if ! test -f "${LOG4SHIB_CONFIG}" ; then
122         LOG4SHIB_CONFIG="${with_log4shib}/bin/log4shib-config"
123     fi
124     ])
125 if test -f "${LOG4SHIB_CONFIG}" ; then
126     LIBS="`${LOG4SHIB_CONFIG} --libs` $LIBS"
127     CPPFLAGS="`${LOG4SHIB_CONFIG} --cflags` $CPPFLAGS"
128     AC_CHECK_HEADER([log4shib/CategoryStream.hh],,AC_MSG_ERROR([unable to find log4shib header files]))
129     AC_LINK_IFELSE(
130         [AC_LANG_PROGRAM([[#include <log4shib/Category.hh>
131 #include <log4shib/CategoryStream.hh>]],
132             [[log4shib::Category::getInstance("foo").errorStream() << log4shib::eol]])],
133         [AC_DEFINE([XMLTOOLING_LOG4SHIB],[1],[Define to 1 if log4shib library is used.])],
134         [AC_MSG_ERROR([unable to link with log4shib])])
135 else
136     AC_MSG_WARN([log4shib-config not found, may need to use --with-log4shib option])
137     AC_MSG_WARN([will look for original log4cpp library])
138     
139     # log4cpp settings
140     AC_PATH_PROG(LOG4CPP_CONFIG,log4cpp-config)
141     AC_ARG_WITH(log4cpp,
142         AS_HELP_STRING([--with-log4cpp=PATH],[where log4cpp-config is installed]),
143         [
144         LOG4CPP_CONFIG="${with_log4cpp}"
145         if ! test -f "${LOG4CPP_CONFIG}" ; then
146                 LOG4CPP_CONFIG="${with_log4cpp}/bin/log4cpp-config"
147         fi
148         ])
149     if test -f "${LOG4CPP_CONFIG}"; then
150         AC_MSG_WARN([will try to use log4cpp, note that most non-Internet2 supplied versions are not thread-safe])
151         LIBS="`${LOG4CPP_CONFIG} --libs` $LIBS"
152         CPPFLAGS="`${LOG4CPP_CONFIG} --cflags` $CPPFLAGS"
153         AC_CHECK_HEADER([log4cpp/CategoryStream.hh],,AC_MSG_ERROR([unable to find log4cpp header files]))
154         AC_LINK_IFELSE(
155             [AC_LANG_PROGRAM([[#include <log4cpp/Category.hh>
156 #include <log4cpp/CategoryStream.hh>]],
157                 [[log4cpp::Category::getInstance("foo").errorStream() << log4cpp::eol]])],
158             [AC_DEFINE([XMLTOOLING_LOG4CPP],[1],[Define to 1 if log4cpp library is used.])],
159             [AC_MSG_ERROR([unable to link with log4cpp, need version 1.0 or later])])
160         else
161             AC_MSG_ERROR([log4cpp-config not found, may need to use --with-log4cpp option])
162         fi
163 fi
164
165 # Xerces settings
166 AC_ARG_WITH(xerces,
167     AS_HELP_STRING([--with-xerces=PATH],[where xerces-c is installed]),,
168     [with_xerces=/usr])
169 if test x_$with_xerces != x_/usr; then
170     CPPFLAGS="-I${with_xerces}/include $CPPFLAGS"
171     LIBS="-L${with_xerces}/lib -lxerces-c $LIBS"
172 else
173     LIBS="-lxerces-c $LIBS"
174 fi
175
176 AC_CHECK_HEADER([xercesc/dom/DOM.hpp],,AC_MSG_ERROR([unable to find xerces header files]))
177 AC_MSG_CHECKING([Xerces version])
178 AC_PREPROC_IFELSE(
179     [AC_LANG_PROGRAM([#include <xercesc/util/XercesVersion.hpp>],
180 [#if  _XERCES_VERSION != 20600
181 int i = 0;
182 #else
183 #error cannot use version 2.6.0
184 #endif])],
185     [AC_MSG_RESULT(OK)],
186     [AC_MSG_FAILURE([Xerces-C v2.6.0 has bugs that inhibit use with signed XML, please use a newer version])])
187 AC_LINK_IFELSE(
188     [AC_LANG_PROGRAM([[#include <xercesc/util/PlatformUtils.hpp>]],
189         [[xercesc::XMLPlatformUtils::Initialize()]])],
190     ,[AC_MSG_ERROR([unable to link with Xerces])])
191
192 AC_MSG_CHECKING([whether Xerces is 64-bit clean])
193 AC_COMPILE_IFELSE(
194     [AC_LANG_PROGRAM([[#include <xercesc/framework/MemBufInputSource.hpp>]],
195         [[using namespace XERCES_CPP_NAMESPACE; XMLFilePos testvar;]])],
196     [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XERCESC_64BITSAFE],[1],[Define to 1 if Xerces has a 64-bit-safe API.])],
197     [AC_MSG_RESULT([no])])
198
199 AC_MSG_CHECKING([whether Xerces BinInputStream requires getContentType])
200 AC_COMPILE_IFELSE(
201     [AC_LANG_PROGRAM([[#include <xercesc/util/BinMemInputStream.hpp>]],
202         [[using namespace XERCES_CPP_NAMESPACE; XMLByte buf[1024]; BinMemInputStream in(buf,1024); in.getContentType();]])],
203     [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XERCESC_INPUTSTREAM_HAS_CONTENTTYPE],[1],[Define to 1 if Xerces InputStream class requires getContentType.])],
204     [AC_MSG_RESULT([no])])
205
206 AC_MSG_CHECKING([whether Xerces DOMLS API is compliant])
207 AC_COMPILE_IFELSE(
208     [AC_LANG_PROGRAM([[#include <xercesc/dom/DOM.hpp>]],
209         [[using namespace XERCES_CPP_NAMESPACE;
210         DOMImplementation *impl = DOMImplementationRegistry::getDOMImplementation(NULL);
211         DOMLSSerializer *ls = ((DOMImplementationLS*)impl)->createLSSerializer();]])],
212     [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XERCESC_COMPLIANT_DOMLS],[1],[Define to 1 if Xerces supports a compliant DOMLS API.])],
213     [AC_MSG_RESULT([no])])
214
215 AC_MSG_CHECKING([whether Xerces has setIdAttribute(XMLCh*, bool)])
216 AC_COMPILE_IFELSE(
217     [AC_LANG_PROGRAM([[#include <xercesc/dom/DOM.hpp>]],
218         [[using namespace XERCES_CPP_NAMESPACE; DOMElement * elt; elt->setIdAttribute(NULL, false);]])],
219     [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE],[1],[Define to 1 if Xerces DOM ID methods take extra parameter.])],
220     [AC_MSG_RESULT([no])])
221
222 AC_MSG_CHECKING([whether Xerces XMLString::release(XMLByte**) exists])
223 AC_COMPILE_IFELSE(
224     [AC_LANG_PROGRAM([[#include <xercesc/util/XMLString.hpp>]],
225     [[using namespace XERCES_CPP_NAMESPACE; XMLByte* buf=NULL; XMLString::release(&buf);]])],
226     [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE],[1],[Define to 1 if Xerces XMLString includes XMLByte release.])],
227     [AC_MSG_RESULT([no])])
228
229 # XML-Security settings
230 AC_ARG_WITH(xmlsec,
231     AS_HELP_STRING([--with-xmlsec=PATH], [where xmlsec is installed]),,
232     [with_xmlsec=/usr])
233
234 if test x_$with_xmlsec != x_no; then
235
236     # OpenSSL settings (need to do this first in case it's in a different spot from xmlsec)
237     AC_ARG_WITH(openssl,
238         AS_HELP_STRING([--with-openssl=PATH], [where openssl is installed]),
239         [if test x_$with_openssl != x_/usr; then
240             SSLFLAGS="-I${with_openssl}/include"
241             SSLLIBS="-L${with_openssl}/lib -lcrypto -lssl"
242         else
243             SSLLIBS="-lcrypto -lssl"
244         fi])
245     
246     if test "x$SSLLIBS" = "x" ; then
247         AC_PATH_PROG(PKG_CONFIG, pkg-config)
248         if test "x$PKG_CONFIG" != x && test "x$PKG_CONFIG" != "xno" ; then
249             if pkg-config openssl ; then
250                 SSLLIBS="`$PKG_CONFIG --libs openssl`"
251                 SSLFLAGS="`$PKG_CONFIG --cflags openssl`"
252             else
253                 AC_MSG_WARN([OpenSSL not supported by pkg-config, try --with-openssl instead])
254             fi
255         fi
256     fi
257     
258     if test "x$SSLLIBS" = "x" ; then
259         SSLLIBS="-lcrypto -lssl"
260     fi
261     
262     AC_MSG_CHECKING(for OpenSSL cflags)
263     AC_MSG_RESULT($SSLFLAGS)
264     CPPFLAGS="$CPPFLAGS $SSLFLAGS"
265     AC_MSG_CHECKING(for OpenSSL libraries)
266     AC_MSG_RESULT($SSLLIBS)
267     XMLSEC_LIBS="$XMLSEC_LIBS $SSLLIBS"
268
269     # save and append master libs
270     save_LIBS="$LIBS"
271     LIBS="$XMLSEC_LIBS $LIBS"
272     
273     AC_CHECK_HEADER([openssl/pem.h],,AC_MSG_ERROR([unable to find openssl header files]))
274     AC_MSG_CHECKING(for ERR_load_CRYPTO_string)
275     AC_TRY_LINK_FUNC([ERR_load_CRYPTO_strings],,AC_MSG_ERROR([unable to link with openssl libraries]))
276     AC_MSG_RESULT(yes)
277
278     AC_CHECK_DECL(EVP_sha512,
279         [AC_DEFINE([XMLTOOLING_OPENSSL_HAVE_SHA2],[1],[Define to 1 if OpenSSL supports the SHA-2 hash family.])],
280                 ,[#include <openssl/evp.h>])
281     AC_CHECK_DECL(EVP_PKEY_set1_EC_KEY,
282         [AC_DEFINE([XMLTOOLING_OPENSSL_HAVE_EC],[1],[Define to 1 if OpenSSL has EC support.])],
283         ,[#include <openssl/evp.h>])
284
285     # restore master libs
286     LIBS="$save_LIBS"
287
288     if test x_$with_xmlsec != x_/usr; then
289         CPPFLAGS="-I${with_xmlsec}/include $CPPFLAGS"
290         XMLSEC_LIBS="-L${with_xmlsec}/lib -lxml-security-c $XMLSEC_LIBS"
291     else
292         XMLSEC_LIBS="-lxml-security-c $XMLSEC_LIBS"
293     fi
294     
295     # save and append master libs
296     save_LIBS="$LIBS"
297     LIBS="$XMLSEC_LIBS $LIBS"
298     
299     AC_CHECK_HEADER([xsec/utils/XSECPlatformUtils.hpp],,AC_MSG_ERROR([unable to find XML-Security header files]))
300     AC_MSG_CHECKING([XML-Security version])
301     AC_PREPROC_IFELSE(
302             [AC_LANG_PROGRAM([#include <xsec/utils/XSECPlatformUtils.hpp>],
303         [#if XSEC_VERSION_MAJOR > 1 || (XSEC_VERSION_MAJOR == 1 && XSEC_VERSION_MEDIUM > 3)
304 int i = 0;
305 #else
306 #error need version 1.4.0 or later
307 #endif])],
308         [AC_MSG_RESULT(OK)],
309         [AC_MSG_FAILURE([XML-Security version 1.4.0 or greater is required.])])
310         
311     AC_LINK_IFELSE(
312         [AC_LANG_PROGRAM([[#include <xsec/utils/XSECPlatformUtils.hpp>]],
313             [[XSECPlatformUtils::Initialise()]])],,
314         [AC_MSG_ERROR([unable to link with XML-Security])])
315     AC_CHECK_TYPE([xsecsize_t],[AC_DEFINE([HAVE_XSECSIZE_T],[1],[Define to 1 if you have the 'xsecsize_t' type.])])
316
317     AC_MSG_CHECKING([whether XML-Security-C has multiple CRL support])
318     AC_COMPILE_IFELSE(
319         [AC_LANG_PROGRAM([[#include <xsec/dsig/DSIGKeyInfoX509.hpp>]],
320             [[DSIGKeyInfoX509* klist; klist->getX509CRLListSize();]])],
321         [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XMLSEC_MULTIPLECRL],[1],[Define to 1 if XML-Security-C handles multiple CRLs.])],
322         [AC_MSG_RESULT([no])])
323
324     AC_MSG_CHECKING([whether XML-Security-C exposes the signature algorithm URI])
325     AC_COMPILE_IFELSE(
326         [AC_LANG_PROGRAM([[#include <xsec/dsig/DSIGSignature.hpp>]],
327             [[DSIGSignature* sig; sig->getAlgorithmURI();]])],
328         [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XMLSEC_SIGALGORITHM],[1],[Define to 1 if XML-Security-C exposes the signature algorithm URI.])],
329         [AC_MSG_RESULT([no])])
330
331     AC_MSG_CHECKING([whether XML-Security-C includes ECC support])
332     AC_COMPILE_IFELSE(
333         [AC_LANG_PROGRAM([[#include <xsec/dsig/DSIGKeyInfoValue.hpp>]],
334             [[DSIGKeyInfoValue* info; info->getECNamedCurve();]])],
335         [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XMLSEC_ECC],[1],[Define to 1 if XML-Security-C includes ECC support.])],
336         [AC_MSG_RESULT([no])])
337
338     AC_MSG_CHECKING([whether XML-Security-C includes C14N 1.1 support])
339     AC_COMPILE_IFELSE(
340         [AC_LANG_PROGRAM([[#include <xsec/dsig/DSIGConstants.hpp>]],
341             [[transformType t = TRANSFORM_C14N11;]])],
342         [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XMLSEC_C14N11],[1],[Define to 1 if XML-Security-C includes C14N 1.1 support.])],
343         [AC_MSG_RESULT([no])])
344
345     AC_MSG_CHECKING([whether XML-Security-C includes debug logging support])
346     AC_COMPILE_IFELSE(
347         [AC_LANG_PROGRAM([[#include <xsec/utils/XSECPlatformUtils.hpp>]],
348             [[XSECPlatformUtils::SetReferenceLoggingSink(NULL)]])],
349         [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XMLSEC_DEBUGLOGGING],[1],[Define to 1 if XML-Security-C includes debug logging support.])],
350         [AC_MSG_RESULT([no])])
351
352     # restore master libs
353     LIBS="$save_LIBS"
354
355     # libcurl settings
356     AC_PATH_PROG(CURL_CONFIG,curl-config)
357     AC_ARG_WITH(curl,
358         AS_HELP_STRING([--with-curl=PATH], [where curl-config is installed]),
359         [
360         CURL_CONFIG="${with_curl}"
361         if ! test -f "${CURL_CONFIG}" ; then
362             CURL_CONFIG="${with_curl}/bin/curl-config"
363         fi
364         ])
365     if test -f "${CURL_CONFIG}" ; then
366         CPPFLAGS="`${CURL_CONFIG} --cflags` $CPPFLAGS"
367         XMLSEC_LIBS="`${CURL_CONFIG} --libs` $XMLSEC_LIBS"
368     else
369         AC_MSG_ERROR([curl-config not found, may need to use --with-curl option])
370     fi
371
372     # save and append master libs
373     save_LIBS="$LIBS"
374     LIBS="$XMLSEC_LIBS $LIBS"
375         
376     AC_CHECK_HEADER([curl/curl.h],,AC_MSG_ERROR([unable to find libcurl header files]))
377     AC_LINK_IFELSE(
378         [AC_LANG_PROGRAM([[#include <curl/curl.h>]],
379             [[curl_global_init(CURL_GLOBAL_ALL)]])],,
380         [AC_MSG_ERROR([unable to link with libcurl])])
381     AC_MSG_CHECKING([for CURLOPT_SSL_CTX_FUNCTION in curl.h])
382     AC_EGREP_HEADER([CURLOPT_SSL_CTX_FUNCTION], [curl/curl.h],
383         [AC_MSG_RESULT(yes)],
384         [AC_MSG_ERROR([need libcurl that supports CURLOPT_SSL_CTX_FUNCTION])])
385     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>]])
386     
387     # restore master libs
388     LIBS="$save_LIBS"
389     
390     AC_SUBST(XMLSEC_LIBS)
391 else
392     AC_MSG_WARN([xmlsec disabled, building without signature/encryption support])
393     AC_DEFINE([XMLTOOLING_NO_XMLSEC],[1],[Define to 1 if you wish to disable XML-Security-dependent features.])
394 fi
395 AM_CONDITIONAL(BUILD_XMLSEC,test x_$with_xmlsec != x_no)
396
397 # Does the STL in use help or screw us?
398 AC_LINK_IFELSE(
399     [AC_LANG_PROGRAM([[#include <string>]],[[std::basic_string<unsigned short> foo; foo=foo+(unsigned short)65]])],
400     [AC_DEFINE([HAVE_GOOD_STL],[1],[Define to 1 if you have an STL implementation that supports useful string specialization.])],[])
401 AC_LINK_IFELSE(
402     [AC_LANG_PROGRAM([[#include <vector>]],[[std::iterator_traits<std::vector<int>::iterator>::value_type foo=0]])],
403     [AC_DEFINE([HAVE_ITERATOR_TRAITS],[1],[Define to 1 if you have an STL implementation that supports std::iterator_traits.])],[])
404
405 # Check for unit test support
406 CXXTEST="/usr/bin/cxxtestgen.pl"
407 CXXTESTFLAGS=""
408 AC_ARG_WITH(cxxtest,
409     AS_HELP_STRING([--with-cxxtest=PATH], [where cxxtest is installed]),
410     [if test x_$with_cxxtest != x_/usr; then
411         CXXTEST="${with_cxxtest}/cxxtestgen.pl"
412         CXXTESTFLAGS="-I${with_cxxtest}"
413     fi])
414 if ! test -f "${CXXTEST}"; then
415     AC_MSG_WARN([cxxtestgen not found, won't build unit tests])
416 fi
417
418 AC_SUBST(CXXTEST)
419 AC_SUBST(CXXTESTFLAGS)
420 AM_CONDITIONAL(BUILD_UNITTEST,test -f ${CXXTEST})
421
422 AX_CREATE_PKGCONFIG_INFO(,,[$XMLSEC_LIBS -lxmltooling],[OpenSAML XMLTooling-C library])
423
424 LIBTOOL="$LIBTOOL --silent"
425
426 # output packaging and makefiles
427 AC_OUTPUT