xmltooling-1.5.3/000755 001751 001751 00000000000 12157725415 015113 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/build-aux/000755 001751 001751 00000000000 12157725413 017003 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/m4/000755 001751 001751 00000000000 12157725413 015431 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/configure.ac000644 001751 001751 00000041631 12146253675 017410 0ustar00scantorscantor000000 000000 # Process this file with autoreconf AC_PREREQ([2.50]) AC_INIT([xmltooling],[1.5.3],[https://issues.shibboleth.net/],[xmltooling]) AC_CONFIG_SRCDIR(xmltooling) AC_CONFIG_AUX_DIR(build-aux) AC_CONFIG_MACRO_DIR(m4) AM_INIT_AUTOMAKE AC_DISABLE_STATIC AC_PROG_LIBTOOL # Docygen features DX_HTML_FEATURE(ON) DX_CHM_FEATURE(OFF) DX_CHI_FEATURE(OFF) DX_MAN_FEATURE(OFF) DX_RTF_FEATURE(OFF) DX_XML_FEATURE(OFF) DX_PDF_FEATURE(OFF) DX_PS_FEATURE(OFF) DX_INIT_DOXYGEN(xmltooling, doxygen.cfg, doc/api) AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],[Have GCC compile with symbols (Default = no)]), enable_debug=$enableval, enable_debug=no) if test "$enable_debug" = "yes" ; then GCC_CFLAGS="$CFLAGS -g -D_DEBUG" GCC_CXXFLAGS="$CXXFLAGS -g -D_DEBUG" else GCC_CFLAGS="$CFLAGS -O2 -DNDEBUG" GCC_CXXFLAGS="$CXXFLAGS -O2 -DNDEBUG" fi AC_CONFIG_HEADERS([config.h xmltooling/config_pub.h]) AC_CONFIG_FILES([xmltooling.spec]) AC_CONFIG_FILES([Makefile xmltooling/Makefile xmltoolingtest/Makefile schemas/Makefile doc/Makefile]) AC_PROG_CC([gcc gcc3 cc]) AC_PROG_CXX([g++ g++3 c++ CC]) AC_CANONICAL_HOST if test "$GCC" = "yes" ; then # AC_HAVE_GCC_VERSION(4,0,0,0, # [ # AC_DEFINE(GCC_HASCLASSVISIBILITY,1, # [Define to enable class visibility control in gcc.]) # GCC_CFLAGS="$GCC_CFLAGS -fvisibility=hidden -fvisibility-inlines-hidden" # GCC_CXXFLAGS="$GCC_CXXFLAGS -fvisibility=hidden -fvisibility-inlines-hidden" # ]) CFLAGS="-Wall $GCC_CFLAGS" CXXFLAGS="-Wall $GCC_CXXFLAGS" fi # Fix for Sun Workshop compiler in debug mode, may be Sun case #6360993 # Also enables POSIX semantics for some functions. case "${host_cpu}-${host_os}" in *solaris*) CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS" CXXFLAGS="$CXXFLAGS -D_POSIX_PTHREAD_SEMANTICS" if test "$CXX" = "CC" ; then CXXFLAGS="$CXXFLAGS -Qoption ccfe -stabs=no%dfltlit+no%dflthlp" fi ;; esac # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T # Checks for library functions. AC_CHECK_FUNCS([strchr strdup strstr timegm gmtime_r strcasecmp]) AC_CHECK_HEADERS([dlfcn.h]) AC_CHECK_FUNC(dlclose, , [ AC_CHECK_LIB(dl, dlopen) ]) # checks for pthreads ACX_PTHREAD([enable_threads="pthread"],[enable_threads="no"]) if test $enable_threads != "pthread"; then AC_MSG_ERROR([unable to find pthreads, currently this is required]) else AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.]) AM_CONDITIONAL(BUILD_PTHREAD,test "$enable_threads" = "pthread") LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$PTHREAD_CFLAGS $CFLAGS" CXXFLAGS="$PTHREAD_CFLAGS $CXXFLAGS" fi AC_CHECK_FUNCS([pthread_rwlock_init]) AC_LANG([C++]) # C++ requirements AC_CXX_NAMESPACES AC_CXX_REQUIRE_STL # Boost BOOST_REQUIRE BOOST_BIND BOOST_CONVERSION BOOST_LAMBDA BOOST_PTR_CONTAINER BOOST_SMART_PTR BOOST_STRING_ALGO BOOST_TOKENIZER CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS" # 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.])]) # 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.])]) # 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]), [ LOG4SHIB_CONFIG="${with_log4shib}" if ! test -f "${LOG4SHIB_CONFIG}" ; then LOG4SHIB_CONFIG="${with_log4shib}/bin/log4shib-config" fi ]) 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])) AC_LINK_IFELSE( [AC_LANG_PROGRAM([[#include #include ]], [[log4shib::Category::getInstance("foo").errorStream() << log4shib::eol]])], [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]) AC_MSG_WARN([will look for original log4cpp library]) # log4cpp settings AC_PATH_PROG(LOG4CPP_CONFIG,log4cpp-config) AC_ARG_WITH(log4cpp, AS_HELP_STRING([--with-log4cpp=PATH],[where log4cpp-config is installed]), [ LOG4CPP_CONFIG="${with_log4cpp}" if ! test -f "${LOG4CPP_CONFIG}" ; then LOG4CPP_CONFIG="${with_log4cpp}/bin/log4cpp-config" fi ]) if test -f "${LOG4CPP_CONFIG}"; then AC_MSG_WARN([will try to use log4cpp, note that most non-Internet2 supplied versions are not thread-safe]) LIBS="`${LOG4CPP_CONFIG} --libs` $LIBS" CPPFLAGS="`${LOG4CPP_CONFIG} --cflags` $CPPFLAGS" AC_CHECK_HEADER([log4cpp/CategoryStream.hh],,AC_MSG_ERROR([unable to find log4cpp header files])) AC_LINK_IFELSE( [AC_LANG_PROGRAM([[#include #include ]], [[log4cpp::Category::getInstance("foo").errorStream() << log4cpp::eol]])], [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]) fi fi # Xerces settings AC_ARG_WITH(xerces, AS_HELP_STRING([--with-xerces=PATH],[where xerces-c is installed]),, [with_xerces=/usr]) if test x_$with_xerces != x_/usr; then CPPFLAGS="-I${with_xerces}/include $CPPFLAGS" LIBS="-L${with_xerces}/lib -lxerces-c $LIBS" else LIBS="-lxerces-c $LIBS" fi 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 ], [#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 a newer version])]) AC_LINK_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[xercesc::XMLPlatformUtils::Initialize()]])], ,[AC_MSG_ERROR([unable to link with Xerces])]) AC_MSG_CHECKING([whether Xerces is 64-bit clean]) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[using namespace XERCES_CPP_NAMESPACE; XMLFilePos testvar;]])], [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XERCESC_64BITSAFE],[1],[Define to 1 if Xerces has a 64-bit-safe API.])], [AC_MSG_RESULT([no])]) AC_MSG_CHECKING([whether Xerces BinInputStream requires getContentType]) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[using namespace XERCES_CPP_NAMESPACE; XMLByte buf[1024]; BinMemInputStream in(buf,1024); in.getContentType();]])], [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XERCESC_INPUTSTREAM_HAS_CONTENTTYPE],[1],[Define to 1 if Xerces InputStream class requires getContentType.])], [AC_MSG_RESULT([no])]) AC_MSG_CHECKING([whether Xerces DOMLS API is compliant]) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[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],[1],[Define to 1 if Xerces supports a compliant DOMLS API.])], [AC_MSG_RESULT([no])]) AC_MSG_CHECKING([whether Xerces has setIdAttribute(XMLCh*, bool)]) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[using namespace XERCES_CPP_NAMESPACE; DOMElement * elt; elt->setIdAttribute(NULL, false);]])], [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE],[1],[Define to 1 if Xerces DOM ID methods take extra parameter.])], [AC_MSG_RESULT([no])]) AC_MSG_CHECKING([whether Xerces XMLString::release(XMLByte**) exists]) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[using namespace XERCES_CPP_NAMESPACE; XMLByte* buf=NULL; XMLString::release(&buf);]])], [AC_MSG_RESULT([yes])AC_DEFINE([XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE],[1],[Define to 1 if Xerces XMLString includes XMLByte release.])], [AC_MSG_RESULT([no])]) # XML-Security settings AC_ARG_WITH(xmlsec, AS_HELP_STRING([--with-xmlsec=PATH], [where xmlsec is installed]),, [with_xmlsec=/usr]) if test x_$with_xmlsec != x_no; then # OpenSSL settings (need to do this first in case it's in a different spot from xmlsec) AC_ARG_WITH(openssl, AS_HELP_STRING([--with-openssl=PATH], [where openssl is installed]), [if test x_$with_openssl != x_/usr; then SSLFLAGS="-I${with_openssl}/include" SSLLIBS="-L${with_openssl}/lib -lcrypto -lssl" else SSLLIBS="-lcrypto -lssl" fi]) if test "x$SSLLIBS" = "x" ; then AC_PATH_PROG(PKG_CONFIG, pkg-config) if test "x$PKG_CONFIG" != x && test "x$PKG_CONFIG" != "xno" ; then if pkg-config openssl ; then SSLLIBS="`$PKG_CONFIG --libs openssl`" SSLFLAGS="`$PKG_CONFIG --cflags openssl`" else AC_MSG_WARN([OpenSSL not supported by pkg-config, try --with-openssl instead]) fi fi fi if test "x$SSLLIBS" = "x" ; then SSLLIBS="-lcrypto -lssl" fi AC_MSG_CHECKING(for OpenSSL cflags) AC_MSG_RESULT($SSLFLAGS) CPPFLAGS="$CPPFLAGS $SSLFLAGS" AC_MSG_CHECKING(for OpenSSL libraries) AC_MSG_RESULT($SSLLIBS) XMLSEC_LIBS="$XMLSEC_LIBS $SSLLIBS" # save and append master libs save_LIBS="$LIBS" LIBS="$XMLSEC_LIBS $LIBS" AC_CHECK_HEADER([openssl/pem.h],,AC_MSG_ERROR([unable to find openssl header files])) AC_MSG_CHECKING(for ERR_load_CRYPTO_string) AC_TRY_LINK_FUNC([ERR_load_CRYPTO_strings],,AC_MSG_ERROR([unable to link with openssl libraries])) AC_MSG_RESULT(yes) AC_CHECK_DECL(EVP_sha512, [AC_DEFINE([XMLTOOLING_OPENSSL_HAVE_SHA2],[1],[Define to 1 if OpenSSL supports the SHA-2 hash family.])], ,[#include ]) AC_CHECK_DECL(EVP_PKEY_set1_EC_KEY, [AC_DEFINE([XMLTOOLING_OPENSSL_HAVE_EC],[1],[Define to 1 if OpenSSL has EC support.])], ,[#include ]) # restore master libs LIBS="$save_LIBS" if test x_$with_xmlsec != x_/usr; then CPPFLAGS="-I${with_xmlsec}/include $CPPFLAGS" XMLSEC_LIBS="-L${with_xmlsec}/lib -lxml-security-c $XMLSEC_LIBS" else XMLSEC_LIBS="-lxml-security-c $XMLSEC_LIBS" fi # save and append master libs save_LIBS="$LIBS" LIBS="$XMLSEC_LIBS $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_MAJOR == 1 && XSEC_VERSION_MEDIUM > 3) int i = 0; #else #error need version 1.4.0 or later #endif])], [AC_MSG_RESULT(OK)], [AC_MSG_FAILURE([XML-Security version 1.4.0 or greater is required.])]) AC_LINK_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[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 ]], [[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 ]], [[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 ]], [[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 ]], [[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 ]], [[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_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 ]]) # restore master libs LIBS="$save_LIBS" AC_SUBST(XMLSEC_LIBS) else AC_MSG_WARN([xmlsec disabled, building without signature/encryption support]) AC_DEFINE([XMLTOOLING_NO_XMLSEC],[1],[Define to 1 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_LINK_IFELSE( [AC_LANG_PROGRAM([[#include ]],[[std::basic_string foo; foo=foo+(unsigned short)65]])], [AC_DEFINE([HAVE_GOOD_STL],[1],[Define to 1 if you have an STL implementation that supports useful string specialization.])],[]) AC_LINK_IFELSE( [AC_LANG_PROGRAM([[#include ]],[[std::iterator_traits::iterator>::value_type foo=0]])], [AC_DEFINE([HAVE_ITERATOR_TRAITS],[1],[Define to 1 if you have an STL implementation that supports std::iterator_traits.])],[]) # Check for unit test support CXXTEST="/usr/bin/cxxtestgen.pl" CXXTESTFLAGS="" AC_ARG_WITH(cxxtest, AS_HELP_STRING([--with-cxxtest=PATH], [where cxxtest is installed]), [if test x_$with_cxxtest != x_/usr; then CXXTEST="${with_cxxtest}/cxxtestgen.pl" CXXTESTFLAGS="-I${with_cxxtest}" fi]) if ! test -f "${CXXTEST}"; then AC_MSG_WARN([cxxtestgen not found, won't build unit tests]) fi AC_SUBST(CXXTEST) AC_SUBST(CXXTESTFLAGS) AM_CONDITIONAL(BUILD_UNITTEST,test -f ${CXXTEST}) AX_CREATE_PKGCONFIG_INFO(,,[$XMLSEC_LIBS -lxmltooling],[OpenSAML XMLTooling-C library]) LIBTOOL="$LIBTOOL --silent" # output packaging and makefiles AC_OUTPUT xmltooling-1.5.3/aclocal.m4000644 001751 001751 00000104470 12147443210 016746 0ustar00scantorscantor000000 000000 # generated automatically by aclocal 1.12.6 -*- Autoconf -*- # Copyright (C) 1996-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.12' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.12.6], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.12.6])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated. For more info, see: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl dnl Support for Objective C++ was only introduced in Autoconf 2.65, dnl but we still cater to Autoconf 2.62. m4_ifdef([AC_PROG_OBJCXX], [AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2001-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of '-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/acinclude.m4]) m4_include([m4/acx_pthread.m4]) m4_include([m4/ax_create_pkgconfig_info.m4]) m4_include([m4/boost.m4]) m4_include([m4/doxygen.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) xmltooling-1.5.3/Makefile.am000644 001751 001751 00000001062 12147443124 017137 0ustar00scantorscantor000000 000000 AUTOMAKE_OPTIONS = foreign ACLOCAL_AMFLAGS = -I m4 include doxygen.am MOSTLYCLEANFILES = $(DX_CLEANFILES) DISTCLEANFILES = \ @PACKAGE_NAME@.pc \ @PACKAGE_NAME@.pc.in \ @PACKAGE_NAME@-uninstalled.pc \ @PACKAGE_NAME@-uninstalled.sh SUBDIRS = doc schemas @PACKAGE_NAME@ xmltoolingtest if DX_COND_doc all-local: doxygen-doc else all-local: endif pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = @PACKAGE_NAME@.pc GENFILES = @PACKAGE_NAME@.spec EXTRA_DIST = $(DX_CONFIG) \ cpp-@PACKAGE_NAME@.sln \ config_win32.h \ $(GENFILES) \ $(GENFILES:%=%.in) xmltooling-1.5.3/Makefile.in000644 001751 001751 00000102153 12147443212 017151 0ustar00scantorscantor000000 000000 # Makefile.in generated by automake 1.12.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2004 Oren Ben-Kiki # This file is distributed under the same terms as the Automake macro files. # Generate automatic documentation using Doxygen. Goals and variables values # are controlled by the various DX_COND_??? conditionals set by autoconf. # # The provided goals are: # doxygen-doc: Generate all doxygen documentation. # doxygen-run: Run doxygen, which will generate some of the documentation # (HTML, CHM, CHI, MAN, RTF, XML) but will not do the post # processing required for the rest of it (PS, PDF, and some MAN). # doxygen-man: Rename some doxygen generated man pages. # doxygen-ps: Generate doxygen PostScript documentation. # doxygen-pdf: Generate doxygen PDF documentation. # # Note that by default these are not integrated into the automake goals. If # doxygen is used to generate man pages, you can achieve this integration by # setting man3_MANS to the list of man pages generated and then adding the # dependency: # # $(man3_MANS): doxygen-doc # # This will cause make to run doxygen and generate all the documentation. # # The following variable is intended for use in Makefile.am: # # DX_CLEANFILES = everything to clean. # # This is usually added to MOSTLYCLEANFILES. VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/doxygen.am $(srcdir)/xmltooling.spec.in \ $(top_srcdir)/build-aux/config.guess \ $(top_srcdir)/build-aux/config.sub \ $(top_srcdir)/build-aux/install-sh \ $(top_srcdir)/build-aux/ltmain.sh \ $(top_srcdir)/build-aux/missing $(top_srcdir)/configure \ build-aux/config.guess build-aux/config.sub build-aux/depcomp \ build-aux/install-sh build-aux/ltmain.sh build-aux/missing subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ $(top_srcdir)/m4/boost.m4 $(top_srcdir)/m4/doxygen.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h $(top_builddir)/xmltooling/config_pub.h CONFIG_CLEAN_FILES = xmltooling.spec CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ cscope distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_ROOT = @BOOST_ROOT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTFLAGS = @CXXTESTFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOG4CPP_CONFIG = @LOG4CPP_CONFIG@ LOG4SHIB_CONFIG = @LOG4SHIB_CONFIG@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLSEC_LIBS = @XMLSEC_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_libdir = @pkgconfig_libdir@ pkgconfig_libfile = @pkgconfig_libfile@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign ACLOCAL_AMFLAGS = -I m4 @DX_COND_doc_TRUE@@DX_COND_html_TRUE@DX_CLEAN_HTML = @DX_DOCDIR@/html @DX_COND_chm_TRUE@@DX_COND_doc_TRUE@DX_CLEAN_CHM = @DX_DOCDIR@/chm @DX_COND_chi_TRUE@@DX_COND_chm_TRUE@@DX_COND_doc_TRUE@DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi @DX_COND_doc_TRUE@@DX_COND_man_TRUE@DX_CLEAN_MAN = @DX_DOCDIR@/man @DX_COND_doc_TRUE@@DX_COND_rtf_TRUE@DX_CLEAN_RTF = @DX_DOCDIR@/rtf @DX_COND_doc_TRUE@@DX_COND_xml_TRUE@DX_CLEAN_XML = @DX_DOCDIR@/xml @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@DX_PS_GOAL = doxygen-ps @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@DX_PDF_GOAL = doxygen-pdf @DX_COND_doc_TRUE@@DX_COND_latex_TRUE@DX_CLEAN_LATEX = @DX_DOCDIR@/latex @DX_COND_doc_TRUE@DX_CLEANFILES = \ @DX_COND_doc_TRUE@ @DX_DOCDIR@/@PACKAGE@.tag \ @DX_COND_doc_TRUE@ -r \ @DX_COND_doc_TRUE@ $(DX_CLEAN_HTML) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_CHM) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_CHI) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_MAN) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_RTF) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_XML) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_PS) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_PDF) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_LATEX) MOSTLYCLEANFILES = $(DX_CLEANFILES) DISTCLEANFILES = \ @PACKAGE_NAME@.pc \ @PACKAGE_NAME@.pc.in \ @PACKAGE_NAME@-uninstalled.pc \ @PACKAGE_NAME@-uninstalled.sh SUBDIRS = doc schemas @PACKAGE_NAME@ xmltoolingtest pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = @PACKAGE_NAME@.pc GENFILES = @PACKAGE_NAME@.spec EXTRA_DIST = $(DX_CONFIG) \ cpp-@PACKAGE_NAME@.sln \ config_win32.h \ $(GENFILES) \ $(GENFILES:%=%.in) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/doxygen.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(srcdir)/doxygen.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then rm -f stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 xmltooling.spec: $(top_builddir)/config.status $(srcdir)/xmltooling.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done cscopelist-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist-recursive cscopelist cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) config.h all-local installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-pkgconfigDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ cscopelist-recursive ctags-recursive install-am install-strip \ tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am all-local am--refresh check check-am clean \ clean-cscope clean-generic clean-libtool cscope cscopelist \ cscopelist-recursive ctags ctags-recursive dist dist-all \ dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ dist-xz \ dist-zip distcheck distclean distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgconfigDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-pkgconfigDATA @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@@DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ cd @DX_DOCDIR@/latex; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(DX_LATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(MAKEINDEX_PATH) refman.idx; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(DX_LATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ countdown=5; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ refman.log > /dev/null 2>&1 \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ && test $$countdown -gt 0; do \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(DX_LATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ countdown=`expr $$countdown - 1`; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ done; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@@DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ cd @DX_DOCDIR@/latex; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ $(DX_PDFLATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ $(DX_MAKEINDEX) refman.idx; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ $(DX_PDFLATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ countdown=5; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ refman.log > /dev/null 2>&1 \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ && test $$countdown -gt 0; do \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ $(DX_PDFLATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ countdown=`expr $$countdown - 1`; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ done; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ mv refman.pdf ../@PACKAGE@.pdf @DX_COND_doc_TRUE@.PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL) @DX_COND_doc_TRUE@.INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) @DX_COND_doc_TRUE@doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag @DX_COND_doc_TRUE@doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) @DX_COND_doc_TRUE@@DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS) @DX_COND_doc_TRUE@ rm -rf @DX_DOCDIR@ @DX_COND_doc_TRUE@ $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG) @DX_COND_doc_TRUE@all-local: doxygen-doc @DX_COND_doc_FALSE@all-local: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xmltooling-1.5.3/config.h.in000644 001751 001751 00000012765 12147443211 017137 0ustar00scantorscantor000000 000000 /* config.h.in. Generated from configure.ac by autoheader. */ /* Defined if the requested minimum BOOST version is satisfied */ #undef HAVE_BOOST /* Define to 1 if you have */ #undef HAVE_BOOST_ALGORITHM_STRING_HPP /* Define to 1 if you have */ #undef HAVE_BOOST_BIND_HPP /* Define to 1 if you have */ #undef HAVE_BOOST_CAST_HPP /* Define to 1 if you have */ #undef HAVE_BOOST_LAMBDA_LAMBDA_HPP /* Define to 1 if you have */ #undef HAVE_BOOST_LEXICAL_CAST_HPP /* Define to 1 if you have */ #undef HAVE_BOOST_PTR_CONTAINER_PTR_VECTOR_HPP /* Define to 1 if you have */ #undef HAVE_BOOST_SCOPED_PTR_HPP /* Define to 1 if you have */ #undef HAVE_BOOST_SHARED_PTR_HPP /* Define to 1 if you have */ #undef HAVE_BOOST_TOKENIZER_HPP /* Define to 1 if C++ compiler supports covariant virtual methods. */ #undef HAVE_COVARIANT_RETURNS /* Define to 1 if you have the 'curl_off_t' type. */ #undef HAVE_CURL_OFF_T /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the `gmtime_r' function. */ #undef HAVE_GMTIME_R /* Define to 1 if you have an STL implementation that supports useful string specialization. */ #undef HAVE_GOOD_STL /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have an STL implementation that supports std::iterator_traits. */ #undef HAVE_ITERATOR_TRAITS /* Define to 1 if you have the `dl' library (-ldl). */ #undef HAVE_LIBDL /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* define if the compiler implements namespaces */ #undef HAVE_NAMESPACES /* Define to 1 if C++ compiler supports nullptr keyword. */ #undef HAVE_NULLPTR /* Define if you have POSIX threads libraries and header files. */ #undef HAVE_PTHREAD /* Define to 1 if you have the `pthread_rwlock_init' function. */ #undef HAVE_PTHREAD_RWLOCK_INIT /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the `timegm' function. */ #undef HAVE_TIMEGM /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the 'xsecsize_t' type. */ #undef HAVE_XSECSIZE_T /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to necessary symbol if this constant uses a non-standard name on your system. */ #undef PTHREAD_CREATE_JOINABLE /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to 1 if log4cpp library is used. */ #undef XMLTOOLING_LOG4CPP /* Define to 1 if log4shib library is used. */ #undef XMLTOOLING_LOG4SHIB /* Define to 1 if you wish to disable XML-Security-dependent features. */ #undef XMLTOOLING_NO_XMLSEC /* Define to 1 if OpenSSL has EC support. */ #undef XMLTOOLING_OPENSSL_HAVE_EC /* Define to 1 if OpenSSL supports the SHA-2 hash family. */ #undef XMLTOOLING_OPENSSL_HAVE_SHA2 /* Define to 1 if Xerces has a 64-bit-safe API. */ #undef XMLTOOLING_XERCESC_64BITSAFE /* Define to 1 if Xerces DOM ID methods take extra parameter. */ #undef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE /* Define to 1 if Xerces supports a compliant DOMLS API. */ #undef XMLTOOLING_XERCESC_COMPLIANT_DOMLS /* Define to 1 if Xerces XMLString includes XMLByte release. */ #undef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE /* Define to 1 if Xerces InputStream class requires getContentType. */ #undef XMLTOOLING_XERCESC_INPUTSTREAM_HAS_CONTENTTYPE /* Define to 1 if XML-Security-C includes C14N 1.1 support. */ #undef XMLTOOLING_XMLSEC_C14N11 /* Define to 1 if XML-Security-C includes debug logging support. */ #undef XMLTOOLING_XMLSEC_DEBUGLOGGING /* Define to 1 if XML-Security-C includes ECC support. */ #undef XMLTOOLING_XMLSEC_ECC /* Define to 1 if XML-Security-C handles multiple CRLs. */ #undef XMLTOOLING_XMLSEC_MULTIPLECRL /* Define to 1 if XML-Security-C exposes the signature algorithm URI. */ #undef XMLTOOLING_XMLSEC_SIGALGORITHM /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `unsigned int' if does not define. */ #undef size_t xmltooling-1.5.3/doxygen.am000644 001751 001751 00000011175 12003305016 017071 0ustar00scantorscantor000000 000000 # Copyright (C) 2004 Oren Ben-Kiki # This file is distributed under the same terms as the Automake macro files. # Generate automatic documentation using Doxygen. Goals and variables values # are controlled by the various DX_COND_??? conditionals set by autoconf. # # The provided goals are: # doxygen-doc: Generate all doxygen documentation. # doxygen-run: Run doxygen, which will generate some of the documentation # (HTML, CHM, CHI, MAN, RTF, XML) but will not do the post # processing required for the rest of it (PS, PDF, and some MAN). # doxygen-man: Rename some doxygen generated man pages. # doxygen-ps: Generate doxygen PostScript documentation. # doxygen-pdf: Generate doxygen PDF documentation. # # Note that by default these are not integrated into the automake goals. If # doxygen is used to generate man pages, you can achieve this integration by # setting man3_MANS to the list of man pages generated and then adding the # dependency: # # $(man3_MANS): doxygen-doc # # This will cause make to run doxygen and generate all the documentation. # # The following variable is intended for use in Makefile.am: # # DX_CLEANFILES = everything to clean. # # This is usually added to MOSTLYCLEANFILES. ## --------------------------------- ## ## Format-independent Doxygen rules. ## ## --------------------------------- ## if DX_COND_doc ## ------------------------------- ## ## Rules specific for HTML output. ## ## ------------------------------- ## if DX_COND_html DX_CLEAN_HTML = @DX_DOCDIR@/html endif DX_COND_html ## ------------------------------ ## ## Rules specific for CHM output. ## ## ------------------------------ ## if DX_COND_chm DX_CLEAN_CHM = @DX_DOCDIR@/chm if DX_COND_chi DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi endif DX_COND_chi endif DX_COND_chm ## ------------------------------ ## ## Rules specific for MAN output. ## ## ------------------------------ ## if DX_COND_man DX_CLEAN_MAN = @DX_DOCDIR@/man endif DX_COND_man ## ------------------------------ ## ## Rules specific for RTF output. ## ## ------------------------------ ## if DX_COND_rtf DX_CLEAN_RTF = @DX_DOCDIR@/rtf endif DX_COND_rtf ## ------------------------------ ## ## Rules specific for XML output. ## ## ------------------------------ ## if DX_COND_xml DX_CLEAN_XML = @DX_DOCDIR@/xml endif DX_COND_xml ## ----------------------------- ## ## Rules specific for PS output. ## ## ----------------------------- ## if DX_COND_ps DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps DX_PS_GOAL = doxygen-ps doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps @DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag cd @DX_DOCDIR@/latex; \ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ $(DX_LATEX) refman.tex; \ $(MAKEINDEX_PATH) refman.idx; \ $(DX_LATEX) refman.tex; \ countdown=5; \ while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ refman.log > /dev/null 2>&1 \ && test $$countdown -gt 0; do \ $(DX_LATEX) refman.tex; \ countdown=`expr $$countdown - 1`; \ done; \ $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi endif DX_COND_ps ## ------------------------------ ## ## Rules specific for PDF output. ## ## ------------------------------ ## if DX_COND_pdf DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf DX_PDF_GOAL = doxygen-pdf doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf @DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag cd @DX_DOCDIR@/latex; \ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ $(DX_PDFLATEX) refman.tex; \ $(DX_MAKEINDEX) refman.idx; \ $(DX_PDFLATEX) refman.tex; \ countdown=5; \ while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ refman.log > /dev/null 2>&1 \ && test $$countdown -gt 0; do \ $(DX_PDFLATEX) refman.tex; \ countdown=`expr $$countdown - 1`; \ done; \ mv refman.pdf ../@PACKAGE@.pdf endif DX_COND_pdf ## ------------------------------------------------- ## ## Rules specific for LaTeX (shared for PS and PDF). ## ## ------------------------------------------------- ## if DX_COND_latex DX_CLEAN_LATEX = @DX_DOCDIR@/latex endif DX_COND_latex .PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL) .INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) @DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS) rm -rf @DX_DOCDIR@ $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG) DX_CLEANFILES = \ @DX_DOCDIR@/@PACKAGE@.tag \ -r \ $(DX_CLEAN_HTML) \ $(DX_CLEAN_CHM) \ $(DX_CLEAN_CHI) \ $(DX_CLEAN_MAN) \ $(DX_CLEAN_RTF) \ $(DX_CLEAN_XML) \ $(DX_CLEAN_PS) \ $(DX_CLEAN_PDF) \ $(DX_CLEAN_LATEX) endif DX_COND_doc xmltooling-1.5.3/xmltooling.spec.in000644 001751 001751 00000014353 12003660337 020565 0ustar00scantorscantor000000 000000 Name: @PACKAGE_NAME@ Version: @PACKAGE_VERSION@ Release: 1 Summary: OpenSAML XMLTooling library Group: Development/Libraries/C and C++ Vendor: Shibboleth Consortium License: Apache 2.0 URL: http://www.opensaml.org/ Source: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root %if 0%{?suse_version} > 1030 && 0%{?suse_version} < 1130 BuildRequires: libXerces-c-devel >= 2.8.0 %else BuildRequires: libxerces-c-devel >= 2.8.0 %endif BuildRequires: libxml-security-c-devel >= 1.4.0 %{?_with_log4cpp:BuildRequires: liblog4cpp-devel >= 1.0} %{!?_with_log4cpp:BuildRequires: liblog4shib-devel >= 1.0.4} BuildRequires: gcc-c++, openssl-devel, boost-devel >= 1.32.0 %if 0%{?rhel} >= 6 || 0%{?centos_version} >= 600 BuildRequires: libcurl-openssl-devel >= 7.21.7 Requires: libcurl-openssl >= 7.21.7 %else BuildRequires: curl-devel >= 7.10.6 %endif %if 0%{?suse_version} > 1000 BuildRequires: pkg-config %endif %{!?_without_doxygen:BuildRequires: doxygen} %if "%{_vendor}" == "redhat" BuildRequires: redhat-rpm-config %endif %if "%{_vendor}" == "suse" %define pkgdocdir %{_docdir}/%{name} %else %define pkgdocdir %{_docdir}/%{name}-%{version} %endif # Prevent the RH6 package from requiring a vanilla libcurl. %if 0%{?rhel} >= 6 || 0%{?centos_version} >= 600 %filter_from_requires /libcurl\.so\..*/d %filter_setup %endif %description The XMLTooling library contains generic XML parsing and processing classes based on the Xerces-C DOM. It adds more powerful facilities for declaring element- and type-specific API and implementation classes to add value around the DOM, as well as signing and encryption support. %package -n lib@PACKAGE_NAME@6 Summary: OpenSAML XMLTooling library Group: Development/Libraries/C and C++ Provides: @PACKAGE_NAME@ = %{version}-%{release} Obsoletes: @PACKAGE_NAME@ < %{version}-%{release} %if 0%{?rhel} >= 6 || 0%{?centos_version} >= 600 Requires: libcurl-openssl >= 7.21.7 %endif %description -n lib@PACKAGE_NAME@6 The XMLTooling library contains generic XML parsing and processing classes based on the Xerces-C DOM. It adds more powerful facilities for declaring element- and type-specific API and implementation classes to add value around the DOM, as well as signing and encryption support. This package contains just the shared library. %package -n lib@PACKAGE_NAME@-devel Summary: XMLTooling development Headers Group: Development/Libraries/C and C++ Requires: lib@PACKAGE_NAME@6 = %{version}-%{release} Provides: @PACKAGE_NAME@-devel = %{version}-%{release} Obsoletes: @PACKAGE_NAME@-devel < %{version}-%{release} %if 0%{?suse_version} > 1030 && 0%{?suse_version} < 1130 Requires: libXerces-c-devel >= 2.8.0 %else Requires: libxerces-c-devel >= 2.8.0 %endif Requires: libxml-security-c-devel >= 1.4.0 %{?_with_log4cpp:Requires: liblog4cpp-devel >= 1.0} %{!?_with_log4cpp:Requires: liblog4shib-devel >= 1.0.4} Requires: openssl-devel, boost-devel >= 1.32.0 %if 0%{?rhel} >= 6 || 0%{?centos_version} >= 600 Requires: libcurl-openssl-devel >= 7.21.7 %else Requires: curl-devel >= 7.10.6 %endif %description -n lib@PACKAGE_NAME@-devel The XMLTooling library contains generic XML parsing and processing classes based on the Xerces-C DOM. It adds more powerful facilities for declaring element- and type-specific API and implementation classes to add value around the DOM, as well as signing and encryption support. This package includes files needed for development with XMLTooling. %package -n @PACKAGE_NAME@-schemas Summary: XMLTooling schemas and catalog Group: Development/Libraries/C and C++ %description -n @PACKAGE_NAME@-schemas The XMLTooling library contains generic XML parsing and processing classes based on the Xerces-C DOM. It adds more powerful facilities for declaring element- and type-specific API and implementation classes to add value around the DOM, as well as signing and encryption support. This package includes XML schemas and related files. %prep %setup -q %build %if 0%{?rhel} >= 6 || 0%{?centos_version} >= 600 %configure %{?@PACKAGE_NAME@_options} --with-curl=/opt/shibboleth %else %configure %{?@PACKAGE_NAME@_options} %endif %{__make} %install %{__make} install DESTDIR=$RPM_BUILD_ROOT pkgdocdir=%{pkgdocdir} # Don't package unit tester if present. %{__rm} -f $RPM_BUILD_ROOT/%{_bindir}/@PACKAGE_NAME@test %check %{__make} check %clean [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT %ifnos solaris2.8 solaris2.9 solaris2.10 %post -n lib@PACKAGE_NAME@6 -p /sbin/ldconfig %endif %ifnos solaris2.8 solaris2.9 solaris2.10 %postun -n lib@PACKAGE_NAME@6 -p /sbin/ldconfig %endif %files -n lib@PACKAGE_NAME@6 %defattr(-,root,root,-) %{_libdir}/*.so.* %files -n @PACKAGE_NAME@-schemas %defattr(-,root,root,-) %dir %{_datadir}/xml/@PACKAGE_NAME@ %{_datadir}/xml/@PACKAGE_NAME@/* %files -n lib@PACKAGE_NAME@-devel %defattr(-,root,root,-) %{_includedir}/* %{_libdir}/*.so %{_libdir}/pkgconfig/@PACKAGE_NAME@.pc %doc %{pkgdocdir} %changelog * Wed Dec 14 2011 Scott Cantor - 1.5-1 - Update lib package number. - Add boost-devel dependency. * Sun Jun 26 2011 Scott Cantor - 1.4.2-1 - Override curl build for RHEL6. * Tue Oct 26 2010 Scott Cantor - 1.4-1 - Update version - Add pkg-config support. - Sync package names for side by side install. - Adjust Xerces dependency name and Group setting - Split out schemas into separate subpackage * Mon Aug 31 2009 Scott Cantor - 1.3-1 - Bump soname for SUSE packaging. * Thu Aug 6 2009 Scott Cantor - 1.2.1-1 - SuSE conventions - Stop packaging unit tester * Wed Dec 3 2008 Scott Cantor - 1.2-1 - Bumping for minor update. - Fixing SuSE Xerces dependency name. * Tue Jul 1 2008 Scott Cantor - 1.1-1 - Bumping for minor update. * Mon Mar 17 2008 Scott Cantor - 1.0-6 - Official release. * Fri Jan 18 2008 Scott Cantor - 1.0-5 - Release candidate 1. * Thu Nov 08 2007 Scott Cantor - 1.0-4 - Second public beta. * Thu Aug 16 2007 Scott Cantor - 1.0-3 - First public beta. * Fri Jul 13 2007 Scott Cantor - 1.0-2 - Second alpha. * Wed Apr 12 2006 Scott Cantor - 1.0-1 - First SPEC file based on various versions in existence. xmltooling-1.5.3/configure000755 001751 001751 00002530753 12147443211 017027 0ustar00scantorscantor000000 000000 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for xmltooling 1.5.3. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: https://issues.shibboleth.net/ about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='xmltooling' PACKAGE_TARNAME='xmltooling' PACKAGE_VERSION='1.5.3' PACKAGE_STRING='xmltooling 1.5.3' PACKAGE_BUGREPORT='https://issues.shibboleth.net/' PACKAGE_URL='' ac_unique_file="xmltooling" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS pkgconfig_libfile pkgconfig_libdir BUILD_UNITTEST_FALSE BUILD_UNITTEST_TRUE CXXTESTFLAGS CXXTEST BUILD_XMLSEC_FALSE BUILD_XMLSEC_TRUE XMLSEC_LIBS CURL_CONFIG PKG_CONFIG LOG4CPP_CONFIG LOG4SHIB_CONFIG BOOST_CPPFLAGS DISTCHECK_CONFIGURE_FLAGS BOOST_ROOT BUILD_PTHREAD_FALSE BUILD_PTHREAD_TRUE PTHREAD_CFLAGS PTHREAD_LIBS PTHREAD_CC acx_pthread_config CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX DOXYGEN_PAPER_SIZE DX_COND_latex_FALSE DX_COND_latex_TRUE DX_COND_pdf_FALSE DX_COND_pdf_TRUE DX_PDFLATEX DX_FLAG_pdf DX_COND_ps_FALSE DX_COND_ps_TRUE DX_EGREP DX_DVIPS DX_MAKEINDEX DX_LATEX DX_FLAG_ps DX_COND_html_FALSE DX_COND_html_TRUE DX_FLAG_html DX_COND_chi_FALSE DX_COND_chi_TRUE DX_FLAG_chi DX_COND_chm_FALSE DX_COND_chm_TRUE DX_HHC DX_FLAG_chm DX_COND_xml_FALSE DX_COND_xml_TRUE DX_FLAG_xml DX_COND_rtf_FALSE DX_COND_rtf_TRUE DX_FLAG_rtf DX_COND_man_FALSE DX_COND_man_TRUE DX_FLAG_man DX_COND_dot_FALSE DX_COND_dot_TRUE DX_DOT DX_FLAG_dot DX_COND_doc_FALSE DX_COND_doc_TRUE DX_PERL DX_DOXYGEN DX_FLAG_doc DX_ENV DX_DOCDIR DX_CONFIG DX_PROJECT CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_static enable_shared with_pic enable_fast_install enable_dependency_tracking with_gnu_ld with_sysroot enable_libtool_lock enable_doxygen_doc enable_doxygen_dot enable_doxygen_man enable_doxygen_rtf enable_doxygen_xml enable_doxygen_chm enable_doxygen_chi enable_doxygen_html enable_doxygen_ps enable_doxygen_pdf enable_debug with_boost with_log4shib with_log4cpp with_xerces with_xmlsec with_openssl with_curl with_cxxtest ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP DOXYGEN_PAPER_SIZE CXX CXXFLAGS CCC CXXCPP BOOST_ROOT' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures xmltooling 1.5.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/xmltooling] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of xmltooling 1.5.3:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-libtool-lock avoid locking (might break parallel builds) --disable-doxygen-doc don't generate any doxygen documentation --enable-doxygen-dot generate graphics for doxygen documentation --enable-doxygen-man generate doxygen manual pages --enable-doxygen-rtf generate doxygen RTF documentation --enable-doxygen-xml generate doxygen XML documentation --enable-doxygen-chm generate doxygen compressed HTML help documentation --enable-doxygen-chi generate doxygen seperate compressed HTML help index file --disable-doxygen-html don't generate doxygen plain HTML documentation --enable-doxygen-ps generate doxygen PostScript documentation --enable-doxygen-pdf generate doxygen PDF documentation --enable-debug Have GCC compile with symbols (Default = no) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-boost=DIR prefix of Boost [guess] --with-log4shib=PATH where log4shib-config is installed --with-log4cpp=PATH where log4cpp-config is installed --with-xerces=PATH where xerces-c is installed --with-xmlsec=PATH where xmlsec is installed --with-openssl=PATH where openssl is installed --with-curl=PATH where curl-config is installed --with-cxxtest=PATH where cxxtest is installed Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor DOXYGEN_PAPER_SIZE a4wide (default), a4, letter, legal or executive CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor BOOST_ROOT Location of Boost installation Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF xmltooling configure 1.5.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## --------------------------------------------- ## ## Report this to https://issues.shibboleth.net/ ## ## --------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## --------------------------------------------- ## ## Report this to https://issues.shibboleth.net/ ## ## --------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_mongrel # ac_fn_cxx_check_decl LINENO SYMBOL VAR INCLUDES # ----------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_cxx_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_decl # ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES # --------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_cxx_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by xmltooling $as_me 1.5.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in build-aux "$srcdir"/build-aux; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.12' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='xmltooling' VERSION='1.5.3' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=no fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: # Docygen features # Files: DX_PROJECT=xmltooling DX_CONFIG=doxygen.cfg DX_DOCDIR=doc/api # Environment variables used inside doxygen.cfg: DX_ENV="$DX_ENV SRCDIR='$srcdir'" DX_ENV="$DX_ENV PROJECT='$DX_PROJECT'" DX_ENV="$DX_ENV DOCDIR='$DX_DOCDIR'" DX_ENV="$DX_ENV VERSION='$PACKAGE_VERSION'" # Doxygen itself: # Check whether --enable-doxygen-doc was given. if test "${enable_doxygen_doc+set}" = set; then : enableval=$enable_doxygen_doc; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_doc=1 ;; #( n|N|no|No|NO) DX_FLAG_doc=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-doc" "$LINENO" 5 ;; esac else DX_FLAG_doc=1 fi if test "$DX_FLAG_doc" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}doxygen", so it can be a program name with args. set dummy ${ac_tool_prefix}doxygen; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_DOXYGEN+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_DX_DOXYGEN="$DX_DOXYGEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_DOXYGEN=$ac_cv_path_DX_DOXYGEN if test -n "$DX_DOXYGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_DOXYGEN" >&5 $as_echo "$DX_DOXYGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_DOXYGEN"; then ac_pt_DX_DOXYGEN=$DX_DOXYGEN # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_DOXYGEN+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_DOXYGEN="$ac_pt_DX_DOXYGEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_DOXYGEN=$ac_cv_path_ac_pt_DX_DOXYGEN if test -n "$ac_pt_DX_DOXYGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_DOXYGEN" >&5 $as_echo "$ac_pt_DX_DOXYGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_DOXYGEN" = x; then DX_DOXYGEN="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_DOXYGEN=$ac_pt_DX_DOXYGEN fi else DX_DOXYGEN="$ac_cv_path_DX_DOXYGEN" fi if test "$DX_FLAG_doc$DX_DOXYGEN" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: doxygen not found - will not generate any doxygen documentation" >&5 $as_echo "$as_me: WARNING: doxygen not found - will not generate any doxygen documentation" >&2;} DX_FLAG_doc=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}perl", so it can be a program name with args. set dummy ${ac_tool_prefix}perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_PERL+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_PERL in [\\/]* | ?:[\\/]*) ac_cv_path_DX_PERL="$DX_PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_PERL=$ac_cv_path_DX_PERL if test -n "$DX_PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_PERL" >&5 $as_echo "$DX_PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_PERL"; then ac_pt_DX_PERL=$DX_PERL # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_PERL+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_PERL in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_PERL="$ac_pt_DX_PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_PERL=$ac_cv_path_ac_pt_DX_PERL if test -n "$ac_pt_DX_PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_PERL" >&5 $as_echo "$ac_pt_DX_PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_PERL" = x; then DX_PERL="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_PERL=$ac_pt_DX_PERL fi else DX_PERL="$ac_cv_path_DX_PERL" fi if test "$DX_FLAG_doc$DX_PERL" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: perl not found - will not generate any doxygen documentation" >&5 $as_echo "$as_me: WARNING: perl not found - will not generate any doxygen documentation" >&2;} DX_FLAG_doc=0 fi : fi if test "$DX_FLAG_doc" = 1; then if :; then DX_COND_doc_TRUE= DX_COND_doc_FALSE='#' else DX_COND_doc_TRUE='#' DX_COND_doc_FALSE= fi DX_ENV="$DX_ENV PERL_PATH='$DX_PERL'" : else if false; then DX_COND_doc_TRUE= DX_COND_doc_FALSE='#' else DX_COND_doc_TRUE='#' DX_COND_doc_FALSE= fi : fi # Dot for graphics: # Check whether --enable-doxygen-dot was given. if test "${enable_doxygen_dot+set}" = set; then : enableval=$enable_doxygen_dot; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_dot=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-dot requires doxygen-dot" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_dot=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-dot" "$LINENO" 5 ;; esac else DX_FLAG_dot=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_dot=0 fi if test "$DX_FLAG_dot" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dot", so it can be a program name with args. set dummy ${ac_tool_prefix}dot; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_DOT+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_DOT in [\\/]* | ?:[\\/]*) ac_cv_path_DX_DOT="$DX_DOT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_DOT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_DOT=$ac_cv_path_DX_DOT if test -n "$DX_DOT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_DOT" >&5 $as_echo "$DX_DOT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_DOT"; then ac_pt_DX_DOT=$DX_DOT # Extract the first word of "dot", so it can be a program name with args. set dummy dot; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_DOT+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_DOT in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_DOT="$ac_pt_DX_DOT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_DOT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_DOT=$ac_cv_path_ac_pt_DX_DOT if test -n "$ac_pt_DX_DOT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_DOT" >&5 $as_echo "$ac_pt_DX_DOT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_DOT" = x; then DX_DOT="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_DOT=$ac_pt_DX_DOT fi else DX_DOT="$ac_cv_path_DX_DOT" fi if test "$DX_FLAG_dot$DX_DOT" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dot not found - will not generate graphics for doxygen documentation" >&5 $as_echo "$as_me: WARNING: dot not found - will not generate graphics for doxygen documentation" >&2;} DX_FLAG_dot=0 fi : fi if test "$DX_FLAG_dot" = 1; then if :; then DX_COND_dot_TRUE= DX_COND_dot_FALSE='#' else DX_COND_dot_TRUE='#' DX_COND_dot_FALSE= fi DX_ENV="$DX_ENV HAVE_DOT='YES'" DX_ENV="$DX_ENV DOT_PATH='`expr ".$DX_DOT" : '\(\.\)[^/]*$' \| "x$DX_DOT" : 'x\(.*\)/[^/]*$'`'" : else if false; then DX_COND_dot_TRUE= DX_COND_dot_FALSE='#' else DX_COND_dot_TRUE='#' DX_COND_dot_FALSE= fi DX_ENV="$DX_ENV HAVE_DOT='NO'" : fi # Man pages generation: # Check whether --enable-doxygen-man was given. if test "${enable_doxygen_man+set}" = set; then : enableval=$enable_doxygen_man; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_man=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-man requires doxygen-man" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_man=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-man" "$LINENO" 5 ;; esac else DX_FLAG_man=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_man=0 fi if test "$DX_FLAG_man" = 1; then : fi if test "$DX_FLAG_man" = 1; then if :; then DX_COND_man_TRUE= DX_COND_man_FALSE='#' else DX_COND_man_TRUE='#' DX_COND_man_FALSE= fi DX_ENV="$DX_ENV GENERATE_MAN='YES'" : else if false; then DX_COND_man_TRUE= DX_COND_man_FALSE='#' else DX_COND_man_TRUE='#' DX_COND_man_FALSE= fi DX_ENV="$DX_ENV GENERATE_MAN='NO'" : fi # RTF file generation: # Check whether --enable-doxygen-rtf was given. if test "${enable_doxygen_rtf+set}" = set; then : enableval=$enable_doxygen_rtf; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_rtf=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-rtf requires doxygen-rtf" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_rtf=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-rtf" "$LINENO" 5 ;; esac else DX_FLAG_rtf=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_rtf=0 fi if test "$DX_FLAG_rtf" = 1; then : fi if test "$DX_FLAG_rtf" = 1; then if :; then DX_COND_rtf_TRUE= DX_COND_rtf_FALSE='#' else DX_COND_rtf_TRUE='#' DX_COND_rtf_FALSE= fi DX_ENV="$DX_ENV GENERATE_RTF='YES'" : else if false; then DX_COND_rtf_TRUE= DX_COND_rtf_FALSE='#' else DX_COND_rtf_TRUE='#' DX_COND_rtf_FALSE= fi DX_ENV="$DX_ENV GENERATE_RTF='NO'" : fi # XML file generation: # Check whether --enable-doxygen-xml was given. if test "${enable_doxygen_xml+set}" = set; then : enableval=$enable_doxygen_xml; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_xml=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-xml requires doxygen-xml" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_xml=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-xml" "$LINENO" 5 ;; esac else DX_FLAG_xml=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_xml=0 fi if test "$DX_FLAG_xml" = 1; then : fi if test "$DX_FLAG_xml" = 1; then if :; then DX_COND_xml_TRUE= DX_COND_xml_FALSE='#' else DX_COND_xml_TRUE='#' DX_COND_xml_FALSE= fi DX_ENV="$DX_ENV GENERATE_XML='YES'" : else if false; then DX_COND_xml_TRUE= DX_COND_xml_FALSE='#' else DX_COND_xml_TRUE='#' DX_COND_xml_FALSE= fi DX_ENV="$DX_ENV GENERATE_XML='NO'" : fi # (Compressed) HTML help generation: # Check whether --enable-doxygen-chm was given. if test "${enable_doxygen_chm+set}" = set; then : enableval=$enable_doxygen_chm; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_chm=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-chm requires doxygen-chm" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_chm=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-chm" "$LINENO" 5 ;; esac else DX_FLAG_chm=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_chm=0 fi if test "$DX_FLAG_chm" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}hhc", so it can be a program name with args. set dummy ${ac_tool_prefix}hhc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_HHC+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_HHC in [\\/]* | ?:[\\/]*) ac_cv_path_DX_HHC="$DX_HHC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_HHC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_HHC=$ac_cv_path_DX_HHC if test -n "$DX_HHC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_HHC" >&5 $as_echo "$DX_HHC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_HHC"; then ac_pt_DX_HHC=$DX_HHC # Extract the first word of "hhc", so it can be a program name with args. set dummy hhc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_HHC+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_HHC in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_HHC="$ac_pt_DX_HHC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_HHC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_HHC=$ac_cv_path_ac_pt_DX_HHC if test -n "$ac_pt_DX_HHC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_HHC" >&5 $as_echo "$ac_pt_DX_HHC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_HHC" = x; then DX_HHC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_HHC=$ac_pt_DX_HHC fi else DX_HHC="$ac_cv_path_DX_HHC" fi if test "$DX_FLAG_chm$DX_HHC" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: hhc not found - will not generate doxygen compressed HTML help documentation" >&5 $as_echo "$as_me: WARNING: hhc not found - will not generate doxygen compressed HTML help documentation" >&2;} DX_FLAG_chm=0 fi : fi if test "$DX_FLAG_chm" = 1; then if :; then DX_COND_chm_TRUE= DX_COND_chm_FALSE='#' else DX_COND_chm_TRUE='#' DX_COND_chm_FALSE= fi DX_ENV="$DX_ENV HHC_PATH='$DX_HHC'" DX_ENV="$DX_ENV GENERATE_HTML='YES'" DX_ENV="$DX_ENV GENERATE_HTMLHELP='YES'" : else if false; then DX_COND_chm_TRUE= DX_COND_chm_FALSE='#' else DX_COND_chm_TRUE='#' DX_COND_chm_FALSE= fi DX_ENV="$DX_ENV GENERATE_HTMLHELP='NO'" : fi # Seperate CHI file generation. # Check whether --enable-doxygen-chi was given. if test "${enable_doxygen_chi+set}" = set; then : enableval=$enable_doxygen_chi; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_chi=1 test "$DX_FLAG_chm" = "1" \ || as_fn_error $? "doxygen-chi requires doxygen-chi" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_chi=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-chi" "$LINENO" 5 ;; esac else DX_FLAG_chi=0 test "$DX_FLAG_chm" = "1" || DX_FLAG_chi=0 fi if test "$DX_FLAG_chi" = 1; then : fi if test "$DX_FLAG_chi" = 1; then if :; then DX_COND_chi_TRUE= DX_COND_chi_FALSE='#' else DX_COND_chi_TRUE='#' DX_COND_chi_FALSE= fi DX_ENV="$DX_ENV GENERATE_CHI='YES'" : else if false; then DX_COND_chi_TRUE= DX_COND_chi_FALSE='#' else DX_COND_chi_TRUE='#' DX_COND_chi_FALSE= fi DX_ENV="$DX_ENV GENERATE_CHI='NO'" : fi # Plain HTML pages generation: # Check whether --enable-doxygen-html was given. if test "${enable_doxygen_html+set}" = set; then : enableval=$enable_doxygen_html; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_html=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-html requires doxygen-html" "$LINENO" 5 test "$DX_FLAG_chm" = "0" \ || as_fn_error $? "doxygen-html contradicts doxygen-html" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_html=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-html" "$LINENO" 5 ;; esac else DX_FLAG_html=1 test "$DX_FLAG_doc" = "1" || DX_FLAG_html=0 test "$DX_FLAG_chm" = "0" || DX_FLAG_html=0 fi if test "$DX_FLAG_html" = 1; then : fi if test "$DX_FLAG_html" = 1; then if :; then DX_COND_html_TRUE= DX_COND_html_FALSE='#' else DX_COND_html_TRUE='#' DX_COND_html_FALSE= fi DX_ENV="$DX_ENV GENERATE_HTML='YES'" : else if false; then DX_COND_html_TRUE= DX_COND_html_FALSE='#' else DX_COND_html_TRUE='#' DX_COND_html_FALSE= fi test "$DX_FLAG_chm" = 1 || DX_ENV="$DX_ENV GENERATE_HTML='NO'" : fi # PostScript file generation: # Check whether --enable-doxygen-ps was given. if test "${enable_doxygen_ps+set}" = set; then : enableval=$enable_doxygen_ps; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_ps=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-ps requires doxygen-ps" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_ps=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-ps" "$LINENO" 5 ;; esac else DX_FLAG_ps=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_ps=0 fi if test "$DX_FLAG_ps" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}latex", so it can be a program name with args. set dummy ${ac_tool_prefix}latex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_LATEX+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_LATEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_LATEX="$DX_LATEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_LATEX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_LATEX=$ac_cv_path_DX_LATEX if test -n "$DX_LATEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_LATEX" >&5 $as_echo "$DX_LATEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_LATEX"; then ac_pt_DX_LATEX=$DX_LATEX # Extract the first word of "latex", so it can be a program name with args. set dummy latex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_LATEX+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_LATEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_LATEX="$ac_pt_DX_LATEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_LATEX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_LATEX=$ac_cv_path_ac_pt_DX_LATEX if test -n "$ac_pt_DX_LATEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_LATEX" >&5 $as_echo "$ac_pt_DX_LATEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_LATEX" = x; then DX_LATEX="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_LATEX=$ac_pt_DX_LATEX fi else DX_LATEX="$ac_cv_path_DX_LATEX" fi if test "$DX_FLAG_ps$DX_LATEX" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: latex not found - will not generate doxygen PostScript documentation" >&5 $as_echo "$as_me: WARNING: latex not found - will not generate doxygen PostScript documentation" >&2;} DX_FLAG_ps=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}makeindex", so it can be a program name with args. set dummy ${ac_tool_prefix}makeindex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_MAKEINDEX+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_MAKEINDEX="$DX_MAKEINDEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_MAKEINDEX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_MAKEINDEX=$ac_cv_path_DX_MAKEINDEX if test -n "$DX_MAKEINDEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_MAKEINDEX" >&5 $as_echo "$DX_MAKEINDEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_MAKEINDEX"; then ac_pt_DX_MAKEINDEX=$DX_MAKEINDEX # Extract the first word of "makeindex", so it can be a program name with args. set dummy makeindex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_MAKEINDEX+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_MAKEINDEX="$ac_pt_DX_MAKEINDEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_MAKEINDEX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_MAKEINDEX=$ac_cv_path_ac_pt_DX_MAKEINDEX if test -n "$ac_pt_DX_MAKEINDEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_MAKEINDEX" >&5 $as_echo "$ac_pt_DX_MAKEINDEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_MAKEINDEX" = x; then DX_MAKEINDEX="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_MAKEINDEX=$ac_pt_DX_MAKEINDEX fi else DX_MAKEINDEX="$ac_cv_path_DX_MAKEINDEX" fi if test "$DX_FLAG_ps$DX_MAKEINDEX" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: makeindex not found - will not generate doxygen PostScript documentation" >&5 $as_echo "$as_me: WARNING: makeindex not found - will not generate doxygen PostScript documentation" >&2;} DX_FLAG_ps=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dvips", so it can be a program name with args. set dummy ${ac_tool_prefix}dvips; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_DVIPS+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_DVIPS in [\\/]* | ?:[\\/]*) ac_cv_path_DX_DVIPS="$DX_DVIPS" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_DVIPS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_DVIPS=$ac_cv_path_DX_DVIPS if test -n "$DX_DVIPS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_DVIPS" >&5 $as_echo "$DX_DVIPS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_DVIPS"; then ac_pt_DX_DVIPS=$DX_DVIPS # Extract the first word of "dvips", so it can be a program name with args. set dummy dvips; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_DVIPS+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_DVIPS in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_DVIPS="$ac_pt_DX_DVIPS" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_DVIPS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_DVIPS=$ac_cv_path_ac_pt_DX_DVIPS if test -n "$ac_pt_DX_DVIPS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_DVIPS" >&5 $as_echo "$ac_pt_DX_DVIPS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_DVIPS" = x; then DX_DVIPS="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_DVIPS=$ac_pt_DX_DVIPS fi else DX_DVIPS="$ac_cv_path_DX_DVIPS" fi if test "$DX_FLAG_ps$DX_DVIPS" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dvips not found - will not generate doxygen PostScript documentation" >&5 $as_echo "$as_me: WARNING: dvips not found - will not generate doxygen PostScript documentation" >&2;} DX_FLAG_ps=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}egrep", so it can be a program name with args. set dummy ${ac_tool_prefix}egrep; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_DX_EGREP="$DX_EGREP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_EGREP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_EGREP=$ac_cv_path_DX_EGREP if test -n "$DX_EGREP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_EGREP" >&5 $as_echo "$DX_EGREP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_EGREP"; then ac_pt_DX_EGREP=$DX_EGREP # Extract the first word of "egrep", so it can be a program name with args. set dummy egrep; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_EGREP="$ac_pt_DX_EGREP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_EGREP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_EGREP=$ac_cv_path_ac_pt_DX_EGREP if test -n "$ac_pt_DX_EGREP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_EGREP" >&5 $as_echo "$ac_pt_DX_EGREP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_EGREP" = x; then DX_EGREP="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_EGREP=$ac_pt_DX_EGREP fi else DX_EGREP="$ac_cv_path_DX_EGREP" fi if test "$DX_FLAG_ps$DX_EGREP" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: egrep not found - will not generate doxygen PostScript documentation" >&5 $as_echo "$as_me: WARNING: egrep not found - will not generate doxygen PostScript documentation" >&2;} DX_FLAG_ps=0 fi : fi if test "$DX_FLAG_ps" = 1; then if :; then DX_COND_ps_TRUE= DX_COND_ps_FALSE='#' else DX_COND_ps_TRUE='#' DX_COND_ps_FALSE= fi : else if false; then DX_COND_ps_TRUE= DX_COND_ps_FALSE='#' else DX_COND_ps_TRUE='#' DX_COND_ps_FALSE= fi : fi # PDF file generation: # Check whether --enable-doxygen-pdf was given. if test "${enable_doxygen_pdf+set}" = set; then : enableval=$enable_doxygen_pdf; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_pdf=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-pdf requires doxygen-pdf" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_pdf=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-pdf" "$LINENO" 5 ;; esac else DX_FLAG_pdf=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_pdf=0 fi if test "$DX_FLAG_pdf" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pdflatex", so it can be a program name with args. set dummy ${ac_tool_prefix}pdflatex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_PDFLATEX+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_PDFLATEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_PDFLATEX="$DX_PDFLATEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_PDFLATEX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_PDFLATEX=$ac_cv_path_DX_PDFLATEX if test -n "$DX_PDFLATEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_PDFLATEX" >&5 $as_echo "$DX_PDFLATEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_PDFLATEX"; then ac_pt_DX_PDFLATEX=$DX_PDFLATEX # Extract the first word of "pdflatex", so it can be a program name with args. set dummy pdflatex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_PDFLATEX+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_PDFLATEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_PDFLATEX="$ac_pt_DX_PDFLATEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_PDFLATEX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_PDFLATEX=$ac_cv_path_ac_pt_DX_PDFLATEX if test -n "$ac_pt_DX_PDFLATEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_PDFLATEX" >&5 $as_echo "$ac_pt_DX_PDFLATEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_PDFLATEX" = x; then DX_PDFLATEX="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_PDFLATEX=$ac_pt_DX_PDFLATEX fi else DX_PDFLATEX="$ac_cv_path_DX_PDFLATEX" fi if test "$DX_FLAG_pdf$DX_PDFLATEX" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pdflatex not found - will not generate doxygen PDF documentation" >&5 $as_echo "$as_me: WARNING: pdflatex not found - will not generate doxygen PDF documentation" >&2;} DX_FLAG_pdf=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}makeindex", so it can be a program name with args. set dummy ${ac_tool_prefix}makeindex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_MAKEINDEX+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_MAKEINDEX="$DX_MAKEINDEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_MAKEINDEX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_MAKEINDEX=$ac_cv_path_DX_MAKEINDEX if test -n "$DX_MAKEINDEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_MAKEINDEX" >&5 $as_echo "$DX_MAKEINDEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_MAKEINDEX"; then ac_pt_DX_MAKEINDEX=$DX_MAKEINDEX # Extract the first word of "makeindex", so it can be a program name with args. set dummy makeindex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_MAKEINDEX+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_MAKEINDEX="$ac_pt_DX_MAKEINDEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_MAKEINDEX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_MAKEINDEX=$ac_cv_path_ac_pt_DX_MAKEINDEX if test -n "$ac_pt_DX_MAKEINDEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_MAKEINDEX" >&5 $as_echo "$ac_pt_DX_MAKEINDEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_MAKEINDEX" = x; then DX_MAKEINDEX="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_MAKEINDEX=$ac_pt_DX_MAKEINDEX fi else DX_MAKEINDEX="$ac_cv_path_DX_MAKEINDEX" fi if test "$DX_FLAG_pdf$DX_MAKEINDEX" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: makeindex not found - will not generate doxygen PDF documentation" >&5 $as_echo "$as_me: WARNING: makeindex not found - will not generate doxygen PDF documentation" >&2;} DX_FLAG_pdf=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}egrep", so it can be a program name with args. set dummy ${ac_tool_prefix}egrep; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_DX_EGREP="$DX_EGREP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_EGREP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_EGREP=$ac_cv_path_DX_EGREP if test -n "$DX_EGREP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_EGREP" >&5 $as_echo "$DX_EGREP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_EGREP"; then ac_pt_DX_EGREP=$DX_EGREP # Extract the first word of "egrep", so it can be a program name with args. set dummy egrep; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_EGREP="$ac_pt_DX_EGREP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_EGREP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_EGREP=$ac_cv_path_ac_pt_DX_EGREP if test -n "$ac_pt_DX_EGREP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_EGREP" >&5 $as_echo "$ac_pt_DX_EGREP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_EGREP" = x; then DX_EGREP="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_EGREP=$ac_pt_DX_EGREP fi else DX_EGREP="$ac_cv_path_DX_EGREP" fi if test "$DX_FLAG_pdf$DX_EGREP" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: egrep not found - will not generate doxygen PDF documentation" >&5 $as_echo "$as_me: WARNING: egrep not found - will not generate doxygen PDF documentation" >&2;} DX_FLAG_pdf=0 fi : fi if test "$DX_FLAG_pdf" = 1; then if :; then DX_COND_pdf_TRUE= DX_COND_pdf_FALSE='#' else DX_COND_pdf_TRUE='#' DX_COND_pdf_FALSE= fi : else if false; then DX_COND_pdf_TRUE= DX_COND_pdf_FALSE='#' else DX_COND_pdf_TRUE='#' DX_COND_pdf_FALSE= fi : fi # LaTeX generation for PS and/or PDF: if test "$DX_FLAG_ps" = 1 || test "$DX_FLAG_pdf" = 1; then if :; then DX_COND_latex_TRUE= DX_COND_latex_FALSE='#' else DX_COND_latex_TRUE='#' DX_COND_latex_FALSE= fi DX_ENV="$DX_ENV GENERATE_LATEX='YES'" else if false; then DX_COND_latex_TRUE= DX_COND_latex_FALSE='#' else DX_COND_latex_TRUE='#' DX_COND_latex_FALSE= fi DX_ENV="$DX_ENV GENERATE_LATEX='NO'" fi # Paper size for PS and/or PDF: case "$DOXYGEN_PAPER_SIZE" in #( "") DOXYGEN_PAPER_SIZE="" ;; #( a4wide|a4|letter|legal|executive) DX_ENV="$DX_ENV PAPER_SIZE='$DOXYGEN_PAPER_SIZE'" ;; #( *) as_fn_error $? "unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE'" "$LINENO" 5 ;; esac #For debugging: #echo DX_FLAG_doc=$DX_FLAG_doc #echo DX_FLAG_dot=$DX_FLAG_dot #echo DX_FLAG_man=$DX_FLAG_man #echo DX_FLAG_html=$DX_FLAG_html #echo DX_FLAG_chm=$DX_FLAG_chm #echo DX_FLAG_chi=$DX_FLAG_chi #echo DX_FLAG_rtf=$DX_FLAG_rtf #echo DX_FLAG_xml=$DX_FLAG_xml #echo DX_FLAG_pdf=$DX_FLAG_pdf #echo DX_FLAG_ps=$DX_FLAG_ps #echo DX_ENV=$DX_ENV # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; enable_debug=$enableval else enable_debug=no fi if test "$enable_debug" = "yes" ; then GCC_CFLAGS="$CFLAGS -g -D_DEBUG" GCC_CXXFLAGS="$CXXFLAGS -g -D_DEBUG" else GCC_CFLAGS="$CFLAGS -O2 -DNDEBUG" GCC_CXXFLAGS="$CXXFLAGS -O2 -DNDEBUG" fi ac_config_headers="$ac_config_headers config.h xmltooling/config_pub.h" ac_config_files="$ac_config_files xmltooling.spec" ac_config_files="$ac_config_files Makefile xmltooling/Makefile xmltoolingtest/Makefile schemas/Makefile doc/Makefile" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in gcc gcc3 cc do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in gcc gcc3 cc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ g++3 c++ CC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ g++3 c++ CC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "$GCC" = "yes" ; then # AC_HAVE_GCC_VERSION(4,0,0,0, # [ # AC_DEFINE(GCC_HASCLASSVISIBILITY,1, # [Define to enable class visibility control in gcc.]) # GCC_CFLAGS="$GCC_CFLAGS -fvisibility=hidden -fvisibility-inlines-hidden" # GCC_CXXFLAGS="$GCC_CXXFLAGS -fvisibility=hidden -fvisibility-inlines-hidden" # ]) CFLAGS="-Wall $GCC_CFLAGS" CXXFLAGS="-Wall $GCC_CXXFLAGS" fi # Fix for Sun Workshop compiler in debug mode, may be Sun case #6360993 # Also enables POSIX semantics for some functions. case "${host_cpu}-${host_os}" in *solaris*) CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS" CXXFLAGS="$CXXFLAGS -D_POSIX_PTHREAD_SEMANTICS" if test "$CXX" = "CC" ; then CXXFLAGS="$CXXFLAGS -Qoption ccfe -stabs=no%dfltlit+no%dflthlp" fi ;; esac # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # Checks for library functions. for ac_func in strchr strdup strstr timegm gmtime_r strcasecmp do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done ac_fn_c_check_func "$LINENO" "dlclose" "ac_cv_func_dlclose" if test "x$ac_cv_func_dlclose" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF LIBS="-ldl $LIBS" fi fi # checks for pthreads ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_join (); int main () { return pthread_join (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : acx_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5 $as_echo "$acx_pthread_ok" >&6; } if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # ... -mt is also the pthreads flag for HP/aCC # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case "${host_cpu}-${host_os}" in *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthreads/-mt/ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" ;; esac if test x"$acx_pthread_ok" = xno; then for flag in $acx_pthread_flags; do case $flag in none) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 $as_echo_n "checking whether pthreads work without any flags... " >&6; } ;; -*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 $as_echo_n "checking whether pthreads work with $flag... " >&6; } PTHREAD_CFLAGS="$flag" ;; pthread-config) # Extract the first word of "pthread-config", so it can be a program name with args. set dummy pthread-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_acx_pthread_config+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$acx_pthread_config"; then ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_acx_pthread_config="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no" fi fi acx_pthread_config=$ac_cv_prog_acx_pthread_config if test -n "$acx_pthread_config"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5 $as_echo "$acx_pthread_config" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x"$acx_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 $as_echo_n "checking for the pthreads library -l$flag... " >&6; } PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : acx_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5 $as_echo "$acx_pthread_ok" >&6; } if test "x$acx_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$acx_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 $as_echo_n "checking for joinable pthread attribute... " >&6; } attr_name=unknown for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int attr=$attr; return attr; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : attr_name=$attr; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 $as_echo "$attr_name" >&6; } if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then cat >>confdefs.h <<_ACEOF #define PTHREAD_CREATE_JOINABLE $attr_name _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 $as_echo_n "checking if more special flags are required for pthreads... " >&6; } flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; *-osf* | *-hpux*) flag="-D_REENTRANT";; *solaris*) if test "$GCC" = "yes"; then flag="-D_REENTRANT" else flag="-mt -D_REENTRANT" fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 $as_echo "${flag}" >&6; } if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with xlc_r or cc_r if test x"$GCC" != xyes; then for ac_prog in xlc_r cc_r do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PTHREAD_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PTHREAD_CC"; then ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PTHREAD_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PTHREAD_CC=$ac_cv_prog_PTHREAD_CC if test -n "$PTHREAD_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 $as_echo "$PTHREAD_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PTHREAD_CC" && break done test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}" else PTHREAD_CC=$CC fi else PTHREAD_CC="$CC" fi # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then enable_threads="pthread" : else acx_pthread_ok=no enable_threads="no" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $enable_threads != "pthread"; then as_fn_error $? "unable to find pthreads, currently this is required" "$LINENO" 5 else $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h if test "$enable_threads" = "pthread"; then BUILD_PTHREAD_TRUE= BUILD_PTHREAD_FALSE='#' else BUILD_PTHREAD_TRUE='#' BUILD_PTHREAD_FALSE= fi LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$PTHREAD_CFLAGS $CFLAGS" CXXFLAGS="$PTHREAD_CFLAGS $CXXFLAGS" fi for ac_func in pthread_rwlock_init do : ac_fn_c_check_func "$LINENO" "pthread_rwlock_init" "ac_cv_func_pthread_rwlock_init" if test "x$ac_cv_func_pthread_rwlock_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTHREAD_RWLOCK_INIT 1 _ACEOF fi done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # C++ requirements { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler implements namespaces" >&5 $as_echo_n "checking whether the compiler implements namespaces... " >&6; } if ${ac_cv_cxx_namespaces+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ namespace Outer { namespace Inner { int i = 0; }} int main () { using namespace Outer::Inner; return i; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_cxx_namespaces=yes else ac_cv_cxx_namespaces=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_namespaces" >&5 $as_echo "$ac_cv_cxx_namespaces" >&6; } if test "$ac_cv_cxx_namespaces" = yes; then $as_echo "#define HAVE_NAMESPACES 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports Standard Template Library" >&5 $as_echo_n "checking whether the compiler supports Standard Template Library... " >&6; } if ${ac_cv_cxx_have_stl+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifdef HAVE_NAMESPACES using namespace std; #endif int main () { list x; x.push_back(5); list::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_cxx_have_stl=yes else ac_cv_cxx_have_stl=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_have_stl" >&5 $as_echo "$ac_cv_cxx_have_stl" >&6; } if test "x_$ac_cv_cxx_have_stl" != x_yes; then as_fn_error $? "C++ Standard Template Libary unsupported" "$LINENO" 5 fi # Boost echo "$as_me: this is boost.m4 serial 16" >&5 boost_save_IFS=$IFS boost_version_req= IFS=. set x $boost_version_req 0 0 0 IFS=$boost_save_IFS shift boost_version_req=`expr "$1" '*' 100000 + "$2" '*' 100 + "$3"` boost_version_req_string=$1.$2.$3 # Check whether --with-boost was given. if test "${with_boost+set}" = set; then : withval=$with_boost; fi # If BOOST_ROOT is set and the user has not provided a value to # --with-boost, then treat BOOST_ROOT as if it the user supplied it. if test x"$BOOST_ROOT" != x; then if test x"$with_boost" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: Detected BOOST_ROOT; continuing with --with-boost=$BOOST_ROOT" >&5 $as_echo "$as_me: Detected BOOST_ROOT; continuing with --with-boost=$BOOST_ROOT" >&6;} with_boost=$BOOST_ROOT else { $as_echo "$as_me:${as_lineno-$LINENO}: Detected BOOST_ROOT=$BOOST_ROOT, but overridden by --with-boost=$with_boost" >&5 $as_echo "$as_me: Detected BOOST_ROOT=$BOOST_ROOT, but overridden by --with-boost=$with_boost" >&6;} fi fi DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS '--with-boost=$with_boost'" boost_save_CPPFLAGS=$CPPFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boost headers version >= $boost_version_req_string" >&5 $as_echo_n "checking for Boost headers version >= $boost_version_req_string... " >&6; } if ${boost_cv_inc_path+:} false; then : $as_echo_n "(cached) " >&6 else boost_cv_inc_path=no ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if !defined BOOST_VERSION # error BOOST_VERSION is not defined #elif BOOST_VERSION < $boost_version_req # error Boost headers version < $boost_version_req #endif int main () { ; return 0; } _ACEOF # If the user provided a value to --with-boost, use it and only it. case $with_boost in #( ''|yes) set x '' /opt/local/include /usr/local/include /opt/include \ /usr/include C:/Boost/include;; #( *) set x "$with_boost/include" "$with_boost";; esac shift for boost_dir do # Without --layout=system, Boost (or at least some versions) installs # itself in /include/boost-. This inner loop helps to # find headers in such directories. # # Any ${boost_dir}/boost-x_xx directories are searched in reverse version # order followed by ${boost_dir}. The final '.' is a sentinel for # searching $boost_dir" itself. Entries are whitespace separated. # # I didn't indent this loop on purpose (to avoid over-indented code) boost_layout_system_search_list=`cd "$boost_dir" 2>/dev/null \ && ls -1 | "${GREP}" '^boost-' | sort -rn -t- -k2 \ && echo .` for boost_inc in $boost_layout_system_search_list do if test x"$boost_inc" != x.; then boost_inc="$boost_dir/$boost_inc" else boost_inc="$boost_dir" # Uses sentinel in boost_layout_system_search_list fi if test x"$boost_inc" != x; then # We are going to check whether the version of Boost installed # in $boost_inc is usable by running a compilation that # #includes it. But if we pass a -I/some/path in which Boost # is not installed, the compiler will just skip this -I and # use other locations (either from CPPFLAGS, or from its list # of system include directories). As a result we would use # header installed on the machine instead of the /some/path # specified by the user. So in that precise case (trying # $boost_inc), make sure the version.hpp exists. # # Use test -e as there can be symlinks. test -e "$boost_inc/boost/version.hpp" || continue CPPFLAGS="$CPPFLAGS -I$boost_inc" fi if ac_fn_cxx_try_compile "$LINENO"; then : boost_cv_inc_path=yes else boost_cv_version=no fi rm -f core conftest.err conftest.$ac_objext if test x"$boost_cv_inc_path" = xyes; then if test x"$boost_inc" != x; then boost_cv_inc_path=$boost_inc fi break 2 fi done done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_inc_path" >&5 $as_echo "$boost_cv_inc_path" >&6; } case $boost_cv_inc_path in #( no) boost_errmsg="cannot find Boost headers version >= $boost_version_req_string" as_fn_error $? "$boost_errmsg" "$LINENO" 5 ;;#( yes) BOOST_CPPFLAGS= ;;#( *) BOOST_CPPFLAGS="-I$boost_cv_inc_path" ;; esac if test x"$boost_cv_inc_path" != xno; then $as_echo "#define HAVE_BOOST 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boost's header version" >&5 $as_echo_n "checking for Boost's header version... " >&6; } if ${boost_cv_lib_version+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include boost_lib_version = BOOST_LIB_VERSION _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | tr -d '\r' | $SED -n -e "/^boost_lib_version = /{s///;s/\"//g;p;q;}" >conftest.i 2>&1; then : boost_cv_lib_version=`cat conftest.i` fi rm -rf conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_version" >&5 $as_echo "$boost_cv_lib_version" >&6; } # e.g. "134" for 1_34_1 or "135" for 1_35 boost_major_version=`echo "$boost_cv_lib_version" | $SED 's/_//;s/_.*//;s/ //'` case $boost_major_version in #( '' | *[!0-9]*) as_fn_error $? "invalid value: boost_major_version=$boost_major_version" "$LINENO" 5 ;; esac fi CPPFLAGS=$boost_save_CPPFLAGS if test x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for boost/bind.hpp" >&5 $as_echo "$as_me: Boost not available, not searching for boost/bind.hpp" >&6;} else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "boost/bind.hpp" "ac_cv_header_boost_bind_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_bind_hpp" = xyes; then : $as_echo "#define HAVE_BOOST_BIND_HPP 1" >>confdefs.h else as_fn_error $? "cannot find boost/bind.hpp" "$LINENO" 5 fi CPPFLAGS=$boost_save_CPPFLAGS ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi if test x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for boost/cast.hpp" >&5 $as_echo "$as_me: Boost not available, not searching for boost/cast.hpp" >&6;} else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "boost/cast.hpp" "ac_cv_header_boost_cast_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_cast_hpp" = xyes; then : $as_echo "#define HAVE_BOOST_CAST_HPP 1" >>confdefs.h else as_fn_error $? "cannot find boost/cast.hpp" "$LINENO" 5 fi CPPFLAGS=$boost_save_CPPFLAGS ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi if test x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for boost/lexical_cast.hpp" >&5 $as_echo "$as_me: Boost not available, not searching for boost/lexical_cast.hpp" >&6;} else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "boost/lexical_cast.hpp" "ac_cv_header_boost_lexical_cast_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_lexical_cast_hpp" = xyes; then : $as_echo "#define HAVE_BOOST_LEXICAL_CAST_HPP 1" >>confdefs.h else as_fn_error $? "cannot find boost/lexical_cast.hpp" "$LINENO" 5 fi CPPFLAGS=$boost_save_CPPFLAGS ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi if test x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for boost/lambda/lambda.hpp" >&5 $as_echo "$as_me: Boost not available, not searching for boost/lambda/lambda.hpp" >&6;} else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "boost/lambda/lambda.hpp" "ac_cv_header_boost_lambda_lambda_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_lambda_lambda_hpp" = xyes; then : $as_echo "#define HAVE_BOOST_LAMBDA_LAMBDA_HPP 1" >>confdefs.h else as_fn_error $? "cannot find boost/lambda/lambda.hpp" "$LINENO" 5 fi CPPFLAGS=$boost_save_CPPFLAGS ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi if test x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for boost/ptr_container/ptr_vector.hpp" >&5 $as_echo "$as_me: Boost not available, not searching for boost/ptr_container/ptr_vector.hpp" >&6;} else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "boost/ptr_container/ptr_vector.hpp" "ac_cv_header_boost_ptr_container_ptr_vector_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_ptr_container_ptr_vector_hpp" = xyes; then : $as_echo "#define HAVE_BOOST_PTR_CONTAINER_PTR_VECTOR_HPP 1" >>confdefs.h else as_fn_error $? "cannot find boost/ptr_container/ptr_vector.hpp" "$LINENO" 5 fi CPPFLAGS=$boost_save_CPPFLAGS ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi if test x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for boost/scoped_ptr.hpp" >&5 $as_echo "$as_me: Boost not available, not searching for boost/scoped_ptr.hpp" >&6;} else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "boost/scoped_ptr.hpp" "ac_cv_header_boost_scoped_ptr_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_scoped_ptr_hpp" = xyes; then : $as_echo "#define HAVE_BOOST_SCOPED_PTR_HPP 1" >>confdefs.h else as_fn_error $? "cannot find boost/scoped_ptr.hpp" "$LINENO" 5 fi CPPFLAGS=$boost_save_CPPFLAGS ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi if test x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for boost/shared_ptr.hpp" >&5 $as_echo "$as_me: Boost not available, not searching for boost/shared_ptr.hpp" >&6;} else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "boost/shared_ptr.hpp" "ac_cv_header_boost_shared_ptr_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_shared_ptr_hpp" = xyes; then : $as_echo "#define HAVE_BOOST_SHARED_PTR_HPP 1" >>confdefs.h else as_fn_error $? "cannot find boost/shared_ptr.hpp" "$LINENO" 5 fi CPPFLAGS=$boost_save_CPPFLAGS ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi if test x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for boost/algorithm/string.hpp" >&5 $as_echo "$as_me: Boost not available, not searching for boost/algorithm/string.hpp" >&6;} else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "boost/algorithm/string.hpp" "ac_cv_header_boost_algorithm_string_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_algorithm_string_hpp" = xyes; then : $as_echo "#define HAVE_BOOST_ALGORITHM_STRING_HPP 1" >>confdefs.h else as_fn_error $? "cannot find boost/algorithm/string.hpp" "$LINENO" 5 fi CPPFLAGS=$boost_save_CPPFLAGS ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi if test x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for boost/tokenizer.hpp" >&5 $as_echo "$as_me: Boost not available, not searching for boost/tokenizer.hpp" >&6;} else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "boost/tokenizer.hpp" "ac_cv_header_boost_tokenizer_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_tokenizer_hpp" = xyes; then : $as_echo "#define HAVE_BOOST_TOKENIZER_HPP 1" >>confdefs.h else as_fn_error $? "cannot find boost/tokenizer.hpp" "$LINENO" 5 fi CPPFLAGS=$boost_save_CPPFLAGS ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS" # are covariant methods allowed? cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { class base { public: virtual base *GetPtr( void ) { return this; } }; class derived: virtual public base { public: virtual derived *GetPtr( void ) { return this; } }; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : $as_echo "#define HAVE_COVARIANT_RETURNS 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext # is nullptr supported? cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { const char* ptr = nullptr; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define HAVE_NULLPTR 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # log4shib settings (favor this version over the log4cpp code) # Extract the first word of "log4shib-config", so it can be a program name with args. set dummy log4shib-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_LOG4SHIB_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $LOG4SHIB_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_LOG4SHIB_CONFIG="$LOG4SHIB_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_LOG4SHIB_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi LOG4SHIB_CONFIG=$ac_cv_path_LOG4SHIB_CONFIG if test -n "$LOG4SHIB_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOG4SHIB_CONFIG" >&5 $as_echo "$LOG4SHIB_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Check whether --with-log4shib was given. if test "${with_log4shib+set}" = set; then : withval=$with_log4shib; LOG4SHIB_CONFIG="${with_log4shib}" if ! test -f "${LOG4SHIB_CONFIG}" ; then LOG4SHIB_CONFIG="${with_log4shib}/bin/log4shib-config" fi fi if test -f "${LOG4SHIB_CONFIG}" ; then LIBS="`${LOG4SHIB_CONFIG} --libs` $LIBS" CPPFLAGS="`${LOG4SHIB_CONFIG} --cflags` $CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "log4shib/CategoryStream.hh" "ac_cv_header_log4shib_CategoryStream_hh" "$ac_includes_default" if test "x$ac_cv_header_log4shib_CategoryStream_hh" = xyes; then : else as_fn_error $? "unable to find log4shib header files" "$LINENO" 5 fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { log4shib::Category::getInstance("foo").errorStream() << log4shib::eol ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : $as_echo "#define XMLTOOLING_LOG4SHIB 1" >>confdefs.h else as_fn_error $? "unable to link with log4shib" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: log4shib-config not found, may need to use --with-log4shib option" >&5 $as_echo "$as_me: WARNING: log4shib-config not found, may need to use --with-log4shib option" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: will look for original log4cpp library" >&5 $as_echo "$as_me: WARNING: will look for original log4cpp library" >&2;} # log4cpp settings # Extract the first word of "log4cpp-config", so it can be a program name with args. set dummy log4cpp-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_LOG4CPP_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $LOG4CPP_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_LOG4CPP_CONFIG="$LOG4CPP_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_LOG4CPP_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi LOG4CPP_CONFIG=$ac_cv_path_LOG4CPP_CONFIG if test -n "$LOG4CPP_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOG4CPP_CONFIG" >&5 $as_echo "$LOG4CPP_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Check whether --with-log4cpp was given. if test "${with_log4cpp+set}" = set; then : withval=$with_log4cpp; LOG4CPP_CONFIG="${with_log4cpp}" if ! test -f "${LOG4CPP_CONFIG}" ; then LOG4CPP_CONFIG="${with_log4cpp}/bin/log4cpp-config" fi fi if test -f "${LOG4CPP_CONFIG}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: will try to use log4cpp, note that most non-Internet2 supplied versions are not thread-safe" >&5 $as_echo "$as_me: WARNING: will try to use log4cpp, note that most non-Internet2 supplied versions are not thread-safe" >&2;} LIBS="`${LOG4CPP_CONFIG} --libs` $LIBS" CPPFLAGS="`${LOG4CPP_CONFIG} --cflags` $CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "log4cpp/CategoryStream.hh" "ac_cv_header_log4cpp_CategoryStream_hh" "$ac_includes_default" if test "x$ac_cv_header_log4cpp_CategoryStream_hh" = xyes; then : else as_fn_error $? "unable to find log4cpp header files" "$LINENO" 5 fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { log4cpp::Category::getInstance("foo").errorStream() << log4cpp::eol ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : $as_echo "#define XMLTOOLING_LOG4CPP 1" >>confdefs.h else as_fn_error $? "unable to link with log4cpp, need version 1.0 or later" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else as_fn_error $? "log4cpp-config not found, may need to use --with-log4cpp option" "$LINENO" 5 fi fi # Xerces settings # Check whether --with-xerces was given. if test "${with_xerces+set}" = set; then : withval=$with_xerces; else with_xerces=/usr fi if test x_$with_xerces != x_/usr; then CPPFLAGS="-I${with_xerces}/include $CPPFLAGS" LIBS="-L${with_xerces}/lib -lxerces-c $LIBS" else LIBS="-lxerces-c $LIBS" fi ac_fn_cxx_check_header_mongrel "$LINENO" "xercesc/dom/DOM.hpp" "ac_cv_header_xercesc_dom_DOM_hpp" "$ac_includes_default" if test "x$ac_cv_header_xercesc_dom_DOM_hpp" = xyes; then : else as_fn_error $? "unable to find xerces header files" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking Xerces version" >&5 $as_echo_n "checking Xerces version... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if _XERCES_VERSION != 20600 int i = 0; #else #error cannot use version 2.6.0 #endif ; return 0; } _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 $as_echo "OK" >&6; } else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Xerces-C v2.6.0 has bugs that inhibit use with signed XML, please use a newer version See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.err conftest.i conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { xercesc::XMLPlatformUtils::Initialize() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : else as_fn_error $? "unable to link with Xerces" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Xerces is 64-bit clean" >&5 $as_echo_n "checking whether Xerces is 64-bit clean... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { using namespace XERCES_CPP_NAMESPACE; XMLFilePos testvar; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define XMLTOOLING_XERCESC_64BITSAFE 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Xerces BinInputStream requires getContentType" >&5 $as_echo_n "checking whether Xerces BinInputStream requires getContentType... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { using namespace XERCES_CPP_NAMESPACE; XMLByte buf[1024]; BinMemInputStream in(buf,1024); in.getContentType(); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define XMLTOOLING_XERCESC_INPUTSTREAM_HAS_CONTENTTYPE 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Xerces DOMLS API is compliant" >&5 $as_echo_n "checking whether Xerces DOMLS API is compliant... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { using namespace XERCES_CPP_NAMESPACE; DOMImplementation *impl = DOMImplementationRegistry::getDOMImplementation(NULL); DOMLSSerializer *ls = ((DOMImplementationLS*)impl)->createLSSerializer(); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define XMLTOOLING_XERCESC_COMPLIANT_DOMLS 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Xerces has setIdAttribute(XMLCh*, bool)" >&5 $as_echo_n "checking whether Xerces has setIdAttribute(XMLCh*, bool)... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { using namespace XERCES_CPP_NAMESPACE; DOMElement * elt; elt->setIdAttribute(NULL, false); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Xerces XMLString::release(XMLByte**) exists" >&5 $as_echo_n "checking whether Xerces XMLString::release(XMLByte**) exists... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { using namespace XERCES_CPP_NAMESPACE; XMLByte* buf=NULL; XMLString::release(&buf); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # XML-Security settings # Check whether --with-xmlsec was given. if test "${with_xmlsec+set}" = set; then : withval=$with_xmlsec; else with_xmlsec=/usr fi if test x_$with_xmlsec != x_no; then # OpenSSL settings (need to do this first in case it's in a different spot from xmlsec) # Check whether --with-openssl was given. if test "${with_openssl+set}" = set; then : withval=$with_openssl; if test x_$with_openssl != x_/usr; then SSLFLAGS="-I${with_openssl}/include" SSLLIBS="-L${with_openssl}/lib -lcrypto -lssl" else SSLLIBS="-lcrypto -lssl" fi fi if test "x$SSLLIBS" = "x" ; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$PKG_CONFIG" != x && test "x$PKG_CONFIG" != "xno" ; then if pkg-config openssl ; then SSLLIBS="`$PKG_CONFIG --libs openssl`" SSLFLAGS="`$PKG_CONFIG --cflags openssl`" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenSSL not supported by pkg-config, try --with-openssl instead" >&5 $as_echo "$as_me: WARNING: OpenSSL not supported by pkg-config, try --with-openssl instead" >&2;} fi fi fi if test "x$SSLLIBS" = "x" ; then SSLLIBS="-lcrypto -lssl" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL cflags" >&5 $as_echo_n "checking for OpenSSL cflags... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SSLFLAGS" >&5 $as_echo "$SSLFLAGS" >&6; } CPPFLAGS="$CPPFLAGS $SSLFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL libraries" >&5 $as_echo_n "checking for OpenSSL libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SSLLIBS" >&5 $as_echo "$SSLLIBS" >&6; } XMLSEC_LIBS="$XMLSEC_LIBS $SSLLIBS" # save and append master libs save_LIBS="$LIBS" LIBS="$XMLSEC_LIBS $LIBS" ac_fn_cxx_check_header_mongrel "$LINENO" "openssl/pem.h" "ac_cv_header_openssl_pem_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_pem_h" = xyes; then : else as_fn_error $? "unable to find openssl header files" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ERR_load_CRYPTO_string" >&5 $as_echo_n "checking for ERR_load_CRYPTO_string... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ERR_load_CRYPTO_strings (); int main () { return ERR_load_CRYPTO_strings (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : else as_fn_error $? "unable to link with openssl libraries" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_fn_cxx_check_decl "$LINENO" "EVP_sha512" "ac_cv_have_decl_EVP_sha512" "#include " if test "x$ac_cv_have_decl_EVP_sha512" = xyes; then : $as_echo "#define XMLTOOLING_OPENSSL_HAVE_SHA2 1" >>confdefs.h fi ac_fn_cxx_check_decl "$LINENO" "EVP_PKEY_set1_EC_KEY" "ac_cv_have_decl_EVP_PKEY_set1_EC_KEY" "#include " if test "x$ac_cv_have_decl_EVP_PKEY_set1_EC_KEY" = xyes; then : $as_echo "#define XMLTOOLING_OPENSSL_HAVE_EC 1" >>confdefs.h fi # restore master libs LIBS="$save_LIBS" if test x_$with_xmlsec != x_/usr; then CPPFLAGS="-I${with_xmlsec}/include $CPPFLAGS" XMLSEC_LIBS="-L${with_xmlsec}/lib -lxml-security-c $XMLSEC_LIBS" else XMLSEC_LIBS="-lxml-security-c $XMLSEC_LIBS" fi # save and append master libs save_LIBS="$LIBS" LIBS="$XMLSEC_LIBS $LIBS" ac_fn_cxx_check_header_mongrel "$LINENO" "xsec/utils/XSECPlatformUtils.hpp" "ac_cv_header_xsec_utils_XSECPlatformUtils_hpp" "$ac_includes_default" if test "x$ac_cv_header_xsec_utils_XSECPlatformUtils_hpp" = xyes; then : else as_fn_error $? "unable to find XML-Security header files" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking XML-Security version" >&5 $as_echo_n "checking XML-Security version... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if XSEC_VERSION_MAJOR > 1 || (XSEC_VERSION_MAJOR == 1 && XSEC_VERSION_MEDIUM > 3) int i = 0; #else #error need version 1.4.0 or later #endif ; return 0; } _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 $as_echo "OK" >&6; } else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "XML-Security version 1.4.0 or greater is required. See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.err conftest.i conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { XSECPlatformUtils::Initialise() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : else as_fn_error $? "unable to link with XML-Security" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_fn_cxx_check_type "$LINENO" "xsecsize_t" "ac_cv_type_xsecsize_t" "$ac_includes_default" if test "x$ac_cv_type_xsecsize_t" = xyes; then : $as_echo "#define HAVE_XSECSIZE_T 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether XML-Security-C has multiple CRL support" >&5 $as_echo_n "checking whether XML-Security-C has multiple CRL support... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { DSIGKeyInfoX509* klist; klist->getX509CRLListSize(); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define XMLTOOLING_XMLSEC_MULTIPLECRL 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether XML-Security-C exposes the signature algorithm URI" >&5 $as_echo_n "checking whether XML-Security-C exposes the signature algorithm URI... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { DSIGSignature* sig; sig->getAlgorithmURI(); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define XMLTOOLING_XMLSEC_SIGALGORITHM 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether XML-Security-C includes ECC support" >&5 $as_echo_n "checking whether XML-Security-C includes ECC support... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { DSIGKeyInfoValue* info; info->getECNamedCurve(); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define XMLTOOLING_XMLSEC_ECC 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether XML-Security-C includes C14N 1.1 support" >&5 $as_echo_n "checking whether XML-Security-C includes C14N 1.1 support... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { transformType t = TRANSFORM_C14N11; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define XMLTOOLING_XMLSEC_C14N11 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether XML-Security-C includes debug logging support" >&5 $as_echo_n "checking whether XML-Security-C includes debug logging support... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { XSECPlatformUtils::SetReferenceLoggingSink(NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define XMLTOOLING_XMLSEC_DEBUGLOGGING 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # restore master libs LIBS="$save_LIBS" # libcurl settings # Extract the first word of "curl-config", so it can be a program name with args. set dummy curl-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_CURL_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $CURL_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_CURL_CONFIG="$CURL_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CURL_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi CURL_CONFIG=$ac_cv_path_CURL_CONFIG if test -n "$CURL_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL_CONFIG" >&5 $as_echo "$CURL_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Check whether --with-curl was given. if test "${with_curl+set}" = set; then : withval=$with_curl; CURL_CONFIG="${with_curl}" if ! test -f "${CURL_CONFIG}" ; then CURL_CONFIG="${with_curl}/bin/curl-config" fi fi if test -f "${CURL_CONFIG}" ; then CPPFLAGS="`${CURL_CONFIG} --cflags` $CPPFLAGS" XMLSEC_LIBS="`${CURL_CONFIG} --libs` $XMLSEC_LIBS" else as_fn_error $? "curl-config not found, may need to use --with-curl option" "$LINENO" 5 fi # save and append master libs save_LIBS="$LIBS" LIBS="$XMLSEC_LIBS $LIBS" ac_fn_cxx_check_header_mongrel "$LINENO" "curl/curl.h" "ac_cv_header_curl_curl_h" "$ac_includes_default" if test "x$ac_cv_header_curl_curl_h" = xyes; then : else as_fn_error $? "unable to find libcurl header files" "$LINENO" 5 fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { curl_global_init(CURL_GLOBAL_ALL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : else as_fn_error $? "unable to link with libcurl" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CURLOPT_SSL_CTX_FUNCTION in curl.h" >&5 $as_echo_n "checking for CURLOPT_SSL_CTX_FUNCTION in curl.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "CURLOPT_SSL_CTX_FUNCTION" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else as_fn_error $? "need libcurl that supports CURLOPT_SSL_CTX_FUNCTION" "$LINENO" 5 fi rm -f conftest* ac_fn_cxx_check_type "$LINENO" "curl_off_t" "ac_cv_type_curl_off_t" "#include " if test "x$ac_cv_type_curl_off_t" = xyes; then : $as_echo "#define HAVE_CURL_OFF_T 1" >>confdefs.h fi # restore master libs LIBS="$save_LIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: xmlsec disabled, building without signature/encryption support" >&5 $as_echo "$as_me: WARNING: xmlsec disabled, building without signature/encryption support" >&2;} $as_echo "#define XMLTOOLING_NO_XMLSEC 1" >>confdefs.h fi if test x_$with_xmlsec != x_no; then BUILD_XMLSEC_TRUE= BUILD_XMLSEC_FALSE='#' else BUILD_XMLSEC_TRUE='#' BUILD_XMLSEC_FALSE= fi # Does the STL in use help or screw us? cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { std::basic_string foo; foo=foo+(unsigned short)65 ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : $as_echo "#define HAVE_GOOD_STL 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { std::iterator_traits::iterator>::value_type foo=0 ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : $as_echo "#define HAVE_ITERATOR_TRAITS 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext # Check for unit test support CXXTEST="/usr/bin/cxxtestgen.pl" CXXTESTFLAGS="" # Check whether --with-cxxtest was given. if test "${with_cxxtest+set}" = set; then : withval=$with_cxxtest; if test x_$with_cxxtest != x_/usr; then CXXTEST="${with_cxxtest}/cxxtestgen.pl" CXXTESTFLAGS="-I${with_cxxtest}" fi fi if ! test -f "${CXXTEST}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cxxtestgen not found, won't build unit tests" >&5 $as_echo "$as_me: WARNING: cxxtestgen not found, won't build unit tests" >&2;} fi if test -f ${CXXTEST}; then BUILD_UNITTEST_TRUE= BUILD_UNITTEST_FALSE='#' else BUILD_UNITTEST_TRUE='#' BUILD_UNITTEST_FALSE= fi # we need the expanded forms... test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' { $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig libname" >&5 $as_echo_n "checking our pkgconfig libname... " >&6; } test ".$ax_create_pkgconfig_libname" != "." || \ ax_create_pkgconfig_libname="${PACKAGE_NAME}" test ".$ax_create_pkgconfig_libname" != "." || \ ax_create_pkgconfig_libname="$PACKAGE" ax_create_pkgconfig_libname=`eval echo "$ax_create_pkgconfig_libname"` ax_create_pkgconfig_libname=`eval echo "$ax_create_pkgconfig_libname"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_libname" >&5 $as_echo "$ax_create_pkgconfig_libname" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig version" >&5 $as_echo_n "checking our pkgconfig version... " >&6; } test ".$ax_create_pkgconfig_version" != "." || \ ax_create_pkgconfig_version="${PACKAGE_VERSION}" test ".$ax_create_pkgconfig_version" != "." || \ ax_create_pkgconfig_version="$VERSION" ax_create_pkgconfig_version=`eval echo "$ax_create_pkgconfig_version"` ax_create_pkgconfig_version=`eval echo "$ax_create_pkgconfig_version"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_version" >&5 $as_echo "$ax_create_pkgconfig_version" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig_libdir" >&5 $as_echo_n "checking our pkgconfig_libdir... " >&6; } test ".$pkgconfig_libdir" = "." && \ pkgconfig_libdir='${libdir}/pkgconfig' ax_create_pkgconfig_libdir=`eval echo "$pkgconfig_libdir"` ax_create_pkgconfig_libdir=`eval echo "$ax_create_pkgconfig_libdir"` ax_create_pkgconfig_libdir=`eval echo "$ax_create_pkgconfig_libdir"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkgconfig_libdir" >&5 $as_echo "$pkgconfig_libdir" >&6; } test "$pkgconfig_libdir" != "$ax_create_pkgconfig_libdir" && ( { $as_echo "$as_me:${as_lineno-$LINENO}: result: expanded our pkgconfig_libdir... $ax_create_pkgconfig_libdir" >&5 $as_echo "expanded our pkgconfig_libdir... $ax_create_pkgconfig_libdir" >&6; }) { $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig_libfile" >&5 $as_echo_n "checking our pkgconfig_libfile... " >&6; } test ".$pkgconfig_libfile" != "." || \ pkgconfig_libfile="$ax_create_pkgconfig_libname.pc" ax_create_pkgconfig_libfile=`eval echo "$pkgconfig_libfile"` ax_create_pkgconfig_libfile=`eval echo "$ax_create_pkgconfig_libfile"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkgconfig_libfile" >&5 $as_echo "$pkgconfig_libfile" >&6; } test "$pkgconfig_libfile" != "$ax_create_pkgconfig_libfile" && ( { $as_echo "$as_me:${as_lineno-$LINENO}: result: expanded our pkgconfig_libfile... $ax_create_pkgconfig_libfile" >&5 $as_echo "expanded our pkgconfig_libfile... $ax_create_pkgconfig_libfile" >&6; }) { $as_echo "$as_me:${as_lineno-$LINENO}: checking our package / suffix" >&5 $as_echo_n "checking our package / suffix... " >&6; } ax_create_pkgconfig_suffix="$program_suffix" test ".$ax_create_pkgconfig_suffix" != .NONE || ax_create_pkgconfig_suffix="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PACKAGE_NAME} / ${ax_create_pkgconfig_suffix}" >&5 $as_echo "${PACKAGE_NAME} / ${ax_create_pkgconfig_suffix}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig description" >&5 $as_echo_n "checking our pkgconfig description... " >&6; } ax_create_pkgconfig_description="OpenSAML XMLTooling-C library" test ".$ax_create_pkgconfig_description" != "." || \ ax_create_pkgconfig_description="$ax_create_pkgconfig_libname Library" ax_create_pkgconfig_description=`eval echo "$ax_create_pkgconfig_description"` ax_create_pkgconfig_description=`eval echo "$ax_create_pkgconfig_description"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_description" >&5 $as_echo "$ax_create_pkgconfig_description" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig requires" >&5 $as_echo_n "checking our pkgconfig requires... " >&6; } ax_create_pkgconfig_requires="$PACKAGE_REQUIRES" ax_create_pkgconfig_requires=`eval echo "$ax_create_pkgconfig_requires"` ax_create_pkgconfig_requires=`eval echo "$ax_create_pkgconfig_requires"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_requires" >&5 $as_echo "$ax_create_pkgconfig_requires" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig ext libs" >&5 $as_echo_n "checking our pkgconfig ext libs... " >&6; } ax_create_pkgconfig_pkglibs="$PACKAGE_LIBS" test ".$ax_create_pkgconfig_pkglibs" != "." || ax_create_pkgconfig_pkglibs="-l$ax_create_pkgconfig_libname" ax_create_pkgconfig_libs="$XMLSEC_LIBS -lxmltooling" ax_create_pkgconfig_libs=`eval echo "$ax_create_pkgconfig_libs"` ax_create_pkgconfig_libs=`eval echo "$ax_create_pkgconfig_libs"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_libs" >&5 $as_echo "$ax_create_pkgconfig_libs" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig cppflags" >&5 $as_echo_n "checking our pkgconfig cppflags... " >&6; } ax_create_pkgconfig_cppflags="$CPPFLAGS $PACKAGE_CFLAGS" ax_create_pkgconfig_cppflags=`eval echo "$ax_create_pkgconfig_cppflags"` ax_create_pkgconfig_cppflags=`eval echo "$ax_create_pkgconfig_cppflags"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_cppflags" >&5 $as_echo "$ax_create_pkgconfig_cppflags" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig ldflags" >&5 $as_echo_n "checking our pkgconfig ldflags... " >&6; } ax_create_pkgconfig_ldflags="$LDFLAGS $PACKAGE_LDFLAGS" ax_create_pkgconfig_ldflags=`eval echo "$ax_create_pkgconfig_ldflags"` ax_create_pkgconfig_ldflags=`eval echo "$ax_create_pkgconfig_ldflags"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_ldflags" >&5 $as_echo "$ax_create_pkgconfig_ldflags" >&6; } test ".$ax_create_pkgconfig_generate" != "." || \ ax_create_pkgconfig_generate="$ax_create_pkgconfig_libname.pc" ax_create_pkgconfig_generate=`eval echo "$ax_create_pkgconfig_generate"` ax_create_pkgconfig_generate=`eval echo "$ax_create_pkgconfig_generate"` test "$pkgconfig_libfile" != "$ax_create_pkgconfig_generate" && ( { $as_echo "$as_me:${as_lineno-$LINENO}: result: generate the pkgconfig later... $ax_create_pkgconfig_generate" >&5 $as_echo "generate the pkgconfig later... $ax_create_pkgconfig_generate" >&6; }) if test ".$ax_create_pkgconfig_src_libdir" = "." ; then ax_create_pkgconfig_src_libdir=`pwd` ax_create_pkgconfig_src_libdir=`$as_dirname -- "$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" || $as_expr X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(//\)[^/]' \| \ X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(//\)$' \| \ X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test ! -d $ax_create_pkgconfig_src_libdir/src || \ ax_create_pkgconfig_src_libdir="$ax_create_pkgconfig_src_libdir/src" case ".$objdir" in *libs) ax_create_pkgconfig_src_libdir="$ax_create_pkgconfig_src_libdir/$objdir" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: noninstalled pkgconfig -L $ax_create_pkgconfig_src_libdir" >&5 $as_echo "noninstalled pkgconfig -L $ax_create_pkgconfig_src_libdir" >&6; } fi if test ".$ax_create_pkgconfig_src_headers" = "." ; then ax_create_pkgconfig_src_headers=`pwd` v="$ac_top_srcdir" ; test ".$v" != "." || v="$ax_spec_dir" test ".$v" != "." || v="$srcdir" case "$v" in /*) ax_create_pkgconfig_src_headers="" ;; esac ax_create_pkgconfig_src_headers=`$as_dirname -- "$ax_create_pkgconfig_src_headers/$v/x" || $as_expr X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(//\)[^/]' \| \ X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(//\)$' \| \ X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ax_create_pkgconfig_src_headers/$v/x" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test ! -d $ax_create_pkgconfig_src_headers/include || \ ax_create_pkgconfig_src_headers="$ax_create_pkgconfig_src_headers/include" { $as_echo "$as_me:${as_lineno-$LINENO}: result: noninstalled pkgconfig -I $ax_create_pkgconfig_src_headers" >&5 $as_echo "noninstalled pkgconfig -I $ax_create_pkgconfig_src_headers" >&6; } fi ac_config_commands="$ac_config_commands $ax_create_pkgconfig_generate" LIBTOOL="$LIBTOOL --silent" # output packaging and makefiles cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_doc_TRUE}" && test -z "${DX_COND_doc_FALSE}"; then as_fn_error $? "conditional \"DX_COND_doc\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_doc_TRUE}" && test -z "${DX_COND_doc_FALSE}"; then as_fn_error $? "conditional \"DX_COND_doc\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_dot_TRUE}" && test -z "${DX_COND_dot_FALSE}"; then as_fn_error $? "conditional \"DX_COND_dot\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_dot_TRUE}" && test -z "${DX_COND_dot_FALSE}"; then as_fn_error $? "conditional \"DX_COND_dot\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_man_TRUE}" && test -z "${DX_COND_man_FALSE}"; then as_fn_error $? "conditional \"DX_COND_man\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_man_TRUE}" && test -z "${DX_COND_man_FALSE}"; then as_fn_error $? "conditional \"DX_COND_man\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_rtf_TRUE}" && test -z "${DX_COND_rtf_FALSE}"; then as_fn_error $? "conditional \"DX_COND_rtf\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_rtf_TRUE}" && test -z "${DX_COND_rtf_FALSE}"; then as_fn_error $? "conditional \"DX_COND_rtf\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_xml_TRUE}" && test -z "${DX_COND_xml_FALSE}"; then as_fn_error $? "conditional \"DX_COND_xml\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_xml_TRUE}" && test -z "${DX_COND_xml_FALSE}"; then as_fn_error $? "conditional \"DX_COND_xml\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_chm_TRUE}" && test -z "${DX_COND_chm_FALSE}"; then as_fn_error $? "conditional \"DX_COND_chm\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_chm_TRUE}" && test -z "${DX_COND_chm_FALSE}"; then as_fn_error $? "conditional \"DX_COND_chm\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_chi_TRUE}" && test -z "${DX_COND_chi_FALSE}"; then as_fn_error $? "conditional \"DX_COND_chi\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_chi_TRUE}" && test -z "${DX_COND_chi_FALSE}"; then as_fn_error $? "conditional \"DX_COND_chi\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_html_TRUE}" && test -z "${DX_COND_html_FALSE}"; then as_fn_error $? "conditional \"DX_COND_html\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_html_TRUE}" && test -z "${DX_COND_html_FALSE}"; then as_fn_error $? "conditional \"DX_COND_html\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_ps_TRUE}" && test -z "${DX_COND_ps_FALSE}"; then as_fn_error $? "conditional \"DX_COND_ps\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_ps_TRUE}" && test -z "${DX_COND_ps_FALSE}"; then as_fn_error $? "conditional \"DX_COND_ps\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_pdf_TRUE}" && test -z "${DX_COND_pdf_FALSE}"; then as_fn_error $? "conditional \"DX_COND_pdf\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_pdf_TRUE}" && test -z "${DX_COND_pdf_FALSE}"; then as_fn_error $? "conditional \"DX_COND_pdf\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_latex_TRUE}" && test -z "${DX_COND_latex_FALSE}"; then as_fn_error $? "conditional \"DX_COND_latex\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_latex_TRUE}" && test -z "${DX_COND_latex_FALSE}"; then as_fn_error $? "conditional \"DX_COND_latex\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_PTHREAD_TRUE}" && test -z "${BUILD_PTHREAD_FALSE}"; then as_fn_error $? "conditional \"BUILD_PTHREAD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_XMLSEC_TRUE}" && test -z "${BUILD_XMLSEC_FALSE}"; then as_fn_error $? "conditional \"BUILD_XMLSEC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_UNITTEST_TRUE}" && test -z "${BUILD_UNITTEST_FALSE}"; then as_fn_error $? "conditional \"BUILD_UNITTEST\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by xmltooling $as_me 1.5.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ xmltooling config.status 1.5.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' ax_create_pkgconfig_generate="$ax_create_pkgconfig_generate" pkgconfig_prefix='$prefix' pkgconfig_execprefix='$exec_prefix' pkgconfig_bindir='$bindir' pkgconfig_libdir='$libdir' pkgconfig_includedir='$includedir' pkgconfig_datarootdir='$datarootdir' pkgconfig_datadir='$datadir' pkgconfig_sysconfdir='$sysconfdir' pkgconfig_suffix='$ax_create_pkgconfig_suffix' pkgconfig_package='$PACKAGE_NAME' pkgconfig_libname='$ax_create_pkgconfig_libname' pkgconfig_description='$ax_create_pkgconfig_description' pkgconfig_version='$ax_create_pkgconfig_version' pkgconfig_requires='$ax_create_pkgconfig_requires' pkgconfig_libs='$ax_create_pkgconfig_libs' pkgconfig_ldflags='$ax_create_pkgconfig_ldflags' pkgconfig_cppflags='$ax_create_pkgconfig_cppflags' pkgconfig_src_libdir='$ax_create_pkgconfig_src_libdir' pkgconfig_src_headers='$ax_create_pkgconfig_src_headers' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "xmltooling/config_pub.h") CONFIG_HEADERS="$CONFIG_HEADERS xmltooling/config_pub.h" ;; "xmltooling.spec") CONFIG_FILES="$CONFIG_FILES xmltooling.spec" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "xmltooling/Makefile") CONFIG_FILES="$CONFIG_FILES xmltooling/Makefile" ;; "xmltoolingtest/Makefile") CONFIG_FILES="$CONFIG_FILES xmltoolingtest/Makefile" ;; "schemas/Makefile") CONFIG_FILES="$CONFIG_FILES schemas/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "$ax_create_pkgconfig_generate") CONFIG_COMMANDS="$CONFIG_COMMANDS $ax_create_pkgconfig_generate" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Whether or not to build static libraries. build_old_libs=$enable_static # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; "$ax_create_pkgconfig_generate":C) pkgconfig_generate="$ax_create_pkgconfig_generate" if test ! -f "$pkgconfig_generate.in" then generate="true" elif grep ' generated by configure ' $pkgconfig_generate.in >/dev/null then generate="true" else generate="false"; fi if $generate ; then { $as_echo "$as_me:${as_lineno-$LINENO}: creating $pkgconfig_generate.in" >&5 $as_echo "$as_me: creating $pkgconfig_generate.in" >&6;} cat > $pkgconfig_generate.in <&5 $as_echo "$as_me: creating $pkgconfig_generate" >&6;} cat >conftest.sed < $pkgconfig_generate if test ! -s $pkgconfig_generate ; then as_fn_error $? "$pkgconfig_generate is empty" "$LINENO" 5 fi ; rm conftest.sed # DONE generate $pkgconfig_generate pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.pc/'` { $as_echo "$as_me:${as_lineno-$LINENO}: creating $pkgconfig_uninstalled" >&5 $as_echo "$as_me: creating $pkgconfig_uninstalled" >&6;} cat >conftest.sed < $pkgconfig_uninstalled if test ! -s $pkgconfig_uninstalled ; then as_fn_error $? "$pkgconfig_uninstalled is empty" "$LINENO" 5 fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled pkgconfig_requires_add=`echo ${pkgconfig_requires}` if test ".$pkgconfig_requires_add" != "." ; then pkgconfig_requires_add="pkg-config $pkgconfig_requires_add" else pkgconfig_requires_add=":" ; fi pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.sh/'` { $as_echo "$as_me:${as_lineno-$LINENO}: creating $pkgconfig_uninstalled" >&5 $as_echo "$as_me: creating $pkgconfig_uninstalled" >&6;} cat >conftest.sed <Name:>for option\\; do case \"\$option\" in --list-all|--name) echo > s>Description: *>\\;\\; --help) pkg-config --help \\; echo Buildscript Of > s>Version: *>\\;\\; --modversion|--version) echo > s>Requires:>\\;\\; --requires) echo $pkgconfig_requires_add> s>Libs: *>\\;\\; --libs) echo > s>Cflags: *>\\;\\; --cflags) echo > /--libs)/a\\ $pkgconfig_requires_add /--cflags)/a\\ $pkgconfig_requires_add\\ ;; --variable=*) eval echo '\$'\`echo \$option | sed -e 's/.*=//'\`\\ ;; --uninstalled) exit 0 \\ ;; *) ;; esac done AXEOF sed -f conftest.sed $pkgconfig_generate.in > $pkgconfig_uninstalled if test ! -s $pkgconfig_uninstalled ; then as_fn_error $? "$pkgconfig_uninstalled is empty" "$LINENO" 5 fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi xmltooling-1.5.3/doxygen.cfg000644 001751 001751 00000022762 12003305016 017237 0ustar00scantorscantor000000 000000 # Doxyfile 1.4.6 #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- PROJECT_NAME = $(PROJECT) PROJECT_NUMBER = $(VERSION) OUTPUT_DIRECTORY = $(DOCDIR) CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English USE_WINDOWS_ENCODING = YES BRIEF_MEMBER_DESC = YES REPEAT_BRIEF = YES ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ "The $name file" \ is \ provides \ specifies \ contains \ represents \ a \ an \ the ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO FULL_PATH_NAMES = YES STRIP_FROM_PATH = $(SRCDIR) STRIP_FROM_INC_PATH = $(SRCDIR) SHORT_NAMES = YES JAVADOC_AUTOBRIEF = YES MULTILINE_CPP_IS_BRIEF = NO DETAILS_AT_TOP = NO INHERIT_DOCS = YES SEPARATE_MEMBER_PAGES = NO TAB_SIZE = 4 ALIASES = OPTIMIZE_OUTPUT_FOR_C = NO OPTIMIZE_OUTPUT_JAVA = NO BUILTIN_STL_SUPPORT = YES DISTRIBUTE_GROUP_DOC = NO SUBGROUPING = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- EXTRACT_ALL = NO EXTRACT_PRIVATE = NO EXTRACT_STATIC = YES EXTRACT_LOCAL_CLASSES = YES EXTRACT_LOCAL_METHODS = NO HIDE_UNDOC_MEMBERS = NO HIDE_UNDOC_CLASSES = NO HIDE_FRIEND_COMPOUNDS = NO HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = NO CASE_SENSE_NAMES = NO HIDE_SCOPE_NAMES = NO SHOW_INCLUDE_FILES = YES INLINE_INFO = YES SORT_MEMBER_DOCS = YES SORT_BRIEF_DOCS = NO SORT_BY_SCOPE_NAME = NO GENERATE_TODOLIST = YES GENERATE_TESTLIST = YES GENERATE_BUGLIST = YES GENERATE_DEPRECATEDLIST= YES ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 SHOW_USED_FILES = YES SHOW_DIRECTORIES = YES FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- QUIET = NO WARNINGS = YES WARN_IF_UNDOCUMENTED = YES WARN_IF_DOC_ERROR = YES WARN_NO_PARAMDOC = NO WARN_FORMAT = "$file:$line: $text" WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- INPUT = $(SRCDIR)/xmltooling FILE_PATTERNS = *.d \ *.java \ *.ii \ *.ixx \ *.ipp \ *.i++ \ *.inl \ *.h \ *.hh \ *.hxx \ *.hpp \ *.h++ \ *.idl \ *.odl \ *.cs \ *.php \ *.php3 \ *.inc \ *.m \ *.mm \ *.dox \ *.py RECURSIVE = YES EXCLUDE = EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = EXAMPLE_PATH = $(SRCDIR)/xmltooling EXAMPLE_PATTERNS = EXAMPLE_RECURSIVE = NO IMAGE_PATH = INPUT_FILTER = FILTER_PATTERNS = FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- SOURCE_BROWSER = NO INLINE_SOURCES = NO STRIP_CODE_COMMENTS = YES REFERENCED_BY_RELATION = NO REFERENCES_RELATION = NO USE_HTAGS = NO VERBATIM_HEADERS = NO #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- ALPHABETICAL_INDEX = NO COLS_IN_ALPHA_INDEX = 5 IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- GENERATE_HTML = $(GENERATE_HTML) HTML_OUTPUT = html HTML_FILE_EXTENSION = .html HTML_HEADER = HTML_FOOTER = HTML_STYLESHEET = HTML_ALIGN_MEMBERS = YES GENERATE_HTMLHELP = $(GENERATE_CHM) CHM_FILE = ../$(PROJECT).chm HHC_LOCATION = $(HHC_PATH) GENERATE_CHI = $(GENERATE_CHI) BINARY_TOC = NO TOC_EXPAND = NO DISABLE_INDEX = NO ENUM_VALUES_PER_LINE = 4 GENERATE_TREEVIEW = YES TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- GENERATE_LATEX = $(GENERATE_LATEX) LATEX_OUTPUT = latex LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex COMPACT_LATEX = NO PAPER_TYPE = $(PAPER_SIZE) EXTRA_PACKAGES = LATEX_HEADER = PDF_HYPERLINKS = NO USE_PDFLATEX = NO LATEX_BATCHMODE = YES LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- GENERATE_RTF = $(GENERATE_RTF) RTF_OUTPUT = rtf COMPACT_RTF = NO RTF_HYPERLINKS = NO RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- GENERATE_MAN = $(GENERATE_MAN) MAN_OUTPUT = man MAN_EXTENSION = .1 MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- GENERATE_XML = $(GENERATE_XML) XML_OUTPUT = xml XML_SCHEMA = XML_DTD = XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- GENERATE_PERLMOD = NO PERLMOD_LATEX = NO PERLMOD_PRETTY = YES PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = NO SEARCH_INCLUDES = YES INCLUDE_PATH = $(SRCDIR) INCLUDE_FILE_PATTERNS = PREDEFINED = _MSC_VER \ DOXYGEN_SKIP EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- TAGFILES = GENERATE_TAGFILE = $(DOCDIR)/$(PROJECT).tag ALLEXTERNALS = NO EXTERNAL_GROUPS = YES PERL_PATH = $(PERL_PATH) #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- CLASS_DIAGRAMS = YES HIDE_UNDOC_RELATIONS = YES HAVE_DOT = $(HAVE_DOT) CLASS_GRAPH = YES COLLABORATION_GRAPH = YES GROUP_GRAPHS = YES UML_LOOK = NO TEMPLATE_RELATIONS = NO INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES CALL_GRAPH = NO GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES DOT_IMAGE_FORMAT = png DOT_PATH = $(DOT_PATH) DOTFILE_DIRS = MAX_DOT_GRAPH_WIDTH = 1024 MAX_DOT_GRAPH_HEIGHT = 1024 MAX_DOT_GRAPH_DEPTH = 1000 DOT_TRANSPARENT = NO DOT_MULTI_TARGETS = NO GENERATE_LEGEND = YES DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- SEARCHENGINE = NO xmltooling-1.5.3/cpp-xmltooling.sln000644 001751 001751 00000016411 12147443124 020601 0ustar00scantorscantor000000 000000  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{61BF324D-2532-49C9-93CE-DF0E89529D4F}" ProjectSection(SolutionItems) = preProject m4\acinclude.m4 = m4\acinclude.m4 m4\acx_pthread.m4 = m4\acx_pthread.m4 m4\ax_create_pkgconfig_info.m4 = m4\ax_create_pkgconfig_info.m4 m4\boost.m4 = m4\boost.m4 config_win32.h = config_win32.h configure.ac = configure.ac doxygen.am = doxygen.am doxygen.cfg = doxygen.cfg m4\doxygen.m4 = m4\doxygen.m4 Makefile.am = Makefile.am xmltooling.spec.in = xmltooling.spec.in EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Schemas", "Schemas", "{23EF5C29-2A13-4F73-99D1-96B8120F148E}" ProjectSection(SolutionItems) = preProject schemas\catalog.xml.in = schemas\catalog.xml.in schemas\Makefile.am = schemas\Makefile.am schemas\soap-envelope.xsd = schemas\soap-envelope.xsd schemas\xenc-schema.xsd = schemas\xenc-schema.xsd schemas\xenc11-schema.xsd = schemas\xenc11-schema.xsd schemas\xml.xsd = schemas\xml.xsd schemas\xmldsig-core-schema.xsd = schemas\xmldsig-core-schema.xsd schemas\xmldsig11-schema.xsd = schemas\xmldsig11-schema.xsd schemas\xmltooling.xsd = schemas\xmltooling.xsd EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dependencies", "Dependencies", "{EE6145CB-F979-4AD2-9D7D-6834345D1983}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "curl", "curl", "{85004FE4-CBD1-4A6D-B60D-EBBF0C267DEF}" ProjectSection(SolutionItems) = preProject dependencies\curl\curl.spec.patch = dependencies\curl\curl.spec.patch dependencies\curl\depend = dependencies\curl\depend dependencies\curl\pkginfo = dependencies\curl\pkginfo dependencies\curl\postinstall = dependencies\curl\postinstall EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "openssl", "openssl", "{F284B9F5-612F-45B2-9D2F-A084EC6C91B5}" ProjectSection(SolutionItems) = preProject dependencies\openssl\pkginfo = dependencies\openssl\pkginfo dependencies\openssl\postinstall = dependencies\openssl\postinstall EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "xerces", "xerces", "{06F58C02-6110-4D42-9981-B326910B3E2D}" ProjectSection(SolutionItems) = preProject dependencies\xerces\pkginfo = dependencies\xerces\pkginfo dependencies\xerces\Portfile = dependencies\xerces\Portfile dependencies\xerces\xerces-c.spec = dependencies\xerces\xerces-c.spec EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "xml-security", "xml-security", "{549A0182-0C7A-4F29-9A9F-E112C3E394E1}" ProjectSection(SolutionItems) = preProject dependencies\xml-security\depend = dependencies\xml-security\depend dependencies\xml-security\pkginfo = dependencies\xml-security\pkginfo dependencies\xml-security\Portfile = dependencies\xml-security\Portfile EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "log4shib", "log4shib", "{96FDD5D7-1231-4953-8DB6-8A5133553AB9}" ProjectSection(SolutionItems) = preProject dependencies\log4shib\pkginfo = dependencies\log4shib\pkginfo dependencies\log4shib\postinstall = dependencies\log4shib\postinstall EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "log4cpp", "log4cpp", "{F2F0B2B6-6E60-4E61-81D2-305D1779622E}" ProjectSection(SolutionItems) = preProject dependencies\log4cpp\pkginfo = dependencies\log4cpp\pkginfo dependencies\log4cpp\postinstall = dependencies\log4cpp\postinstall EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Doc", "Doc", "{847EC34E-0069-4427-B42C-1B6E29906930}" ProjectSection(SolutionItems) = preProject doc\CURL.LICENSE = doc\CURL.LICENSE doc\LICENSE.txt = doc\LICENSE.txt doc\LOG4CPP.LICENSE = doc\LOG4CPP.LICENSE doc\Makefile.am = doc\Makefile.am doc\OPENSSL.LICENSE = doc\OPENSSL.LICENSE doc\README.txt = doc\README.txt EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xmltooling", "xmltooling\xmltooling.vcxproj", "{06B55A46-D3B3-41AE-B5A5-B57830BA010D}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xmltoolingtest", "xmltoolingtest\xmltoolingtest.vcxproj", "{3E34CDCC-FCBA-490D-A165-1CB6F4559799}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xmltooling-lite", "xmltooling\xmltooling-lite.vcxproj", "{06B55A46-D3B3-41AE-B5A5-B57830BA010E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {06B55A46-D3B3-41AE-B5A5-B57830BA010D}.Debug|Win32.ActiveCfg = Debug|Win32 {06B55A46-D3B3-41AE-B5A5-B57830BA010D}.Debug|Win32.Build.0 = Debug|Win32 {06B55A46-D3B3-41AE-B5A5-B57830BA010D}.Debug|x64.ActiveCfg = Debug|x64 {06B55A46-D3B3-41AE-B5A5-B57830BA010D}.Debug|x64.Build.0 = Debug|x64 {06B55A46-D3B3-41AE-B5A5-B57830BA010D}.Release|Win32.ActiveCfg = Release|Win32 {06B55A46-D3B3-41AE-B5A5-B57830BA010D}.Release|Win32.Build.0 = Release|Win32 {06B55A46-D3B3-41AE-B5A5-B57830BA010D}.Release|x64.ActiveCfg = Release|x64 {06B55A46-D3B3-41AE-B5A5-B57830BA010D}.Release|x64.Build.0 = Release|x64 {3E34CDCC-FCBA-490D-A165-1CB6F4559799}.Debug|Win32.ActiveCfg = Debug|Win32 {3E34CDCC-FCBA-490D-A165-1CB6F4559799}.Debug|Win32.Build.0 = Debug|Win32 {3E34CDCC-FCBA-490D-A165-1CB6F4559799}.Debug|x64.ActiveCfg = Debug|x64 {3E34CDCC-FCBA-490D-A165-1CB6F4559799}.Debug|x64.Build.0 = Debug|x64 {3E34CDCC-FCBA-490D-A165-1CB6F4559799}.Release|Win32.ActiveCfg = Release|Win32 {3E34CDCC-FCBA-490D-A165-1CB6F4559799}.Release|Win32.Build.0 = Release|Win32 {3E34CDCC-FCBA-490D-A165-1CB6F4559799}.Release|x64.ActiveCfg = Release|x64 {3E34CDCC-FCBA-490D-A165-1CB6F4559799}.Release|x64.Build.0 = Release|x64 {06B55A46-D3B3-41AE-B5A5-B57830BA010E}.Debug|Win32.ActiveCfg = Debug|Win32 {06B55A46-D3B3-41AE-B5A5-B57830BA010E}.Debug|Win32.Build.0 = Debug|Win32 {06B55A46-D3B3-41AE-B5A5-B57830BA010E}.Debug|x64.ActiveCfg = Debug|x64 {06B55A46-D3B3-41AE-B5A5-B57830BA010E}.Debug|x64.Build.0 = Debug|x64 {06B55A46-D3B3-41AE-B5A5-B57830BA010E}.Release|Win32.ActiveCfg = Release|Win32 {06B55A46-D3B3-41AE-B5A5-B57830BA010E}.Release|Win32.Build.0 = Release|Win32 {06B55A46-D3B3-41AE-B5A5-B57830BA010E}.Release|x64.ActiveCfg = Release|x64 {06B55A46-D3B3-41AE-B5A5-B57830BA010E}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {85004FE4-CBD1-4A6D-B60D-EBBF0C267DEF} = {EE6145CB-F979-4AD2-9D7D-6834345D1983} {F284B9F5-612F-45B2-9D2F-A084EC6C91B5} = {EE6145CB-F979-4AD2-9D7D-6834345D1983} {06F58C02-6110-4D42-9981-B326910B3E2D} = {EE6145CB-F979-4AD2-9D7D-6834345D1983} {549A0182-0C7A-4F29-9A9F-E112C3E394E1} = {EE6145CB-F979-4AD2-9D7D-6834345D1983} {96FDD5D7-1231-4953-8DB6-8A5133553AB9} = {EE6145CB-F979-4AD2-9D7D-6834345D1983} {F2F0B2B6-6E60-4E61-81D2-305D1779622E} = {EE6145CB-F979-4AD2-9D7D-6834345D1983} EndGlobalSection EndGlobal xmltooling-1.5.3/config_win32.h000644 001751 001751 00000011422 12146253676 017556 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /* config_win32.h. Copied from a ./configure on Unix */ /* Define if C++ compiler supports covariant virtual methods. */ #define HAVE_COVARIANT_RETURNS 1 /* Define to 1 if C++ compiler supports nullptr keyword. */ #if _MSC_VER >= 1600 # define HAVE_NULLPTR 1 #endif /* Define to 1 if you have the header file. */ /* #undef HAVE_DLFCN_H */ /* Define to 1 if you have the `gmtime_r' function. */ /* #undef HAVE_GMTIME_R */ /* Define if you have an STL implementation that supports useful string specialization. */ #define HAVE_GOOD_STL 1 /* Define to 1 if you have an STL implementation that supports std::iterator_traits. */ #define HAVE_ITERATOR_TRAITS 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_INTTYPES_H */ /* Define if log4shib library is used. */ #define XMLTOOLING_LOG4SHIB 1 /* Define if log4cpp library is used. */ /* #undef XMLTOOLING_LOG4CPP */ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* define if the compiler implements namespaces */ #define HAVE_NAMESPACES 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_STDINT_H */ /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 /* Define to 1 if you have the `strdup' function. */ #define HAVE_STRDUP 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_STRINGS_H */ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_UNISTD_H */ #include #if (XERCES_VERSION_MAJOR >= 3) # define XMLTOOLING_XERCESC_COMPLIANT_DOMLS 1 # define XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE 1 # define XMLTOOLING_XERCESC_64BITSAFE 1 # define XMLTOOLING_XERCESC_INPUTSTREAM_HAS_CONTENTTYPE 1 #else # define XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE 1 #endif /* Define to 1 if you have the `xsecsize_t' type. */ #define HAVE_XSECSIZE_T 1 /* Define to 1 if you have the `curl_off_t' type. */ #define HAVE_CURL_OFF_T 1 /* Name of package */ #define PACKAGE "xmltooling" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "https://issues.shibboleth.net/" /* Define to the full name of this package. */ #define PACKAGE_NAME "xmltooling" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "xmltooling 1.5.3" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "xmltooling" /* Define to the version of this package. */ #define PACKAGE_VERSION "1.5.3" /* Define to the necessary symbol if this constant uses a non-standard name on your system. */ /* #undef PTHREAD_CREATE_JOINABLE */ /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define to 1 if your declares `struct tm'. */ /* #undef TM_IN_SYS_TIME */ /* Version number of package */ #define VERSION "1.5.3" /* Define if you wish to disable XML-Security-dependent features. */ /* #undef XMLTOOLING_NO_XMLSEC */ /* Define if you wish to disable Xalan-dependent features. */ #define XSEC_NO_XALAN #ifndef XMLTOOLING_NO_XMLSEC # include # if (_XSEC_VERSION_FULL >= 10500) # define XMLTOOLING_XMLSEC_C14N11 1 # endif # if (_XSEC_VERSION_FULL >= 10600) # define XMLTOOLING_XMLSEC_MULTIPLECRL 1 # define XMLTOOLING_XMLSEC_SIGALGORITHM 1 # define XMLTOOLING_XMLSEC_ECC 1 # define XMLTOOLING_XMLSEC_DEBUGLOGGING 1 # endif #endif /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* Define to `unsigned' if does not define. */ /* #undef size_t */ xmltooling-1.5.3/xmltooling.spec000644 001751 001751 00000014203 12147443233 020155 0ustar00scantorscantor000000 000000 Name: xmltooling Version: 1.5.3 Release: 1 Summary: OpenSAML XMLTooling library Group: Development/Libraries/C and C++ Vendor: Shibboleth Consortium License: Apache 2.0 URL: http://www.opensaml.org/ Source: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root %if 0%{?suse_version} > 1030 && 0%{?suse_version} < 1130 BuildRequires: libXerces-c-devel >= 2.8.0 %else BuildRequires: libxerces-c-devel >= 2.8.0 %endif BuildRequires: libxml-security-c-devel >= 1.4.0 %{?_with_log4cpp:BuildRequires: liblog4cpp-devel >= 1.0} %{!?_with_log4cpp:BuildRequires: liblog4shib-devel >= 1.0.4} BuildRequires: gcc-c++, openssl-devel, boost-devel >= 1.32.0 %if 0%{?rhel} >= 6 || 0%{?centos_version} >= 600 BuildRequires: libcurl-openssl-devel >= 7.21.7 Requires: libcurl-openssl >= 7.21.7 %else BuildRequires: curl-devel >= 7.10.6 %endif %if 0%{?suse_version} > 1000 BuildRequires: pkg-config %endif %{!?_without_doxygen:BuildRequires: doxygen} %if "%{_vendor}" == "redhat" BuildRequires: redhat-rpm-config %endif %if "%{_vendor}" == "suse" %define pkgdocdir %{_docdir}/%{name} %else %define pkgdocdir %{_docdir}/%{name}-%{version} %endif # Prevent the RH6 package from requiring a vanilla libcurl. %if 0%{?rhel} >= 6 || 0%{?centos_version} >= 600 %filter_from_requires /libcurl\.so\..*/d %filter_setup %endif %description The XMLTooling library contains generic XML parsing and processing classes based on the Xerces-C DOM. It adds more powerful facilities for declaring element- and type-specific API and implementation classes to add value around the DOM, as well as signing and encryption support. %package -n libxmltooling6 Summary: OpenSAML XMLTooling library Group: Development/Libraries/C and C++ Provides: xmltooling = %{version}-%{release} Obsoletes: xmltooling < %{version}-%{release} %if 0%{?rhel} >= 6 || 0%{?centos_version} >= 600 Requires: libcurl-openssl >= 7.21.7 %endif %description -n libxmltooling6 The XMLTooling library contains generic XML parsing and processing classes based on the Xerces-C DOM. It adds more powerful facilities for declaring element- and type-specific API and implementation classes to add value around the DOM, as well as signing and encryption support. This package contains just the shared library. %package -n libxmltooling-devel Summary: XMLTooling development Headers Group: Development/Libraries/C and C++ Requires: libxmltooling6 = %{version}-%{release} Provides: xmltooling-devel = %{version}-%{release} Obsoletes: xmltooling-devel < %{version}-%{release} %if 0%{?suse_version} > 1030 && 0%{?suse_version} < 1130 Requires: libXerces-c-devel >= 2.8.0 %else Requires: libxerces-c-devel >= 2.8.0 %endif Requires: libxml-security-c-devel >= 1.4.0 %{?_with_log4cpp:Requires: liblog4cpp-devel >= 1.0} %{!?_with_log4cpp:Requires: liblog4shib-devel >= 1.0.4} Requires: openssl-devel, boost-devel >= 1.32.0 %if 0%{?rhel} >= 6 || 0%{?centos_version} >= 600 Requires: libcurl-openssl-devel >= 7.21.7 %else Requires: curl-devel >= 7.10.6 %endif %description -n libxmltooling-devel The XMLTooling library contains generic XML parsing and processing classes based on the Xerces-C DOM. It adds more powerful facilities for declaring element- and type-specific API and implementation classes to add value around the DOM, as well as signing and encryption support. This package includes files needed for development with XMLTooling. %package -n xmltooling-schemas Summary: XMLTooling schemas and catalog Group: Development/Libraries/C and C++ %description -n xmltooling-schemas The XMLTooling library contains generic XML parsing and processing classes based on the Xerces-C DOM. It adds more powerful facilities for declaring element- and type-specific API and implementation classes to add value around the DOM, as well as signing and encryption support. This package includes XML schemas and related files. %prep %setup -q %build %if 0%{?rhel} >= 6 || 0%{?centos_version} >= 600 %configure %{?xmltooling_options} --with-curl=/opt/shibboleth %else %configure %{?xmltooling_options} %endif %{__make} %install %{__make} install DESTDIR=$RPM_BUILD_ROOT pkgdocdir=%{pkgdocdir} # Don't package unit tester if present. %{__rm} -f $RPM_BUILD_ROOT/%{_bindir}/xmltoolingtest %check %{__make} check %clean [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT %ifnos solaris2.8 solaris2.9 solaris2.10 %post -n libxmltooling6 -p /sbin/ldconfig %endif %ifnos solaris2.8 solaris2.9 solaris2.10 %postun -n libxmltooling6 -p /sbin/ldconfig %endif %files -n libxmltooling6 %defattr(-,root,root,-) %{_libdir}/*.so.* %files -n xmltooling-schemas %defattr(-,root,root,-) %dir %{_datadir}/xml/xmltooling %{_datadir}/xml/xmltooling/* %files -n libxmltooling-devel %defattr(-,root,root,-) %{_includedir}/* %{_libdir}/*.so %{_libdir}/pkgconfig/xmltooling.pc %doc %{pkgdocdir} %changelog * Wed Dec 14 2011 Scott Cantor - 1.5-1 - Update lib package number. - Add boost-devel dependency. * Sun Jun 26 2011 Scott Cantor - 1.4.2-1 - Override curl build for RHEL6. * Tue Oct 26 2010 Scott Cantor - 1.4-1 - Update version - Add pkg-config support. - Sync package names for side by side install. - Adjust Xerces dependency name and Group setting - Split out schemas into separate subpackage * Mon Aug 31 2009 Scott Cantor - 1.3-1 - Bump soname for SUSE packaging. * Thu Aug 6 2009 Scott Cantor - 1.2.1-1 - SuSE conventions - Stop packaging unit tester * Wed Dec 3 2008 Scott Cantor - 1.2-1 - Bumping for minor update. - Fixing SuSE Xerces dependency name. * Tue Jul 1 2008 Scott Cantor - 1.1-1 - Bumping for minor update. * Mon Mar 17 2008 Scott Cantor - 1.0-6 - Official release. * Fri Jan 18 2008 Scott Cantor - 1.0-5 - Release candidate 1. * Thu Nov 08 2007 Scott Cantor - 1.0-4 - Second public beta. * Thu Aug 16 2007 Scott Cantor - 1.0-3 - First public beta. * Fri Jul 13 2007 Scott Cantor - 1.0-2 - Second alpha. * Wed Apr 12 2006 Scott Cantor - 1.0-1 - First SPEC file based on various versions in existence. xmltooling-1.5.3/doc/000755 001751 001751 00000000000 12157725413 015656 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/schemas/000755 001751 001751 00000000000 12157725414 016535 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltooling/000755 001751 001751 00000000000 12157725415 017307 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltoolingtest/000755 001751 001751 00000000000 12157725415 020207 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltoolingtest/XMLObjectBaseTestCase.h000644 001751 001751 00000015545 12003305017 024366 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef XMLTOOLING_NO_XMLSEC #include using namespace xmlsignature; #endif using namespace xmltooling; using namespace xercesc; using namespace std; extern string data_path; #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif class SimpleXMLObject : public AbstractAttributeExtensibleXMLObject, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { protected: SimpleXMLObject(const SimpleXMLObject& src) : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src), m_id(XMLString::replicate(src.m_id)) { #ifndef XMLTOOLING_NO_XMLSEC m_children.push_back(nullptr); m_signature=m_children.begin(); #endif VectorOf(SimpleXMLObject) mine=getSimpleXMLObjects(); for (vector::const_iterator i=src.m_simples.begin(); i!=src.m_simples.end(); i++) { mine.push_back(dynamic_cast((*i)->clone())); } } public: static const XMLCh NAMESPACE[]; static const XMLCh NAMESPACE_PREFIX[]; static const XMLCh LOCAL_NAME[]; static const XMLCh DERIVED_NAME[]; static const XMLCh TYPE_NAME[]; static const XMLCh ID_ATTRIB_NAME[]; SimpleXMLObject( const XMLCh* nsURI=nullptr, const XMLCh* localName=nullptr, const XMLCh* prefix=nullptr, const xmltooling::QName* schemaType=nullptr ) : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_id(nullptr) { #ifndef XMLTOOLING_NO_XMLSEC m_children.push_back(nullptr); m_signature=m_children.begin(); #endif } virtual ~SimpleXMLObject() { XMLString::release(&m_id); } XMLObject* clone() const { auto_ptr domClone(AbstractDOMCachingXMLObject::clone()); SimpleXMLObject* ret=dynamic_cast(domClone.get()); if (ret) { domClone.release(); return ret; } return new SimpleXMLObject(*this); } const XMLCh* getXMLID() const { return getId(); } const XMLCh* getId() const { return m_id; } void setId(const XMLCh* id) { m_id=prepareForAssignment(m_id,id); } const XMLCh* getValue() const { return getTextContent(); } void setValue(const XMLCh* value) { setTextContent(value); } #ifndef XMLTOOLING_NO_XMLSEC Signature* getSignature() const { return dynamic_cast(*m_signature); } void setSignature(Signature* sig) { *m_signature=prepareForAssignment(*m_signature,sig); } #endif VectorOf(SimpleXMLObject) getSimpleXMLObjects() { return VectorOf(SimpleXMLObject)(this, m_simples, &m_children, m_children.end()); } const std::vector& getSimpleXMLObjects() const { return m_simples; } protected: void marshallAttributes(xercesc::DOMElement* domElement) const { if(getId()) { domElement->setAttributeNS(nullptr, SimpleXMLObject::ID_ATTRIB_NAME, getId()); #ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE domElement->setIdAttributeNS(nullptr, SimpleXMLObject::ID_ATTRIB_NAME, true); #else domElement->setIdAttributeNS(nullptr, SimpleXMLObject::ID_ATTRIB_NAME); #endif } marshallExtensionAttributes(domElement); } void processChildElement(XMLObject* childXMLObject, const xercesc::DOMElement* root) { SimpleXMLObject* simple=dynamic_cast(childXMLObject); if (simple) { getSimpleXMLObjects().push_back(simple); return; } #ifndef XMLTOOLING_NO_XMLSEC Signature* sig=dynamic_cast(childXMLObject); if (sig) { setSignature(sig); return; } #endif throw UnmarshallingException("Unknown child element cannot be added to parent object."); } void processAttribute(const xercesc::DOMAttr* attribute) { if (XMLHelper::isNodeNamed(attribute, nullptr, SimpleXMLObject::ID_ATTRIB_NAME)) { setId(attribute->getValue()); return; } unmarshallExtensionAttribute(attribute); } private: XMLCh* m_id; vector m_simples; #ifndef XMLTOOLING_NO_XMLSEC list::iterator m_signature; #endif }; class SimpleXMLObjectBuilder : public XMLObjectBuilder { public: XMLObject* buildObject() const { return buildObject(SimpleXMLObject::NAMESPACE, SimpleXMLObject::LOCAL_NAME, SimpleXMLObject::NAMESPACE_PREFIX); } XMLObject* buildObject( const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=nullptr, const xmltooling::QName* schemaType=nullptr ) const { return new SimpleXMLObject(nsURI, localName, prefix, schemaType); } static SimpleXMLObject* buildSimpleXMLObject() { const SimpleXMLObjectBuilder* b = dynamic_cast( XMLObjectBuilder::getBuilder(xmltooling::QName(SimpleXMLObject::NAMESPACE,SimpleXMLObject::LOCAL_NAME)) ); if (b) return dynamic_cast(b->buildObject()); throw XMLObjectException("Unable to obtain typed builder for SimpleXMLObject."); } }; #if defined (_MSC_VER) #pragma warning( pop ) #endif xmltooling-1.5.3/xmltoolingtest/ComplexXMLObjectTest.h000644 001751 001751 00000005542 12003305017 024323 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ #include "XMLObjectBaseTestCase.h" #include #include class ComplexXMLObjectTest : public CxxTest::TestSuite { public: ComplexXMLObjectTest() {} void setUp() { XMLObjectBuilder::registerDefaultBuilder(new AnyElementBuilder()); } void tearDown() { XMLObjectBuilder::deregisterDefaultBuilder(); } void testComplexUnmarshalling() { string path=data_path + "ComplexXMLObject.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs); TS_ASSERT(doc!=nullptr); XercesJanitor janitor(doc); const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement()); TS_ASSERT(b!=nullptr); auto_ptr wcObject( dynamic_cast(b->buildFromDocument(doc, false)) ); TS_ASSERT(wcObject.get()!=nullptr); VectorOf(XMLObject) kids=wcObject->getUnknownXMLObjects(); TSM_ASSERT_EQUALS("Number of child elements was not expected value", 2, kids.size()); ElementProxy* wc1=dynamic_cast(*(++kids.begin())); ElementProxy* wc2=dynamic_cast(*(++(wc1->getUnknownXMLObjects().begin()))); TSM_ASSERT_EQUALS("Number of child elements was not expected value", 3, wc2->getUnknownXMLObjects().size()); static const XMLCh html[] = {chLatin_h, chLatin_t, chLatin_m, chLatin_l, chNull}; static const XMLCh div[] = {chLatin_d, chLatin_i, chLatin_v, chNull}; auto_ptr_XMLCh htmlns("http://www.w3.org/1999/xhtml"); xmltooling::QName q(htmlns.get(),div,html); TSM_ASSERT_EQUALS("Element QName unexpected", wc2->getUnknownXMLObjects()[2]->getElementQName(),q); DOMElement* rebuilt = wcObject->marshall(XMLToolingConfig::getConfig().getParser().newDocument()); wcObject->setDocument(rebuilt->getOwnerDocument()); TS_ASSERT(rebuilt->isEqualNode(doc->getDocumentElement())); } }; xmltooling-1.5.3/xmltoolingtest/DateTimeTest.h000644 001751 001751 00000004271 12003305017 022676 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ #include "XMLObjectBaseTestCase.h" #include class DateTimeTest : public CxxTest::TestSuite { public: void setUp() { } void tearDown() { } void testDateTime() { auto_ptr_XMLCh ts1("1970-01-31T00:00:00Z"); DateTime dt1(ts1.get()); dt1.parseDateTime(); TSM_ASSERT_EQUALS("Epoch for Jan 31, 1970 did not match.", dt1.getEpoch(), 2592000); DateTime dt2(1227234172); auto_ptr_char ts2(dt2.getRawData()); TSM_ASSERT("ISO string for Nov 21, 2008 02:22:52 did not match.", !strcmp(ts2.get(), "2008-11-21T02:22:52Z")); } void testDuration() { auto_ptr_XMLCh d1("P1D"); DateTime dt1(d1.get()); dt1.parseDuration(); TSM_ASSERT_EQUALS("Epoch for 1 day did not match.", dt1.getEpoch(true), 86400); auto_ptr_XMLCh d2("PT2H"); DateTime dt2(d2.get()); dt2.parseDuration(); TSM_ASSERT_EQUALS("Epoch for 2 hours did not match.", dt2.getEpoch(true), 7200); DateTime dt3(28800, true); auto_ptr_char d3(dt3.getRawData()); TSM_ASSERT("ISO string for 8 hours did not match.", !strcmp(d3.get(), "P0DT8H0M0S")); DateTime dt4(-29000, true); auto_ptr_char d4(dt4.getRawData()); TSM_ASSERT("ISO string for negative 8 hours did not match.", !strcmp(d4.get(), "-P0DT8H3M20S")); } }; xmltooling-1.5.3/xmltoolingtest/ExceptionTest.h000644 001751 001751 00000004562 12003305017 023143 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ #include "XMLObjectBaseTestCase.h" #include class ExceptionTest : public CxxTest::TestSuite { public: void testException(void) { #define TEST(n,b,a) XMLToolingException e##n(b); \ TS_ASSERT(!strcmp(a,e##n.what())) #define TESTP(n,b,a,p) MarshallingException e##n(b,p); \ TS_ASSERT(!strcmp(a,e##n.what())) TESTP(1,"This is a test.", "This is a test.", params(2,"Foo","bar")); TESTP(2,"This is a test.$", "This is a test.", params(2,"Foo","bar")); TESTP(3,"This is a $ test.", "This is a test.", params(2,"Foo","bar")); TESTP(4,"$$This is a test.$", "$This is a test.", params(2,"Foo","bar")); TESTP(5,"$This is a $test.", "This is a test.", params(2,"Foo","bar")); TESTP(6,"$1 is a $2", "Foo is a bar", params(2,"Foo","bar")); TESTP(7,"$This is a $test.", "Foo is a bar.", namedparams(2,"This","Foo","test","bar")); TESTP(8,"Unable to generate random data: $1", "Unable to generate random data: OpenSSLCryptoProvider::getRandom - OpenSSL random not properly initialised", params(1,"OpenSSLCryptoProvider::getRandom - OpenSSL random not properly initialised")); string buf=e7.toString(); auto_ptr ptr(XMLToolingException::fromString(buf.c_str())); TS_ASSERT(typeid(*ptr)==typeid(MarshallingException)); TS_ASSERT(!strcmp(ptr->what(),"Foo is a bar.")); } }; xmltooling-1.5.3/xmltoolingtest/KeyInfoTest.h000644 001751 001751 00000011550 12003305017 022544 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ #include "XMLObjectBaseTestCase.h" #include #include #include using namespace xmlsignature; class KeyInfoTest : public CxxTest::TestSuite { public: KeyInfoTest() {} void setUp() { XMLObjectBuilder::registerDefaultBuilder(new AnyElementBuilder()); } void tearDown() { XMLObjectBuilder::deregisterDefaultBuilder(); } void testKeyInfo1() { string path=data_path + "KeyInfo1.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getValidatingParser().parse(fs); TS_ASSERT(doc!=nullptr); const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement()); TS_ASSERT(b!=nullptr); auto_ptr kiObject(dynamic_cast(b->buildFromDocument(doc))); TS_ASSERT(kiObject.get()!=nullptr); TSM_ASSERT_EQUALS("Number of child elements was not expected value", 4, kiObject->getOrderedChildren().size()); TSM_ASSERT_EQUALS("Number of child elements was not expected value", 1, kiObject->getKeyValues().size()); TSM_ASSERT_EQUALS("Number of child elements was not expected value", 1, kiObject->getX509Datas().front()->getX509Certificates().size()); auto_ptr_XMLCh expected("Public Key for CN=xmldap.org, OU=Domain Control Validated, O=xmldap.org"); TSM_ASSERT("KeyName was not expected value", XMLString::equals(expected.get(), kiObject->getKeyNames().front()->getName())); SchemaValidators.validate(kiObject.get()); } void testKeyInfo2() { string path=data_path + "KeyInfo2.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getValidatingParser().parse(fs); TS_ASSERT(doc!=nullptr); const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement()); TS_ASSERT(b!=nullptr); auto_ptr kiObject(dynamic_cast(b->buildFromDocument(doc))); TS_ASSERT(kiObject.get()!=nullptr); TSM_ASSERT_EQUALS("Number of child elements was not expected value", 2, kiObject->getOrderedChildren().size()); TSM_ASSERT_EQUALS("Number of child elements was not expected value", 1, kiObject->getRetrievalMethods().size()); TSM_ASSERT_EQUALS("Number of child elements was not expected value", 2, kiObject->getSPKIDatas().front()->getSPKISexps().size()); SchemaValidators.validate(kiObject.get()); } void testKeyInfo3() { string path=data_path + "KeyInfo3.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs); TS_ASSERT(doc!=nullptr); const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement()); TS_ASSERT(b!=nullptr); auto_ptr kiObject(dynamic_cast(b->buildFromDocument(doc))); TS_ASSERT(kiObject.get()!=nullptr); TS_ASSERT_THROWS(SchemaValidators.validate(kiObject.get()),ValidationException); } void testKeyInfo4() { string path=data_path + "KeyInfo4.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getValidatingParser().parse(fs); TS_ASSERT(doc!=nullptr); const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement()); TS_ASSERT(b!=nullptr); auto_ptr kiObject(dynamic_cast(b->buildFromDocument(doc))); TS_ASSERT(kiObject.get()!=nullptr); TSM_ASSERT_EQUALS("Number of child elements was not expected value", 1, kiObject->getKeyValues().size()); ECKeyValue* kv = kiObject->getKeyValues().front()->getECKeyValue(); TSM_ASSERT("Missing ECKeyValue", kv!=nullptr); TSM_ASSERT("Missing NamedCurve", kv->getNamedCurve()!=nullptr); TSM_ASSERT("Missing PublicKey", kv->getPublicKey()!=nullptr); SchemaValidators.validate(kiObject.get()); } }; xmltooling-1.5.3/xmltoolingtest/MarshallingTest.h000644 001751 001751 00000011302 12003305017 023434 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ #include "XMLObjectBaseTestCase.h" #include class MarshallingTest : public CxxTest::TestSuite { public: void setUp() { xmltooling::QName qname(SimpleXMLObject::NAMESPACE,SimpleXMLObject::LOCAL_NAME); xmltooling::QName qtype(SimpleXMLObject::NAMESPACE,SimpleXMLObject::TYPE_NAME); XMLObjectBuilder::registerBuilder(qname, new SimpleXMLObjectBuilder()); XMLObjectBuilder::registerBuilder(qtype, new SimpleXMLObjectBuilder()); } void tearDown() { xmltooling::QName qname(SimpleXMLObject::NAMESPACE,SimpleXMLObject::LOCAL_NAME); xmltooling::QName qtype(SimpleXMLObject::NAMESPACE,SimpleXMLObject::TYPE_NAME); XMLObjectBuilder::deregisterBuilder(qname); XMLObjectBuilder::deregisterBuilder(qtype); } void testMarshallingWithAttributes() { auto_ptr sxObject(SimpleXMLObjectBuilder::buildSimpleXMLObject()); TS_ASSERT(sxObject.get()!=nullptr); auto_ptr_XMLCh expected("Firefly"); sxObject->setId(expected.get()); DOMElement* rootElement = sxObject->marshall(); string path=data_path + "SimpleXMLObjectWithAttribute.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs); TS_ASSERT(doc!=nullptr); TS_ASSERT(rootElement->isEqualNode(doc->getDocumentElement())); doc->release(); } void testMarshallingWithElementContent() { auto_ptr sxObject(SimpleXMLObjectBuilder::buildSimpleXMLObject()); TS_ASSERT(sxObject.get()!=nullptr); auto_ptr_XMLCh expected("Sample Content"); sxObject->setValue(expected.get()); DOMElement* rootElement = sxObject->marshall(); string path=data_path + "SimpleXMLObjectWithContent.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs); TS_ASSERT(doc!=nullptr); TS_ASSERT(rootElement->isEqualNode(doc->getDocumentElement())); doc->release(); } void testMarshallingWithChildElements() { xmltooling::QName qname(SimpleXMLObject::NAMESPACE,SimpleXMLObject::LOCAL_NAME); const SimpleXMLObjectBuilder* b=dynamic_cast(XMLObjectBuilder::getBuilder(qname)); TS_ASSERT(b!=nullptr); auto_ptr sxObject(dynamic_cast(b->buildObject())); TS_ASSERT(sxObject.get()!=nullptr); VectorOf(SimpleXMLObject) kids=sxObject->getSimpleXMLObjects(); kids.push_back(dynamic_cast(b->buildObject())); kids.push_back(dynamic_cast(b->buildObject())); kids.push_back(dynamic_cast(b->buildObject())); // Test some collection stuff auto_ptr_XMLCh foo("Foo"); auto_ptr_XMLCh bar("Bar"); auto_ptr_XMLCh baz("Baz"); kids.begin()->setId(foo.get()); kids.at(2)->setValue(bar.get()); kids.erase(kids.begin()+1); TS_ASSERT(XMLString::equals(kids.back()->getValue(), bar.get())); xmltooling::QName qtype(SimpleXMLObject::NAMESPACE,SimpleXMLObject::TYPE_NAME,SimpleXMLObject::NAMESPACE_PREFIX); kids.push_back( dynamic_cast( b->buildObject(SimpleXMLObject::NAMESPACE,SimpleXMLObject::DERIVED_NAME,SimpleXMLObject::NAMESPACE_PREFIX,&qtype) ) ); kids.back()->setValue(baz.get()); DOMElement* rootElement = sxObject->marshall(); string path=data_path + "SimpleXMLObjectWithChildren.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs); TS_ASSERT(doc!=nullptr); TS_ASSERT(rootElement->isEqualNode(doc->getDocumentElement())); doc->release(); } }; xmltooling-1.5.3/xmltoolingtest/NonVisibleNamespaceTest.h000644 001751 001751 00000012353 12003305017 025067 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ #include "XMLObjectBaseTestCase.h" #include #include class NonVisibleNamespaceTest : public CxxTest::TestSuite { public: void setUp() { xmltooling::QName qname(SimpleXMLObject::NAMESPACE,SimpleXMLObject::LOCAL_NAME); xmltooling::QName qtype(SimpleXMLObject::NAMESPACE,SimpleXMLObject::TYPE_NAME); XMLObjectBuilder::registerBuilder(qname, new SimpleXMLObjectBuilder()); XMLObjectBuilder::registerBuilder(qtype, new SimpleXMLObjectBuilder()); } void tearDown() { xmltooling::QName qname(SimpleXMLObject::NAMESPACE,SimpleXMLObject::LOCAL_NAME); xmltooling::QName qtype(SimpleXMLObject::NAMESPACE,SimpleXMLObject::TYPE_NAME); XMLObjectBuilder::deregisterBuilder(qname); XMLObjectBuilder::deregisterBuilder(qtype); } void testNamespacesAfterBuilding() { xmltooling::QName qtype(SimpleXMLObject::NAMESPACE,SimpleXMLObject::TYPE_NAME,SimpleXMLObject::NAMESPACE_PREFIX); const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(qtype); TS_ASSERT(b!=nullptr); auto_ptr sxObject( dynamic_cast(b->buildObject(SimpleXMLObject::NAMESPACE, SimpleXMLObject::LOCAL_NAME, nullptr, &qtype)) ); TS_ASSERT(sxObject.get()!=nullptr); static_cast(sxObject.get())->setAttribute( xmltooling::QName(nullptr, "attr1"), xmltooling::QName("http://www.example.org/testObjects/ext", "Value1", "test2") ); static const XMLCh TEST2_PREFIX[] = { chLatin_t, chLatin_e, chLatin_s, chLatin_t, chDigit_2, chNull }; const set& namespaces = sxObject->getNamespaces(); bool cond1=false, cond2=false, cond3 = false; for (set::const_iterator ns = namespaces.begin(); ns != namespaces.end(); ++ns) { if (XMLString::equals(ns->getNamespacePrefix(), SimpleXMLObject::NAMESPACE_PREFIX)) { TSM_ASSERT("'test' namespace was visibly used", ns->usage() != Namespace::VisiblyUsed); cond1 = true; } else if (XMLString::equals(ns->getNamespacePrefix(), TEST2_PREFIX)) { TSM_ASSERT("'test2' namespace was visibly used", ns->usage() != Namespace::VisiblyUsed); cond2 = true; } else if (XMLString::equals(ns->getNamespacePrefix(), &chNull)) { TSM_ASSERT("Default namespace was not visibly used", ns->usage() == Namespace::VisiblyUsed); cond3 = true; } } TSM_ASSERT("'test' namespace was missing.", cond1); TSM_ASSERT("'test2' namespace was missing.", cond2); TSM_ASSERT("Default namespace was missing.", cond3); } void testNamespacesAfterUnmarshalling() { string path=data_path + "SimpleXMLObjectWithNonVisible.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs); TS_ASSERT(doc!=nullptr); const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement()); TS_ASSERT(b!=nullptr); auto_ptr sxObject( dynamic_cast(b->buildFromDocument(doc)) ); TS_ASSERT(sxObject.get()!=nullptr); const set& namespaces = sxObject->getNamespaces(); bool cond1=false, cond2=false; for (set::const_iterator ns = namespaces.begin(); ns != namespaces.end(); ++ns) { if (XMLString::equals(ns->getNamespacePrefix(), SimpleXMLObject::NAMESPACE_PREFIX)) { TSM_ASSERT("'test' namespace was visibly used", ns->usage() != Namespace::VisiblyUsed); cond1 = true; } else if (XMLString::equals(ns->getNamespacePrefix(), &chNull)) { TSM_ASSERT("Default namespace was not visibly used", ns->usage() == Namespace::VisiblyUsed); cond2 = true; } } TSM_ASSERT("Default or 'test' namespace missing.", cond1 && cond2); for (set::const_iterator ns = namespaces.begin(); ns != namespaces.end(); ++ns) { static const XMLCh TEST2_PREFIX[] = { chLatin_t, chLatin_e, chLatin_s, chLatin_t, chDigit_2, chNull }; TSM_ASSERT("'test2' namespace was noted during unmarshalling", !XMLString::equals(ns->getNamespacePrefix(), TEST2_PREFIX)); } } }; xmltooling-1.5.3/xmltoolingtest/SOAPTest.h000644 001751 001751 00000003442 12003305017 021743 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ #include "XMLObjectBaseTestCase.h" #include #include #include using namespace soap11; class SOAPTest : public CxxTest::TestSuite { public: SOAPTest() {} void testSOAPFault() { string path=data_path + "SOAPFault.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getValidatingParser().parse(fs); TS_ASSERT(doc!=nullptr); const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement()); TS_ASSERT(b!=nullptr); auto_ptr envObject(dynamic_cast(b->buildFromDocument(doc))); TS_ASSERT(envObject.get()!=nullptr); TSM_ASSERT("SOAP Envelope missing Body", envObject->getBody() != nullptr); TSM_ASSERT_EQUALS("SOAP Body missing Fault", 1, envObject->getBody()->getOrderedChildren().size()); SchemaValidators.validate(envObject.get()); } }; xmltooling-1.5.3/xmltoolingtest/UnmarshallingTest.h000644 001751 001751 00000015510 12003305017 024004 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ #include "XMLObjectBaseTestCase.h" #include #include const XMLCh SimpleXMLObject::NAMESPACE[] = { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash, chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_e, chLatin_x, chLatin_a, chLatin_m, chLatin_p, chLatin_l, chLatin_e, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash, chLatin_t, chLatin_e, chLatin_s, chLatin_t, chLatin_O, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t, chLatin_s, chNull }; const XMLCh SimpleXMLObject::NAMESPACE_PREFIX[] = { chLatin_t, chLatin_e, chLatin_s, chLatin_t, chNull }; const XMLCh SimpleXMLObject::LOCAL_NAME[] = { chLatin_S, chLatin_i, chLatin_m, chLatin_p, chLatin_l, chLatin_e, chLatin_E, chLatin_l, chLatin_e, chLatin_m, chLatin_e, chLatin_n, chLatin_t, chNull }; const XMLCh SimpleXMLObject::DERIVED_NAME[] = { chLatin_D, chLatin_e, chLatin_r, chLatin_i, chLatin_v, chLatin_e, chLatin_d, chLatin_E, chLatin_l, chLatin_e, chLatin_m, chLatin_e, chLatin_n, chLatin_t, chNull }; const XMLCh SimpleXMLObject::TYPE_NAME[] = { chLatin_S, chLatin_i, chLatin_m, chLatin_p, chLatin_l, chLatin_e, chLatin_E, chLatin_l, chLatin_e, chLatin_m, chLatin_e, chLatin_n, chLatin_t, chLatin_T, chLatin_y, chLatin_p, chLatin_e, chNull }; const XMLCh SimpleXMLObject::ID_ATTRIB_NAME[] = { chLatin_I, chLatin_d, chNull }; class UnmarshallingTest : public CxxTest::TestSuite { public: void setUp() { xmltooling::QName qname(SimpleXMLObject::NAMESPACE,SimpleXMLObject::LOCAL_NAME); xmltooling::QName qtype(SimpleXMLObject::NAMESPACE,SimpleXMLObject::TYPE_NAME); XMLObjectBuilder::registerBuilder(qname, new SimpleXMLObjectBuilder()); XMLObjectBuilder::registerBuilder(qtype, new SimpleXMLObjectBuilder()); } void tearDown() { xmltooling::QName qname(SimpleXMLObject::NAMESPACE,SimpleXMLObject::LOCAL_NAME); xmltooling::QName qtype(SimpleXMLObject::NAMESPACE,SimpleXMLObject::TYPE_NAME); XMLObjectBuilder::deregisterBuilder(qname); XMLObjectBuilder::deregisterBuilder(qtype); } void testUnmarshallingWithAttributes() { string path=data_path + "SimpleXMLObjectWithAttribute.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs); TS_ASSERT(doc!=nullptr); const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement()); TS_ASSERT(b!=nullptr); auto_ptr sxObject( dynamic_cast(b->buildFromDocument(doc)) ); TS_ASSERT(sxObject.get()!=nullptr); auto_ptr_XMLCh expected("Firefly"); TSM_ASSERT("ID was not expected value", XMLString::equals(expected.get(), sxObject->getId())); } void testUnmarshallingWithElementContent() { string path=data_path + "SimpleXMLObjectWithContent.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs); TS_ASSERT(doc!=nullptr); const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement()); TS_ASSERT(b!=nullptr); auto_ptr sxObject( dynamic_cast(b->buildFromDocument(doc)) ); TS_ASSERT(sxObject.get()!=nullptr); auto_ptr_XMLCh expected("Sample Content"); TSM_ASSERT("Element content was not expected value", XMLString::equals(expected.get(), sxObject->getValue())); } void testUnmarshallingWithChildElements() { string path=data_path + "SimpleXMLObjectWithChildren.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs); TS_ASSERT(doc!=nullptr); const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement()); TS_ASSERT(b!=nullptr); auto_ptr sxObject( dynamic_cast(b->buildFromDocument(doc)) ); TS_ASSERT(sxObject.get()!=nullptr); VectorOf(SimpleXMLObject) kids=sxObject->getSimpleXMLObjects(); TSM_ASSERT_EQUALS("Number of child elements was not expected value", 3, kids.size()); xmltooling::QName qtype(SimpleXMLObject::NAMESPACE,SimpleXMLObject::TYPE_NAME); TSM_ASSERT_EQUALS("Child's schema type was not expected value", qtype, *(kids.back()->getSchemaType())); } void testUnmarshallingWithClone() { string path=data_path + "SimpleXMLObjectWithChildren.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs); TS_ASSERT(doc!=nullptr); const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement()); TS_ASSERT(b!=nullptr); auto_ptr sxObject( dynamic_cast(b->buildFromDocument(doc)) ); TS_ASSERT(sxObject.get()!=nullptr); sxObject->releaseThisAndChildrenDOM(); auto_ptr clonedObject(dynamic_cast(sxObject->clone())); VectorOf(SimpleXMLObject) kids=clonedObject->getSimpleXMLObjects(); TSM_ASSERT_EQUALS("Number of child elements was not expected value", 3, kids.size()); xmltooling::QName qtype(SimpleXMLObject::NAMESPACE,SimpleXMLObject::TYPE_NAME); TSM_ASSERT_EQUALS("Child's schema type was not expected value", qtype, *(kids.back()->getSchemaType())); } void testUnmarshallingWithUnknownChild() { string path=data_path + "SimpleXMLObjectWithUnknownChild.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs); TS_ASSERT(doc!=nullptr); const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement()); TS_ASSERT(b!=nullptr); TS_ASSERT_THROWS(b->buildFromDocument(doc),UnmarshallingException); doc->release(); } }; xmltooling-1.5.3/xmltoolingtest/TemplateEngineTest.h000644 001751 001751 00000003757 12003305017 024113 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ #include "XMLObjectBaseTestCase.h" #include #include #include class TemplateEngineTest : public CxxTest::TestSuite { public: void setUp() { } void tearDown() { } void testTemplateEngine() { auto_ptr engine(new TemplateEngine()); TemplateEngine::TemplateParameters p; p.m_map["foo1"] = "bar1"; p.m_map["foo3"] = "bar3"; p.m_map["encoded"] = "http://www.example.org/foo/bar#foobar"; multimap& submap = p.m_collectionMap["sub"]; submap.insert(pair("subfoo1", "subbar1")); submap.insert(pair("subfoo2", "subbar2")); string path = data_path + "template.in"; ifstream in(path.c_str()); ostringstream out; engine->run(in,out,p); string compstr; path = data_path + "template.out"; ifstream compfile(path.c_str()); while (getline(compfile,path)) compstr += path + '\n'; TSM_ASSERT_EQUALS("Template output did not match.", out.str(), compstr); } }; xmltooling-1.5.3/xmltoolingtest/xmltoolingtest.h000644 001751 001751 00000011023 12003305017 023427 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ #include "XMLObjectBaseTestCase.h" #include #include #include #include //#define XMLTOOLINGTEST_LEAKCHECK std::string data_path = "../xmltoolingtest/data/"; class ToolingFixture : public CxxTest::GlobalFixture { public: bool setUpWorld() { XMLToolingConfig::getConfig().log_config(); if (getenv("XMLTOOLINGTEST_DATA")) data_path=std::string(getenv("XMLTOOLINGTEST_DATA")) + "/"; XMLToolingConfig::getConfig().catalog_path = data_path + "catalog.xml"; if (!XMLToolingConfig::getConfig().init()) return false; if (!XMLToolingConfig::getConfig().init()) // should be a no-op return false; return true; } bool tearDownWorld() { XMLToolingConfig::getConfig().term(); // should be a no-op XMLToolingConfig::getConfig().term(); XMLToolingConfig::getConfig().term(); // shouldn't break anything #if defined(_MSC_VER ) && defined(XMLTOOLINGTEST_LEAKCHECK) _CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDOUT ); _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDOUT ); _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDOUT ); _CrtDumpMemoryLeaks(); #endif return true; } //bool setUp() { printf( "" ); return true; } //bool tearDown() { printf( "" ); return true; } }; static ToolingFixture globalFixture; class GlobalTest : public CxxTest::TestSuite { public: void setUp() { XMLObjectBuilder::registerDefaultBuilder(new UnknownElementBuilder()); } void tearDown() { XMLObjectBuilder::deregisterDefaultBuilder(); } void testUnknown() { ifstream fs("../xmltoolingtest/data/SimpleXMLObjectWithChildren.xml"); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs); TS_ASSERT(doc!=nullptr); string buf1; XMLHelper::serialize(doc->getDocumentElement(), buf1); const XMLObjectBuilder* b=XMLObjectBuilder::getBuilder(doc->getDocumentElement()); TS_ASSERT(b!=nullptr); auto_ptr xmlObject(b->buildFromDocument(doc)); // bind document TS_ASSERT(xmlObject.get()!=nullptr); auto_ptr clonedObject(xmlObject->clone()); TS_ASSERT(clonedObject.get()!=nullptr); DOMElement* rootElement=clonedObject->marshall(); TS_ASSERT(rootElement!=nullptr); // should reuse DOM TS_ASSERT(rootElement==clonedObject->marshall()); string buf2; XMLHelper::serialize(rootElement, buf2); TS_ASSERT_EQUALS(buf1,buf2); } void testUnknownWithDocChange() { ifstream fs("../xmltoolingtest/data/SimpleXMLObjectWithChildren.xml"); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs); TS_ASSERT(doc!=nullptr); string buf1; XMLHelper::serialize(doc->getDocumentElement(), buf1); const XMLObjectBuilder* b=XMLObjectBuilder::getBuilder(doc->getDocumentElement()); TS_ASSERT(b!=nullptr); auto_ptr xmlObject(b->buildFromDocument(doc)); // bind document TS_ASSERT(xmlObject.get()!=nullptr); DOMDocument* newDoc=XMLToolingConfig::getConfig().getParser().newDocument(); DOMElement* rootElement=xmlObject->marshall(newDoc); TS_ASSERT(rootElement!=nullptr); string buf2; XMLHelper::serialize(rootElement, buf2); TS_ASSERT_EQUALS(buf1,buf2); newDoc->release(); } }; xmltooling-1.5.3/xmltoolingtest/EncryptionTest.h000644 001751 001751 00000007265 12003305017 023342 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ #include "XMLObjectBaseTestCase.h" #include #include #include #include #include #include #include #include #include using namespace xmlencryption; class EncryptionTest : public CxxTest::TestSuite { CredentialResolver* m_resolver; public: void setUp() { m_resolver=nullptr; string config = data_path + "FilesystemCredentialResolver.xml"; ifstream in(config.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(in); XercesJanitor janitor(doc); m_resolver = XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin( CHAINING_CREDENTIAL_RESOLVER,doc->getDocumentElement() ); XMLObjectBuilder::registerDefaultBuilder(new UnknownElementBuilder()); } void tearDown() { XMLObjectBuilder::deregisterDefaultBuilder(); delete m_resolver; } void testEncryption() { string path=data_path + "ComplexXMLObject.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs); TS_ASSERT(doc!=nullptr); try { CredentialCriteria cc; cc.setUsage(Credential::ENCRYPTION_CREDENTIAL); Locker locker(m_resolver); const Credential* cred=m_resolver->resolve(&cc); TSM_ASSERT("Retrieved credential was null", cred!=nullptr); Encrypter encrypter; Encrypter::EncryptionParams ep; Encrypter::KeyEncryptionParams kep(*cred); auto_ptr encData(encrypter.encryptElement(doc->getDocumentElement(),ep,&kep)); string buf; XMLHelper::serialize(encData->marshall(), buf); //TS_TRACE(buf.c_str()); istringstream is(buf); DOMDocument* doc2=XMLToolingConfig::getConfig().getValidatingParser().parse(is); auto_ptr encData2( dynamic_cast(XMLObjectBuilder::buildOneFromElement(doc2->getDocumentElement(),true)) ); Decrypter decrypter(m_resolver); DOMDocumentFragment* frag = decrypter.decryptData(*encData2.get()); XMLHelper::serialize(static_cast(frag->getFirstChild()), buf); //TS_TRACE(buf.c_str()); TS_ASSERT(doc->getDocumentElement()->isEqualNode(frag->getFirstChild())); frag->release(); doc->release(); } catch (XMLToolingException& e) { TS_TRACE(e.what()); doc->release(); throw; } } }; xmltooling-1.5.3/xmltoolingtest/FilesystemCredentialResolverTest.h000644 001751 001751 00000004247 12003305017 027046 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ #include "XMLObjectBaseTestCase.h" #include #include #include class FilesystemCredentialResolverTest : public CxxTest::TestSuite { public: void setUp() { } void tearDown() { } void testFilesystemProvider() { string config = data_path + "FilesystemCredentialResolver.xml"; ifstream in(config.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(in); XercesJanitor janitor(doc); auto_ptr credResolver( XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin( CHAINING_CREDENTIAL_RESOLVER,doc->getDocumentElement() ) ); vector creds; Locker locker(credResolver.get()); credResolver->resolve(creds); TSM_ASSERT_EQUALS("Retrieved credential was null", 1, creds.size()); TSM_ASSERT("Retrieved key was null", creds.front()->getPrivateKey()!=nullptr); TSM_ASSERT_EQUALS("Unexpected number of certificates", 1, dynamic_cast(creds.front())->getEntityCertificateChain().size()); TSM_ASSERT_EQUALS("Custom key name not found", 1, creds.front()->getKeyNames().count("Sample Key")); } }; xmltooling-1.5.3/xmltoolingtest/InlineKeyResolverTest.h000644 001751 001751 00000007416 12003305017 024617 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ #include "XMLObjectBaseTestCase.h" #include #include #include #include #include using namespace xmlsignature; class InlineKeyResolverTest : public CxxTest::TestSuite { KeyInfoResolver* m_resolver; public: InlineKeyResolverTest() : m_resolver(nullptr) {} void setUp() { string config = data_path + "InlineKeyResolver.xml"; ifstream in(config.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(in); XercesJanitor janitor(doc); m_resolver=XMLToolingConfig::getConfig().KeyInfoResolverManager.newPlugin(INLINE_KEYINFO_RESOLVER,doc->getDocumentElement()); } void tearDown() { delete m_resolver; m_resolver=nullptr; } void testResolver() { string path=data_path + "KeyInfo1.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getValidatingParser().parse(fs); TS_ASSERT(doc!=nullptr); const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement()); TS_ASSERT(b!=nullptr); auto_ptr kiObject(dynamic_cast(b->buildFromDocument(doc))); TS_ASSERT(kiObject.get()!=nullptr); auto_ptr cred(dynamic_cast(m_resolver->resolve(kiObject.get()))); TSM_ASSERT("Unable to resolve KeyInfo into Credential.", cred.get()!=nullptr); TSM_ASSERT("Unable to resolve public key.", cred->getPublicKey()!=nullptr); TSM_ASSERT_EQUALS("Unexpected key type.", cred->getPublicKey()->getKeyType(), XSECCryptoKey::KEY_RSA_PUBLIC); TSM_ASSERT_EQUALS("Wrong certificate count.", cred->getEntityCertificateChain().size(), 1); TSM_ASSERT_EQUALS("Wrong CRL count.", cred->getCRLs().size(), 3); } void testDER() { string path=data_path + "KeyInfo5.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getValidatingParser().parse(fs); TS_ASSERT(doc!=nullptr); const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement()); TS_ASSERT(b!=nullptr); auto_ptr kiObject(dynamic_cast(b->buildFromDocument(doc))); TS_ASSERT(kiObject.get()!=nullptr); auto_ptr cred(dynamic_cast(m_resolver->resolve(kiObject.get()))); TSM_ASSERT("Unable to resolve KeyInfo into Credential.", cred.get()!=nullptr); TSM_ASSERT("Unable to resolve public key.", cred->getPublicKey()!=nullptr); TSM_ASSERT_EQUALS("Unexpected key type.", cred->getPublicKey()->getKeyType(), XSECCryptoKey::KEY_RSA_PUBLIC); TSM_ASSERT_EQUALS("Wrong certificate count.", cred->getEntityCertificateChain().size(), 0); TSM_ASSERT_EQUALS("Wrong CRL count.", cred->getCRLs().size(), 0); } }; xmltooling-1.5.3/xmltoolingtest/MemoryStorageServiceTest.h000644 001751 001751 00000004122 12003305017 025313 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ #include "XMLObjectBaseTestCase.h" #include class MemoryStorageServiceTest : public CxxTest::TestSuite { public: void setUp() { } void tearDown() { } void testMemoryService() { auto_ptr storage( XMLToolingConfig::getConfig().StorageServiceManager.newPlugin(MEMORY_STORAGE_SERVICE,nullptr) ); string data; TSM_ASSERT_EQUALS("Record found in storage.", 0, storage->readString("context", "foo1", &data)); storage->createString("context", "foo1", "bar1", time(nullptr) + 60); storage->createString("context", "foo2", "bar2", time(nullptr) + 60); TSM_ASSERT_EQUALS("Record not found in storage.", 1, storage->readString("context", "foo1", &data)); TSM_ASSERT_EQUALS("Record value doesn't match.", data, "bar1"); TSM_ASSERT_EQUALS("Update failed.", 2, storage->updateString("context", "foo2", "bar1", 0, 1)); TSM_ASSERT_EQUALS("Record not found in storage.", 2, storage->readString("context", "foo2", &data, nullptr, 1)); TSM_ASSERT_EQUALS("Record value doesn't match.", data, "bar1"); TSM_ASSERT("Delete failed.", storage->deleteString("context", "foo2")); storage->reap("context"); } }; xmltooling-1.5.3/xmltoolingtest/PKIXEngineTest.h000644 001751 001751 00000012000 12003305017 023070 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ #include "XMLObjectBaseTestCase.h" #include #include #include #include #include #include class PKIXEngineTest : public CxxTest::TestSuite { X509TrustEngine* buildTrustEngine(const char* filename) { string config = data_path + "x509/" + filename + ".xml"; ifstream in(config.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(in); XercesJanitor janitor(doc); return dynamic_cast( XMLToolingConfig::getConfig().TrustEngineManager.newPlugin( STATIC_PKIX_TRUSTENGINE, doc->getDocumentElement() ) ); } CredentialResolver* m_dummy; ChainingTrustEngine* m_chain; XSECCryptoX509* m_ee; // end entity XSECCryptoX509* m_int1; // any policy XSECCryptoX509* m_int2; // explicit policy XSECCryptoX509* m_int3; // policy mapping public: void setUp() { m_dummy = XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(DUMMY_CREDENTIAL_RESOLVER, nullptr); m_chain = dynamic_cast(XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(CHAINING_TRUSTENGINE, nullptr)); m_ee = m_int1 = m_int2 = m_int3 = nullptr; vector certs; string pathname = data_path + "x509/mdt-signer.crt.pem"; SecurityHelper::loadCertificatesFromFile(certs, pathname.c_str()); pathname = data_path + "x509/mdt-ica.1.crt.pem"; SecurityHelper::loadCertificatesFromFile(certs, pathname.c_str()); pathname = data_path + "x509/mdt-ica.2.crt.pem"; SecurityHelper::loadCertificatesFromFile(certs, pathname.c_str()); pathname = data_path + "x509/mdt-ica.3.crt.pem"; SecurityHelper::loadCertificatesFromFile(certs, pathname.c_str()); m_ee = certs[0]; m_int1 = certs[1]; m_int2 = certs[2]; m_int3 = certs[3]; } void tearDown() { delete m_chain; delete m_dummy; delete m_ee; delete m_int1; delete m_int2; delete m_int3; } void testAnyPolicy() { TrustEngine* trust = buildTrustEngine("AnyPolicy"); m_chain->addTrustEngine(trust); vector untrusted(1, m_int1); TSM_ASSERT("PKIX validation failed", m_chain->validate(m_ee, untrusted, *m_dummy)); TSM_ASSERT_EQUALS("Trust engine removal failed", m_chain->removeTrustEngine(trust), trust); delete trust; } void testExplicitPolicy() { TrustEngine* trust = buildTrustEngine("ExplicitPolicy"); m_chain->addTrustEngine(trust); vector untrusted(1, m_int1); TSM_ASSERT("PKIX validation succeeded despite anyPolicyInhibit", !m_chain->validate(m_ee, untrusted, *m_dummy)); untrusted[0] = m_int2; TSM_ASSERT("PKIX validation failed", m_chain->validate(m_ee, untrusted, *m_dummy)); untrusted[0] = m_int3; TSM_ASSERT("PKIX validation failed", m_chain->validate(m_ee, untrusted, *m_dummy)); TSM_ASSERT_EQUALS("Trust engine removal failed", m_chain->removeTrustEngine(trust), trust); delete trust; } void testExplicitPolicyMap() { TrustEngine* trust = buildTrustEngine("ExplicitPolicyMap"); m_chain->addTrustEngine(trust); vector untrusted(1, m_int3); TSM_ASSERT("PKIX validation failed", m_chain->validate(m_ee, untrusted, *m_dummy)); TSM_ASSERT_EQUALS("Trust engine removal failed", m_chain->removeTrustEngine(trust), trust); delete trust; } void testExplicitPolicyNoMap() { TrustEngine* trust = buildTrustEngine("ExplicitPolicyNoMap"); m_chain->addTrustEngine(trust); vector untrusted(1, m_int3); TSM_ASSERT("PKIX validation succeeded despite policyMappingInhibit", !m_chain->validate(m_ee, untrusted, *m_dummy)); TSM_ASSERT_EQUALS("Trust engine removal failed", m_chain->removeTrustEngine(trust), trust); delete trust; } }; xmltooling-1.5.3/xmltoolingtest/SecurityHelperTest.h000644 001751 001751 00000015120 12003305017 024144 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ #include "XMLObjectBaseTestCase.h" #include #include #include class SecurityHelperTest : public CxxTest::TestSuite { vector certs; SOAPTransport* getTransport(const char* url) { SOAPTransport::Address addr("SecurityHelperTest", "spaces.internet2.edu", url); string scheme(addr.m_endpoint, strchr(addr.m_endpoint,':') - addr.m_endpoint); return XMLToolingConfig::getConfig().SOAPTransportManager.newPlugin(scheme.c_str(), addr); } public: void setUp() { } void tearDown() { for_each(certs.begin(), certs.end(), xmltooling::cleanup()); certs.clear(); } void testKeysFromFiles() { string pathname = data_path + "key.pem"; auto_ptr key1(SecurityHelper::loadKeyFromFile(pathname.c_str())); pathname = data_path + "key.der"; auto_ptr key2(SecurityHelper::loadKeyFromFile(pathname.c_str())); pathname = data_path + "test.pfx"; auto_ptr key3(SecurityHelper::loadKeyFromFile(pathname.c_str(), nullptr, "password")); TSM_ASSERT("PEM/DER keys did not match", SecurityHelper::matches(*key1.get(), *key2.get())); TSM_ASSERT("DER/PKCS12 keys did not match", SecurityHelper::matches(*key2.get(), *key3.get())); pathname = data_path + "key2.pem"; auto_ptr key4(SecurityHelper::loadKeyFromFile(pathname.c_str())); TSM_ASSERT("Different keys matched", !SecurityHelper::matches(*key3.get(), *key4.get())); } void testKeysFromURLs() { string pathname = data_path + "key.pem.bak"; auto_ptr t1(getTransport("https://wiki.shibboleth.net/confluence/download/attachments/3277026/key.pem")); auto_ptr key1(SecurityHelper::loadKeyFromURL(*t1.get(), pathname.c_str())); pathname = data_path + "key.der.bak"; auto_ptr t2(getTransport("https://wiki.shibboleth.net/confluence/download/attachments/3277026/key.der")); auto_ptr key2(SecurityHelper::loadKeyFromURL(*t2.get(), pathname.c_str())); pathname = data_path + "test.pfx.bak"; auto_ptr t3(getTransport("https://wiki.shibboleth.net/confluence/download/attachments/3277026/test.pfx")); auto_ptr key3(SecurityHelper::loadKeyFromURL(*t3.get(), pathname.c_str(), nullptr, "password")); TSM_ASSERT("PEM/DER keys did not match", SecurityHelper::matches(*key1.get(), *key2.get())); TSM_ASSERT("DER/PKCS12 keys did not match", SecurityHelper::matches(*key2.get(), *key3.get())); } void testCertificatesFromFiles() { string pathname = data_path + "cert.pem"; SecurityHelper::loadCertificatesFromFile(certs, pathname.c_str()); pathname = data_path + "cert.der"; SecurityHelper::loadCertificatesFromFile(certs, pathname.c_str()); pathname = data_path + "test.pfx"; SecurityHelper::loadCertificatesFromFile(certs, pathname.c_str(), nullptr, "password"); TSM_ASSERT_EQUALS("Wrong certificate count", certs.size(), 3); auto_ptr key1(certs[0]->clonePublicKey()); auto_ptr key2(certs[1]->clonePublicKey()); auto_ptr key3(certs[2]->clonePublicKey()); TSM_ASSERT("PEM/DER keys did not match", SecurityHelper::matches(*key1.get(), *key2.get())); TSM_ASSERT("DER/PKCS12 keys did not match", SecurityHelper::matches(*key2.get(), *key3.get())); TSM_ASSERT_EQUALS( "Certificate and its key produced different DER encodings", SecurityHelper::getDEREncoding(*certs[2]), SecurityHelper::getDEREncoding(*key1.get()) ); TSM_ASSERT_EQUALS( "Certificate and its key produced different hashed encodings", SecurityHelper::getDEREncoding(*certs[2], "SHA1"), SecurityHelper::getDEREncoding(*key1.get(), "SHA1") ); TSM_ASSERT_EQUALS( "Certificate and its key produced different hashed encodings", SecurityHelper::getDEREncoding(*certs[2], "SHA256"), SecurityHelper::getDEREncoding(*key1.get(), "SHA256") ); for_each(certs.begin(), certs.end(), xmltooling::cleanup()); certs.clear(); } void testCertificatesFromURLs() { string pathname = data_path + "cert.pem.bak"; auto_ptr t1(getTransport("https://wiki.shibboleth.net/confluence/download/attachments/3277026/cert.pem")); SecurityHelper::loadCertificatesFromURL(certs, *t1.get(), pathname.c_str()); pathname = data_path + "cert.der.bak"; auto_ptr t2(getTransport("https://wiki.shibboleth.net/confluence/download/attachments/3277026/cert.der")); SecurityHelper::loadCertificatesFromURL(certs, *t2.get(), pathname.c_str()); pathname = data_path + "test.pfx.bak"; auto_ptr t3(getTransport("https://wiki.shibboleth.net/confluence/download/attachments/3277026/test.pfx")); SecurityHelper::loadCertificatesFromURL(certs, *t3.get(), pathname.c_str(), nullptr, "password"); TSM_ASSERT_EQUALS("Wrong certificate count", certs.size(), 3); auto_ptr key1(certs[0]->clonePublicKey()); auto_ptr key2(certs[0]->clonePublicKey()); auto_ptr key3(certs[0]->clonePublicKey()); TSM_ASSERT("PEM/DER keys did not match", SecurityHelper::matches(*key1.get(), *key2.get())); TSM_ASSERT("DER/PKCS12 keys did not match", SecurityHelper::matches(*key2.get(), *key3.get())); for_each(certs.begin(), certs.end(), xmltooling::cleanup()); certs.clear(); } }; xmltooling-1.5.3/xmltoolingtest/SignatureTest.h000644 001751 001751 00000013550 12003305017 023143 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ #include "XMLObjectBaseTestCase.h" #include #include #include #include #include #include #include #include #include #include class TestContext : public ContentReference { XMLCh* m_uri; public: TestContext(const XMLCh* uri) { m_uri=XMLString::replicate(uri); } virtual ~TestContext() { XMLString::release(&m_uri); } void createReferences(DSIGSignature* sig) { DSIGReference* ref=sig->createReference(m_uri); ref->appendEnvelopedSignatureTransform(); ref->appendCanonicalizationTransform(CANON_C14NE_NOC); } }; class TestValidator : public SignatureValidator { XMLCh* m_uri; public: TestValidator(const XMLCh* uri, const Credential* credential) : SignatureValidator(credential) { m_uri=XMLString::replicate(uri); } virtual ~TestValidator() { XMLString::release(&m_uri); } void validate(const Signature* sigObj) const { DSIGSignature* sig=sigObj->getXMLSignature(); if (!sig) throw SignatureException("Only a marshalled Signature object can be verified."); const XMLCh* uri=sig->getReferenceList()->item(0)->getURI(); TSM_ASSERT_SAME_DATA("Reference URI does not match.",uri,m_uri,XMLString::stringLen(uri)); SignatureValidator::validate(sigObj); } }; class SignatureTest : public CxxTest::TestSuite { CredentialResolver* m_resolver; public: void setUp() { m_resolver=nullptr; xmltooling::QName qname(SimpleXMLObject::NAMESPACE,SimpleXMLObject::LOCAL_NAME); xmltooling::QName qtype(SimpleXMLObject::NAMESPACE,SimpleXMLObject::TYPE_NAME); XMLObjectBuilder::registerBuilder(qname, new SimpleXMLObjectBuilder()); XMLObjectBuilder::registerBuilder(qtype, new SimpleXMLObjectBuilder()); string config = data_path + "FilesystemCredentialResolver.xml"; ifstream in(config.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(in); XercesJanitor janitor(doc); m_resolver = XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin( CHAINING_CREDENTIAL_RESOLVER,doc->getDocumentElement() ); } void tearDown() { xmltooling::QName qname(SimpleXMLObject::NAMESPACE,SimpleXMLObject::LOCAL_NAME); xmltooling::QName qtype(SimpleXMLObject::NAMESPACE,SimpleXMLObject::TYPE_NAME); XMLObjectBuilder::deregisterBuilder(qname); XMLObjectBuilder::deregisterBuilder(qtype); delete m_resolver; } void testSignature() { xmltooling::QName qname(SimpleXMLObject::NAMESPACE,SimpleXMLObject::LOCAL_NAME); const SimpleXMLObjectBuilder* b=dynamic_cast(XMLObjectBuilder::getBuilder(qname)); TS_ASSERT(b!=nullptr); auto_ptr sxObject(dynamic_cast(b->buildObject())); TS_ASSERT(sxObject.get()!=nullptr); VectorOf(SimpleXMLObject) kids=sxObject->getSimpleXMLObjects(); kids.push_back(dynamic_cast(b->buildObject())); kids.push_back(dynamic_cast(b->buildObject())); // Test some collection stuff auto_ptr_XMLCh foo("Foo"); auto_ptr_XMLCh bar("Bar"); kids.begin()->setId(foo.get()); kids[1]->setValue(bar.get()); // Append a Signature. Signature* sig=SignatureBuilder::buildSignature(); sxObject->setSignature(sig); sig->setContentReference(new TestContext(&chNull)); CredentialCriteria cc; cc.setUsage(Credential::SIGNING_CREDENTIAL); Locker locker(m_resolver); const Credential* cred = m_resolver->resolve(&cc); TSM_ASSERT("Retrieved credential was null", cred!=nullptr); DOMElement* rootElement = nullptr; try { vector sigs(1,sig); rootElement=sxObject->marshall((DOMDocument*)nullptr,&sigs,cred); } catch (XMLToolingException& e) { TS_TRACE(e.what()); throw; } string buf; XMLHelper::serialize(rootElement, buf); //TS_TRACE(buf.c_str()); istringstream in(buf); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(in); auto_ptr sxObject2(dynamic_cast(b->buildFromDocument(doc))); TS_ASSERT(sxObject2.get()!=nullptr); TS_ASSERT(sxObject2->getSignature()!=nullptr); try { TestValidator tv(&chNull, cred); tv.validate(sxObject2->getSignature()); } catch (XMLToolingException& e) { TS_TRACE(e.what()); throw; } } }; xmltooling-1.5.3/xmltoolingtest/Makefile.am000644 001751 001751 00000003047 12003305017 022225 0ustar00scantorscantor000000 000000 AUTOMAKE_OPTIONS = foreign if BUILD_UNITTEST bin_PROGRAMS = xmltoolingtest xmltoolingtest_CXXFLAGS = $(CXXTESTFLAGS) if BUILD_XMLSEC xmltoolingtest_LDFLAGS = $(XMLSEC_LIBS) xmltoolingtest_LDADD = $(top_builddir)/xmltooling/libxmltooling.la else xmltoolingtest_LDADD = $(top_builddir)/xmltooling/libxmltooling-lite.la endif else bin_PROGRAMS = endif if BUILD_XMLSEC xmlsec_sources = \ EncryptionTest.h \ FilesystemCredentialResolverTest.h \ InlineKeyResolverTest.h \ MemoryStorageServiceTest.h \ PKIXEngineTest.h \ SecurityHelperTest.h \ SignatureTest.h else xmlsec_sources = endif xmltoolingtest_h = \ ComplexXMLObjectTest.h \ DateTimeTest.h \ ExceptionTest.h \ KeyInfoTest.h \ MarshallingTest.h \ NonVisibleNamespaceTest.h \ SOAPTest.h \ UnmarshallingTest.h \ TemplateEngineTest.h \ xmltoolingtest.h \ ${xmlsec_sources} noinst_HEADERS = \ XMLObjectBaseTestCase.h \ $(xmltoolingtest_h) nodist_xmltoolingtest_SOURCES = $(xmltoolingtest_h:.h=.cpp) if BUILD_UNITTEST BUILT_SOURCES = $(nodist_xmltoolingtest_SOURCES) CLEANFILES = $(nodist_xmltoolingtest_SOURCES) endif do-cxxtestgen: if test "$(CPPFILE)" = "xmltoolingtest.cpp"; then \ $(CXXTEST) --error-printer --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \ else \ $(CXXTEST) --part --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \ fi; $(nodist_xmltoolingtest_SOURCES): %.cpp: %.h $(MAKE) do-cxxtestgen HFILE=$< CPPFILE=$@ EXTRA_DIST = xmltoolingtest.vcxproj xmltoolingtest.vcxproj.filters data xmltooling-1.5.3/xmltoolingtest/Makefile.in000644 001751 001751 00000167032 12147443212 022254 0ustar00scantorscantor000000 000000 # Makefile.in generated by automake 1.12.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @BUILD_UNITTEST_TRUE@bin_PROGRAMS = xmltoolingtest$(EXEEXT) subdir = xmltoolingtest DIST_COMMON = $(am__noinst_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/build-aux/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ $(top_srcdir)/m4/boost.m4 $(top_srcdir)/m4/doxygen.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h \ $(top_builddir)/xmltooling/config_pub.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) @BUILD_XMLSEC_TRUE@am__objects_1 = \ @BUILD_XMLSEC_TRUE@ xmltoolingtest-EncryptionTest.$(OBJEXT) \ @BUILD_XMLSEC_TRUE@ xmltoolingtest-FilesystemCredentialResolverTest.$(OBJEXT) \ @BUILD_XMLSEC_TRUE@ xmltoolingtest-InlineKeyResolverTest.$(OBJEXT) \ @BUILD_XMLSEC_TRUE@ xmltoolingtest-MemoryStorageServiceTest.$(OBJEXT) \ @BUILD_XMLSEC_TRUE@ xmltoolingtest-PKIXEngineTest.$(OBJEXT) \ @BUILD_XMLSEC_TRUE@ xmltoolingtest-SecurityHelperTest.$(OBJEXT) \ @BUILD_XMLSEC_TRUE@ xmltoolingtest-SignatureTest.$(OBJEXT) am__objects_2 = xmltoolingtest-ComplexXMLObjectTest.$(OBJEXT) \ xmltoolingtest-DateTimeTest.$(OBJEXT) \ xmltoolingtest-ExceptionTest.$(OBJEXT) \ xmltoolingtest-KeyInfoTest.$(OBJEXT) \ xmltoolingtest-MarshallingTest.$(OBJEXT) \ xmltoolingtest-NonVisibleNamespaceTest.$(OBJEXT) \ xmltoolingtest-SOAPTest.$(OBJEXT) \ xmltoolingtest-UnmarshallingTest.$(OBJEXT) \ xmltoolingtest-TemplateEngineTest.$(OBJEXT) \ xmltoolingtest-xmltoolingtest.$(OBJEXT) $(am__objects_1) nodist_xmltoolingtest_OBJECTS = $(am__objects_2) xmltoolingtest_OBJECTS = $(nodist_xmltoolingtest_OBJECTS) @BUILD_UNITTEST_TRUE@@BUILD_XMLSEC_FALSE@xmltoolingtest_DEPENDENCIES = $(top_builddir)/xmltooling/libxmltooling-lite.la @BUILD_UNITTEST_TRUE@@BUILD_XMLSEC_TRUE@xmltoolingtest_DEPENDENCIES = $(top_builddir)/xmltooling/libxmltooling.la xmltoolingtest_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) \ $(xmltoolingtest_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/xmltooling depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(nodist_xmltoolingtest_SOURCES) DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__noinst_HEADERS_DIST = XMLObjectBaseTestCase.h \ ComplexXMLObjectTest.h DateTimeTest.h ExceptionTest.h \ KeyInfoTest.h MarshallingTest.h NonVisibleNamespaceTest.h \ SOAPTest.h UnmarshallingTest.h TemplateEngineTest.h \ xmltoolingtest.h EncryptionTest.h \ FilesystemCredentialResolverTest.h InlineKeyResolverTest.h \ MemoryStorageServiceTest.h PKIXEngineTest.h \ SecurityHelperTest.h SignatureTest.h HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_ROOT = @BOOST_ROOT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTFLAGS = @CXXTESTFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOG4CPP_CONFIG = @LOG4CPP_CONFIG@ LOG4SHIB_CONFIG = @LOG4SHIB_CONFIG@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLSEC_LIBS = @XMLSEC_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_libdir = @pkgconfig_libdir@ pkgconfig_libfile = @pkgconfig_libfile@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign @BUILD_UNITTEST_TRUE@xmltoolingtest_CXXFLAGS = $(CXXTESTFLAGS) @BUILD_UNITTEST_TRUE@@BUILD_XMLSEC_TRUE@xmltoolingtest_LDFLAGS = $(XMLSEC_LIBS) @BUILD_UNITTEST_TRUE@@BUILD_XMLSEC_FALSE@xmltoolingtest_LDADD = $(top_builddir)/xmltooling/libxmltooling-lite.la @BUILD_UNITTEST_TRUE@@BUILD_XMLSEC_TRUE@xmltoolingtest_LDADD = $(top_builddir)/xmltooling/libxmltooling.la @BUILD_XMLSEC_FALSE@xmlsec_sources = @BUILD_XMLSEC_TRUE@xmlsec_sources = \ @BUILD_XMLSEC_TRUE@ EncryptionTest.h \ @BUILD_XMLSEC_TRUE@ FilesystemCredentialResolverTest.h \ @BUILD_XMLSEC_TRUE@ InlineKeyResolverTest.h \ @BUILD_XMLSEC_TRUE@ MemoryStorageServiceTest.h \ @BUILD_XMLSEC_TRUE@ PKIXEngineTest.h \ @BUILD_XMLSEC_TRUE@ SecurityHelperTest.h \ @BUILD_XMLSEC_TRUE@ SignatureTest.h xmltoolingtest_h = \ ComplexXMLObjectTest.h \ DateTimeTest.h \ ExceptionTest.h \ KeyInfoTest.h \ MarshallingTest.h \ NonVisibleNamespaceTest.h \ SOAPTest.h \ UnmarshallingTest.h \ TemplateEngineTest.h \ xmltoolingtest.h \ ${xmlsec_sources} noinst_HEADERS = \ XMLObjectBaseTestCase.h \ $(xmltoolingtest_h) nodist_xmltoolingtest_SOURCES = $(xmltoolingtest_h:.h=.cpp) @BUILD_UNITTEST_TRUE@BUILT_SOURCES = $(nodist_xmltoolingtest_SOURCES) @BUILD_UNITTEST_TRUE@CLEANFILES = $(nodist_xmltoolingtest_SOURCES) EXTRA_DIST = xmltoolingtest.vcxproj xmltoolingtest.vcxproj.filters data all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign xmltoolingtest/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign xmltoolingtest/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list xmltoolingtest$(EXEEXT): $(xmltoolingtest_OBJECTS) $(xmltoolingtest_DEPENDENCIES) $(EXTRA_xmltoolingtest_DEPENDENCIES) @rm -f xmltoolingtest$(EXEEXT) $(xmltoolingtest_LINK) $(xmltoolingtest_OBJECTS) $(xmltoolingtest_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmltoolingtest-ComplexXMLObjectTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmltoolingtest-DateTimeTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmltoolingtest-EncryptionTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmltoolingtest-ExceptionTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmltoolingtest-FilesystemCredentialResolverTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmltoolingtest-InlineKeyResolverTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmltoolingtest-KeyInfoTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmltoolingtest-MarshallingTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmltoolingtest-MemoryStorageServiceTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmltoolingtest-NonVisibleNamespaceTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmltoolingtest-PKIXEngineTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmltoolingtest-SOAPTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmltoolingtest-SecurityHelperTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmltoolingtest-SignatureTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmltoolingtest-TemplateEngineTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmltoolingtest-UnmarshallingTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmltoolingtest-xmltoolingtest.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< xmltoolingtest-ComplexXMLObjectTest.o: ComplexXMLObjectTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-ComplexXMLObjectTest.o -MD -MP -MF $(DEPDIR)/xmltoolingtest-ComplexXMLObjectTest.Tpo -c -o xmltoolingtest-ComplexXMLObjectTest.o `test -f 'ComplexXMLObjectTest.cpp' || echo '$(srcdir)/'`ComplexXMLObjectTest.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-ComplexXMLObjectTest.Tpo $(DEPDIR)/xmltoolingtest-ComplexXMLObjectTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ComplexXMLObjectTest.cpp' object='xmltoolingtest-ComplexXMLObjectTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-ComplexXMLObjectTest.o `test -f 'ComplexXMLObjectTest.cpp' || echo '$(srcdir)/'`ComplexXMLObjectTest.cpp xmltoolingtest-ComplexXMLObjectTest.obj: ComplexXMLObjectTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-ComplexXMLObjectTest.obj -MD -MP -MF $(DEPDIR)/xmltoolingtest-ComplexXMLObjectTest.Tpo -c -o xmltoolingtest-ComplexXMLObjectTest.obj `if test -f 'ComplexXMLObjectTest.cpp'; then $(CYGPATH_W) 'ComplexXMLObjectTest.cpp'; else $(CYGPATH_W) '$(srcdir)/ComplexXMLObjectTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-ComplexXMLObjectTest.Tpo $(DEPDIR)/xmltoolingtest-ComplexXMLObjectTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ComplexXMLObjectTest.cpp' object='xmltoolingtest-ComplexXMLObjectTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-ComplexXMLObjectTest.obj `if test -f 'ComplexXMLObjectTest.cpp'; then $(CYGPATH_W) 'ComplexXMLObjectTest.cpp'; else $(CYGPATH_W) '$(srcdir)/ComplexXMLObjectTest.cpp'; fi` xmltoolingtest-DateTimeTest.o: DateTimeTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-DateTimeTest.o -MD -MP -MF $(DEPDIR)/xmltoolingtest-DateTimeTest.Tpo -c -o xmltoolingtest-DateTimeTest.o `test -f 'DateTimeTest.cpp' || echo '$(srcdir)/'`DateTimeTest.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-DateTimeTest.Tpo $(DEPDIR)/xmltoolingtest-DateTimeTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='DateTimeTest.cpp' object='xmltoolingtest-DateTimeTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-DateTimeTest.o `test -f 'DateTimeTest.cpp' || echo '$(srcdir)/'`DateTimeTest.cpp xmltoolingtest-DateTimeTest.obj: DateTimeTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-DateTimeTest.obj -MD -MP -MF $(DEPDIR)/xmltoolingtest-DateTimeTest.Tpo -c -o xmltoolingtest-DateTimeTest.obj `if test -f 'DateTimeTest.cpp'; then $(CYGPATH_W) 'DateTimeTest.cpp'; else $(CYGPATH_W) '$(srcdir)/DateTimeTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-DateTimeTest.Tpo $(DEPDIR)/xmltoolingtest-DateTimeTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='DateTimeTest.cpp' object='xmltoolingtest-DateTimeTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-DateTimeTest.obj `if test -f 'DateTimeTest.cpp'; then $(CYGPATH_W) 'DateTimeTest.cpp'; else $(CYGPATH_W) '$(srcdir)/DateTimeTest.cpp'; fi` xmltoolingtest-ExceptionTest.o: ExceptionTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-ExceptionTest.o -MD -MP -MF $(DEPDIR)/xmltoolingtest-ExceptionTest.Tpo -c -o xmltoolingtest-ExceptionTest.o `test -f 'ExceptionTest.cpp' || echo '$(srcdir)/'`ExceptionTest.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-ExceptionTest.Tpo $(DEPDIR)/xmltoolingtest-ExceptionTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ExceptionTest.cpp' object='xmltoolingtest-ExceptionTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-ExceptionTest.o `test -f 'ExceptionTest.cpp' || echo '$(srcdir)/'`ExceptionTest.cpp xmltoolingtest-ExceptionTest.obj: ExceptionTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-ExceptionTest.obj -MD -MP -MF $(DEPDIR)/xmltoolingtest-ExceptionTest.Tpo -c -o xmltoolingtest-ExceptionTest.obj `if test -f 'ExceptionTest.cpp'; then $(CYGPATH_W) 'ExceptionTest.cpp'; else $(CYGPATH_W) '$(srcdir)/ExceptionTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-ExceptionTest.Tpo $(DEPDIR)/xmltoolingtest-ExceptionTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ExceptionTest.cpp' object='xmltoolingtest-ExceptionTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-ExceptionTest.obj `if test -f 'ExceptionTest.cpp'; then $(CYGPATH_W) 'ExceptionTest.cpp'; else $(CYGPATH_W) '$(srcdir)/ExceptionTest.cpp'; fi` xmltoolingtest-KeyInfoTest.o: KeyInfoTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-KeyInfoTest.o -MD -MP -MF $(DEPDIR)/xmltoolingtest-KeyInfoTest.Tpo -c -o xmltoolingtest-KeyInfoTest.o `test -f 'KeyInfoTest.cpp' || echo '$(srcdir)/'`KeyInfoTest.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-KeyInfoTest.Tpo $(DEPDIR)/xmltoolingtest-KeyInfoTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='KeyInfoTest.cpp' object='xmltoolingtest-KeyInfoTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-KeyInfoTest.o `test -f 'KeyInfoTest.cpp' || echo '$(srcdir)/'`KeyInfoTest.cpp xmltoolingtest-KeyInfoTest.obj: KeyInfoTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-KeyInfoTest.obj -MD -MP -MF $(DEPDIR)/xmltoolingtest-KeyInfoTest.Tpo -c -o xmltoolingtest-KeyInfoTest.obj `if test -f 'KeyInfoTest.cpp'; then $(CYGPATH_W) 'KeyInfoTest.cpp'; else $(CYGPATH_W) '$(srcdir)/KeyInfoTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-KeyInfoTest.Tpo $(DEPDIR)/xmltoolingtest-KeyInfoTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='KeyInfoTest.cpp' object='xmltoolingtest-KeyInfoTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-KeyInfoTest.obj `if test -f 'KeyInfoTest.cpp'; then $(CYGPATH_W) 'KeyInfoTest.cpp'; else $(CYGPATH_W) '$(srcdir)/KeyInfoTest.cpp'; fi` xmltoolingtest-MarshallingTest.o: MarshallingTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-MarshallingTest.o -MD -MP -MF $(DEPDIR)/xmltoolingtest-MarshallingTest.Tpo -c -o xmltoolingtest-MarshallingTest.o `test -f 'MarshallingTest.cpp' || echo '$(srcdir)/'`MarshallingTest.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-MarshallingTest.Tpo $(DEPDIR)/xmltoolingtest-MarshallingTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='MarshallingTest.cpp' object='xmltoolingtest-MarshallingTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-MarshallingTest.o `test -f 'MarshallingTest.cpp' || echo '$(srcdir)/'`MarshallingTest.cpp xmltoolingtest-MarshallingTest.obj: MarshallingTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-MarshallingTest.obj -MD -MP -MF $(DEPDIR)/xmltoolingtest-MarshallingTest.Tpo -c -o xmltoolingtest-MarshallingTest.obj `if test -f 'MarshallingTest.cpp'; then $(CYGPATH_W) 'MarshallingTest.cpp'; else $(CYGPATH_W) '$(srcdir)/MarshallingTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-MarshallingTest.Tpo $(DEPDIR)/xmltoolingtest-MarshallingTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='MarshallingTest.cpp' object='xmltoolingtest-MarshallingTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-MarshallingTest.obj `if test -f 'MarshallingTest.cpp'; then $(CYGPATH_W) 'MarshallingTest.cpp'; else $(CYGPATH_W) '$(srcdir)/MarshallingTest.cpp'; fi` xmltoolingtest-NonVisibleNamespaceTest.o: NonVisibleNamespaceTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-NonVisibleNamespaceTest.o -MD -MP -MF $(DEPDIR)/xmltoolingtest-NonVisibleNamespaceTest.Tpo -c -o xmltoolingtest-NonVisibleNamespaceTest.o `test -f 'NonVisibleNamespaceTest.cpp' || echo '$(srcdir)/'`NonVisibleNamespaceTest.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-NonVisibleNamespaceTest.Tpo $(DEPDIR)/xmltoolingtest-NonVisibleNamespaceTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='NonVisibleNamespaceTest.cpp' object='xmltoolingtest-NonVisibleNamespaceTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-NonVisibleNamespaceTest.o `test -f 'NonVisibleNamespaceTest.cpp' || echo '$(srcdir)/'`NonVisibleNamespaceTest.cpp xmltoolingtest-NonVisibleNamespaceTest.obj: NonVisibleNamespaceTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-NonVisibleNamespaceTest.obj -MD -MP -MF $(DEPDIR)/xmltoolingtest-NonVisibleNamespaceTest.Tpo -c -o xmltoolingtest-NonVisibleNamespaceTest.obj `if test -f 'NonVisibleNamespaceTest.cpp'; then $(CYGPATH_W) 'NonVisibleNamespaceTest.cpp'; else $(CYGPATH_W) '$(srcdir)/NonVisibleNamespaceTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-NonVisibleNamespaceTest.Tpo $(DEPDIR)/xmltoolingtest-NonVisibleNamespaceTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='NonVisibleNamespaceTest.cpp' object='xmltoolingtest-NonVisibleNamespaceTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-NonVisibleNamespaceTest.obj `if test -f 'NonVisibleNamespaceTest.cpp'; then $(CYGPATH_W) 'NonVisibleNamespaceTest.cpp'; else $(CYGPATH_W) '$(srcdir)/NonVisibleNamespaceTest.cpp'; fi` xmltoolingtest-SOAPTest.o: SOAPTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-SOAPTest.o -MD -MP -MF $(DEPDIR)/xmltoolingtest-SOAPTest.Tpo -c -o xmltoolingtest-SOAPTest.o `test -f 'SOAPTest.cpp' || echo '$(srcdir)/'`SOAPTest.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-SOAPTest.Tpo $(DEPDIR)/xmltoolingtest-SOAPTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SOAPTest.cpp' object='xmltoolingtest-SOAPTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-SOAPTest.o `test -f 'SOAPTest.cpp' || echo '$(srcdir)/'`SOAPTest.cpp xmltoolingtest-SOAPTest.obj: SOAPTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-SOAPTest.obj -MD -MP -MF $(DEPDIR)/xmltoolingtest-SOAPTest.Tpo -c -o xmltoolingtest-SOAPTest.obj `if test -f 'SOAPTest.cpp'; then $(CYGPATH_W) 'SOAPTest.cpp'; else $(CYGPATH_W) '$(srcdir)/SOAPTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-SOAPTest.Tpo $(DEPDIR)/xmltoolingtest-SOAPTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SOAPTest.cpp' object='xmltoolingtest-SOAPTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-SOAPTest.obj `if test -f 'SOAPTest.cpp'; then $(CYGPATH_W) 'SOAPTest.cpp'; else $(CYGPATH_W) '$(srcdir)/SOAPTest.cpp'; fi` xmltoolingtest-UnmarshallingTest.o: UnmarshallingTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-UnmarshallingTest.o -MD -MP -MF $(DEPDIR)/xmltoolingtest-UnmarshallingTest.Tpo -c -o xmltoolingtest-UnmarshallingTest.o `test -f 'UnmarshallingTest.cpp' || echo '$(srcdir)/'`UnmarshallingTest.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-UnmarshallingTest.Tpo $(DEPDIR)/xmltoolingtest-UnmarshallingTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='UnmarshallingTest.cpp' object='xmltoolingtest-UnmarshallingTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-UnmarshallingTest.o `test -f 'UnmarshallingTest.cpp' || echo '$(srcdir)/'`UnmarshallingTest.cpp xmltoolingtest-UnmarshallingTest.obj: UnmarshallingTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-UnmarshallingTest.obj -MD -MP -MF $(DEPDIR)/xmltoolingtest-UnmarshallingTest.Tpo -c -o xmltoolingtest-UnmarshallingTest.obj `if test -f 'UnmarshallingTest.cpp'; then $(CYGPATH_W) 'UnmarshallingTest.cpp'; else $(CYGPATH_W) '$(srcdir)/UnmarshallingTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-UnmarshallingTest.Tpo $(DEPDIR)/xmltoolingtest-UnmarshallingTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='UnmarshallingTest.cpp' object='xmltoolingtest-UnmarshallingTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-UnmarshallingTest.obj `if test -f 'UnmarshallingTest.cpp'; then $(CYGPATH_W) 'UnmarshallingTest.cpp'; else $(CYGPATH_W) '$(srcdir)/UnmarshallingTest.cpp'; fi` xmltoolingtest-TemplateEngineTest.o: TemplateEngineTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-TemplateEngineTest.o -MD -MP -MF $(DEPDIR)/xmltoolingtest-TemplateEngineTest.Tpo -c -o xmltoolingtest-TemplateEngineTest.o `test -f 'TemplateEngineTest.cpp' || echo '$(srcdir)/'`TemplateEngineTest.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-TemplateEngineTest.Tpo $(DEPDIR)/xmltoolingtest-TemplateEngineTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='TemplateEngineTest.cpp' object='xmltoolingtest-TemplateEngineTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-TemplateEngineTest.o `test -f 'TemplateEngineTest.cpp' || echo '$(srcdir)/'`TemplateEngineTest.cpp xmltoolingtest-TemplateEngineTest.obj: TemplateEngineTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-TemplateEngineTest.obj -MD -MP -MF $(DEPDIR)/xmltoolingtest-TemplateEngineTest.Tpo -c -o xmltoolingtest-TemplateEngineTest.obj `if test -f 'TemplateEngineTest.cpp'; then $(CYGPATH_W) 'TemplateEngineTest.cpp'; else $(CYGPATH_W) '$(srcdir)/TemplateEngineTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-TemplateEngineTest.Tpo $(DEPDIR)/xmltoolingtest-TemplateEngineTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='TemplateEngineTest.cpp' object='xmltoolingtest-TemplateEngineTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-TemplateEngineTest.obj `if test -f 'TemplateEngineTest.cpp'; then $(CYGPATH_W) 'TemplateEngineTest.cpp'; else $(CYGPATH_W) '$(srcdir)/TemplateEngineTest.cpp'; fi` xmltoolingtest-xmltoolingtest.o: xmltoolingtest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-xmltoolingtest.o -MD -MP -MF $(DEPDIR)/xmltoolingtest-xmltoolingtest.Tpo -c -o xmltoolingtest-xmltoolingtest.o `test -f 'xmltoolingtest.cpp' || echo '$(srcdir)/'`xmltoolingtest.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-xmltoolingtest.Tpo $(DEPDIR)/xmltoolingtest-xmltoolingtest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmltoolingtest.cpp' object='xmltoolingtest-xmltoolingtest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-xmltoolingtest.o `test -f 'xmltoolingtest.cpp' || echo '$(srcdir)/'`xmltoolingtest.cpp xmltoolingtest-xmltoolingtest.obj: xmltoolingtest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-xmltoolingtest.obj -MD -MP -MF $(DEPDIR)/xmltoolingtest-xmltoolingtest.Tpo -c -o xmltoolingtest-xmltoolingtest.obj `if test -f 'xmltoolingtest.cpp'; then $(CYGPATH_W) 'xmltoolingtest.cpp'; else $(CYGPATH_W) '$(srcdir)/xmltoolingtest.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-xmltoolingtest.Tpo $(DEPDIR)/xmltoolingtest-xmltoolingtest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xmltoolingtest.cpp' object='xmltoolingtest-xmltoolingtest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-xmltoolingtest.obj `if test -f 'xmltoolingtest.cpp'; then $(CYGPATH_W) 'xmltoolingtest.cpp'; else $(CYGPATH_W) '$(srcdir)/xmltoolingtest.cpp'; fi` xmltoolingtest-EncryptionTest.o: EncryptionTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-EncryptionTest.o -MD -MP -MF $(DEPDIR)/xmltoolingtest-EncryptionTest.Tpo -c -o xmltoolingtest-EncryptionTest.o `test -f 'EncryptionTest.cpp' || echo '$(srcdir)/'`EncryptionTest.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-EncryptionTest.Tpo $(DEPDIR)/xmltoolingtest-EncryptionTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='EncryptionTest.cpp' object='xmltoolingtest-EncryptionTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-EncryptionTest.o `test -f 'EncryptionTest.cpp' || echo '$(srcdir)/'`EncryptionTest.cpp xmltoolingtest-EncryptionTest.obj: EncryptionTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-EncryptionTest.obj -MD -MP -MF $(DEPDIR)/xmltoolingtest-EncryptionTest.Tpo -c -o xmltoolingtest-EncryptionTest.obj `if test -f 'EncryptionTest.cpp'; then $(CYGPATH_W) 'EncryptionTest.cpp'; else $(CYGPATH_W) '$(srcdir)/EncryptionTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-EncryptionTest.Tpo $(DEPDIR)/xmltoolingtest-EncryptionTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='EncryptionTest.cpp' object='xmltoolingtest-EncryptionTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-EncryptionTest.obj `if test -f 'EncryptionTest.cpp'; then $(CYGPATH_W) 'EncryptionTest.cpp'; else $(CYGPATH_W) '$(srcdir)/EncryptionTest.cpp'; fi` xmltoolingtest-FilesystemCredentialResolverTest.o: FilesystemCredentialResolverTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-FilesystemCredentialResolverTest.o -MD -MP -MF $(DEPDIR)/xmltoolingtest-FilesystemCredentialResolverTest.Tpo -c -o xmltoolingtest-FilesystemCredentialResolverTest.o `test -f 'FilesystemCredentialResolverTest.cpp' || echo '$(srcdir)/'`FilesystemCredentialResolverTest.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-FilesystemCredentialResolverTest.Tpo $(DEPDIR)/xmltoolingtest-FilesystemCredentialResolverTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='FilesystemCredentialResolverTest.cpp' object='xmltoolingtest-FilesystemCredentialResolverTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-FilesystemCredentialResolverTest.o `test -f 'FilesystemCredentialResolverTest.cpp' || echo '$(srcdir)/'`FilesystemCredentialResolverTest.cpp xmltoolingtest-FilesystemCredentialResolverTest.obj: FilesystemCredentialResolverTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-FilesystemCredentialResolverTest.obj -MD -MP -MF $(DEPDIR)/xmltoolingtest-FilesystemCredentialResolverTest.Tpo -c -o xmltoolingtest-FilesystemCredentialResolverTest.obj `if test -f 'FilesystemCredentialResolverTest.cpp'; then $(CYGPATH_W) 'FilesystemCredentialResolverTest.cpp'; else $(CYGPATH_W) '$(srcdir)/FilesystemCredentialResolverTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-FilesystemCredentialResolverTest.Tpo $(DEPDIR)/xmltoolingtest-FilesystemCredentialResolverTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='FilesystemCredentialResolverTest.cpp' object='xmltoolingtest-FilesystemCredentialResolverTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-FilesystemCredentialResolverTest.obj `if test -f 'FilesystemCredentialResolverTest.cpp'; then $(CYGPATH_W) 'FilesystemCredentialResolverTest.cpp'; else $(CYGPATH_W) '$(srcdir)/FilesystemCredentialResolverTest.cpp'; fi` xmltoolingtest-InlineKeyResolverTest.o: InlineKeyResolverTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-InlineKeyResolverTest.o -MD -MP -MF $(DEPDIR)/xmltoolingtest-InlineKeyResolverTest.Tpo -c -o xmltoolingtest-InlineKeyResolverTest.o `test -f 'InlineKeyResolverTest.cpp' || echo '$(srcdir)/'`InlineKeyResolverTest.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-InlineKeyResolverTest.Tpo $(DEPDIR)/xmltoolingtest-InlineKeyResolverTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='InlineKeyResolverTest.cpp' object='xmltoolingtest-InlineKeyResolverTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-InlineKeyResolverTest.o `test -f 'InlineKeyResolverTest.cpp' || echo '$(srcdir)/'`InlineKeyResolverTest.cpp xmltoolingtest-InlineKeyResolverTest.obj: InlineKeyResolverTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-InlineKeyResolverTest.obj -MD -MP -MF $(DEPDIR)/xmltoolingtest-InlineKeyResolverTest.Tpo -c -o xmltoolingtest-InlineKeyResolverTest.obj `if test -f 'InlineKeyResolverTest.cpp'; then $(CYGPATH_W) 'InlineKeyResolverTest.cpp'; else $(CYGPATH_W) '$(srcdir)/InlineKeyResolverTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-InlineKeyResolverTest.Tpo $(DEPDIR)/xmltoolingtest-InlineKeyResolverTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='InlineKeyResolverTest.cpp' object='xmltoolingtest-InlineKeyResolverTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-InlineKeyResolverTest.obj `if test -f 'InlineKeyResolverTest.cpp'; then $(CYGPATH_W) 'InlineKeyResolverTest.cpp'; else $(CYGPATH_W) '$(srcdir)/InlineKeyResolverTest.cpp'; fi` xmltoolingtest-MemoryStorageServiceTest.o: MemoryStorageServiceTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-MemoryStorageServiceTest.o -MD -MP -MF $(DEPDIR)/xmltoolingtest-MemoryStorageServiceTest.Tpo -c -o xmltoolingtest-MemoryStorageServiceTest.o `test -f 'MemoryStorageServiceTest.cpp' || echo '$(srcdir)/'`MemoryStorageServiceTest.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-MemoryStorageServiceTest.Tpo $(DEPDIR)/xmltoolingtest-MemoryStorageServiceTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='MemoryStorageServiceTest.cpp' object='xmltoolingtest-MemoryStorageServiceTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-MemoryStorageServiceTest.o `test -f 'MemoryStorageServiceTest.cpp' || echo '$(srcdir)/'`MemoryStorageServiceTest.cpp xmltoolingtest-MemoryStorageServiceTest.obj: MemoryStorageServiceTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-MemoryStorageServiceTest.obj -MD -MP -MF $(DEPDIR)/xmltoolingtest-MemoryStorageServiceTest.Tpo -c -o xmltoolingtest-MemoryStorageServiceTest.obj `if test -f 'MemoryStorageServiceTest.cpp'; then $(CYGPATH_W) 'MemoryStorageServiceTest.cpp'; else $(CYGPATH_W) '$(srcdir)/MemoryStorageServiceTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-MemoryStorageServiceTest.Tpo $(DEPDIR)/xmltoolingtest-MemoryStorageServiceTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='MemoryStorageServiceTest.cpp' object='xmltoolingtest-MemoryStorageServiceTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-MemoryStorageServiceTest.obj `if test -f 'MemoryStorageServiceTest.cpp'; then $(CYGPATH_W) 'MemoryStorageServiceTest.cpp'; else $(CYGPATH_W) '$(srcdir)/MemoryStorageServiceTest.cpp'; fi` xmltoolingtest-PKIXEngineTest.o: PKIXEngineTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-PKIXEngineTest.o -MD -MP -MF $(DEPDIR)/xmltoolingtest-PKIXEngineTest.Tpo -c -o xmltoolingtest-PKIXEngineTest.o `test -f 'PKIXEngineTest.cpp' || echo '$(srcdir)/'`PKIXEngineTest.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-PKIXEngineTest.Tpo $(DEPDIR)/xmltoolingtest-PKIXEngineTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='PKIXEngineTest.cpp' object='xmltoolingtest-PKIXEngineTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-PKIXEngineTest.o `test -f 'PKIXEngineTest.cpp' || echo '$(srcdir)/'`PKIXEngineTest.cpp xmltoolingtest-PKIXEngineTest.obj: PKIXEngineTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-PKIXEngineTest.obj -MD -MP -MF $(DEPDIR)/xmltoolingtest-PKIXEngineTest.Tpo -c -o xmltoolingtest-PKIXEngineTest.obj `if test -f 'PKIXEngineTest.cpp'; then $(CYGPATH_W) 'PKIXEngineTest.cpp'; else $(CYGPATH_W) '$(srcdir)/PKIXEngineTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-PKIXEngineTest.Tpo $(DEPDIR)/xmltoolingtest-PKIXEngineTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='PKIXEngineTest.cpp' object='xmltoolingtest-PKIXEngineTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-PKIXEngineTest.obj `if test -f 'PKIXEngineTest.cpp'; then $(CYGPATH_W) 'PKIXEngineTest.cpp'; else $(CYGPATH_W) '$(srcdir)/PKIXEngineTest.cpp'; fi` xmltoolingtest-SecurityHelperTest.o: SecurityHelperTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-SecurityHelperTest.o -MD -MP -MF $(DEPDIR)/xmltoolingtest-SecurityHelperTest.Tpo -c -o xmltoolingtest-SecurityHelperTest.o `test -f 'SecurityHelperTest.cpp' || echo '$(srcdir)/'`SecurityHelperTest.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-SecurityHelperTest.Tpo $(DEPDIR)/xmltoolingtest-SecurityHelperTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SecurityHelperTest.cpp' object='xmltoolingtest-SecurityHelperTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-SecurityHelperTest.o `test -f 'SecurityHelperTest.cpp' || echo '$(srcdir)/'`SecurityHelperTest.cpp xmltoolingtest-SecurityHelperTest.obj: SecurityHelperTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-SecurityHelperTest.obj -MD -MP -MF $(DEPDIR)/xmltoolingtest-SecurityHelperTest.Tpo -c -o xmltoolingtest-SecurityHelperTest.obj `if test -f 'SecurityHelperTest.cpp'; then $(CYGPATH_W) 'SecurityHelperTest.cpp'; else $(CYGPATH_W) '$(srcdir)/SecurityHelperTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-SecurityHelperTest.Tpo $(DEPDIR)/xmltoolingtest-SecurityHelperTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SecurityHelperTest.cpp' object='xmltoolingtest-SecurityHelperTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-SecurityHelperTest.obj `if test -f 'SecurityHelperTest.cpp'; then $(CYGPATH_W) 'SecurityHelperTest.cpp'; else $(CYGPATH_W) '$(srcdir)/SecurityHelperTest.cpp'; fi` xmltoolingtest-SignatureTest.o: SignatureTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-SignatureTest.o -MD -MP -MF $(DEPDIR)/xmltoolingtest-SignatureTest.Tpo -c -o xmltoolingtest-SignatureTest.o `test -f 'SignatureTest.cpp' || echo '$(srcdir)/'`SignatureTest.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-SignatureTest.Tpo $(DEPDIR)/xmltoolingtest-SignatureTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SignatureTest.cpp' object='xmltoolingtest-SignatureTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-SignatureTest.o `test -f 'SignatureTest.cpp' || echo '$(srcdir)/'`SignatureTest.cpp xmltoolingtest-SignatureTest.obj: SignatureTest.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -MT xmltoolingtest-SignatureTest.obj -MD -MP -MF $(DEPDIR)/xmltoolingtest-SignatureTest.Tpo -c -o xmltoolingtest-SignatureTest.obj `if test -f 'SignatureTest.cpp'; then $(CYGPATH_W) 'SignatureTest.cpp'; else $(CYGPATH_W) '$(srcdir)/SignatureTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/xmltoolingtest-SignatureTest.Tpo $(DEPDIR)/xmltoolingtest-SignatureTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SignatureTest.cpp' object='xmltoolingtest-SignatureTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xmltoolingtest_CXXFLAGS) $(CXXFLAGS) -c -o xmltoolingtest-SignatureTest.obj `if test -f 'SignatureTest.cpp'; then $(CYGPATH_W) 'SignatureTest.cpp'; else $(CYGPATH_W) '$(srcdir)/SignatureTest.cpp'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool cscopelist ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS do-cxxtestgen: if test "$(CPPFILE)" = "xmltoolingtest.cpp"; then \ $(CXXTEST) --error-printer --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \ else \ $(CXXTEST) --part --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \ fi; $(nodist_xmltoolingtest_SOURCES): %.cpp: %.h $(MAKE) do-cxxtestgen HFILE=$< CPPFILE=$@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xmltooling-1.5.3/xmltoolingtest/xmltoolingtest.vcxproj000644 001751 001751 00000102675 12147443124 024724 0ustar00scantorscantor000000 000000 Debug Win32 Debug x64 Release Win32 Release x64 {3E34CDCC-FCBA-490D-A165-1CB6F4559799} xmltoolingtest $(BuildRoot)\cxxtest\ Win32Proj Application MultiByte true Application MultiByte Application MultiByte true Application MultiByte <_ProjectFileVersion>10.0.30319.1 true $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ true $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset Disabled $(SolutionDir);%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE=1;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL true Level3 EditAndContinue xerces-c_3D.lib;xsec_1D.lib;%(AdditionalDependencies) true Console false MachineX86 X64 Disabled $(SolutionDir);%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE=1;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL true Level3 ProgramDatabase xerces-c_3D.lib;xsec_1D.lib;%(AdditionalDependencies) true Console $(SolutionDir);%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE=1;%(PreprocessorDefinitions) MultiThreadedDLL Level3 ProgramDatabase xerces-c_3.lib;xsec_1.lib;%(AdditionalDependencies) true Console true true false MachineX86 X64 $(SolutionDir);%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE=1;%(PreprocessorDefinitions) MultiThreadedDLL Level3 ProgramDatabase xerces-c_3.lib;xsec_1.lib;%(AdditionalDependencies) true Console true true perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --error-printer --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --error-printer --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --error-printer --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) perl.exe -w $(CxxTestRoot)\cxxtestgen.pl --error-printer --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)" %(Filename).cpp;%(Outputs) {06b55a46-d3b3-41ae-b5a5-b57830ba010d} false xmltooling-1.5.3/xmltoolingtest/xmltoolingtest.vcxproj.filters000644 001751 001751 00000010465 12003305017 026353 0ustar00scantorscantor000000 000000  {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hpp;hxx;hm;inl;inc;xsd Generated Code Generated Code Generated Code Generated Code Generated Code Generated Code Generated Code Generated Code Generated Code Generated Code Generated Code Generated Code Generated Code Generated Code Generated Code Generated Code Generated Code Unit Tests Unit Tests Unit Tests Unit Tests Unit Tests Unit Tests Unit Tests Unit Tests Unit Tests Unit Tests Unit Tests Unit Tests Unit Tests Unit Tests Unit Tests Unit Tests Unit Tests Unit Tests xmltooling-1.5.3/xmltoolingtest/data/000755 001751 001751 00000000000 12003305017 021076 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltoolingtest/data/x509/000755 001751 001751 00000000000 12003305017 021603 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltoolingtest/data/template.in000644 001751 001751 00000000511 12003305017 023236 0ustar00scantorscantor000000 000000 This is a template containing tags for substitution by the template engine. xmltooling-1.5.3/xmltoolingtest/data/SimpleXMLObjectWithAttribute.xml000644 001751 001751 00000000175 12003305017 027304 0ustar00scantorscantor000000 000000  xmltooling-1.5.3/xmltoolingtest/data/SimpleXMLObjectWithUnknownChild.xml000644 001751 001751 00000000254 12003305017 027742 0ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltoolingtest/data/template.out000644 001751 001751 00000000323 12003305017 023440 0ustar00scantorscantor000000 000000 This is a template containing tags for substitution by the template engine. bar1 bar3 bar3 bar3 http://www.example.org/foo/bar#foobar subfoo1 bar1 subbar1 subfoo2 bar1 subbar2 xmltooling-1.5.3/xmltoolingtest/data/KeyInfo1.xml000644 001751 001751 00000010735 12003305017 023253 0ustar00scantorscantor000000 000000 Public Key for CN=xmldap.org, OU=Domain Control Validated, O=xmldap.org ANCxWwHKKOzwCtsbZUhhzQjXcyKHA7zrl8UqoCyu7haKzrEmI7udl7B6L+zxgnmVRz4zsw1PJsVYUt9zG6ABC+P7Xtx46Tk/h5gO6hWL4XBzFUuKwsMRZ0RB0sAv6iQtz6TCyH47OBSJSN24h7e/viUQ0ZtKYsJo/r8BHrnoiJk1 AQAB MIIEYTCCA8qgAwIBAgIDPbIoMA0GCSqGSIb3DQEBBQUAMIHsMQswCQYDVQQGEwJVUzEQMA4GA1UECBMHQXJpem9uYTETMBEGA1UEBxMKU2NvdHRzZGFsZTElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEwMC4GA1UECxMnaHR0cDovL3d3dy5zdGFyZmllbGR0ZWNoLmNvbS9yZXBvc2l0b3J5MTEwLwYDVQQDEyhTdGFyZmllbGQgU2VjdXJlIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MSowKAYJKoZIhvcNAQkBFhtwcmFjdGljZXNAc3RhcmZpZWxkdGVjaC5jb20wHhcNMDYwMzI5MjAwNzIxWhcNMDcwMzI5MjAwNzIxWjBNMRMwEQYDVQQKEwp4bWxkYXAub3JnMSEwHwYDVQQLExhEb21haW4gQ29udHJvbCBWYWxpZGF0ZWQxEzARBgNVBAMTCnhtbGRhcC5vcmcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANCxWwHKKOzwCtsbZUhhzQjXcyKHA7zrl8UqoCyu7haKzrEmI7udl7B6L+zxgnmVRz4zsw1PJsVYUt9zG6ABC+P7Xtx46Tk/h5gO6hWL4XBzFUuKwsMRZ0RB0sAv6iQtz6TCyH47OBSJSN24h7e/viUQ0ZtKYsJo/r8BHrnoiJk1AgMBAAGjggGtMIIBqTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwVgYDVR0fBE8wTTBLoEmgR4ZFaHR0cDovL2NlcnRpZmljYXRlcy5zdGFyZmllbGR0ZWNoLmNvbS9yZXBvc2l0b3J5L3N0YXJmaWVsZGlzc3VpbmcuY3JsME8GA1UdIARIMEYwRAYLYIZIAYb4RQEHFwMwNTAzBggrBgEFBQcCARYnaHR0cDovL3d3dy5zdGFyZmllbGR0ZWNoLmNvbS9yZXBvc2l0b3J5MIGGBggrBgEFBQcBAQR6MHgwKQYIKwYBBQUHMAGGHWh0dHA6Ly9vY3NwLnN0YXJmaWVsZHRlY2guY29tMEsGCCsGAQUFBzAChj9odHRwOi8vY2VydGlmaWNhdGVzLnN0YXJmaWVsZHRlY2guY29tL3JlcG9zaXRvcnkvc2ZfaXNzdWluZy5jcnQwHQYDVR0OBBYEFMcfOhkD6X5rEFFGmj1aV4Rg7Nr9MB8GA1UdIwQYMBaAFKxV3rfqE+v8mGjiU2Ae8SU+jO7nMA0GCSqGSIb3DQEBBQUAA4GBAB0qT6gCXzgWua2P9/CPqsbXztwJAMPVx2zyAVYuZwgThsEmg53EhpqhUFz6DssNFzIxGT8vMrOMJs0hgndBTtWVfdJbrhbgtdc7/Zp10WO/6ioX3lIzJq+un2MA9Rdwk3QQyHCH9baYgHbcPEOj3N+dk2nzCzK34IbPpjYzE7H0 MIIBNjCBoDANBgkqhkiG9w0BAQQFADBbMQswCQYDVQQGEwJVUzELMAkGA1UECBMC VE4xEDAOBgNVBAcTB01lbXBoaXMxEjAQBgNVBAoTCVdhc3NhLk9yRzEZMBcGA1UE AxMQV2FsdGVyJ3MgVGVzdCBDQRcNMDUwNDA4MDQwMTU2WhcNMDUwNTA4MDQwMTU2 WjAUMBICAQEXDTA1MDQwODA0MDA1MVowDQYJKoZIhvcNAQEEBQADgYEAETadhKU8 nrxii0wwkbdfBZ5lmlBu0z9wqobPCH/oSlkMZ9FlE/LmADEclR2hqOgczMRz/BwL kghUXSJe4yuXl2gvGrTd/Mn36HQ/rvr6dbgLzpuNWHRAW99o4Wpf5o+Hi9iEyF2J /50cy2EUSe6YtzA8pGXzSP67YC/3U0D8U4A= MIICKjCCARICAQEwDQYJKoZIhvcNAQEFBQAwdzELMAkGA1UEBhMCQ0gxQDA+BgNVBAoTN1N3aXRj aCAtIFRlbGVpbmZvcm1hdGlrZGllbnN0ZSBmdWVyIExlaHJlIHVuZCBGb3JzY2h1bmcxJjAkBgNV BAMTHVNXSVRDSGFhaSBNZXRhZGF0YSBTaWduaW5nIENBFw0wODA5MDIwNDAwMDdaFw0wODA5MjMw NDAwMDdaMDYwNAIVSWITCHaaiMetadataSignerTest0Fw0wODA1MjcwODE3NTlaMAwwCgYDVR0V BAMKAQSgLzAtMB8GA1UdIwQYMBaAFG6idTQyfos1XdiTIq2IvM82okZmMAoGA1UdFAQDAgFCMA0G CSqGSIb3DQEBBQUAA4IBAQCJfSE0x/Gu6zjEfEviR+s568qgRwHLmgTigz3iY0GNfgNTOFttZM0+ 3AjApSI2FGQHm4K+69MLJNfiH/drNMMnAjY1F2Y8YNkujeyamWBL0HljH8z7lH0uWePFbXje5JTg sCyGARWq46Ted7kekgUdSwNIzreMlLrcdSiEcPw4cTPrMLMj4FbiJVcjn8O1mkBhJOvQTF0Em9Qn g3AeJVx9QzfJTK5B8qZRF7eJDxe+lHsC8UU7HHT0p4cgrBiiBJi+kypFMZepmJi0OJ6fkEHCbAhI IEjDrLGetw0Bq0otJHwueaKcqL2/J2krrsDWUniRyw6X6CK/YtFrAf8RJ9GK MIIB5TCBzgIBATANBgkqhkiG9w0BAQUFADBrMQswCQYDVQQGEwJDSDFAMD4GA1UEChM3U3dpdGNo IC0gVGVsZWluZm9ybWF0aWtkaWVuc3RlIGZ1ZXIgTGVocmUgdW5kIEZvcnNjaHVuZzEaMBgGA1UE AxMRU1dJVENIYWFpIFJvb3QgQ0EXDTA4MDUxNTA2MzA1NVoXDTA5MTExNDA2MzA1NVqgLzAtMB8G A1UdIwQYMBaAFOma4gZY6w/XgQNdXJe5sbWTfTuEMAoGA1UdFAQDAgEBMA0GCSqGSIb3DQEBBQUA A4IBAQCjTKxJjysq8pl799mPu+m/90hKGZ+nu3YBR8yStYFVm/7WvDW62c2OalRlFipcA/cU4lpU cbb1698/XHLfVX4UiZ6+90rQPRtM3VG0fB8Dz/perhCjvjGLB7PWVI/1KKg+b4VFLDqoU/WMbR3O FF6tK+Gfvk3xFhSgaUIpJXVwgJWGYEXbfr6hHaIJ0VjKxvLGUcpRrfsVPNVZVNfYfaHvH2BsdWhq vDMyK3mhySRlYQX0dvi7majHpwzUPQcyr1a5c+hl50Lo0TJ7pIgZn1kc0oj1bxZHt6dGUQz9mhxU M9ZChStEJ32+ghr/sK/2DA3nkIcCZ/Ou4btRgsG1F8yG xmltooling-1.5.3/xmltoolingtest/data/KeyInfo2.xml000644 001751 001751 00000000644 12003305017 023252 0ustar00scantorscantor000000 000000 AQAB AQAB xmltooling-1.5.3/xmltoolingtest/data/SimpleXMLObjectWithNonVisible.xml000644 001751 001751 00000000415 12003305017 027406 0ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltoolingtest/data/KeyInfo3.xml000644 001751 001751 00000000427 12003305017 023252 0ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltoolingtest/data/KeyInfo4.xml000644 001751 001751 00000000744 12003305017 023255 0ustar00scantorscantor000000 000000 MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAER9z9tFObV/MdgFT0IDEUq6b8VZFL sj+qeNjJMVgEIrioShi5HfJfZq/aLuTvt5DZEybsFNC1Fit5cYx7+0DN3g== xmltooling-1.5.3/xmltoolingtest/data/SimpleXMLObjectWithContent.xml000644 001751 001751 00000000217 12003305017 026750 0ustar00scantorscantor000000 000000 Sample Content xmltooling-1.5.3/xmltoolingtest/data/KeyInfo5.xml000644 001751 001751 00000000641 12003305017 023252 0ustar00scantorscantor000000 000000 MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDQsVsByijs8ArbG2VIYc0I13Mi hwO865fFKqAsru4Wis6xJiO7nZewei/s8YJ5lUc+M7MNTybFWFLfcxugAQvj+17c eOk5P4eYDuoVi+FwcxVLisLDEWdEQdLAL+okLc+kwsh+OzgUiUjduIe3v74lENGb SmLCaP6/AR656IiZNQIDAQAB xmltooling-1.5.3/xmltoolingtest/data/key2.pem000644 001751 001751 00000001567 12003305017 022464 0ustar00scantorscantor000000 000000 -----BEGIN RSA PRIVATE KEY----- MIICXAIBAAKBgQDsVJTGY11ve7R8ZxzuZPy5QtJsHaLiJllISV2eFeamJEUc81as Rqw1eZQGI9r9+nkPI0jLp3NTwn2Z0oHjMhq9zrQFs1rawVKbMEPKa6pt1H8DCKmU fJzMIZ4l+n6Xtqcw6hBxQVHiJfUZFqXJLwNuh7r67M7/3hR/Z/144gBXRQIDAQAB AoGAWjosltWG7bJABSLk88tQhXaSmb5y2n6jpaqE+H8KETJVxKjO1XUh+ESTlAiK al7/ax0ghMhIipj9lQW+mzwc4tCrR1hAILfPe3d6+Zd8IyIoFUSV1wqOpm7DGGIZ WWNQBGmD2chsLIC5Q1vEXA42yB/+9PMAKhnjGLu+8z6sej0CQQD9RxPDBqBhLYTX 9lOPnI7kNkArQd0lJampPVpPmnaEztwgA3K8J/w/NiJuxWWQvH44Cgb1WxfSYJ89 re24mbQTAkEA7t7fI2Y8UfZL1clIthP2Ys/3AeuAIQG6uDTZpuIWsMWPNIQdjJoy 345APV7XRKlxdvAkiRh83wfBsAH6upPCRwJAZ5eLsKfkLvsEK6SXdtSs6RB7XHX6 8neeFhd++bIOqbFF/V4LroOYO25z1OSt7u35nggT4oSYkLZuSzb5VRiguwJAdUww Grv7ZuwhNSwQbojC9qbUzraMRqkIvagGMTLYnZmFxu4RbJfT33+FAB3wa6EhPJyT 9FZ4CzVN4VY3fyNLxQJBAJxiP1YfAv0MOSG+I9lwzSDAzjS/beWIxAHh+AjtyK36 Jx9aMs1gOqh13sAp3PqgvciFkZuImpUy7uF03lU+Guw= -----END RSA PRIVATE KEY----- xmltooling-1.5.3/xmltoolingtest/data/SOAPFault.xml000644 001751 001751 00000000336 12003305017 023360 0ustar00scantorscantor000000 000000 S:Server a message goes here xmltooling-1.5.3/xmltoolingtest/data/FilesystemCredentialResolver.xml000644 001751 001751 00000000600 12003305017 027455 0ustar00scantorscantor000000 000000 ../xmltoolingtest/data/key.pem Sample Key ../xmltoolingtest/data/cert.pem xmltooling-1.5.3/xmltoolingtest/data/key.der000644 001751 001751 00000001141 12003305017 022357 0ustar00scantorscantor000000 000000 0‚]ÙYÔ½f+6QR¢1áfWÆ&þ8‰¥ÏÑhK6 ɤäÞj;ì¬ X6qWäÂÍÎà·5äu ,ݘ£cJØA âù¨N]‘®3õosÊÚ•mK˜Ÿ/^œ|/æxn3ÿòyˆ*XTJ®LeÛÁÔ"Z0•ïÛÇGÿMª­·€*Æ•)ÙK³ÐX†ìȼŠc»îŒØ±Kdmö¦ÎnÎê.û6×× ˆ«Ã„£uêݳç}.QzÙ| ‡TG ]7…!ùdEŒÎh’ÄÜo¸‹Èç‰TDÂG6­tÙÆ†¿×3 ·üžÙ–ÓÃk¹Gh»&uÖV2CõùV›ƒÁAûT•ÖËÂ…‹'‚¶bV¡¿‡’Ó-¹t‡ŸÍl[`yåâ´sˆVʜѮ9ýOòÛ-p´Ðf DŸÜ˜¤;VÃ5QAÝc šüE29WR¹°‚g4QŠs@4/í¬)‹²ñÒ¶Á{Öpp¥rd›ƒ(po­R9 ª{…cðü‡A÷_lÏêãþ?U×@ÏÝ|¹]cÙ­¿Ë|ƒ&®Æ"éêŽpgpbæ›,8ñŒ`8e§·üÓ6¾Ìmu~SJÑ@B‹v³ÿMùÃÙ󳲎¸Ú#@]b f¤¼ÖµÏc<Ì”YVÜ—Os±ÿøˆ6Y?”ÀÔ+P €_'Â)G3AКªVfÑúy£7¦ÿõ`]W:³¤'“XYKý,!U¼È³é6Îð¸@ õ}ö’TÐ0@ã܆©cB] Ä?xmltooling-1.5.3/xmltoolingtest/data/cert.der000644 001751 001751 00000001223 12003305017 022525 0ustar00scantorscantor000000 000000 0‚0‚ø  ©<·XXpÉ!0  *†H†÷ 0:1 0 UUS10U  Internet210Usp.example.org0 050620154834Z 321105154834Z0:1 0 UUS10U  Internet210Usp.example.org0Ÿ0  *†H†÷ 0‰ÙYÔ½f+6QR¢1áfWÆ&þ8‰¥ÏÑhK6 ɤäÞj;ì¬ X6qWäÂÍÎà·5äu ,ݘ£cJØA âù¨N]‘®3õosÊÚ•mK˜Ÿ/^œ|/æxn3ÿòyˆ*XTJ®LeÛÁÔ"Z0•ïÛÇGÿMª­·£œ0™0U–b;Z¬È œÜ| ”¿i&“z}±°0jU#c0a€–b;Z¬È œÜ| ”¿i&“z}±°¡>¤<0:1 0 UUS10U  Internet210Usp.example.org‚ ©<·XXpÉ!0 U0ÿ0  *†H†÷ 0Z¿QäÊxÐjY¹ìƒÙE´3~|º`è‡æú¥Èz1Œ ¡~Ö8B,–v©„½–E!Ô¶^æ;ìGó–µï•á)©ø A:-£ÚKaï—êûÇõž©‚f,Nf¤úLN÷ri®³÷|i“ÌšËíP®Ùü˜xmltooling-1.5.3/xmltoolingtest/data/SimpleXMLObjectWithChildren.xml000644 001751 001751 00000000521 12003305017 027064 0ustar00scantorscantor000000 000000 BarBaz xmltooling-1.5.3/xmltoolingtest/data/InlineKeyResolver.xml000644 001751 001751 00000000074 12003305017 025232 0ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltoolingtest/data/key.pem000644 001751 001751 00000001567 12003305017 022402 0ustar00scantorscantor000000 000000 -----BEGIN RSA PRIVATE KEY----- MIICXQIBAAKBgQDZWdS9Zis2G1FSojEC4WZXxg8mGv44womlz9FoSzYLyaTk3mo7 7KwKWDZxV+TCzc7gtzXkCI11DSzdmKNjAkrYQSDi+ahOXZGuM/Vvc8raH5VtS5if L16cfAMv5nhuM//yeYgqWFRKrgNMZdvB1CJaMJ2VBe8O28dHBf9Nqq0dtwIDAQAB AoGAKsaVKdlLs9BYhuzIvIpju+6M2LEDS2Rt9qYZzm7O6i77NtfXDIgdq8OEo3Xq 3bPnfS5Retl8DYdURyBdN4Uh+WR/BUWQjBvOaJLEEdxvuAaLyAjniVREwkc2rXTZ xoYYFL/XMyAEt/ye2ZbTw2u5R2i7HCYdddZWMkP1+Vabg8ECQQD7VJXWy8KFiyeC thJiVqG/h5IO0y25dId/n81sW2B55eK0c4+IVsqc0a45/U/y2y1wtNBmIEQQn9yY pDtWwzVRAkEA3WOgmvxFGTI5V1K5CLCCZzQIUYpzQDQvBu2sKYuy8dK2BMEGe9Zw cKVyZJuDKHBvrVI5G6CqkHuFD2PwDvwAhwJBAPdfbM/q4/4/VddAz918uV1j2a2/ y3yDJq7GIhHp6o5wZ3AHYhnmmyw48YxgOGWntxT80zYBwhy+zAhtdX5TStECQEKL drP/TfnD2e6Ag/Ozso642iNAXWIYDWakvBIE1rXPYzzMlFlW3JdPc7H/+I2INlk/ lMDUK1CggB9fJ8IpRzMCQQDQmqpWZtH6eaMAN6b/9WBdVzqzpCeTWFlL/SwhVbzI s+k2zvC4HEAK9Y199g6SHVTQMEAE49wfhhCpY0JdCsQ/ -----END RSA PRIVATE KEY----- xmltooling-1.5.3/xmltoolingtest/data/catalog.xml000644 001751 001751 00000000756 12003305017 023242 0ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltoolingtest/data/test.pfx000644 001751 001751 00000003215 12003305017 022575 0ustar00scantorscantor000000 000000 0‚‰0‚O *†H†÷  ‚@‚<0‚80‚7 *†H†÷  ‚(0‚$0‚ *†H†÷ 0 *†H†÷  0ñ=È»éѹ€‚ðZÞÞ•Ì/9`<‹gAÅëÝ&ü›è19ƒÔvØN\üõun µ NAà5U˜Kë®ô+…c^ëJŽŒ‰ÖÒÄžʄfƒ¢]Éx2`¸M>šP,N„ðï6( "Ë4´L˜ü²°ã‹ú·Œ°GXÿCʽ]9Žƒ:?ƒð¨A‘V(”ˆ”¾í!¼Že±’Ãçˆ+AÿëÂ!9½W)½4ŸWûýVIÇýí~ø‰¶CKf .]Q`¯©JÝ%s³¨üSvM°wA´¸ñ®B‰Þ$bòÕOØÌpóf³Q5)„Ê3P:ÿ‰×ï%Wþ˜R¬=˜8n4¬o£Ù£ÆlpÖ=e–ÛzõoÖä¢ Òkª¢Ô©]D)Ìò}œ3ù j38]  4Œå°{QÖ¯ßù,ÒÎþ4Š—…ùÁ€FdâH£ü@‹ãOþG{]Yd?Êq›”¿Ê@ †ôÇ'ÎÈVAÆ‚ Ò©»¨©‚iˆ{µLhÈg±ÁàÅ…˜¬ŸÿÓÁqø-}Òª†)åè_C?÷.›tFytSLp8WLšÅ{„5‡•ÙZ ¸M¹:§Y„Ð]øÍMÔv8ƒ©!Cª£]Çwï¨'Þ‚n¥Dšä¸ô÷ìØùø³õ8œÍ¯7yÑk/®xêè¬^î}Þ í—\¶²"åúßÞîíú¯&XfŠE"¾®^¤9Åǽ6aYˆ­Àñ°ËÍ9†Û –ÁŸê¿@¤zYŸK¯’îŒò$Ïi€œÄ˜›ˆýR€«Æ&†1 ¼žýp"–æ%°ÃrJ”Èu-æ§©Y›]×H!-ñ‚µÕ7ñ‚»Hq~ zç ›Ÿ ˆ‹¤M÷m  ÈbP 0äø³ÇS´(p%m2æ{3‘¶weAQÏ:«5 =íá‘ï:9e_vR¡Ùó6ocjIs¸”#/C2(ûŸŒû·Þ"3û4t?$Rbý!jA6Ò÷¼atáäV~è íÛ8š0‚ù *†H†÷  ‚ê‚æ0‚â0‚Þ *†H†÷   ‚¦0‚¢0 *†H†÷  0Ê {ӵ®Ü‚€KnŸo¦6vE…O¿„òx Õ× ¤ý$ï© œ&9 «@°çĄϨ|O5=Ȩ:)(!)í¨™¾]rnÐ[¬²[.,ÜDý XTÈ·Zí¾=˱’—È2ã4Iš‚­ÖD,Sæ1/RΈÀÓž&ÓU?ü_î3ƒÔ÷ÝdƒÝF(âþ ආYŸþ%Û(ÀÒr;Ç/j7a¿x¾ö˜æoÏãIq!@Rê+m´’±àm):Qt¼C´F7;¸ãÛ‡ä²Z$9PUüÉ¿4ÍàDÑ&3šÄûþ†Œe„ŽÝSÐû*t<”Q7Äù]g¾é©¾ÉØ(U.ylê±—¤ú_eC–©wà1mÙ¢|ÔŽi™fÑqNÉÁ½¦\HM4ˆî -U'‰)0Wƒ dé£W¡¸Q÷íÇ²Š¼±¸,¬Ôÿµ)1$=Xi¢âKP,JG¼(Q!ZíˆÏ1‚–tTжlúV¶íΆ&ÙUxÕèué’Zâ½ìñÝۺ؊&ùn ³69.&Öýwãf À¹ÿè ü;œ¤sU.™ÔðÛߨ‹|*ÈÜg(P¡<#ü<¹¥{›‡Š‚D­Úà. =ÕPPÂÐ-• °/ÃÕØ$Ô˜£:iqÀ<Ó…9#~Êr7Vð+ Ùä3u–5GÁ¬PñÔ²_4ƒ€ÖÀÔ¥={úïË]æ•¿äj7¼`:ñðF ÀªÏsiçžcoøt¢ÄÜΓ0ûõÏ9Zví!¬Eù‰¼0ME¬Öu¯qâ|eÙl…(Â7¿[©~‰mŸÄ ä+CÔé…wYÈÓ9šðR §t»ï÷Pt^1%0# *†H†÷  1¢^˜ ˜£)/å[ŸÀþ010!0 +»AN{%)DXë§IÉ wÌHNHìÔHXâïxmltooling-1.5.3/xmltoolingtest/data/cert.pem000644 001751 001751 00000001664 12003305017 022545 0ustar00scantorscantor000000 000000 -----BEGIN CERTIFICATE----- MIICjzCCAfigAwIBAgIJAKk8t1hYcMkhMA0GCSqGSIb3DQEBBAUAMDoxCzAJBgNV BAYTAlVTMRIwEAYDVQQKEwlJbnRlcm5ldDIxFzAVBgNVBAMTDnNwLmV4YW1wbGUu b3JnMB4XDTA1MDYyMDE1NDgzNFoXDTMyMTEwNTE1NDgzNFowOjELMAkGA1UEBhMC VVMxEjAQBgNVBAoTCUludGVybmV0MjEXMBUGA1UEAxMOc3AuZXhhbXBsZS5vcmcw gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANlZ1L1mKzYbUVKiMQLhZlfGDyYa /jjCiaXP0WhLNgvJpOTeajvsrApYNnFX5MLNzuC3NeQIjXUNLN2Yo2MCSthBIOL5 qE5dka4z9W9zytoflW1LmJ8vXpx8Ay/meG4z//J5iCpYVEquA0xl28HUIlownZUF 7w7bx0cF/02qrR23AgMBAAGjgZwwgZkwHQYDVR0OBBYEFJZiO1qsyAyc3HwMlL9p JpN6fbGwMGoGA1UdIwRjMGGAFJZiO1qsyAyc3HwMlL9pJpN6fbGwoT6kPDA6MQsw CQYDVQQGEwJVUzESMBAGA1UEChMJSW50ZXJuZXQyMRcwFQYDVQQDEw5zcC5leGFt cGxlLm9yZ4IJAKk8t1hYcMkhMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQAD gYEAMFq/UeSQyngE0GpZueyD2UW0M358uhseYOgGEIfm+qXIFQF6MYwNoX7WFzhC LJZ2E6mEvZZFHCHUtl7mGDvsRwgZ85YCtRbvleEpqfgNQToto9pLYe+X6vvH9Z6p gmYsTmak+kxO93JprrOd9xp8aZPMEprL7VCdrhbZEfyYER0= -----END CERTIFICATE----- xmltooling-1.5.3/xmltoolingtest/data/ComplexXMLObject.xml000644 001751 001751 00000002152 12003305017 024737 0ustar00scantorscantor000000 000000 Python Perfect IDE Uses mind-reading technology to anticipate and accommodate all user needs in Python development. Implements all from __future__ import features though the year 3000. Works well with 1166. XSLT Perfect IDE red blue A link xmltooling-1.5.3/xmltoolingtest/data/x509/ExplicitPolicyMap.xml000644 001751 001751 00000000361 12003305017 025724 0ustar00scantorscantor000000 000000 Snakeoil Metadata Signer 1.3.6.1.4.1.32473.2011.6.21 xmltooling-1.5.3/xmltoolingtest/data/x509/mdt-signer.crt.pem000644 001751 001751 00000002250 12003305017 025145 0ustar00scantorscantor000000 000000 -----BEGIN CERTIFICATE----- MIIDQjCCAiqgAwIBAgIRSnakeoilMetadataSignerAwDQYJKoZIhvcNAQEFBQAw JzElMCMGA1UEAxMcU25ha2VvaWwgTWV0YWRhdGEgSXNzdWluZyBDQTAeFw0xMTA2 MjAwMDAwMDBaFw0zODAxMTkwMzE0MDhaMCMxITAfBgNVBAMTGFNuYWtlb2lsIE1l dGFkYXRhIFNpZ25lcjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALOx RpswhModNQdyDyFG7SISavkJCSi77OaBM/M6ZvqW+bg2BE1Ituzi8fnhDnV4HB2z hsKWK0FGoeHuuDVHJDJLQzPIadZMIJE7BzXb1Vy6PdAmMvb4fgqV7WAUfidKf15M Y9zMYLknnkb792or1I49SdJpTxpiFeju+wzauGC5g5DdXJfaBSBFnmQCIaPZpx2e VKK5XDWgw/6QYC1XQuHSHluEB4JwsDyz2BrtYpUKrw0d7Bef+cYbEjOYtuvgZPEn 8mGirZxaztB7IYOqaTOvyMwtu8cH/N5d2xAZAzlrY9ODOZBCglqKoeOkhAnqvDaz AxjmiFgYLbWxPKUIH1UCAwEAAaNtMGswDgYDVR0PAQH/BAQDAgeAMB0GA1UdDgQW BBS6UY1qJSWaNYsl/AMTl7jLqkQbmDAfBgNVHSMEGDAWgBQET29bgHGiIaw/RdgW WTALQ2PH4DAZBgNVHSAEEjAQMA4GDCsGAQQBgf1Zj1sGFDANBgkqhkiG9w0BAQUF AAOCAQEAO2e6CJK0fhzF6MFMAt7rjYt+Y/AuOP4VD14uCVG4TEGQ7aNsvaFGwbQ9 Pnc/wxdh2tLp4ZU5N0oFKZeeHDoYNXsjBWKXEhtegQndKm56EpN0YjlLGqeeY5de D0qoQnXHl5SZhoXUCh09yLK4sNctJm1Fz74KzStg/nQK4E/QbvVXQduWv8hdKEMG mLNb01y5xXqXCMIKKZj4wtTOwXhTOmGo8oJbz9OKy/PkhF1M+V/BzwZizhpV6imO 2EBL59C8fkkT416J5kYx+FgGEV0vU8wCyE8mkg1/Hi6VnU2ZTYJgM2TW0rjkKNRw fWwwrfK4x3a8hkKaLZmTgHnGL6J2VA== -----END CERTIFICATE----- xmltooling-1.5.3/xmltoolingtest/data/x509/mdt-signer.key000644 001751 001751 00000003213 12003305017 024365 0ustar00scantorscantor000000 000000 -----BEGIN RSA PRIVATE KEY----- MIIEowIBAAKCAQEAs7FGmzCEyh01B3IPIUbtIhJq+QkJKLvs5oEz8zpm+pb5uDYE TUi27OLx+eEOdXgcHbOGwpYrQUah4e64NUckMktDM8hp1kwgkTsHNdvVXLo90CYy 9vh+CpXtYBR+J0p/Xkxj3MxguSeeRvv3aivUjj1J0mlPGmIV6O77DNq4YLmDkN1c l9oFIEWeZAIho9mnHZ5UorlcNaDD/pBgLVdC4dIeW4QHgnCwPLPYGu1ilQqvDR3s F5/5xhsSM5i26+Bk8SfyYaKtnFrO0Hshg6ppM6/IzC27xwf83l3bEBkDOWtj04M5 kEKCWoqh46SECeq8NrMDGOaIWBgttbE8pQgfVQIDAQABAoIBABdds/q2Im5NwfmH 4WPIX0mQ74wWmrRLS5DluCWmsIFhZHOJwqFyFSdUk3aUx1aLGcza7WkcMd+5GY/R hO6Yo6JOmxx+sRSGra106YkdXu9B4IvSi8oFog4qVMWrpIPjchCHCm1JvkIVXsWI OjH6JReh7JmJzBl4K7UwbkDLqDIbdZdTgmCWndAXSGJKRS1XNC/S35A1UWg3zW3T uS60skBI1L5JH051ioSXJ5ngr4/wS86Q+QpXZiScvGZt0gYu1xo0OzjdUk3m1gk7 Adf7278QC5WGfVGDFVXc7GtoZVD+fHI8JLY/Gw6g00tpSJ2l7FTX9JZwATB5u+Rl 2ymHlwECgYEA5CiyCP7yeAq/LRCTQXPzE++Os21wa3+DsWcl2lZeX0HPnEOBd94/ R+9Bf/A8FdxUzT/6kjqOB3Lq1ouTyNu/OQmTgBSTuYR5sOkL6uMSDTsYYG+zfvqZ dhHQUry+b5THj0Pidgt3vbgu6NQ0gq7aIzhec6WbZzHR4os+hJXqjPUCgYEAyZ6R h/vi2lNQegzhOTyvrRqA1qWMLl4AEI9UrvtDmYRmkfs8Xr++gWl0JBtNtEfDxKL/ rOoYHsieNW7gcqi0zxwrcbo1AkuiRnS19IKBDnDB3Vl4pms15+ttFLjdOoDHO+/M SwwJgye9LLTwoqRYkucCv67BMo7n5a/klVnzzOECgYB5lWYqfRHg/nkaHrcaLhvf B83Xt/4sius24my9iUEJKhzkfOTFZ935C3qwHukmDR/zsKBqxGFjfs2+PusmIlQo pP3BRzXhqsLej5IWPaMlAdTfrybMB+c3kA6fyI0DERm3Msm/diT9KOV2lX7WFS+R jTxoDFxgBaB/RQyvwuQW8QKBgHZb8SE8PINgj4jm0LzyJEthmKrpim6Z3j3adqM2 fAu+Txx5uYoB1EtSZczgfnBMBOAFtESFNF219jJ2Aast4N8IsXRVFNNhJUVpNHvy tOKOTTCtWoePvpiEe4fDspOqj8tezbZsvZTSGlsJaY6BHkI2/UUbyOzuObJ73JvU r6vhAoGBAKAb4tG2mJYi9FeYxaMKjkPx+/HAysYlCrMK8ZJyqk2ATzC0N+b6t88+ dSXlcLwuI/iVXRAHXqU7m/Va8hQ0s1glUOtnQj13jOlElID2Lw7W7Ar3B1SxPLba 3LgndcfbhNpdZjjrQC+i+c6DPiNDNEWUDJujEk0Ge+QyFV9UnPxJ -----END RSA PRIVATE KEY----- xmltooling-1.5.3/xmltoolingtest/data/x509/mdt-ica.1.crt.pem000644 001751 001751 00000002254 12003305017 024555 0ustar00scantorscantor000000 000000 -----BEGIN CERTIFICATE----- MIIDRjCCAi6gAwIBAgIUSnakeoilMetadataIssuingCA1wwDQYJKoZIhvcNAQEF BQAwGzEZMBcGA1UEAxMQU25ha2VvaWwgUm9vdCBDQTAeFw0xMTA2MjAwMDAwMDBa Fw0zODAxMTkwMzE0MDhaMCcxJTAjBgNVBAMTHFNuYWtlb2lsIE1ldGFkYXRhIElz c3VpbmcgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6DFQZPSPr yTWmV+i0UFl9d9AOGjH6nHTU35faoOh0alsLKJAxCRlU3WT+EySFOpYoOwNLWtid M8Fvxz0/cXtXQ6ivGKWEFtvzVock6jtRz/yUd6Oo/qo/TKlyrO+CtNxAexCgshLj xXkeyOv1JtSIvsCQ19dnGwOaSS7sWmPsUEEiJ24Iby2A+BtubQbAWI4M1gb+bbhi OVRA2f8Km2qqM2ijsEqfzYZbDFd1xoULR+iglagvtK4xfjZ+k/Qorax/MSSKg0cf nHz2LKMRMqXvKVPK6M9xCgqZxYwogUSlAXBc0vpP8FUU6B3minhpbAlrxXL9Frsz asEFaMQLsHiBAgMBAAGjdjB0MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQD AgEGMB0GA1UdDgQWBBQET29bgHGiIaw/RdgWWTALQ2PH4DAfBgNVHSMEGDAWgBQz 2TQJ+Wbq9e8hujPnpCUJO79r6DARBgNVHSAECjAIMAYGBFUdIAAwDQYJKoZIhvcN AQEFBQADggEBACN6yB+JUZHNgkA9aSe4EDxgrpBrmG9SmZSiZmwYVXykWiw5m1OB 3wLvtqusFxK1ohegKGzu36yGBCGv5q4mumbI8ejTrJ0n2qSyfgLZrqVb46CO2s6p 5xKZZcVSAZD8xno9RiSDZrYucsOxxlDwjVeJkw+6sEJeWNMvN3NEzd7xZC1qilQl VJZQUmY5pzu2qxaGrmJrIWr8yxcKjbmzG3UvHPpv1NxR3F69sTz4e+dGZYclASIR 2nwHLRuU/LH0oNrMy8+s5d9a5jg5u0Ew9pXdlpguQERNT5lJJ1z9S1Z7KQEX0rFt peZZ8oY/LKHVbU3ykmSnh5n3VgB6FxBgdfM= -----END CERTIFICATE----- xmltooling-1.5.3/xmltoolingtest/data/x509/mdt-ica.2.crt.pem000644 001751 001751 00000002270 12003305017 024554 0ustar00scantorscantor000000 000000 -----BEGIN CERTIFICATE----- MIIDTjCCAjagAwIBAgIUSnakeoilMetadataIssuingCA2wwDQYJKoZIhvcNAQEF BQAwGzEZMBcGA1UEAxMQU25ha2VvaWwgUm9vdCBDQTAeFw0xMTA2MjAwMDAwMDBa Fw0zODAxMTkwMzE0MDhaMCcxJTAjBgNVBAMTHFNuYWtlb2lsIE1ldGFkYXRhIElz c3VpbmcgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6DFQZPSPr yTWmV+i0UFl9d9AOGjH6nHTU35faoOh0alsLKJAxCRlU3WT+EySFOpYoOwNLWtid M8Fvxz0/cXtXQ6ivGKWEFtvzVock6jtRz/yUd6Oo/qo/TKlyrO+CtNxAexCgshLj xXkeyOv1JtSIvsCQ19dnGwOaSS7sWmPsUEEiJ24Iby2A+BtubQbAWI4M1gb+bbhi OVRA2f8Km2qqM2ijsEqfzYZbDFd1xoULR+iglagvtK4xfjZ+k/Qorax/MSSKg0cf nHz2LKMRMqXvKVPK6M9xCgqZxYwogUSlAXBc0vpP8FUU6B3minhpbAlrxXL9Frsz asEFaMQLsHiBAgMBAAGjfjB8MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQD AgEGMB0GA1UdDgQWBBQET29bgHGiIaw/RdgWWTALQ2PH4DAfBgNVHSMEGDAWgBQz 2TQJ+Wbq9e8hujPnpCUJO79r6DAZBgNVHSAEEjAQMA4GDCsGAQQBgf1Zj1sGFDAN BgkqhkiG9w0BAQUFAAOCAQEACfLO1Mfw6/QHH7PVwGOUWgLYr87x5tRuFMoG8IAr HU02fF+0hEAQdw113Z8LZjuKWH3jZhLpGt3kkEDiGcbRxSjru/fYz6IhRExMnZAA udM8V7LCBmdoZJRUWKF0pXYooVRHuVkYt4VTzhoq1uvdN1VheKLTDzhkp+NMj3Zb Yc90ifQViWGWx2Aia9HzSo1oj4iu2M2RUblGbuUAola7i2kjCmZJBHTzqNbwf0FM 2syAHqQdXUmqpm4R3ex9EKSIjOHuaafUWDEi2y4i3ZD3lzMKlRIlpgz69drBLPBF CFBlnENG5Hfkc44XerMTp0b4+Ch6PEUGtZOepyNkkGS/iA== -----END CERTIFICATE----- xmltooling-1.5.3/xmltoolingtest/data/x509/AnyPolicy.xml000644 001751 001751 00000000331 12003305017 024231 0ustar00scantorscantor000000 000000 Snakeoil Metadata Signer 1.3.6.1.4.1.32473.2011.6.20 xmltooling-1.5.3/xmltoolingtest/data/x509/mdt-ica.3.crt.pem000644 001751 001751 00000002405 12003305017 024555 0ustar00scantorscantor000000 000000 -----BEGIN CERTIFICATE----- MIIDiTCCAnGgAwIBAgIUSnakeoilMetadataIssuingCA3wwDQYJKoZIhvcNAQEF BQAwGzEZMBcGA1UEAxMQU25ha2VvaWwgUm9vdCBDQTAeFw0xMTA2MjAwMDAwMDBa Fw0zODAxMTkwMzE0MDhaMCcxJTAjBgNVBAMTHFNuYWtlb2lsIE1ldGFkYXRhIElz c3VpbmcgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6DFQZPSPr yTWmV+i0UFl9d9AOGjH6nHTU35faoOh0alsLKJAxCRlU3WT+EySFOpYoOwNLWtid M8Fvxz0/cXtXQ6ivGKWEFtvzVock6jtRz/yUd6Oo/qo/TKlyrO+CtNxAexCgshLj xXkeyOv1JtSIvsCQ19dnGwOaSS7sWmPsUEEiJ24Iby2A+BtubQbAWI4M1gb+bbhi OVRA2f8Km2qqM2ijsEqfzYZbDFd1xoULR+iglagvtK4xfjZ+k/Qorax/MSSKg0cf nHz2LKMRMqXvKVPK6M9xCgqZxYwogUSlAXBc0vpP8FUU6B3minhpbAlrxXL9Frsz asEFaMQLsHiBAgMBAAGjgbgwgbUwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8E BAMCAQYwHQYDVR0OBBYEFARPb1uAcaIhrD9F2BZZMAtDY8fgMB8GA1UdIwQYMBaA FDPZNAn5Zur17yG6M+ekJQk7v2voMCkGA1UdIAQiMCAwDgYMKwYBBAGB/VmPWwYU MA4GDCsGAQQBgf1Zj1sGFTAnBgNVHSEEIDAeMBwGDCsGAQQBgf1Zj1sGFQYMKwYB BAGB/VmPWwYUMA0GCSqGSIb3DQEBBQUAA4IBAQCv0yZiKSpIYcSNWQbAi0Rbh8oj AGQZafYQWlMahy0ulw8FrFx4VFw8cEQsoFGwoyl4r8WQQ3swIjPVqvyQCwvn6mDi t2vrMwcPTzVy3ToHyK50qXQ0eoqlOM+NVWygs5oPhqAQDBPBrQKRr9CN9VdaByBv tXDS3zQCi/10E3tCL/YGjDG5s9rSAUkbEk5USZDJ5BSu0cmj85ykEyx5TqpUwEVs H99BVU8a80oPf+mpI3gE6hZwK+l9dMElHIqygS4JT1FZUUZ95hzBzZLCj6mjq7R/ hHuqtUqMd9myRdAe/9pOTGikDr7JYeZblzcqRvl5PCiYXYAnDyv1lIOKKbDb -----END CERTIFICATE----- xmltooling-1.5.3/xmltoolingtest/data/x509/ExplicitPolicyNoMap.xml000644 001751 001751 00000000365 12003305017 026225 0ustar00scantorscantor000000 000000 Snakeoil Metadata Signer 1.3.6.1.4.1.32473.2011.6.21 xmltooling-1.5.3/xmltoolingtest/data/x509/mdt-root.crt.pem000644 001751 001751 00000002113 12003305017 024637 0ustar00scantorscantor000000 000000 -----BEGIN CERTIFICATE----- MIIC/TCCAeWgAwIBAgILSnakeoilRootCA0wDQYJKoZIhvcNAQEFBQAwGzEZMBcG A1UEAxMQU25ha2VvaWwgUm9vdCBDQTAeFw0xMTA2MjAwMDAwMDBaFw0zODAxMTkw MzE0MDhaMBsxGTAXBgNVBAMTEFNuYWtlb2lsIFJvb3QgQ0EwggEiMA0GCSqGSIb3 DQEBAQUAA4IBDwAwggEKAoIBAQDthRs8czq6e7n74lDBJqe1Qpd51jO6NjHcHQZJ cZgW7II+EY7MJ5+kDDFoTo0v2O3J2rI5DojH6mhcT4BX/NUDVtwu2PgQNlHtLfBk sT4FHSritu78Q7Y1r+XlcawAIcbTtF2jnDCumyZUT/wMjdyM8ACchmKssQks2NXB f2bhHfZfsVaO7aO6qwA9q3Lpm8VxjmGLfCuKrM1PDEMLzAKWGpRgtUm+LKW++11T PZxP0z8X02j01qOXTDhDCP84HY0jWMk6P4H5DH/z0JIIaEG2Ph+SpMAuIs5YmDs8 xBgtgAqsXjSJoCPnECTH6m2/SEqINyJuuWHd1XuoKAOOhq1RAgMBAAGjQjBAMA8G A1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBQz2TQJ+Wbq 9e8hujPnpCUJO79r6DANBgkqhkiG9w0BAQUFAAOCAQEADV3g7LGZGFiK5MYPAzRP GBuhJKoYN8+6UVvt0WLSNC/MNWtLpF74r54CD5OGVFua7c8aIDEPKGXuyKGgz9r6 WLPTjtZjBg0E3TZu9Pwpta+dC0kVF7ossDxXHPOHiDMFZ60EVI7dZR2NboFDirL9 jHCvwlKLP8NWjB17aw7m0SM3g8krVj2Cxxdc99CmfYKsvWpvI06sP2O69K06Modi 5aQZ37EJEpp8x/lFaRubAymWrM6azpRz9av1BbeFgVAP16yWGV1wl8HMhu69ULL4 tmlA85snFNnlVZ6rI6goJhcc0yeurCQIpCKTwRnpcLDBo74lSjyOXMo0ppsDl7Jy DA== -----END CERTIFICATE----- xmltooling-1.5.3/xmltoolingtest/data/x509/ExplicitPolicy.xml000644 001751 001751 00000000361 12003305017 025266 0ustar00scantorscantor000000 000000 Snakeoil Metadata Signer 1.3.6.1.4.1.32473.2011.6.20 xmltooling-1.5.3/xmltooling/encryption/000755 001751 001751 00000000000 12157725415 021501 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltooling/impl/000755 001751 001751 00000000000 12157725415 020250 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltooling/io/000755 001751 001751 00000000000 12157725415 017716 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltooling/security/000755 001751 001751 00000000000 12157725415 021156 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltooling/signature/000755 001751 001751 00000000000 12157725415 021310 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltooling/soap/000755 001751 001751 00000000000 12157725415 020251 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltooling/util/000755 001751 001751 00000000000 12157725415 020264 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltooling/validation/000755 001751 001751 00000000000 12157725415 021441 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltooling/AbstractAttributeExtensibleXMLObject.h000644 001751 001751 00000006104 12003305017 026621 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/AbstractAttributeExtensibleXMLObject.h * * AbstractXMLObject mixin that implements AttributeExtensibleXMLObject */ #ifndef __xmltooling_absattrextxmlobj_h__ #define __xmltooling_absattrextxmlobj_h__ #include #include #include #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif namespace xmltooling { /** * AbstractXMLObject mixin that implements AttributeExtensibleXMLObject. * Inherit from this class to add support for attribute wildcarding. */ class XMLTOOL_API AbstractAttributeExtensibleXMLObject : public virtual AttributeExtensibleXMLObject, public virtual AbstractXMLObject { public: virtual ~AbstractAttributeExtensibleXMLObject(); // Virtual function overrides. const XMLCh* getAttribute(const QName& qualifiedName) const; void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false); const std::map& getExtensionAttributes() const; const XMLCh* getXMLID() const; const XMLCh* getLang() const; protected: AbstractAttributeExtensibleXMLObject(); /** Copy constructor. */ AbstractAttributeExtensibleXMLObject(const AbstractAttributeExtensibleXMLObject& src); /** * Assists in the unmarshalling of extension attributes. * * @param attribute the DOM attribute node being unmarshalled */ void unmarshallExtensionAttribute(const xercesc::DOMAttr* attribute); /** * Assists in the marshalling of extension attributes. * * @param domElement the DOM element against which to marshall the attributes */ void marshallExtensionAttributes(xercesc::DOMElement* domElement) const; private: /** Map of arbitrary attributes. */ std::map m_attributeMap; /** Points to the last attribute designated as an XML ID. */ std::map::const_iterator m_idAttribute; }; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif #endif /* __xmltooling_absattrextxmlobj_h__ */ xmltooling-1.5.3/xmltooling/AbstractComplexElement.h000644 001751 001751 00000004636 12003305016 024053 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/AbstractComplexElement.h * * AbstractXMLObject mixin that implements children */ #ifndef __xmltooling_abscomplexel_h__ #define __xmltooling_abscomplexel_h__ #include #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif namespace xmltooling { /** * AbstractXMLObject mixin that implements children. * Inherit from this class to implement an element with child objects and mixed content. */ class XMLTOOL_API AbstractComplexElement : public virtual AbstractXMLObject { public: virtual ~AbstractComplexElement(); // Virtual function overrides. bool hasChildren() const; const std::list& getOrderedChildren() const; void removeChild(XMLObject* child); const XMLCh* getTextContent(unsigned int position=0) const; void setTextContent(const XMLCh* value, unsigned int position=0); protected: AbstractComplexElement(); /** Copy constructor. */ AbstractComplexElement(const AbstractComplexElement& src); /** * Underlying list of child objects. * Manages the lifetime of the children. */ std::list m_children; /** * Interstitial text nodes. * Needed to support mixed content, and preserve DOM whitespace across rebuilds. */ std::vector m_text; }; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif #endif /* __xmltooling_abscomplexel_h__ */ xmltooling-1.5.3/xmltooling/AbstractDOMCachingXMLObject.h000644 001751 001751 00000005210 12003305017 024524 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/AbstractDOMCachingXMLObject.h * * AbstractXMLObject mixin that implements DOM caching. */ #ifndef __xmltooling_abstractdomxmlobj_h__ #define __xmltooling_abstractdomxmlobj_h__ #include #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif namespace xmltooling { /** * AbstractXMLObject mixin that implements DOM caching. * Inherit from this class to implement standard DOM caching behavior. */ class XMLTOOL_API AbstractDOMCachingXMLObject : public virtual AbstractXMLObject { public: virtual ~AbstractDOMCachingXMLObject(); // Virtual function overrides. xercesc::DOMElement* getDOM() const; void setDOM(xercesc::DOMElement* dom, bool bindDocument=false) const; void setDocument(xercesc::DOMDocument* doc) const; void releaseDOM() const; void releaseParentDOM(bool propagateRelease=true) const; void releaseChildrenDOM(bool propagateRelease=true) const; XMLObject* clone() const; void detach(); protected: AbstractDOMCachingXMLObject(); /** Copy constructor. */ AbstractDOMCachingXMLObject(const AbstractDOMCachingXMLObject& src); /** * If a DOM representation exists, this clones it into a new document. * * @param doc the document to clone into, or nullptr, in which case a new document is created * @return the cloned DOM */ xercesc::DOMElement* cloneDOM(xercesc::DOMDocument* doc=nullptr) const; private: mutable xercesc::DOMElement* m_dom; mutable xercesc::DOMDocument* m_document; }; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif #endif /* __xmltooling_abstractdomxmlobj_h__ */ xmltooling-1.5.3/xmltooling/AbstractSimpleElement.h000644 001751 001751 00000004277 12003305017 023677 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/AbstractSimpleElement.h * * AbstractXMLObject mixin that implements a simple string-based content model */ #ifndef __xmltooling_abssimpleel_h__ #define __xmltooling_abssimpleel_h__ #include #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif namespace xmltooling { /** * AbstractXMLObject mixin that implements a simple string-based content model. * Inherit from this class to support string-based element content. */ class XMLTOOL_API AbstractSimpleElement : public virtual AbstractXMLObject { public: virtual ~AbstractSimpleElement(); // Virtual function overrides. bool hasChildren() const; const std::list& getOrderedChildren() const; void removeChild(XMLObject* child); const XMLCh* getTextContent(unsigned int position=0) const; void setTextContent(const XMLCh* value, unsigned int position=0); protected: AbstractSimpleElement(); /** Copy constructor. */ AbstractSimpleElement(const AbstractSimpleElement& src); private: XMLCh* m_value; static std::list m_no_children; }; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif #endif /* __xmltooling_abssimpleel_h__ */ xmltooling-1.5.3/xmltooling/AbstractXMLObject.h000644 001751 001751 00000016101 12003305016 022707 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/AbstractXMLObject.h * * An abstract implementation of XMLObject. */ #ifndef __xmltooling_abstractxmlobj_h__ #define __xmltooling_abstractxmlobj_h__ #include #include #include #include #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif namespace xmltooling { class XMLTOOL_API DateTime; /** * An abstract implementation of XMLObject. * This is the primary concrete base class, and supplies basic namespace, * type, and parent handling. Most implementation classes should not * directly inherit from this class, but rather from the various mixins * that supply the rest of the XMLObject interface, as required. */ class XMLTOOL_API AbstractXMLObject : public virtual XMLObject { public: virtual ~AbstractXMLObject(); // Virtual function overrides. void detach(); const QName& getElementQName() const; const std::set& getNamespaces() const; void addNamespace(const Namespace& ns) const; void removeNamespace(const Namespace& ns); const QName* getSchemaType() const; const XMLCh* getXMLID() const; xmlconstants::xmltooling_bool_t getNil() const; void nil(xmlconstants::xmltooling_bool_t value); bool hasParent() const; XMLObject* getParent() const; void setParent(XMLObject* parent); protected: /** * Constructor * * @param nsURI the namespace of the element * @param localName the local name of the XML element this Object represents * @param prefix the namespace prefix to use * @param schemaType the xsi:type to use */ AbstractXMLObject( const XMLCh* nsURI=nullptr, const XMLCh* localName=nullptr, const XMLCh* prefix=nullptr, const QName* schemaType=nullptr ); /** Copy constructor. */ AbstractXMLObject(const AbstractXMLObject& src); /** * A helper function for derived classes, for assignment of strings. * * This 'normalizes' newString, and then if it is different from oldString, * it invalidates the DOM, frees the old string, and returns the new. * If not different, it frees the new string and just returns the old value. * * @param oldValue the current value * @param newValue the new value * * @return the value that should be assigned */ XMLCh* prepareForAssignment(XMLCh* oldValue, const XMLCh* newValue); /** * A helper function for derived classes, for assignment of date/time data. * * It invalidates the DOM, frees the old object, and returns the new. * * @param oldValue the current value * @param newValue the new value * * @return the value that should be assigned */ DateTime* prepareForAssignment(DateTime* oldValue, const DateTime* newValue); /** * A helper function for derived classes, for assignment of date/time data. * * It invalidates the DOM, frees the old object, and returns the new. * * @param oldValue the current value * @param newValue the epoch to assign as the new value * @param duration true iff the value is a duration rather than an absolute timestamp * * @return the value that should be assigned */ DateTime* prepareForAssignment(DateTime* oldValue, time_t newValue, bool duration=false); /** * A helper function for derived classes, for assignment of date/time data. * * It invalidates the DOM, frees the old object, and returns the new. * * @param oldValue the current value * @param newValue the new value in string form * @param duration true iff the value is a duration rather than an absolute timestamp * * @return the value that should be assigned */ DateTime* prepareForAssignment(DateTime* oldValue, const XMLCh* newValue, bool duration=false); /** * A helper function for derived classes, for assignment of QName data. * * It invalidates the DOM, frees the old object, and returns the new. * * @param oldValue the current value * @param newValue the new value * * @return the value that should be assigned */ QName* prepareForAssignment(QName* oldValue, const QName* newValue); /** * A helper function for derived classes, for assignment of (singleton) XML objects. * * It is indifferent to whether either the old or the new version of the value is null. * This method will do a safe compare of the objects and will also invalidate the DOM if appropriate. * Note that since the new value (even if nullptr) is always returned, it may be more efficient * to discard the return value and just assign independently if a dynamic cast would be involved. * * @param oldValue current value * @param newValue proposed new value * @return the new value * * @throws XMLObjectException if the new child already has a parent. */ XMLObject* prepareForAssignment(XMLObject* oldValue, XMLObject* newValue); /** * Set of namespaces associated with the object. */ mutable std::set m_namespaces; /** * Logging object. */ logging::Category& m_log; /** * Stores off xsi:schemaLocation attribute. */ XMLCh* m_schemaLocation; /** * Stores off xsi:noNamespaceSchemaLocation attribute. */ XMLCh* m_noNamespaceSchemaLocation; /** * Stores off xsi:nil attribute. */ xmlconstants::xmltooling_bool_t m_nil; private: XMLObject* m_parent; QName m_elementQname; std::auto_ptr m_typeQname; }; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif #endif /* __xmltooling_abstractxmlobj_h__ */ xmltooling-1.5.3/xmltooling/AttributeExtensibleXMLObject.h000644 001751 001751 00000010014 12003305016 025127 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/AttributeExtensibleXMLObject.h * * An XMLObject that supports arbitrary attributes */ #ifndef __xmltooling_attrextxmlobj_h__ #define __xmltooling_attrextxmlobj_h__ #include #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif namespace xmltooling { /** * An XMLObject that supports arbitrary attributes. */ class XMLTOOL_API AttributeExtensibleXMLObject : public virtual XMLObject { protected: AttributeExtensibleXMLObject(); public: virtual ~AttributeExtensibleXMLObject(); /** * Gets the value of an XML attribute of the object. * * @param qualifiedName qualified name of the attribute * @return the attribute value, or nullptr */ virtual const XMLCh* getAttribute(const QName& qualifiedName) const=0; /** * Sets (or clears) an XML attribute of the object. * * @param qualifiedName qualified name of the attribute * @param value value to set, or nullptr to clear * @param ID true iff the attribute is an XML ID */ virtual void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false)=0; /** * Sets a QName-valued XML attribute of the object. * * @param qualifiedName qualified name of the attribute * @param value value to set */ virtual void setAttribute(const QName& qualifiedName, const QName& value); /** * Gets an immutable map of the extended XML attributes of the object. * * This set is not guaranteed to (and generally will not) include * attributes defined directly on the object's "type". */ virtual const std::map& getExtensionAttributes() const=0; /** * Gets an immutable list of all the ID attributes currently registered. * * @return list of all the ID attributes currently registered */ static const std::set& getRegisteredIDAttributes(); /** * Tests whether an XML attribute is registered as an XML ID. * * @return true iff the attribute name matches a registered XML ID attribute */ static bool isRegisteredIDAttribute(const QName& name); /** * Registers a new attribute as being of XML ID type. * * @param name the qualified attribute name */ static void registerIDAttribute(const QName& name); /** * Deregisters an ID attribute. * * @param name the qualified attribute name */ static void deregisterIDAttribute(const QName& name); /** * Deregisters all ID attributes. */ static void deregisterIDAttributes(); private: /** Set of attributes to treat as XML IDs. */ static std::set m_idAttributeSet; }; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif #endif /* __xmltooling_attrextxmlobj_h__ */ xmltooling-1.5.3/xmltooling/base.h000644 001751 001751 00000317226 12003305016 020362 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/base.h * * Base header file definitions. * Must be included prior to including any other header. */ #ifndef __xmltooling_base_h__ #define __xmltooling_base_h__ #include /* Required for sprintf, used by integer XML attribute macros. */ #include #if defined (_MSC_VER) || defined(__BORLANDC__) #include #else #include #endif #ifdef XMLTOOLING_LITE # define XMLTOOLING_NO_XMLSEC 1 #endif #ifndef HAVE_NULLPTR # define nullptr 0 #endif #if defined(XMLTOOLING_NO_XMLSEC) || !defined(HAVE_XSECSIZE_T) # ifdef XMLTOOLING_XERCESC_64BITSAFE # include typedef XMLSize_t xsecsize_t; # else typedef unsigned int xsecsize_t; # endif #endif // Windows and GCC4 Symbol Visibility Macros #ifdef WIN32 #define XMLTOOL_IMPORT __declspec(dllimport) #define XMLTOOL_EXPORT __declspec(dllexport) #define XMLTOOL_DLLLOCAL #define XMLTOOL_DLLPUBLIC #else #define XMLTOOL_IMPORT #ifdef GCC_HASCLASSVISIBILITY #define XMLTOOL_EXPORT __attribute__ ((visibility("default"))) #define XMLTOOL_DLLLOCAL __attribute__ ((visibility("hidden"))) #define XMLTOOL_DLLPUBLIC __attribute__ ((visibility("default"))) #else #define XMLTOOL_EXPORT #define XMLTOOL_DLLLOCAL #define XMLTOOL_DLLPUBLIC #endif #endif // Define XMLTOOL_API for DLL builds #ifdef XMLTOOLING_EXPORTS #define XMLTOOL_API XMLTOOL_EXPORT #else #define XMLTOOL_API XMLTOOL_IMPORT #endif // Throwable classes must always be visible on GCC in all binaries #ifdef WIN32 #define XMLTOOL_EXCEPTIONAPI(api) api #elif defined(GCC_HASCLASSVISIBILITY) #define XMLTOOL_EXCEPTIONAPI(api) XMLTOOL_EXPORT #else #define XMLTOOL_EXCEPTIONAPI(api) #endif #ifdef _MSC_VER #define XMLTOOLING_DOXYGEN(desc) /##** desc */ #else #define XMLTOOLING_DOXYGEN(desc) #endif /** * Blocks copy c'tor and assignment operator for a class. */ #define MAKE_NONCOPYABLE(type) \ private: \ type(const type&); \ type& operator=(const type&) #ifndef DOXYGEN_SKIP #ifndef NULL #define NULL 0 #endif #define UNICODE_LITERAL_1(a) {xercesc::chLatin_##a, xercesc::chNull} #define UNICODE_LITERAL_2(a,b) {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chNull} #define UNICODE_LITERAL_3(a,b,c) {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chNull} #define UNICODE_LITERAL_4(a,b,c,d) {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chNull} #define UNICODE_LITERAL_5(a,b,c,d,e) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chNull} #define UNICODE_LITERAL_6(a,b,c,d,e,f) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chNull} #define UNICODE_LITERAL_7(a,b,c,d,e,f,g) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chNull} #define UNICODE_LITERAL_8(a,b,c,d,e,f,g,h) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chNull} #define UNICODE_LITERAL_9(a,b,c,d,e,f,g,h,i) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, xercesc::chNull} #define UNICODE_LITERAL_10(a,b,c,d,e,f,g,h,i,j) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chNull} #define UNICODE_LITERAL_11(a,b,c,d,e,f,g,h,i,j,k) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chNull} #define UNICODE_LITERAL_12(a,b,c,d,e,f,g,h,i,j,k,l) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chNull} #define UNICODE_LITERAL_13(a,b,c,d,e,f,g,h,i,j,k,l,m) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chNull} #define UNICODE_LITERAL_14(a,b,c,d,e,f,g,h,i,j,k,l,m,n) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chNull} #define UNICODE_LITERAL_15(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chNull} #define UNICODE_LITERAL_16(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chNull} #define UNICODE_LITERAL_17(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chNull} #define UNICODE_LITERAL_18(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, xercesc::chNull} #define UNICODE_LITERAL_19(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chNull} #define UNICODE_LITERAL_20(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chNull} #define UNICODE_LITERAL_21(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chNull} #define UNICODE_LITERAL_22(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chNull} #define UNICODE_LITERAL_23(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chNull} #define UNICODE_LITERAL_24(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chNull} #define UNICODE_LITERAL_25(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chNull} #define UNICODE_LITERAL_26(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, xercesc::chNull} #define UNICODE_LITERAL_27(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chNull} #define UNICODE_LITERAL_28(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chNull} #define UNICODE_LITERAL_29(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chNull} #define UNICODE_LITERAL_30(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chNull} #define UNICODE_LITERAL_31(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chNull} #define UNICODE_LITERAL_32(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chNull} #define UNICODE_LITERAL_33(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chNull} #define UNICODE_LITERAL_34(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chLatin_##hh, xercesc::chNull} #define UNICODE_LITERAL_35(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh,ii) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chLatin_##hh, \ xercesc::chLatin_##ii, xercesc::chNull} #define UNICODE_LITERAL_36(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh,ii,jj) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chLatin_##hh, \ xercesc::chLatin_##ii, xercesc::chLatin_##jj, xercesc::chNull} #define UNICODE_LITERAL_37(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chLatin_##hh, \ xercesc::chLatin_##ii, xercesc::chLatin_##jj, xercesc::chLatin_##kk, xercesc::chNull} #define UNICODE_LITERAL_38(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chLatin_##hh, \ xercesc::chLatin_##ii, xercesc::chLatin_##jj, xercesc::chLatin_##kk, xercesc::chLatin_##ll, xercesc::chNull} #define UNICODE_LITERAL_39(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll,mm) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chLatin_##hh, \ xercesc::chLatin_##ii, xercesc::chLatin_##jj, xercesc::chLatin_##kk, xercesc::chLatin_##ll, xercesc::chLatin_##mm, xercesc::chNull} #define UNICODE_LITERAL_40(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll,mm,nn) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chLatin_##hh, \ xercesc::chLatin_##ii, xercesc::chLatin_##jj, xercesc::chLatin_##kk, xercesc::chLatin_##ll, xercesc::chLatin_##mm, xercesc::chLatin_##nn, xercesc::chNull} #define UNICODE_LITERAL_41(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll,mm,nn,oo) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chLatin_##hh, \ xercesc::chLatin_##ii, xercesc::chLatin_##jj, xercesc::chLatin_##kk, xercesc::chLatin_##ll, xercesc::chLatin_##mm, xercesc::chLatin_##nn, xercesc::chLatin_##oo, xercesc::chNull} #define UNICODE_LITERAL_42(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll,mm,nn,oo,pp) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chLatin_##hh, \ xercesc::chLatin_##ii, xercesc::chLatin_##jj, xercesc::chLatin_##kk, xercesc::chLatin_##ll, xercesc::chLatin_##mm, xercesc::chLatin_##nn, xercesc::chLatin_##oo, xercesc::chLatin_##pp, xercesc::chNull} #define UNICODE_LITERAL_43(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll,mm,nn,oo,pp,qq) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chLatin_##hh, \ xercesc::chLatin_##ii, xercesc::chLatin_##jj, xercesc::chLatin_##kk, xercesc::chLatin_##ll, xercesc::chLatin_##mm, xercesc::chLatin_##nn, xercesc::chLatin_##oo, xercesc::chLatin_##pp, \ xercesc::chLatin_##qq, xercesc::chNull} #define UNICODE_LITERAL_44(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll,mm,nn,oo,pp,qq,rr) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chLatin_##hh, \ xercesc::chLatin_##ii, xercesc::chLatin_##jj, xercesc::chLatin_##kk, xercesc::chLatin_##ll, xercesc::chLatin_##mm, xercesc::chLatin_##nn, xercesc::chLatin_##oo, xercesc::chLatin_##pp, \ xercesc::chLatin_##qq, xercesc::chLatin_##rr, xercesc::chNull} #define UNICODE_LITERAL_45(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll,mm,nn,oo,pp,qq,rr,ss) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chLatin_##hh, \ xercesc::chLatin_##ii, xercesc::chLatin_##jj, xercesc::chLatin_##kk, xercesc::chLatin_##ll, xercesc::chLatin_##mm, xercesc::chLatin_##nn, xercesc::chLatin_##oo, xercesc::chLatin_##pp, \ xercesc::chLatin_##qq, xercesc::chLatin_##rr, xercesc::chLatin_##ss, xercesc::chNull} #define UNICODE_LITERAL_46(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll,mm,nn,oo,pp,qq,rr,ss,tt) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chLatin_##hh, \ xercesc::chLatin_##ii, xercesc::chLatin_##jj, xercesc::chLatin_##kk, xercesc::chLatin_##ll, xercesc::chLatin_##mm, xercesc::chLatin_##nn, xercesc::chLatin_##oo, xercesc::chLatin_##pp, \ xercesc::chLatin_##qq, xercesc::chLatin_##rr, xercesc::chLatin_##ss, xercesc::chLatin_##tt, xercesc::chNull} #define UNICODE_LITERAL_47(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll,mm,nn,oo,pp,qq,rr,ss,tt,uu) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chLatin_##hh, \ xercesc::chLatin_##ii, xercesc::chLatin_##jj, xercesc::chLatin_##kk, xercesc::chLatin_##ll, xercesc::chLatin_##mm, xercesc::chLatin_##nn, xercesc::chLatin_##oo, xercesc::chLatin_##pp, \ xercesc::chLatin_##qq, xercesc::chLatin_##rr, xercesc::chLatin_##ss, xercesc::chLatin_##tt, xercesc::chLatin_##uu, xercesc::chNull} #define UNICODE_LITERAL_48(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll,mm,nn,oo,pp,qq,rr,ss,tt,uu,vv) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chLatin_##hh, \ xercesc::chLatin_##ii, xercesc::chLatin_##jj, xercesc::chLatin_##kk, xercesc::chLatin_##ll, xercesc::chLatin_##mm, xercesc::chLatin_##nn, xercesc::chLatin_##oo, xercesc::chLatin_##pp, \ xercesc::chLatin_##qq, xercesc::chLatin_##rr, xercesc::chLatin_##ss, xercesc::chLatin_##tt, xercesc::chLatin_##uu, xercesc::chLatin_##vv, xercesc::chNull} #define UNICODE_LITERAL_49(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll,mm,nn,oo,pp,qq,rr,ss,tt,uu,vv,ww) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chLatin_##hh, \ xercesc::chLatin_##ii, xercesc::chLatin_##jj, xercesc::chLatin_##kk, xercesc::chLatin_##ll, xercesc::chLatin_##mm, xercesc::chLatin_##nn, xercesc::chLatin_##oo, xercesc::chLatin_##pp, \ xercesc::chLatin_##qq, xercesc::chLatin_##rr, xercesc::chLatin_##ss, xercesc::chLatin_##tt, xercesc::chLatin_##uu, xercesc::chLatin_##vv, xercesc::chLatin_##ww, xercesc::chNull} #define UNICODE_LITERAL_50(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll,mm,nn,oo,pp,qq,rr,ss,tt,uu,vv,ww,xx) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chLatin_##hh, \ xercesc::chLatin_##ii, xercesc::chLatin_##jj, xercesc::chLatin_##kk, xercesc::chLatin_##ll, xercesc::chLatin_##mm, xercesc::chLatin_##nn, xercesc::chLatin_##oo, xercesc::chLatin_##pp, \ xercesc::chLatin_##qq, xercesc::chLatin_##rr, xercesc::chLatin_##ss, xercesc::chLatin_##tt, xercesc::chLatin_##uu, xercesc::chLatin_##vv, xercesc::chLatin_##ww, xercesc::chLatin_##xx, xercesc::chNull} #define UNICODE_LITERAL_51(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll,mm,nn,oo,pp,qq,rr,ss,tt,uu,vv,ww,xx,yy) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chLatin_##hh, \ xercesc::chLatin_##ii, xercesc::chLatin_##jj, xercesc::chLatin_##kk, xercesc::chLatin_##ll, xercesc::chLatin_##mm, xercesc::chLatin_##nn, xercesc::chLatin_##oo, xercesc::chLatin_##pp, \ xercesc::chLatin_##qq, xercesc::chLatin_##rr, xercesc::chLatin_##ss, xercesc::chLatin_##tt, xercesc::chLatin_##uu, xercesc::chLatin_##vv, xercesc::chLatin_##ww, xercesc::chLatin_##xx, \ xercesc::chLatin_##yy, xercesc::chNull} #define UNICODE_LITERAL_52(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll,mm,nn,oo,pp,qq,rr,ss,tt,uu,vv,ww,xx,yy,zz) \ {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chLatin_##hh, \ xercesc::chLatin_##ii, xercesc::chLatin_##jj, xercesc::chLatin_##kk, xercesc::chLatin_##ll, xercesc::chLatin_##mm, xercesc::chLatin_##nn, xercesc::chLatin_##oo, xercesc::chLatin_##pp, \ xercesc::chLatin_##qq, xercesc::chLatin_##rr, xercesc::chLatin_##ss, xercesc::chLatin_##tt, xercesc::chLatin_##uu, xercesc::chLatin_##vv, xercesc::chLatin_##ww, xercesc::chLatin_##xx, \ xercesc::chLatin_##yy, xercesc::chLatin_##zz, xercesc::chNull} #endif /* DOXYGEN_SKIP */ /** * Begins the declaration of an XMLObject specialization for an abstract element/type. * Basic boilerplate includes a protected constructor, empty virtual destructor, * and Unicode constants for the default associated element's name and prefix. * * @param linkage linkage specifier for the class * @param cname the name of the class to declare * @param base the base class to derive from using public virtual inheritance * @param desc documentation comment for class */ #define DECL_XMLOBJECT_ABSTRACT(linkage,cname,base,desc) \ XMLTOOLING_DOXYGEN(desc) \ class linkage cname : public virtual base { \ protected: \ cname() {} \ public: \ virtual ~cname() {} \ XMLTOOLING_DOXYGEN(Element local name) \ static const XMLCh LOCAL_NAME[]; \ } /** * Begins the declaration of an XMLObject specialization. * Basic boilerplate includes a protected constructor, empty virtual destructor, * and Unicode constants for the default associated element's name and prefix. * * @param linkage linkage specifier for the class * @param cname the name of the class to declare * @param base the base class to derive from using public virtual inheritance * @param desc documentation comment for class */ #define BEGIN_XMLOBJECT(linkage,cname,base,desc) \ XMLTOOLING_DOXYGEN(desc) \ class linkage cname : public virtual base { \ protected: \ cname() {} \ public: \ virtual ~cname() {} \ XMLTOOLING_DOXYGEN(Type-specific clone method.) \ virtual cname* clone##cname() const=0; \ XMLTOOLING_DOXYGEN(Element local name) \ static const XMLCh LOCAL_NAME[] /** * Begins the declaration of an XMLObject specialization with two base classes. * Basic boilerplate includes a protected constructor, empty virtual destructor, * and Unicode constants for the default associated element's name and prefix. * * @param linkage linkage specifier for the class * @param cname the name of the class to declare * @param base the first base class to derive from using public virtual inheritance * @param base2 the second base class to derive from using public virtual inheritance * @param desc documentation comment for class */ #define BEGIN_XMLOBJECT2(linkage,cname,base,base2,desc) \ XMLTOOLING_DOXYGEN(desc) \ class linkage cname : public virtual base, public virtual base2 { \ protected: \ cname() {} \ public: \ virtual ~cname() {} \ XMLTOOLING_DOXYGEN(Type-specific clone method.) \ virtual cname* clone##cname() const=0; \ XMLTOOLING_DOXYGEN(Element local name) \ static const XMLCh LOCAL_NAME[] /** * Begins the declaration of an XMLObject specialization with three base classes. * Basic boilerplate includes a protected constructor, empty virtual destructor, * and Unicode constants for the default associated element's name and prefix. * * @param linkage linkage specifier for the class * @param cname the name of the class to declare * @param base the first base class to derive from using public virtual inheritance * @param base2 the second base class to derive from using public virtual inheritance * @param base3 the third base class to derive from using public virtual inheritance * @param desc documentation comment for class */ #define BEGIN_XMLOBJECT3(linkage,cname,base,base2,base3,desc) \ XMLTOOLING_DOXYGEN(desc) \ class linkage cname : public virtual base, public virtual base2, public virtual base3 { \ protected: \ cname() {} \ public: \ virtual ~cname() {} \ XMLTOOLING_DOXYGEN(Type-specific clone method.) \ virtual cname* clone##cname() const=0; \ XMLTOOLING_DOXYGEN(Element local name) \ static const XMLCh LOCAL_NAME[] /** * Begins the declaration of an XMLObject specialization with four base classes. * Basic boilerplate includes a protected constructor, empty virtual destructor, * and Unicode constants for the default associated element's name and prefix. * * @param linkage linkage specifier for the class * @param cname the name of the class to declare * @param base the first base class to derive from using public virtual inheritance * @param base2 the second base class to derive from using public virtual inheritance * @param base3 the third base class to derive from using public virtual inheritance * @param base4 the fourth base class to derive from using public virtual inheritance * @param desc documentation comment for class */ #define BEGIN_XMLOBJECT4(linkage,cname,base,base2,base3,base4,desc) \ XMLTOOLING_DOXYGEN(desc) \ class linkage cname : public virtual base, public virtual base2, public virtual base3, public virtual base4 { \ protected: \ cname() {} \ public: \ virtual ~cname() {} \ XMLTOOLING_DOXYGEN(Type-specific clone method.) \ virtual cname* clone##cname() const=0; \ XMLTOOLING_DOXYGEN(Element local name) \ static const XMLCh LOCAL_NAME[] /** * Begins the declaration of an XMLObject specialization with five base classes. * Basic boilerplate includes a protected constructor, empty virtual destructor, * and Unicode constants for the default associated element's name and prefix. * * @param linkage linkage specifier for the class * @param cname the name of the class to declare * @param base the first base class to derive from using public virtual inheritance * @param base2 the second base class to derive from using public virtual inheritance * @param base3 the third base class to derive from using public virtual inheritance * @param base4 the fourth base class to derive from using public virtual inheritance * @param base5 the fifth base class to derive from using public virtual inheritance * @param desc documentation comment for class */ #define BEGIN_XMLOBJECT5(linkage,cname,base,base2,base3,base4,base5,desc) \ XMLTOOLING_DOXYGEN(desc) \ class linkage cname : public virtual base, public virtual base2, public virtual base3, public virtual base4, public virtual base5 { \ protected: \ cname() {} \ public: \ virtual ~cname() {} \ XMLTOOLING_DOXYGEN(Type-specific clone method.) \ virtual cname* clone##cname() const=0; \ XMLTOOLING_DOXYGEN(Element local name) \ static const XMLCh LOCAL_NAME[] /** * Ends the declaration of an XMLObject specialization. */ #define END_XMLOBJECT } /** * Declares a static variable holding the XMLObject's element QName. */ #define DECL_ELEMENT_QNAME \ public: \ XMLTOOLING_DOXYGEN(Element QName) \ static xmltooling::QName ELEMENT_QNAME /** * Declares a static variable holding the XMLObject's schema type QName. */ #define DECL_TYPE_QNAME \ public: \ XMLTOOLING_DOXYGEN(Type QName) \ static xmltooling::QName TYPE_QNAME /** * Implements a static variable holding an XMLObject's element QName. * * @param cname the name of the XMLObject specialization * @param namespaceURI the XML namespace of the default associated element * @param namespacePrefix the XML namespace prefix of the default associated element */ #define IMPL_ELEMENT_QNAME(cname,namespaceURI,namespacePrefix) \ xmltooling::QName cname::ELEMENT_QNAME(namespaceURI,cname::LOCAL_NAME,namespacePrefix) /** * Implements a static variable holding an XMLObject's schema type QName. * * @param cname the name of the XMLObject specialization * @param namespaceURI the XML namespace of the default associated element * @param namespacePrefix the XML namespace prefix of the default associated element */ #define IMPL_TYPE_QNAME(cname,namespaceURI,namespacePrefix) \ xmltooling::QName cname::TYPE_QNAME(namespaceURI,cname::TYPE_NAME,namespacePrefix) /** * Declares abstract set method for a typed XML attribute. * The get method is omitted. * * @param proper the proper name of the attribute * @param upcased the upcased name of the attribute * @param type the attribute's data type */ #define DECL_INHERITED_XMLOBJECT_ATTRIB(proper,upcased,type) \ public: \ XMLTOOLING_DOXYGEN(proper attribute name) \ static const XMLCh upcased##_ATTRIB_NAME[]; \ XMLTOOLING_DOXYGEN(Sets the proper attribute.) \ virtual void set##proper(const type* proper)=0 /** * Declares abstract get/set methods for a typed XML attribute. * * @param proper the proper name of the attribute * @param upcased the upcased name of the attribute * @param type the attribute's data type */ #define DECL_XMLOBJECT_ATTRIB(proper,upcased,type) \ public: \ XMLTOOLING_DOXYGEN(proper attribute name) \ static const XMLCh upcased##_ATTRIB_NAME[]; \ XMLTOOLING_DOXYGEN(Returns the proper attribute.) \ virtual const type* get##proper() const=0; \ XMLTOOLING_DOXYGEN(Sets the proper attribute.) \ virtual void set##proper(const type* proper)=0 /** * Declares abstract set method for a string XML attribute. * The get method is omitted. * * @param proper the proper name of the attribute * @param upcased the upcased name of the attribute */ #define DECL_INHERITED_STRING_ATTRIB(proper,upcased) \ DECL_INHERITED_XMLOBJECT_ATTRIB(proper,upcased,XMLCh) /** * Declares abstract get/set methods for a string XML attribute. * * @param proper the proper name of the attribute * @param upcased the upcased name of the attribute */ #define DECL_STRING_ATTRIB(proper,upcased) \ DECL_XMLOBJECT_ATTRIB(proper,upcased,XMLCh) /** * Declares abstract set method for a DateTime XML attribute. * The get method is omitted. * * @param proper the proper name of the attribute * @param upcased the upcased name of the attribute */ #define DECL_INHERITED_DATETIME_ATTRIB(proper,upcased) \ DECL_INHERITED_XMLOBJECT_ATTRIB(proper,upcased,xmltooling::DateTime); \ XMLTOOLING_DOXYGEN(Sets the proper attribute.) \ virtual void set##proper(time_t proper)=0; \ XMLTOOLING_DOXYGEN(Sets the proper attribute.) \ virtual void set##proper(const XMLCh* proper)=0 /** * Declares abstract get/set methods for a DateTime XML attribute. * * @param proper the proper name of the attribute * @param upcased the upcased name of the attribute */ #define DECL_DATETIME_ATTRIB(proper,upcased) \ DECL_XMLOBJECT_ATTRIB(proper,upcased,xmltooling::DateTime); \ XMLTOOLING_DOXYGEN(Returns the proper attribute in epoch form.) \ virtual time_t get##proper##Epoch() const=0; \ XMLTOOLING_DOXYGEN(Sets the proper attribute.) \ virtual void set##proper(time_t proper)=0; \ XMLTOOLING_DOXYGEN(Sets the proper attribute.) \ virtual void set##proper(const XMLCh* proper)=0 /** * Declares abstract set method for an integer XML attribute. * The get method is omitted. * * @param proper the proper name of the attribute * @param upcased the upcased name of the attribute */ #define DECL_INHERITED_INTEGER_ATTRIB(proper,upcased) \ public: \ XMLTOOLING_DOXYGEN(proper attribute name) \ static const XMLCh upcased##_ATTRIB_NAME[]; \ XMLTOOLING_DOXYGEN(Sets the proper attribute using a string value.) \ virtual void set##proper(const XMLCh* proper)=0; \ XMLTOOLING_DOXYGEN(Sets the proper attribute.) \ virtual void set##proper(int proper)=0 /** * Declares abstract get/set methods for an integer XML attribute. * * @param proper the proper name of the attribute * @param upcased the upcased name of the attribute */ #define DECL_INTEGER_ATTRIB(proper,upcased) \ public: \ XMLTOOLING_DOXYGEN(proper attribute name) \ static const XMLCh upcased##_ATTRIB_NAME[]; \ XMLTOOLING_DOXYGEN(Returns the proper attribute after a NULL indicator.) \ virtual std::pair get##proper() const=0; \ XMLTOOLING_DOXYGEN(Sets the proper attribute using a string value.) \ virtual void set##proper(const XMLCh* proper)=0; \ XMLTOOLING_DOXYGEN(Sets the proper attribute.) \ virtual void set##proper(int proper)=0 /** * Declares abstract get/set methods for a boolean XML attribute. * * @param proper the proper name of the attribute * @param upcased the upcased name of the attribute * @param def the default/presumed value, if no explicit value has been set */ #define DECL_BOOLEAN_ATTRIB(proper,upcased,def) \ public: \ XMLTOOLING_DOXYGEN(proper attribute name) \ static const XMLCh upcased##_ATTRIB_NAME[]; \ XMLTOOLING_DOXYGEN(Returns the proper attribute or def if not set.) \ bool proper() const { \ switch (get##proper()) { \ case xmlconstants::XML_BOOL_TRUE: \ case xmlconstants::XML_BOOL_ONE: \ return true; \ case xmlconstants::XML_BOOL_FALSE: \ case xmlconstants::XML_BOOL_ZERO: \ return false; \ default: \ return def; \ } \ } \ XMLTOOLING_DOXYGEN(Returns the proper attribute as an explicit enumerated value.) \ virtual xmlconstants::xmltooling_bool_t get##proper() const=0; \ XMLTOOLING_DOXYGEN(Sets the proper attribute using an enumerated value.) \ virtual void proper(xmlconstants::xmltooling_bool_t value)=0; \ XMLTOOLING_DOXYGEN(Sets the proper attribute.) \ void proper(bool value) { \ proper(value ? xmlconstants::XML_BOOL_ONE : xmlconstants::XML_BOOL_ZERO); \ } \ XMLTOOLING_DOXYGEN(Sets the proper attribute using a string constant.) \ void set##proper(const XMLCh* value) { \ if (value) { \ switch (*value) { \ case xercesc::chLatin_t: \ proper(xmlconstants::XML_BOOL_TRUE); \ break; \ case xercesc::chLatin_f: \ proper(xmlconstants::XML_BOOL_FALSE); \ break; \ case xercesc::chDigit_1: \ proper(xmlconstants::XML_BOOL_ONE); \ break; \ case xercesc::chDigit_0: \ proper(xmlconstants::XML_BOOL_ZERO); \ break; \ default: \ proper(xmlconstants::XML_BOOL_NULL); \ } \ } \ else \ proper(xmlconstants::XML_BOOL_NULL); \ } /** * Implements get/set methods and a private member for a typed XML attribute. * * @param proper the proper name of the attribute * @param type the attribute's data type */ #define IMPL_XMLOBJECT_ATTRIB(proper,type) \ protected: \ type* m_##proper; \ public: \ const type* get##proper() const { \ return m_##proper; \ } \ void set##proper(const type* proper) { \ m_##proper = prepareForAssignment(m_##proper,proper); \ } /** * Implements get/set methods and a private member for a string XML attribute. * * @param proper the proper name of the attribute */ #define IMPL_STRING_ATTRIB(proper) \ IMPL_XMLOBJECT_ATTRIB(proper,XMLCh) /** * Implements get/set methods and a private member for a string XML attribute, * plus a getXMLID override. * * @param proper the proper name of the attribute */ #define IMPL_ID_ATTRIB(proper) \ IMPL_XMLOBJECT_ATTRIB(proper,XMLCh) \ const XMLCh* getXMLID() const { \ return m_##proper; \ } /** * Implements get/set methods and a private member for a string XML attribute, * plus a getXMLID override and attribute node clearance when DOM is dropped. * * @param proper the proper name of the attribute * @param ucase the upcased name of the attribute * @param namespaceURI the XML namespace of the attribute */ #define IMPL_ID_ATTRIB_EX(proper, ucase, namespaceURI) \ IMPL_XMLOBJECT_ATTRIB(proper,XMLCh) \ const XMLCh* getXMLID() const { \ return m_##proper; \ } \ void releaseDOM() const { \ if (getDOM()) \ getDOM()->removeAttributeNS(namespaceURI, ucase##_ATTRIB_NAME); \ AbstractDOMCachingXMLObject::releaseDOM(); \ } /** * Implements get/set methods and a private member for a DateTime XML attribute. * * @param proper the proper name of the attribute * @param fallback epoch to return when attribute is NULL */ #define IMPL_DATETIME_ATTRIB(proper,fallback) \ IMPL_DATETIME_ATTRIB_EX(proper,fallback,false) /** * Implements get/set methods and a private member for a duration-valued DateTime XML attribute. * * @param proper the proper name of the attribute * @param fallback epoch to return when attribute is NULL */ #define IMPL_DURATION_ATTRIB(proper,fallback) \ IMPL_DATETIME_ATTRIB_EX(proper,fallback,true) /** * Implements get/set methods and a private member for a DateTime XML attribute. * * @param proper the proper name of the attribute * @param fallback epoch to return when attribute is NULL * @param duration true iff the attribute should be handled as a duration */ #define IMPL_DATETIME_ATTRIB_EX(proper,fallback,duration) \ protected: \ DateTime* m_##proper; \ time_t m_##proper##Epoch; \ public: \ const DateTime* get##proper() const { \ return m_##proper; \ } \ time_t get##proper##Epoch() const { \ return m_##proper ? m_##proper##Epoch : fallback; \ } \ void set##proper(const DateTime* proper) { \ m_##proper = prepareForAssignment(m_##proper,proper); \ if (m_##proper) \ m_##proper##Epoch=m_##proper->getEpoch(duration); \ } \ void set##proper(time_t proper) { \ m_##proper = prepareForAssignment(m_##proper,proper,duration); \ m_##proper##Epoch = proper; \ } \ void set##proper(const XMLCh* proper) { \ m_##proper = prepareForAssignment(m_##proper,proper,duration); \ if (m_##proper) \ m_##proper##Epoch=m_##proper->getEpoch(duration); \ } /** * Implements get/set methods and a private member for an integer XML attribute. * * @param proper the proper name of the attribute */ #define IMPL_INTEGER_ATTRIB(proper) \ protected: \ XMLCh* m_##proper; \ public: \ pair get##proper() const { \ return make_pair((m_##proper!=nullptr),(m_##proper!=nullptr ? xercesc::XMLString::parseInt(m_##proper): 0)); \ } \ void set##proper(const XMLCh* proper) { \ m_##proper = prepareForAssignment(m_##proper,proper); \ } \ void set##proper(int proper) { \ try { \ std::string buf(boost::lexical_cast(proper)); \ xmltooling::auto_ptr_XMLCh widen(buf.c_str()); \ set##proper(widen.get()); \ } \ catch (boost::bad_lexical_cast&) { \ } \ } /** * Implements get/set methods and a private member for a boolean XML attribute. * * @param proper the proper name of the attribute */ #define IMPL_BOOLEAN_ATTRIB(proper) \ protected: \ xmlconstants::xmltooling_bool_t m_##proper; \ public: \ xmlconstants::xmltooling_bool_t get##proper() const { \ return m_##proper; \ } \ void proper(xmlconstants::xmltooling_bool_t value) { \ if (m_##proper != value) { \ releaseThisandParentDOM(); \ m_##proper = value; \ } \ } /** * Implements get/set methods and a private member for a typed, qualified XML attribute. * * @param proper the proper name of the attribute * @param type the attribute's data type */ #define IMPL_XMLOBJECT_FOREIGN_ATTRIB(proper,type) \ protected: \ XMLCh* m_##proper##Prefix; \ type* m_##proper; \ public: \ const type* get##proper() const { \ return m_##proper; \ } \ void set##proper(const type* proper) { \ m_##proper = prepareForAssignment(m_##proper,proper); \ xercesc::XMLString::release(&m_##proper##Prefix); \ m_##proper##Prefix = nullptr; \ } /** * Declares abstract set method for a typed XML child object in a foreign namespace. * The get method is omitted. * * @param proper the proper name of the child type * @param ns the C++ namespace for the type */ #define DECL_INHERITED_TYPED_FOREIGN_CHILD(proper,ns) \ public: \ XMLTOOLING_DOXYGEN(Sets the proper child.) \ virtual void set##proper(ns::proper* child)=0 /** * Declares abstract get/set methods for a typed XML child object in a foreign namespace. * * @param proper the proper name of the child type * @param ns the C++ namespace for the type */ #define DECL_TYPED_FOREIGN_CHILD(proper,ns) \ public: \ XMLTOOLING_DOXYGEN(Returns the proper child.) \ virtual ns::proper* get##proper() const=0; \ XMLTOOLING_DOXYGEN(Sets the proper child.) \ virtual void set##proper(ns::proper* child)=0 /** * Declares abstract set method for a typed XML child object. * The get method is omitted. * * @param proper the proper name of the child type */ #define DECL_INHERITED_TYPED_CHILD(proper) \ public: \ XMLTOOLING_DOXYGEN(Sets the proper child.) \ virtual void set##proper(proper* child)=0 /** * Declares abstract get/set methods for a typed XML child object. * * @param proper the proper name of the child type */ #define DECL_TYPED_CHILD(proper) \ public: \ XMLTOOLING_DOXYGEN(Returns the proper child.) \ virtual proper* get##proper() const=0; \ XMLTOOLING_DOXYGEN(Sets the proper child.) \ virtual void set##proper(proper* child)=0 /** * Declares abstract get/set methods for a generic XML child object. * * @param proper the proper name of the child */ #define DECL_XMLOBJECT_CHILD(proper) \ public: \ XMLTOOLING_DOXYGEN(Returns the proper child.) \ virtual xmltooling::XMLObject* get##proper() const=0; \ XMLTOOLING_DOXYGEN(Sets the proper child.) \ virtual void set##proper(xmltooling::XMLObject* child)=0 /** * Implements get/set methods and a private list iterator member for a typed XML child object. * * @param proper the proper name of the child type */ #define IMPL_TYPED_CHILD(proper) \ protected: \ proper* m_##proper; \ std::list::iterator m_pos_##proper; \ public: \ proper* get##proper() const { \ return m_##proper; \ } \ void set##proper(proper* child) { \ prepareForAssignment(m_##proper,child); \ *m_pos_##proper = m_##proper = child; \ } /** * Implements get/set methods and a private list iterator member for * a typed XML child object in a foreign namespace * * @param proper the proper name of the child type * @param ns the C++ namespace for the type */ #define IMPL_TYPED_FOREIGN_CHILD(proper,ns) \ protected: \ ns::proper* m_##proper; \ std::list::iterator m_pos_##proper; \ public: \ ns::proper* get##proper() const { \ return m_##proper; \ } \ void set##proper(ns::proper* child) { \ prepareForAssignment(m_##proper,child); \ *m_pos_##proper = m_##proper = child; \ } /** * Implements get/set methods and a private list iterator member for a generic XML child object. * * @param proper the proper name of the child */ #define IMPL_XMLOBJECT_CHILD(proper) \ protected: \ xmltooling::XMLObject* m_##proper; \ std::list::iterator m_pos_##proper; \ public: \ xmltooling::XMLObject* get##proper() const { \ return m_##proper; \ } \ void set##proper(xmltooling::XMLObject* child) { \ prepareForAssignment(m_##proper,child); \ *m_pos_##proper = m_##proper = child; \ } /** * Declares abstract get/set methods for a typed XML child collection. * * @param proper the proper name of the child type */ #define DECL_TYPED_CHILDREN(proper) \ public: \ XMLTOOLING_DOXYGEN(Returns modifiable proper collection.) \ virtual VectorOf(proper) get##proper##s()=0; \ XMLTOOLING_DOXYGEN(Returns reference to immutable proper collection.) \ virtual const std::vector& get##proper##s() const=0 /** * Declares abstract get/set methods for a typed XML child collection in a foreign namespace. * * @param proper the proper name of the child type * @param ns the C++ namespace for the type */ #define DECL_TYPED_FOREIGN_CHILDREN(proper,ns) \ public: \ XMLTOOLING_DOXYGEN(Returns modifiable proper collection.) \ virtual VectorOf(ns::proper) get##proper##s()=0; \ XMLTOOLING_DOXYGEN(Returns reference to immutable proper collection.) \ virtual const std::vector& get##proper##s() const=0 /** * Declares abstract get/set methods for a generic XML child collection. * * @param proper the proper name of the child */ #define DECL_XMLOBJECT_CHILDREN(proper) \ public: \ XMLTOOLING_DOXYGEN(Returns modifiable proper collection.) \ virtual VectorOf(xmltooling::XMLObject) get##proper##s()=0; \ XMLTOOLING_DOXYGEN(Returns reference to immutable proper collection.) \ virtual const std::vector& get##proper##s() const=0 /** * Implements get method and a private vector member for a typed XML child collection. * * @param proper the proper name of the child type * @param fence insertion fence for new objects of the child collection in backing list */ #define IMPL_TYPED_CHILDREN(proper,fence) \ protected: \ std::vector m_##proper##s; \ public: \ VectorOf(proper) get##proper##s() { \ return VectorOf(proper)(this, m_##proper##s, &m_children, fence); \ } \ const std::vector& get##proper##s() const { \ return m_##proper##s; \ } /** * Implements get method and a private vector member for a typed XML child collection * in a foreign namespace. * * @param proper the proper name of the child type * @param ns the C++ namespace for the type * @param fence insertion fence for new objects of the child collection in backing list */ #define IMPL_TYPED_FOREIGN_CHILDREN(proper,ns,fence) \ protected: \ std::vector m_##proper##s; \ public: \ VectorOf(ns::proper) get##proper##s() { \ return VectorOf(ns::proper)(this, m_##proper##s, &m_children, fence); \ } \ const std::vector& get##proper##s() const { \ return m_##proper##s; \ } /** * Implements get method and a private vector member for a generic XML child collection. * * @param proper the proper name of the child * @param fence insertion fence for new objects of the child collection in backing list */ #define IMPL_XMLOBJECT_CHILDREN(proper,fence) \ protected: \ std::vector m_##proper##s; \ public: \ VectorOf(xmltooling::XMLObject) get##proper##s() { \ return VectorOf(xmltooling::XMLObject)(this, m_##proper##s, &m_children, fence); \ } \ const std::vector& get##proper##s() const { \ return m_##proper##s; \ } /** * Implements marshalling for a string attribute * * @param proper the proper name of the attribute * @param ucase the upcased name of the attribute * @param namespaceURI the XML namespace of the attribute */ #define MARSHALL_STRING_ATTRIB(proper,ucase,namespaceURI) \ if (m_##proper && *m_##proper) { \ domElement->setAttributeNS(namespaceURI, ucase##_ATTRIB_NAME, m_##proper); \ } /** * Implements marshalling for a DateTime attribute * * @param proper the proper name of the attribute * @param ucase the upcased name of the attribute * @param namespaceURI the XML namespace of the attribute */ #define MARSHALL_DATETIME_ATTRIB(proper,ucase,namespaceURI) \ if (m_##proper) { \ domElement->setAttributeNS(namespaceURI, ucase##_ATTRIB_NAME, m_##proper->getRawData()); \ } /** * Implements marshalling for an integer attribute * * @param proper the proper name of the attribute * @param ucase the upcased name of the attribute * @param namespaceURI the XML namespace of the attribute */ #define MARSHALL_INTEGER_ATTRIB(proper,ucase,namespaceURI) \ if (m_##proper && *m_##proper) { \ domElement->setAttributeNS(namespaceURI, ucase##_ATTRIB_NAME, m_##proper); \ } /** * Implements marshalling for a boolean attribute * * @param proper the proper name of the attribute * @param ucase the upcased name of the attribute * @param namespaceURI the XML namespace of the attribute */ #define MARSHALL_BOOLEAN_ATTRIB(proper,ucase,namespaceURI) \ switch (m_##proper) { \ case xmlconstants::XML_BOOL_TRUE: \ domElement->setAttributeNS(namespaceURI, ucase##_ATTRIB_NAME, xmlconstants::XML_TRUE); \ break; \ case xmlconstants::XML_BOOL_ONE: \ domElement->setAttributeNS(namespaceURI, ucase##_ATTRIB_NAME, xmlconstants::XML_ONE); \ break; \ case xmlconstants::XML_BOOL_FALSE: \ domElement->setAttributeNS(namespaceURI, ucase##_ATTRIB_NAME, xmlconstants::XML_FALSE); \ break; \ case xmlconstants::XML_BOOL_ZERO: \ domElement->setAttributeNS(namespaceURI, ucase##_ATTRIB_NAME, xmlconstants::XML_ZERO); \ break; \ case xmlconstants::XML_BOOL_NULL: \ break; \ } /** * Implements marshalling for a QName attribute * * @param proper the proper name of the attribute * @param ucase the upcased name of the attribute * @param namespaceURI the XML namespace of the attribute */ #define MARSHALL_QNAME_ATTRIB(proper,ucase,namespaceURI) \ if (m_##proper) { \ xmltooling::auto_ptr_XMLCh qstr(m_##proper->toString().c_str()); \ domElement->setAttributeNS(namespaceURI, ucase##_ATTRIB_NAME, qstr.get()); \ } #ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE /** * Implements marshalling for an ID attribute * * @param proper the proper name of the attribute * @param ucase the upcased name of the attribute * @param namespaceURI the XML namespace of the attribute */ # define MARSHALL_ID_ATTRIB(proper,ucase,namespaceURI) \ if (m_##proper && *m_##proper) { \ domElement->setAttributeNS(namespaceURI, ucase##_ATTRIB_NAME, m_##proper); \ domElement->setIdAttributeNS(namespaceURI, ucase##_ATTRIB_NAME, true); \ } #else /** * Implements marshalling for an ID attribute * * @param proper the proper name of the attribute * @param ucase the upcased name of the attribute * @param namespaceURI the XML namespace of the attribute */ # define MARSHALL_ID_ATTRIB(proper,ucase,namespaceURI) \ if (m_##proper && *m_##proper) { \ domElement->setAttributeNS(namespaceURI, ucase##_ATTRIB_NAME, m_##proper); \ domElement->setIdAttributeNS(namespaceURI, ucase##_ATTRIB_NAME); \ } #endif /** * Implements unmarshalling process branch for a string attribute * * @param proper the proper name of the attribute * @param ucase the upcased name of the attribute * @param namespaceURI the XML namespace of the attribute */ #define PROC_STRING_ATTRIB(proper,ucase,namespaceURI) \ if (xmltooling::XMLHelper::isNodeNamed(attribute, namespaceURI, ucase##_ATTRIB_NAME)) { \ set##proper(attribute->getValue()); \ return; \ } #ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE /** * Implements unmarshalling process branch for an ID attribute * * @param proper the proper name of the attribute * @param ucase the upcased name of the attribute * @param namespaceURI the XML namespace of the attribute */ # define PROC_ID_ATTRIB(proper,ucase,namespaceURI) \ if (xmltooling::XMLHelper::isNodeNamed(attribute, namespaceURI, ucase##_ATTRIB_NAME)) { \ set##proper(attribute->getValue()); \ attribute->getOwnerElement()->setIdAttributeNode(attribute, true); \ return; \ } #else /** * Implements unmarshalling process branch for an ID attribute * * @param proper the proper name of the attribute * @param ucase the upcased name of the attribute * @param namespaceURI the XML namespace of the attribute */ # define PROC_ID_ATTRIB(proper,ucase,namespaceURI) \ if (xmltooling::XMLHelper::isNodeNamed(attribute, namespaceURI, ucase##_ATTRIB_NAME)) { \ set##proper(attribute->getValue()); \ attribute->getOwnerElement()->setIdAttributeNode(attribute); \ return; \ } #endif /** * Implements unmarshalling process branch for a DateTime attribute * * @param proper the proper name of the attribute * @param ucase the upcased name of the attribute * @param namespaceURI the XML namespace of the attribute */ #define PROC_DATETIME_ATTRIB(proper,ucase,namespaceURI) \ PROC_STRING_ATTRIB(proper,ucase,namespaceURI) /** * Implements unmarshalling process branch for a DateTime attribute * * @param proper the proper name of the attribute * @param ucase the upcased name of the attribute * @param namespaceURI the XML namespace of the attribute */ #define PROC_QNAME_ATTRIB(proper,ucase,namespaceURI) \ if (xmltooling::XMLHelper::isNodeNamed(attribute, namespaceURI, ucase##_ATTRIB_NAME)) { \ std::auto_ptr q(xmltooling::XMLHelper::getAttributeValueAsQName(attribute)); \ set##proper(q.get()); \ return; \ } /** * Implements unmarshalling process branch for an integer attribute * * @param proper the proper name of the attribute * @param ucase the upcased name of the attribute * @param namespaceURI the XML namespace of the attribute */ #define PROC_INTEGER_ATTRIB(proper,ucase,namespaceURI) \ PROC_STRING_ATTRIB(proper,ucase,namespaceURI) /** * Implements unmarshalling process branch for a boolean attribute * * @param proper the proper name of the attribute * @param ucase the upcased name of the attribute * @param namespaceURI the XML namespace of the attribute */ #define PROC_BOOLEAN_ATTRIB(proper,ucase,namespaceURI) \ PROC_STRING_ATTRIB(proper,ucase,namespaceURI) /** * Implements unmarshalling process branch for typed child collection element * * @param proper the proper name of the child type * @param namespaceURI the XML namespace of the child element * @param force bypass use of hint and just cast down to check child */ #define PROC_TYPED_CHILDREN(proper,namespaceURI,force) \ if (force || xmltooling::XMLHelper::isNodeNamed(root,namespaceURI,proper::LOCAL_NAME)) { \ proper* typesafe=dynamic_cast(childXMLObject); \ if (typesafe) { \ get##proper##s().push_back(typesafe); \ return; \ } \ } /** * Implements unmarshalling process branch for typed child collection element * in a foreign namespace. * * @param proper the proper name of the child type * @param ns the C++ namespace for the type * @param namespaceURI the XML namespace of the child element * @param force bypass use of hint and just cast down to check child */ #define PROC_TYPED_FOREIGN_CHILDREN(proper,ns,namespaceURI,force) \ if (force || xmltooling::XMLHelper::isNodeNamed(root,namespaceURI,ns::proper::LOCAL_NAME)) { \ ns::proper* typesafe=dynamic_cast(childXMLObject); \ if (typesafe) { \ get##proper##s().push_back(typesafe); \ return; \ } \ } /** * Implements unmarshalling process branch for typed child singleton element * * @param proper the proper name of the child type * @param namespaceURI the XML namespace of the child element * @param force bypass use of hint and just cast down to check child */ #define PROC_TYPED_CHILD(proper,namespaceURI,force) \ if (force || xmltooling::XMLHelper::isNodeNamed(root,namespaceURI,proper::LOCAL_NAME)) { \ proper* typesafe=dynamic_cast(childXMLObject); \ if (typesafe && !m_##proper) { \ typesafe->setParent(this); \ *m_pos_##proper = m_##proper = typesafe; \ return; \ } \ } /** * Implements unmarshalling process branch for typed child singleton element * in a foreign namespace. * * @param proper the proper name of the child type * @param ns the C++ namespace for the type * @param namespaceURI the XML namespace of the child element * @param force bypass use of hint and just cast down to check child */ #define PROC_TYPED_FOREIGN_CHILD(proper,ns,namespaceURI,force) \ if (force || xmltooling::XMLHelper::isNodeNamed(root,namespaceURI,ns::proper::LOCAL_NAME)) { \ ns::proper* typesafe=dynamic_cast(childXMLObject); \ if (typesafe && !m_##proper) { \ typesafe->setParent(this); \ *m_pos_##proper = m_##proper = typesafe; \ return; \ } \ } /** * Implements unmarshalling process branch for a generic child singleton element * * @param proper the proper name of the child type * @param namespaceURI the XML namespace of the child element */ #define PROC_XMLOBJECT_CHILD(proper,namespaceURI) \ if (xmltooling::XMLHelper::isNodeNamed(root,namespaceURI,proper::LOCAL_NAME)) { \ if (!m_##proper) { \ childXMLObject->setParent(this); \ *m_pos_##proper = m_##proper = childXMLObject; \ return; \ } \ } /** * Declares aliased get/set methods for named XML element simple content. * * @param proper the proper name to label the element's content */ #define DECL_SIMPLE_CONTENT(proper) \ XMLTOOLING_DOXYGEN(Returns proper.) \ const XMLCh* get##proper() const { \ return getTextContent(); \ } \ XMLTOOLING_DOXYGEN(Sets or clears proper.) \ void set##proper(const XMLCh* proper) { \ setTextContent(proper); \ } /** * Declares aliased get/set methods for named integer XML element content. * * @param proper the proper name to label the element's content */ #define DECL_INTEGER_CONTENT(proper) \ XMLTOOLING_DOXYGEN(Returns proper in integer form after a NULL indicator.) \ std::pair get##proper() const { \ return std::make_pair((getTextContent()!=nullptr), (getTextContent()!=nullptr ? xercesc::XMLString::parseInt(getTextContent()) : 0)); \ } \ XMLTOOLING_DOXYGEN(Sets proper.) \ void set##proper(int proper) { \ try { \ std::string buf(boost::lexical_cast(proper)); \ xmltooling::auto_ptr_XMLCh widen(buf.c_str()); \ setTextContent(widen.get()); \ } \ catch (boost::bad_lexical_cast&) { \ } \ } \ XMLTOOLING_DOXYGEN(Sets or clears proper.) \ void set##proper(const XMLCh* proper) { \ setTextContent(proper); \ } /** * Implements cloning methods for an XMLObject specialization implementation class. * * @param cname the name of the XMLObject specialization */ #define IMPL_XMLOBJECT_CLONE(cname) \ cname* clone##cname() const { \ return dynamic_cast(clone()); \ } \ xmltooling::XMLObject* clone() const { \ std::auto_ptr domClone(xmltooling::AbstractDOMCachingXMLObject::clone()); \ cname##Impl* ret=dynamic_cast(domClone.get()); \ if (ret) { \ domClone.release(); \ return ret; \ } \ return new cname##Impl(*this); \ } /** * Implements cloning methods for an XMLObject specialization implementation class * that must override a base class clone method. * * @param cname the name of the XMLObject specialization * @param base name of base type. */ #define IMPL_XMLOBJECT_CLONE2(cname,base) \ cname* clone##cname() const { \ return dynamic_cast(clone()); \ } \ base* clone##base() const { \ return dynamic_cast(clone()); \ } \ xmltooling::XMLObject* clone() const { \ std::auto_ptr domClone(xmltooling::AbstractDOMCachingXMLObject::clone()); \ cname##Impl* ret=dynamic_cast(domClone.get()); \ if (ret) { \ domClone.release(); \ return ret; \ } \ return new cname##Impl(*this); \ } /** * Implements cloning methods for an XMLObject specialization implementation class that * needs two stage duplication to avoid invoking virtual methods during construction. * * @param cname the name of the XMLObject specialization */ #define IMPL_XMLOBJECT_CLONE_EX(cname) \ cname* clone##cname() const { \ return dynamic_cast(clone()); \ } \ xmltooling::XMLObject* clone() const { \ std::auto_ptr domClone(xmltooling::AbstractDOMCachingXMLObject::clone()); \ cname##Impl* ret=dynamic_cast(domClone.get()); \ if (ret) { \ domClone.release(); \ return ret; \ } \ std::auto_ptr ret2(new cname##Impl(*this)); \ ret2->_clone(*this); \ return ret2.release(); \ } /** * Implements cloning methods for an XMLObject specialization implementation class that * needs two stage duplication to avoid invoking virtual methods during construction, * and must override a base class clone method. * * @param cname the name of the XMLObject specialization * @param base name of base type */ #define IMPL_XMLOBJECT_CLONE_EX2(cname,base) \ cname* clone##cname() const { \ return dynamic_cast(clone()); \ } \ base* clone##base() const { \ return dynamic_cast(clone()); \ } \ xmltooling::XMLObject* clone() const { \ std::auto_ptr domClone(xmltooling::AbstractDOMCachingXMLObject::clone()); \ cname##Impl* ret=dynamic_cast(domClone.get()); \ if (ret) { \ domClone.release(); \ return ret; \ } \ std::auto_ptr ret2(new cname##Impl(*this)); \ ret2->_clone(*this); \ return ret2.release(); \ } /** * Implements cloning of a child attribute, for use in copy constructor or * deferred clone methods. * * proper the proper name of the attribute to clone */ #define IMPL_CLONE_ATTRIB(proper) \ set##proper(src.get##proper()) /** * Implements cloning of a child attribute in a foreign namespace, for use in copy constructor or * deferred clone methods. * * proper the proper name of the attribute to clone */ #define IMPL_CLONE_FOREIGN_ATTRIB(proper) \ set##proper(src.get##proper()); \ if (src.m_##proper##Prefix) \ m_##proper##Prefix = xercesc::XMLString::replicate(src.m_##proper##Prefix) /** * Implements cloning of an integer child attribute, for use in copy constructor or * deferred clone methods. * * proper the proper name of the attribute to clone */ #define IMPL_CLONE_INTEGER_ATTRIB(proper) \ set##proper(src.m_##proper) /** * Implements cloning of a boolean child attribute, for use in copy constructor or * deferred clone methods. * * proper the proper name of the attribute to clone */ #define IMPL_CLONE_BOOLEAN_ATTRIB(proper) \ proper(src.m_##proper) /** * Implements cloning of a child object, for use in copy constructor or * deferred clone methods. * * proper the proper name of the child object to clone */ #define IMPL_CLONE_XMLOBJECT_CHILD(proper) \ if (src.get##proper()) \ set##proper(src.get##proper()->clone()) /** * Implements cloning of a typed child object, for use in copy constructor or * deferred clone methods. * * proper the proper name of the child type to clone */ #define IMPL_CLONE_TYPED_CHILD(proper) \ if (src.get##proper()) \ set##proper(src.get##proper()->clone##proper()) /** * Implements cloning of an untyped child collection, for use in copy constructor or * deferred clone methods. * * proper the proper name of the child type to clone */ #define IMPL_CLONE_XMLOBJECT_CHILDREN(proper) \ static void (VectorOf(XMLObject)::* XMLObject_push_back)(XMLObject* const&) = &VectorOf(XMLObject)::push_back; \ VectorOf(XMLObject) c##proper = get##proper##s(); \ std::for_each( \ src.m_##proper##s.begin(), src.m_##proper##s.end(), \ boost::lambda::if_(boost::lambda::_1 != ((XMLObject*)nullptr)) \ [boost::lambda::bind(XMLObject_push_back, boost::ref(c##proper), boost::lambda::bind(&XMLObject::clone, boost::lambda::_1))] \ ) /** * Implements cloning of a child collection, for use in copy constructor or * deferred clone methods. * * proper the proper name of the child type to clone */ #define IMPL_CLONE_TYPED_CHILDREN(proper) \ static void (VectorOf(proper)::* proper##_push_back)(proper* const&) = &VectorOf(proper)::push_back; \ VectorOf(proper) c##proper = get##proper##s(); \ std::for_each( \ src.m_##proper##s.begin(), src.m_##proper##s.end(), \ boost::lambda::if_(boost::lambda::_1 != ((proper*)nullptr)) \ [boost::lambda::bind(proper##_push_back, boost::ref(c##proper), boost::lambda::bind(&proper::clone##proper, boost::lambda::_1))] \ ) /** * Implements cloning of a child collection in a foreign namespace, for use in copy constructor or * deferred clone methods. * * proper the proper name of the child type to clone * ns the namespace of the child type */ #define IMPL_CLONE_TYPED_FOREIGN_CHILDREN(proper,ns) \ static void (VectorOf(ns::proper)::* proper##_push_back)(ns::proper* const&) = &VectorOf(ns::proper)::push_back; \ VectorOf(ns::proper) c##proper = get##proper##s(); \ std::for_each( \ src.m_##proper##s.begin(), src.m_##proper##s.end(), \ boost::lambda::if_(boost::lambda::_1 != ((ns::proper*)nullptr)) \ [boost::lambda::bind(proper##_push_back, boost::ref(c##proper), boost::lambda::bind(&ns::proper::clone##proper, boost::lambda::_1))] \ ) /** * Opens an iteration loop over all of the children of an object. */ #define IMPL_CLONE_CHILDBAG_BEGIN \ for (list::const_iterator _bagit = src.m_children.begin(); _bagit != src.m_children.end(); ++_bagit) { /** * Closes an iteration loop over all of the children of an object. */ #define IMPL_CLONE_CHILDBAG_END } /** * Implements cloning of a typed child in a bag iteration loop based on a cast check. * * @param proper the proper name of the child type to clone */ #define IMPL_CLONE_TYPED_CHILD_IN_BAG(proper) \ proper* _##proper##cast = dynamic_cast(*_bagit); \ if (_##proper##cast) { \ get##proper##s().push_back(_##proper##cast->clone##proper()); \ continue; \ } /** * Implements cloning of a typed child in a forign namespace in a bag iteration loop based on a cast check. * * @param proper the proper name of the child type to clone * @param ns the namespace of the child type */ #define IMPL_CLONE_TYPED_FOREIGN_CHILD_IN_BAG(proper,ns) \ ns::proper* _##proper##cast = dynamic_cast(*_bagit); \ if (_##proper##cast) { \ get##proper##s().push_back(_##proper##cast->clone##proper()); \ continue; \ } /** * Implements cloning of an XMLObject child in a bag iteration loop. * * @param proper the proper name of the child to clone */ #define IMPL_CLONE_XMLOBJECT_CHILD_IN_BAG(proper) \ if (*_bagit) { \ get##proper##s().push_back((*_bagit)->clone()); \ } /** * Declares an XMLObject specialization with a simple content model and type, * handling it as string data. * * @param linkage linkage specifier for the class * @param cname the name of the XMLObject specialization * @param proper the proper name to label the element's content * @param desc documentation for class */ #define DECL_XMLOBJECT_SIMPLE(linkage,cname,proper,desc) \ BEGIN_XMLOBJECT(linkage,cname,xmltooling::XMLObject,desc); \ DECL_SIMPLE_CONTENT(proper); \ END_XMLOBJECT /** * Declares and defines an implementation class for an XMLObject with * a simple content model and type, handling it as string data. * * @param linkage linkage specifier for the class * @param cname the name of the XMLObject specialization */ #define DECL_XMLOBJECTIMPL_SIMPLE(linkage,cname) \ class linkage cname##Impl \ : public virtual cname, \ public xmltooling::AbstractSimpleElement, \ public xmltooling::AbstractDOMCachingXMLObject, \ public xmltooling::AbstractXMLObjectMarshaller, \ public xmltooling::AbstractXMLObjectUnmarshaller \ { \ public: \ virtual ~cname##Impl() {} \ cname##Impl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) \ : xmltooling::AbstractXMLObject(nsURI, localName, prefix, schemaType) { \ } \ cname##Impl(const cname##Impl& src) \ : xmltooling::AbstractXMLObject(src), \ xmltooling::AbstractSimpleElement(src), \ xmltooling::AbstractDOMCachingXMLObject(src) {} \ IMPL_XMLOBJECT_CLONE(cname) \ } #ifdef HAVE_COVARIANT_RETURNS /** * Begins the declaration of an XMLObjectBuilder specialization. * Basic boilerplate includes an empty virtual destructor, and * a default builder that defaults the element name. * * @param linkage linkage specifier for the class * @param cname the name of the XMLObject specialization * @param namespaceURI the XML namespace of the default associated element * @param namespacePrefix the XML namespace prefix of the default associated element */ #define BEGIN_XMLOBJECTBUILDER(linkage,cname,namespaceURI,namespacePrefix) \ XMLTOOLING_DOXYGEN(Builder for cname objects.) \ class linkage cname##Builder : public xmltooling::ConcreteXMLObjectBuilder { \ public: \ virtual ~cname##Builder() {} \ XMLTOOLING_DOXYGEN(Default builder.) \ virtual cname* buildObject() const { \ return buildObject(namespaceURI,cname::LOCAL_NAME,namespacePrefix); \ } \ XMLTOOLING_DOXYGEN(Builder that allows element/type override.) \ virtual cname* buildObject( \ const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=nullptr, const xmltooling::QName* schemaType=nullptr \ ) const /** * Ends the declaration of an XMLObjectBuilder specialization. */ #define END_XMLOBJECTBUILDER } /** * Declares a generic XMLObjectBuilder specialization. * * @param linkage linkage specifier for the class * @param cname the name of the XMLObject specialization * @param namespaceURI the XML namespace of the default associated element * @param namespacePrefix the XML namespace prefix of the default associated element */ #define DECL_XMLOBJECTBUILDER(linkage,cname,namespaceURI,namespacePrefix) \ BEGIN_XMLOBJECTBUILDER(linkage,cname,namespaceURI,namespacePrefix); \ XMLTOOLING_DOXYGEN(Singleton builder.) \ static cname* build##cname() { \ const cname##Builder* b = dynamic_cast( \ XMLObjectBuilder::getBuilder(xmltooling::QName(namespaceURI,cname::LOCAL_NAME)) \ ); \ if (b) \ return b->buildObject(); \ throw xmltooling::XMLObjectException("Unable to obtain typed builder for "#cname"."); \ } \ END_XMLOBJECTBUILDER /** * Implements the standard XMLObjectBuilder specialization function. * * @param cname the name of the XMLObject specialization */ #define IMPL_XMLOBJECTBUILDER(cname) \ cname* cname##Builder::buildObject( \ const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType \ ) const \ { \ return new cname##Impl(nsURI,localName,prefix,schemaType); \ } #else /* !HAVE_COVARIANT_RETURNS */ /** * Begins the declaration of an XMLObjectBuilder specialization. * Basic boilerplate includes an empty virtual destructor, and * a default builder that defaults the element name. * * @param linkage linkage specifier for the class * @param cname the name of the XMLObject specialization * @param namespaceURI the XML namespace of the default associated element * @param namespacePrefix the XML namespace prefix of the default associated element */ #define BEGIN_XMLOBJECTBUILDER(linkage,cname,namespaceURI,namespacePrefix) \ XMLTOOLING_DOXYGEN(Builder for cname objects.) \ class linkage cname##Builder : public xmltooling::ConcreteXMLObjectBuilder { \ public: \ virtual ~cname##Builder() {} \ XMLTOOLING_DOXYGEN(Default builder.) \ virtual xmltooling::XMLObject* buildObject() const { \ return buildObject(namespaceURI,cname::LOCAL_NAME,namespacePrefix); \ } \ XMLTOOLING_DOXYGEN(Builder that allows element/type override.) \ virtual xmltooling::XMLObject* buildObject( \ const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=nullptr, const xmltooling::QName* schemaType=nullptr \ ) const /** * Ends the declaration of an XMLObjectBuilder specialization. */ #define END_XMLOBJECTBUILDER } /** * Declares a generic XMLObjectBuilder specialization. * * @param linkage linkage specifier for the class * @param cname the name of the XMLObject specialization * @param namespaceURI the XML namespace of the default associated element * @param namespacePrefix the XML namespace prefix of the default associated element */ #define DECL_XMLOBJECTBUILDER(linkage,cname,namespaceURI,namespacePrefix) \ BEGIN_XMLOBJECTBUILDER(linkage,cname,namespaceURI,namespacePrefix); \ XMLTOOLING_DOXYGEN(Singleton builder.) \ static cname* build##cname() { \ const cname##Builder* b = dynamic_cast( \ XMLObjectBuilder::getBuilder(xmltooling::QName(namespaceURI,cname::LOCAL_NAME)) \ ); \ if (b) \ return dynamic_cast(b->buildObject()); \ throw xmltooling::XMLObjectException("Unable to obtain typed builder for "#cname"."); \ } \ END_XMLOBJECTBUILDER /** * Implements the standard XMLObjectBuilder specialization function. * * @param cname the name of the XMLObject specialization */ #define IMPL_XMLOBJECTBUILDER(cname) \ xmltooling::XMLObject* cname##Builder::buildObject( \ const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType \ ) const \ { \ return new cname##Impl(nsURI,localName,prefix,schemaType); \ } #endif /* HAVE_COVARIANT_RETURNS */ /** * Begins the declaration of a Schema Validator specialization. * * @param linkage linkage specifier for the class * @param cname the base name of the Validator specialization */ #define BEGIN_XMLOBJECTVALIDATOR(linkage,cname) \ class linkage cname##SchemaValidator : public xmltooling::Validator \ { \ public: \ virtual ~cname##SchemaValidator() {} \ virtual void validate(const xmltooling::XMLObject* xmlObject) const { \ const cname* ptr=dynamic_cast(xmlObject); \ if (!ptr) \ throw xmltooling::ValidationException(#cname"SchemaValidator: unsupported object type ($1).",xmltooling::params(1,typeid(xmlObject).name())); \ if (ptr->nil() && (ptr->hasChildren() || ptr->getTextContent())) \ throw xmltooling::ValidationException("Object has nil property but with children or content.") /** * Begins the declaration of a Schema Validator specialization subclass. * * @param linkage linkage specifier for the class * @param cname the base name of the Validator specialization * @param base base class for the validator */ #define BEGIN_XMLOBJECTVALIDATOR_SUB(linkage,cname,base) \ class linkage cname##SchemaValidator : public base##SchemaValidator \ { \ public: \ virtual ~cname##SchemaValidator() {} \ virtual void validate(const xmltooling::XMLObject* xmlObject) const { \ const cname* ptr=dynamic_cast(xmlObject); \ if (!ptr) \ throw xmltooling::ValidationException(#cname"SchemaValidator: unsupported object type ($1).",xmltooling::params(1,typeid(xmlObject).name())); /** * Ends the declaration of a Validator specialization. */ #define END_XMLOBJECTVALIDATOR } } /** * Validator code that checks the object type. * * @param cname the name of the XMLObject specialization */ #define XMLOBJECTVALIDATOR_CHECKTYPE(cname) \ const cname* ptr=dynamic_cast(xmlObject); \ if (!ptr) \ throw xmltooling::ValidationException(#cname"SchemaValidator: unsupported object type ($1).",xmltooling::params(1,typeid(xmlObject).name())) /** * Validator code that checks for a required attribute, content, or singleton. * * @param cname the name of the XMLObject specialization * @param proper the proper name of the attribute, content, or singleton member */ #define XMLOBJECTVALIDATOR_REQUIRE(cname,proper) \ if (!ptr->get##proper()) \ throw xmltooling::ValidationException(#cname" must have "#proper".") /** * Validator code that checks for a required integer attribute * * @param cname the name of the XMLObject specialization * @param proper the proper name of the attribute, content, or singleton member */ #define XMLOBJECTVALIDATOR_REQUIRE_INTEGER(cname,proper) \ if (!ptr->get##proper().first) \ throw xmltooling::ValidationException(#cname" must have "#proper".") /** * Validator code that checks for one of a pair of * required attributes, content, or singletons. * * @param cname the name of the XMLObject specialization * @param proper1 the proper name of the first attribute, content, or singleton member * @param proper2 the proper name of the second attribute, content, or singleton member */ #define XMLOBJECTVALIDATOR_ONEOF(cname,proper1,proper2) \ if (!ptr->get##proper1() && !ptr->get##proper2()) \ throw xmltooling::ValidationException(#cname" must have "#proper1" or "#proper2".") /** * Validator code that checks for one of a pair of * required attributes, content, or singletons, but disallows both. * * @param cname the name of the XMLObject specialization * @param proper1 the proper name of the first attribute, content, or singleton member * @param proper2 the proper name of the second attribute, content, or singleton member */ #define XMLOBJECTVALIDATOR_ONLYONEOF(cname,proper1,proper2) \ if ((!ptr->get##proper1() && !ptr->get##proper2()) || (ptr->get##proper1() && ptr->get##proper2())) \ throw xmltooling::ValidationException(#cname" must have "#proper1" or "#proper2" but not both.") /** * Validator code that checks for one of a set of three * required attributes, content, or singletons. * * @param cname the name of the XMLObject specialization * @param proper1 the proper name of the first attribute, content, or singleton member * @param proper2 the proper name of the second attribute, content, or singleton member * @param proper3 the proper name of the third attribute, content, or singleton member */ #define XMLOBJECTVALIDATOR_ONEOF3(cname,proper1,proper2,proper3) \ if (!ptr->get##proper1() && !ptr->get##proper2() && !ptr->get##proper3()) \ throw xmltooling::ValidationException(#cname" must have "#proper1", "#proper2", or "#proper3".") /** * Validator code that checks for one of a set of three * required attributes, content, or singletons but disallows more than one. * * @param cname the name of the XMLObject specialization * @param proper1 the proper name of the first attribute, content, or singleton member * @param proper2 the proper name of the second attribute, content, or singleton member * @param proper3 the proper name of the third attribute, content, or singleton member */ #define XMLOBJECTVALIDATOR_ONLYONEOF3(cname,proper1,proper2,proper3) \ int c##proper1##proper2##proper3=0; \ if (ptr->get##proper1()!=nullptr) \ c##proper1##proper2##proper3++; \ if (ptr->get##proper2()!=nullptr) \ c##proper1##proper2##proper3++; \ if (ptr->get##proper3()!=nullptr) \ c##proper1##proper2##proper3++; \ if (c##proper1##proper2##proper3 != 1) \ throw xmltooling::ValidationException(#cname" must have only one of "#proper1", "#proper2", or "#proper3".") /** * Validator code that checks a co-constraint (if one present, the other must be) * between a pair of attributes, content, or singletons. * * @param cname the name of the XMLObject specialization * @param proper1 the proper name of the first attribute, content, or singleton member * @param proper2 the proper name of the second attribute, content, or singleton member */ #define XMLOBJECTVALIDATOR_NONEORBOTH(cname,proper1,proper2) \ if ((ptr->get##proper1() && !ptr->get##proper2()) || (!ptr->get##proper1() && ptr->get##proper2())) \ throw xmltooling::ValidationException(#cname" cannot have "#proper1" without "#proper2".") /** * Validator code that checks for a non-empty collection. * * @param cname the name of the XMLObject specialization * @param proper the proper name of the collection item */ #define XMLOBJECTVALIDATOR_NONEMPTY(cname,proper) \ if (ptr->get##proper##s().empty()) \ throw xmltooling::ValidationException(#cname" must have at least one "#proper".") /** * Declares/defines a Validator specialization that checks object type and * a non-empty simple content model. * * @param linkage linkage specifier for the class * @param cname the name of the XMLObject specialization */ #define XMLOBJECTVALIDATOR_SIMPLE(linkage,cname) \ BEGIN_XMLOBJECTVALIDATOR(linkage,cname); \ XMLOBJECTVALIDATOR_REQUIRE(cname,TextContent); \ END_XMLOBJECTVALIDATOR #include /** * @namespace xmltooling * Public namespace of XML Tooling library */ namespace xmltooling { /** * Template function for cloning a sequence of XMLObjects. * Invokes the clone() member on each element of the input sequence and adds the copy to * the output sequence. Order is preserved. * * @param in input sequence to clone * @param out output sequence to copy cloned pointers into */ template void clone(const InputSequence& in, OutputSequence& out) { for (typename InputSequence::const_iterator i=in.begin(); i!=in.end(); i++) { if (*i) out.push_back((*i)->clone()); else out.push_back(*i); } } /** * Functor for cleaning up heap objects in containers. */ template struct cleanup { /** * Function operator to delete an object. * * @param ptr object to delete */ void operator()(T* ptr) {delete ptr;} /** * Function operator to delete an object stored as const. * * @param ptr object to delete after casting away const */ void operator()(const T* ptr) {delete const_cast(ptr);} }; /** * Functor for cleaning up heap objects in key/value containers. */ template struct cleanup_pair { /** * Function operator to delete an object. * * @param p a pair in which the second component is the object to delete */ void operator()(const std::pair& p) {delete p.second;} }; /** * Functor for cleaning up const heap objects in key/value containers. */ template struct cleanup_const_pair { /** * Function operator to delete an object stored as const * * @param p a pair in which the second component is the const object to delete */ void operator()(const std::pair& p) {delete const_cast(p.second);} }; }; #endif /* __xmltooling_base_h__ */ xmltooling-1.5.3/xmltooling/ConcreteXMLObjectBuilder.h000644 001751 001751 00000003353 12003305016 024222 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/ConcreteXMLObjectBuilder.h * * Factory interface for concrete XMLObjects, supporting default construction. */ #ifndef __xmltooling_concxmlobjbuilder_h__ #define __xmltooling_concxmlobjbuilder_h__ #include namespace xmltooling { /** * A factory interface for obtaining XMLObjects. * Subclasses MAY supply additional factory methods. */ class XMLTOOL_API ConcreteXMLObjectBuilder : public XMLObjectBuilder { public: virtual ~ConcreteXMLObjectBuilder(); using XMLObjectBuilder::buildObject; /** * Creates an empty XMLObject with a defaulted element name and/or type. * * @return the empty XMLObject */ virtual XMLObject* buildObject() const=0; protected: ConcreteXMLObjectBuilder(); }; }; #endif /* __xmltooling_concxmlobjbuilder_h__ */ xmltooling-1.5.3/xmltooling/char_traits.h000644 001751 001751 00000011333 12003305016 021741 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/char_traits.h * * Traits template for basic_string instantiation on strict compilers. */ #ifndef __xmltooling_chartraits_h__ #define __xmltooling_chartraits_h__ #include #include #include namespace xmltooling { /// @cond OFF template struct _Char_types { typedef unsigned long int_type; typedef std::streampos pos_type; typedef std::streamoff off_type; typedef std::mbstate_t state_type; }; template struct char_traits { typedef _CharT char_type; typedef typename _Char_types<_CharT>::int_type int_type; typedef typename _Char_types<_CharT>::pos_type pos_type; typedef typename _Char_types<_CharT>::off_type off_type; typedef typename _Char_types<_CharT>::state_type state_type; static void assign(char_type& __c1, const char_type& __c2) { __c1 = __c2; } static bool eq(const char_type& __c1, const char_type& __c2) { return __c1 == __c2; } static bool lt(const char_type& __c1, const char_type& __c2) { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, std::size_t __n); static std::size_t length(const char_type* __s); static const char_type* find(const char_type* __s, std::size_t __n, const char_type& __a); static char_type* move(char_type* __s1, const char_type* __s2, std::size_t __n); static char_type* copy(char_type* __s1, const char_type* __s2, std::size_t __n); static char_type* assign(char_type* __s, std::size_t __n, char_type __a); static char_type to_char_type(const int_type& __c) { return static_cast(__c); } static int_type to_int_type(const char_type& __c) { return static_cast(__c); } static bool eq_int_type(const int_type& __c1, const int_type& __c2) { return __c1 == __c2; } static int_type eof() { return static_cast(EOF); } static int_type not_eof(const int_type& __c) { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } }; template int char_traits<_CharT>:: compare(const char_type* __s1, const char_type* __s2, std::size_t __n) { for (size_t __i = 0; __i < __n; ++__i) if (lt(__s1[__i], __s2[__i])) return -1; else if (lt(__s2[__i], __s1[__i])) return 1; return 0; } template std::size_t char_traits<_CharT>:: length(const char_type* __p) { std::size_t __i = 0; while (!eq(__p[__i], char_type())) ++__i; return __i; } template const typename char_traits<_CharT>::char_type* char_traits<_CharT>:: find(const char_type* __s, std::size_t __n, const char_type& __a) { for (std::size_t __i = 0; __i < __n; ++__i) if (eq(__s[__i], __a)) return __s + __i; return 0; } template typename char_traits<_CharT>::char_type* char_traits<_CharT>:: move(char_type* __s1, const char_type* __s2, std::size_t __n) { return static_cast<_CharT*>(std::memmove(__s1, __s2, __n * sizeof(char_type))); } template typename char_traits<_CharT>::char_type* char_traits<_CharT>:: copy(char_type* __s1, const char_type* __s2, std::size_t __n) { std::copy(__s2, __s2 + __n, __s1); return __s1; } template typename char_traits<_CharT>::char_type* char_traits<_CharT>:: assign(char_type* __s, std::size_t __n, char_type __a) { std::fill_n(__s, __n, __a); return __s; } /// @endcond } #endif // __xmltooling_chartraits_h__ xmltooling-1.5.3/xmltooling/config_pub.h000644 001751 001751 00000002175 12057276627 021605 0ustar00scantorscantor000000 000000 /* xmltooling/config_pub.h. Generated from config_pub.h.in by configure. */ /* Define if C++ compiler supports covariant virtual methods. */ #define HAVE_COVARIANT_RETURNS 1 /* Define to 1 if C++ compiler supports nullptr keyword. */ /* #undef HAVE_NULLPTR */ /* Define to 1 if you have an STL implementation that supports useful string specialization. */ #define HAVE_GOOD_STL 1 /* Define to 1 if you have an STL implementation that supports std::iterator_traits. */ #define HAVE_ITERATOR_TRAITS 1 /* Define if log4shib library is used. */ #define XMLTOOLING_LOG4SHIB 1 /* Define if log4cpp library is used. */ /* #undef XMLTOOLING_LOG4CPP */ /* Define to 1 to disable XML-Security-dependent features. */ /* #undef XMLTOOLING_NO_XMLSEC */ /* Define to 1 if Xerces supports a compliant DOMLS API. */ #define XMLTOOLING_XERCESC_COMPLIANT_DOMLS 1 /* Define to 1 if Xerces DOM ID methods take extra parameter. */ #define XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE 1 /* Define to 1 if Xerces has a 64-bit-safe API. */ #define XMLTOOLING_XERCESC_64BITSAFE 1 /* Define to 1 if you have the `xsecsize_t' type. */ /* #undef HAVE_XSECSIZE_T */ xmltooling-1.5.3/xmltooling/ElementProxy.h000644 001751 001751 00000002673 12003305016 022100 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/ElementProxy.h * * An XMLObject with an open content model */ #ifndef __xmltooling_eleproxy_h__ #define __xmltooling_eleproxy_h__ #include #include namespace xmltooling { /** * An XMLObject with an open content model. */ class XMLTOOL_API ElementProxy : public virtual AttributeExtensibleXMLObject, public virtual ElementExtensibleXMLObject { protected: ElementProxy(); public: virtual ~ElementProxy(); }; }; #endif /* __xmltooling_eleproxy_h__ */ xmltooling-1.5.3/xmltooling/ElementExtensibleXMLObject.h000644 001751 001751 00000004057 12003305016 024567 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/ElementExtensibleXMLObject.h * * An XMLObject that exposes arbitrary children via a mutable vector. */ #ifndef __xmltooling_eleextxmlobj_h__ #define __xmltooling_eleextxmlobj_h__ #include #include #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif namespace xmltooling { /** * An XMLObject that exposes arbitrary children via a mutable vector. */ class XMLTOOL_API ElementExtensibleXMLObject : public virtual XMLObject { protected: ElementExtensibleXMLObject(); public: virtual ~ElementExtensibleXMLObject(); /** * Gets a mutable list of child objects * * @return mutable list of child objects */ virtual VectorOf(XMLObject) getUnknownXMLObjects()=0; /** * Gets an immutable list of child objects * * @return immutable list of child objects */ virtual const std::vector& getUnknownXMLObjects() const=0; }; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif #endif /* __xmltooling_eleextxmlobj_h__ */ xmltooling-1.5.3/xmltooling/exceptions.h000644 001751 001751 00000031011 12003305017 021613 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/exceptions.h * * Exception classes. */ #ifndef __xmltooling_exceptions_h__ #define __xmltooling_exceptions_h__ #include #include #include #include #include /** * Declares a derived exception class * * @param name the exception class * @param linkage linkage specification for class * @param ns the exception class C++ namespace * @param base the base class * @param desc documentation comment for class */ #define DECL_XMLTOOLING_EXCEPTION(name,linkage,ns,base,desc) \ XMLTOOLING_DOXYGEN(desc) \ class linkage name : public base { \ public: \ XMLTOOLING_DOXYGEN(Constructor) \ name(const char* msg=nullptr, const xmltooling::params& p=xmltooling::params()) : base(msg,p) {} \ XMLTOOLING_DOXYGEN(Constructor) \ name(const char* msg, const xmltooling::namedparams& p) : base(msg,p) {} \ XMLTOOLING_DOXYGEN(Constructor) \ name(const std::string& msg, const xmltooling::params& p=xmltooling::params()) : base(msg,p) {} \ XMLTOOLING_DOXYGEN(Constructor) \ name(const std::string& msg, const xmltooling::namedparams& p) : base(msg,p) {} \ virtual ~name() throw () {} \ virtual const char* getClassName() const { return #ns"::"#name; } \ void raise() const {throw *this;} \ } /** * Declares a factory function for an exception class. * * @param name the exception class name * @param ns the exception class C++ namespace */ #define DECL_XMLTOOLING_EXCEPTION_FACTORY(name,ns) \ xmltooling::XMLToolingException* name##Factory() \ { \ return new ns::name(); \ } /** * Registers a factory for an exception class. * * @param name the exception class name * @param ns the exception class C++ namespace */ #define REGISTER_XMLTOOLING_EXCEPTION_FACTORY(name,ns) XMLToolingException::registerFactory(#ns"::"#name,name##Factory) #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif namespace xmltooling { /** * Wrapper around a variable number of arguments. */ class XMLTOOL_API params { public: /** * Initializes with zero parameters. */ params() {} /** * Initializes the parameter set. * * @param count the number of parameters that follow */ params(int count,...); /** * Returns an immutable reference to the set of parameters. * * @return the parameter set */ const std::vector& get() const {return v;} protected: /** Contains the parameters being passed. */ std::vector v; }; /** * Wrapper around a variable number of name/value pairs. */ class XMLTOOL_API namedparams : public params { public: /** * Initializes with zero parameters. */ namedparams() {} /** * Initializes the named parameter set. * * @param count the number of name/value pairs that follow (must be even) */ namedparams(int count,...); }; /** * Base exception class, supports parametrized messages and XML serialization. * Parameters are prefixed with a dollar sign ($) and can be positional ($1) * or named ($info). */ class XMLTOOL_EXCEPTIONAPI(XMLTOOL_API) XMLToolingException : public std::exception { public: virtual ~XMLToolingException() throw () {} /** * Constructs an exception using a message and positional parameters. * * @param msg error message * @param p an ordered set of positional parameter strings */ XMLToolingException(const char* msg=nullptr, const params& p=params()); /** * Constructs an exception using a message and named parameters. * * @param msg error message * @param p a set of named parameter strings */ XMLToolingException(const char* msg, const namedparams& p); /** * Constructs an exception using a message and positional parameters. * * @param msg error message * @param p an ordered set of positional parameter strings */ XMLToolingException(const std::string& msg, const params& p=params()); /** * Constructs an exception using a message and named parameters. * * @param msg error message * @param p a set of named parameter strings */ XMLToolingException(const std::string& msg, const namedparams& p); /** * Returns the error message, after processing any parameter references. * * @return the processed message */ const char* getMessage() const; /** * Returns the error message, after processing any parameter references. * * @return the processed message */ const char* what() const throw () {return getMessage();} /** * Sets the error message. * * @param msg the error message */ void setMessage(const char* msg); /** * Sets the error message. * * @param msg the error message */ void setMessage(const std::string& msg) { setMessage(msg.c_str()); } /** * Attach a set of positional parameters to the exception. * * @param p an ordered set of named parameter strings */ void addProperties(const params& p); /** * Attach a set of named parameters to the exception. * * @param p a set of named parameter strings */ void addProperties(const namedparams& p); /** * Attach a single positional parameter at the next available position. * * @param value the parameter value */ void addProperty(const char* value) { addProperties(params(1,value)); } /** * Attach a single named parameter. * * @param name the parameter name * @param value the parameter value */ void addProperty(const char* name, const char* value) { addProperties(namedparams(1,name,value)); } /** * Returns the parameter property with the designated position (based from one). * * @param index position to access * @return the parameter property or nullptr */ const char* getProperty(unsigned int index) const; /** * Returns the parameter property with the designated name. * * @param name named parameter to access * @return the parameter property or nullptr */ const char* getProperty(const char* name) const; /** * Raises an exception using itself. * Used to raise an exception of a derived type. */ virtual void raise() const { throw *this; } /** * Returns a unique name for the exception class. * * @return class name */ virtual const char* getClassName() const { return "xmltooling::XMLToolingException"; } /** * Returns a string containing a serialized representation of the exception. * * @return the serialization */ std::string toString() const; /** * Returns a set of query string name/value pairs, URL-encoded, representing the * exception's type, message, and parameters. * * @return the query string representation */ std::string toQueryString() const; private: std::string m_msg; mutable std::string m_processedmsg; std::map m_params; public: /** * Builds an empty exception of the given type. * * @param exceptionClass the name of the exception type to build * @return an empty exception object */ static XMLToolingException* getInstance(const char* exceptionClass); /** * Builds an exception from a serialized input stream. * * @param in input stream * @return the exception object found in the stream */ static XMLToolingException* fromStream(std::istream& in); /** * Builds an exception from a serialized input buffer. * * @param s input buffer * @return the exception object found in the buffer */ static XMLToolingException* fromString(const char* s); /** A factory function that returns an empty exception object of a given type. */ typedef XMLToolingException* ExceptionFactory(); /** * Registers a factory to create exceptions of a given class name. * * @param exceptionClass name of exception type * @param factory factory function to build exceptions with */ static void registerFactory(const char* exceptionClass, ExceptionFactory* factory) { m_factoryMap[exceptionClass] = factory; } /** * Unregisters the factory for a given class name. * * @param exceptionClass name of exception type */ static void deregisterFactory(const char* exceptionClass) { m_factoryMap.erase(exceptionClass); } /** * Unregisters all factories. */ static void deregisterFactories() { m_factoryMap.clear(); } private: typedef std::map ExceptionFactoryMap; static ExceptionFactoryMap m_factoryMap; }; DECL_XMLTOOLING_EXCEPTION(XMLParserException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmltooling,XMLToolingException,Exceptions related to XML parsing); DECL_XMLTOOLING_EXCEPTION(XMLObjectException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmltooling,XMLToolingException,Exceptions in basic object usage); DECL_XMLTOOLING_EXCEPTION(MarshallingException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmltooling,XMLToolingException,Exceptions during object marshalling); DECL_XMLTOOLING_EXCEPTION(UnmarshallingException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmltooling,XMLToolingException,Exceptions during object unmarshalling); DECL_XMLTOOLING_EXCEPTION(UnknownElementException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmltooling,XMLToolingException,Exceptions due to processing of unknown element content); DECL_XMLTOOLING_EXCEPTION(UnknownAttributeException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmltooling,XMLToolingException,Exceptions due to processing of unknown attributes); DECL_XMLTOOLING_EXCEPTION(UnknownExtensionException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmltooling,XMLToolingException,Exceptions from use of an unrecognized extension/plugin); DECL_XMLTOOLING_EXCEPTION(ValidationException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmltooling,XMLToolingException,Exceptions during object validation); DECL_XMLTOOLING_EXCEPTION(IOException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmltooling,XMLToolingException,Exceptions related to physical input/output errors); #ifndef XMLTOOLING_NO_XMLSEC DECL_XMLTOOLING_EXCEPTION(XMLSecurityException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmltooling,XMLToolingException,Exceptions related to the XML security layer); #endif }; #if defined (_MSC_VER) #pragma warning( pop ) #endif #endif /* __xmltooling_exceptions_h__ */ xmltooling-1.5.3/xmltooling/Lockable.h000644 001751 001751 00000005066 12003305016 021160 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/Lockable.h * * Locking abstraction. */ #ifndef __xmltooling_lockable_h__ #define __xmltooling_lockable_h__ #include namespace xmltooling { /** * Abstract mixin interface for interfaces that support locking */ class XMLTOOL_API Lockable { protected: Lockable(); public: virtual ~Lockable(); /** * Lock the associated object for exclusive access. * * @return a pointer to the object being locked */ virtual Lockable* lock()=0; /** * Unlock the associated object from exclusive access. */ virtual void unlock()=0; }; /** * RAII wrapper for lockable objects to ensure lock release */ class XMLTOOL_API Locker { MAKE_NONCOPYABLE(Locker); public: /** * Optionally locks an object and stores it for later release. * * @param lockee pointer to an object to hold, and optionally lock * @param lock true iff object is not yet locked */ Locker(Lockable* lockee=nullptr, bool lock=true); /** * Optionally locks an object and stores it for later release. * If an object is already held, it is unlocked and detached. * * @param lockee pointer to an object to hold, and optionally lock * @param lock true iff object is not yet locked */ void assign(Lockable* lockee=nullptr, bool lock=true); /** * Destructor releases lock on held pointer, if any. */ ~Locker(); private: Lockable* m_lockee; }; }; #endif /* __xmltooling_lockable_h__ */ xmltooling-1.5.3/xmltooling/logging.h000644 001751 001751 00000002754 12003305017 021074 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/logging.h * * Assist with logging portability. */ #ifndef __xmltooling_logging_h__ #define __xmltooling_logging_h__ #include #if defined(XMLTOOLING_LOG4SHIB) # define LOG4SHIB_HAVE_INT64_T 1 # include # include namespace xmltooling { namespace logging = log4shib; }; #elif defined(XMLTOOLING_LOG4CPP) # define LOG4CPP_HAVE_INT64_T 1 # include # include namespace xmltooling { namespace logging = log4cpp; }; #else # error "Supported logging library not available." #endif #endif /* __xmltooling_logging_h__ */ xmltooling-1.5.3/xmltooling/Namespace.h000644 001751 001751 00000011175 12003305016 021336 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/Namespace.h * * Representing XML namespace attributes. */ #if !defined(__xmltooling_namespace_h__) #define __xmltooling_namespace_h__ #include namespace xmltooling { #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4251 ) #endif /** * A data structure for encapsulating XML Namespace attributes. */ class XMLTOOL_API Namespace { public: /** * Tri-state indicator of namespace usage. */ enum namespace_usage_t { Indeterminate, NonVisiblyUsed, VisiblyUsed }; /** * Constructor * @param uri namespace URI * @param prefix namespace prefix (without the colon) * @param alwaysDeclare true iff the namespace should always be declared regardless of in-scope declarations * @param usage indicates usage of namespace in the context of an XMLObject */ Namespace(const XMLCh* uri=nullptr, const XMLCh* prefix=nullptr, bool alwaysDeclare=false, namespace_usage_t usage=Indeterminate); ~Namespace(); /** * Returns the namespace prefix * @return Null-terminated Unicode string containing the prefix, without the colon */ const XMLCh* getNamespacePrefix() const { return m_prefix.c_str(); } /** * Returns the namespace URI * @return Null-terminated Unicode string containing the URI */ const XMLCh* getNamespaceURI() const { return m_uri.c_str(); } /** * Returns true iff the namespace should always be declared regardless of in-scope declarations * @return the alwaysDeclared setting */ const bool alwaysDeclare() const { return m_pinned; } /** * Returns the usage of the namespace by an XMLObject * @return the usage setting */ const namespace_usage_t usage() const { return m_usage; } /** * Sets the namespace prefix * @param prefix Null-terminated Unicode string containing the prefix, without the colon */ void setNamespacePrefix(const XMLCh* prefix); /** * Sets the namespace URI * @param uri Null-terminated Unicode string containing the URI */ void setNamespaceURI(const XMLCh* uri); /** * Sets the alwaysDeclared property * @param alwaysDeclare true iff the namespace should always be declared regardless of in-scope declarations */ void setAlwaysDeclare(bool alwaysDeclare) { m_pinned = alwaysDeclare; } /** * Sets the usage property * @param usage usage of the namespace by an XMLObject */ void setUsage(namespace_usage_t usage) { m_usage = usage; } private: bool m_pinned; namespace_usage_t m_usage; xstring m_uri; xstring m_prefix; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif /** * Returns true iff op1's namespace lexically compares less than op2's namespace, * or if equal, iff op1's prefix lexically compares less than op2's prefix. * * Needed for use with sorted STL containers. * * @param op1 First namspace to compare * @param op2 Second namespace to compare */ extern XMLTOOL_API bool operator<(const Namespace& op1, const Namespace& op2); /** * Returns true iff op1's namespace and prefix are equal to op2's namespace and prefix. * @param op1 First namspace to compare * @param op2 Second namespace to compare */ extern XMLTOOL_API bool operator==(const Namespace& op1, const Namespace& op2); }; #endif /* __xmltooling_namespace_h__ */ xmltooling-1.5.3/xmltooling/PluginManager.h000644 001751 001751 00000006351 12003305016 022173 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/PluginManager.h * * Plugin management template */ #ifndef __xmltooling_plugin_h__ #define __xmltooling_plugin_h__ #include #include #include #include #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif namespace xmltooling { /** * Template for management/access to plugins constructed based on a Key type * and arbitrary parameters. * * @param T class of plugin to manage * @param Key the key for type lookup * @param Params parameters for plugin construction */ template class PluginManager { public: PluginManager() {} ~PluginManager() {} /** Factory function for plugin. */ typedef T* Factory(const Params&); /** * Registers the factory for a given type. * * @param type the key to the plugin type * @param factory the factory function for the plugin type */ void registerFactory(const Key& type, typename PluginManager::Factory* factory) { if (factory) m_map[type]=factory; } /** * Unregisters the factory for a given type. * * @param type the key to the plugin type */ void deregisterFactory(const Key& type) { m_map.erase(type); } /** * Unregisters all registered factories. */ void deregisterFactories() { m_map.clear(); } /** * Builds a new instance of a plugin of a given type, configuring it * with the supplied parameters. * * @param type the key to the plugin type * @param p parameters to configure plugin * @return the constructed plugin */ T* newPlugin(const Key& type, const Params& p) { typename std::map::const_iterator i=m_map.find(type); if (i==m_map.end()) throw UnknownExtensionException("Unknown plugin type."); return i->second(p); } private: std::map m_map; }; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif #endif /* __xmltooling_plugin_h__ */ xmltooling-1.5.3/xmltooling/QName.h000644 001751 001751 00000013335 12003305016 020443 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/QName.h * * Representing XML QNames */ #ifndef __xmltooling_qname_h__ #define __xmltooling_qname_h__ #include #include namespace xmltooling { #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4251 ) #endif /** * A data structure for encapsulating XML QNames. * The Xerces class is too limited to use at the moment. */ class XMLTOOL_API QName { public: /** * Constructor * * @param uri namespace URI * @param localPart local name * @param prefix namespace prefix (without the colon) */ QName(const XMLCh* uri=nullptr, const XMLCh* localPart=nullptr, const XMLCh* prefix=nullptr); /** * Constructor * * @param uri namespace URI * @param localPart local name * @param prefix namespace prefix (without the colon) */ QName(const char* uri, const char* localPart, const char* prefix=nullptr); ~QName(); /** * Indicates whether the QName has a prefix. * @return true iff the prefix is non-empty */ bool hasPrefix() const { return !m_prefix.empty(); } /** * Indicates whether the QName has a non-empty namespace. * @return true iff the namespace is non-empty */ bool hasNamespaceURI() const { return !m_uri.empty(); } /** * Indicates whether the QName has a non-empty local name. * @return true iff the local name is non-empty */ bool hasLocalPart() const { return !m_local.empty(); } /** * Returns the namespace prefix * @return Null-terminated Unicode string containing the prefix, without the colon */ const XMLCh* getPrefix() const { return m_prefix.c_str(); } /** * Returns the namespace URI * @return Null-terminated Unicode string containing the URI */ const XMLCh* getNamespaceURI() const { return m_uri.c_str(); } /** * Returns the local part of the name * @return Null-terminated Unicode string containing the local name */ const XMLCh* getLocalPart() const { return m_local.c_str(); } /** * Sets the namespace prefix * @param prefix Null-terminated Unicode string containing the prefix, without the colon */ void setPrefix(const XMLCh* prefix); /** * Sets the namespace URI * @param uri Null-terminated Unicode string containing the URI */ void setNamespaceURI(const XMLCh* uri); /** * Sets the local part of the name * @param localPart Null-terminated Unicode string containing the local name */ void setLocalPart(const XMLCh* localPart); /** * Sets the namespace prefix * @param prefix Null-terminated ASCII string containing the prefix, without the colon */ void setPrefix(const char* prefix); /** * Sets the namespace URI * @param uri Null-terminated ASCII string containing the URI */ void setNamespaceURI(const char* uri); /** * Sets the local part of the name * @param localPart Null-terminated ASCII string containing the local name */ void setLocalPart(const char* localPart); /** * Gets a string representation of the QName for logging, etc. * Format is prefix:localPart or {namespaceURI}localPart if no prefix. * * @return the string representation */ std::string toString() const; private: xstring m_uri; xstring m_local; xstring m_prefix; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif /** * Returns true iff op1's namespace lexically compares less than op2's namespace, * or if equal, iff op1's prefix lexically compares less than op2's prefix. * * Needed for use with sorted STL containers. * * @param op1 First qname to compare * @param op2 Second qname to compare */ extern XMLTOOL_API bool operator<(const QName& op1, const QName& op2); /** * Returns true iff op1's components are equal to op2's components, excluding prefix. * @param op1 First qname to compare * @param op2 Second qname to compare */ extern XMLTOOL_API bool operator==(const QName& op1, const QName& op2); /** * Returns true iff op1's components are not equal to op2's components, excluding prefix. * @param op1 First qname to compare * @param op2 Second qname to compare */ extern XMLTOOL_API bool operator!=(const QName& op1, const QName& op2); }; #endif /* __xmltooling_qname_h__ */ xmltooling-1.5.3/xmltooling/unicode.h000644 001751 001751 00000017624 12146253675 021122 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/unicode.h * * Helper classes and types for manipulating Unicode */ #ifndef __xmltooling_unicode_h__ #define __xmltooling_unicode_h__ #include #ifndef HAVE_GOOD_STL # include #endif #include #include #include namespace xmltooling { #ifdef HAVE_GOOD_STL /** * An STL string type that supports 16-bit Unicode. */ typedef std::basic_string xstring; #else /** * An STL string type that supports 16-bit Unicode. */ typedef std::basic_string< XMLCh,char_traits > xstring; #endif /** * Transcodes a 16-bit Unicode string into UTF-8. * * @param src the 16-bit string to transcode * @param use_malloc true iff the result should be allocated with malloc, false to use new * @return a UTF-8 string allocated by new or malloc */ extern XMLTOOL_API char* toUTF8(const XMLCh* src, bool use_malloc=false); /** * Transcodes a UTF-8 string into 16-bit Unicode. * * @param src the UTF-8 string to transcode * @param use_malloc true iff the result should be allocated with malloc, false to use new * @return a 16-bit Unicode string allocated by new or malloc */ extern XMLTOOL_API XMLCh* fromUTF8(const char* src, bool use_malloc=false); /** * Writes a Unicode string to an ASCII stream by transcoding to UTF8. * * @param ostr stream to write to * @param s string to write * @return reference to output stream */ extern XMLTOOL_API std::ostream& operator<<(std::ostream& ostr, const XMLCh* s); /** * Writes a Unicode string to an ASCII stream by transcoding to UTF8. * * @param ostr stream to write to * @param s string to write * @return reference to output stream */ extern XMLTOOL_API std::ostream& operator<<(std::ostream& ostr, const xstring& s); /** * A minimal auto_ptr-like class that can copy or transcode a buffer into * the local code page and free the result automatically. * * Needed because a standard auto_ptr would use delete on the resulting * pointer. */ class XMLTOOL_API auto_ptr_char { MAKE_NONCOPYABLE(auto_ptr_char); public: /** * Default constructor. */ auto_ptr_char() : m_buf(nullptr) { } /** * Constructor transcodes a 16-bit Unicode string into the local code page (NOT UTF-8) and wraps the result. * @param src the 16-bit string to transcode and wrap * @param trim trims leading/trailing whitespace from the result (defaults to true) */ auto_ptr_char(const XMLCh* src, bool trim=true) : m_buf(xercesc::XMLString::transcode(src)) { if (trim && m_buf) xercesc::XMLString::trim(m_buf); } /** * Constructor copies a local code page (NOT UTF-8) string and wraps the result. * @param src the local string to copy and wrap * @param trim trims leading/trailing whitespace from the result (defaults to true) */ auto_ptr_char(const char* src, bool trim=true) : m_buf(xercesc::XMLString::replicate(src)) { if (trim && m_buf) xercesc::XMLString::trim(m_buf); } /** * Destructor frees the wrapped buffer using the Xerces memory manager. */ ~auto_ptr_char() { xercesc::XMLString::release(&m_buf); } /** * Returns the wrapped buffer. * @return a null-terminated local code page string */ const char* get() const { return m_buf; } /** * Returns the wrapped buffer and transfers ownership of it to the caller. * @return a null-terminated local code page string */ char* release() { char* temp=m_buf; m_buf=nullptr; return temp; } private: char* m_buf; }; /** * A minimal auto_ptr-like class that can copy or transcode a buffer into * 16-bit Unicode and free the result automatically. * * Needed because a standard auto_ptr would use delete on the resulting * pointer. */ class XMLTOOL_API auto_ptr_XMLCh { MAKE_NONCOPYABLE(auto_ptr_XMLCh); public: /** * Default constructor. */ auto_ptr_XMLCh() : m_buf(nullptr) { } /** * Constructor transcodes a local code page (NOT UTF-8) string into 16-bit Unicode and wraps the result. * @param src the local string to transcode and wrap * @param trim trims leading/trailing whitespace from the result (defaults to true) */ auto_ptr_XMLCh(const char* src, bool trim=true) : m_buf(xercesc::XMLString::transcode(src)) { if (trim && m_buf) xercesc::XMLString::trim(m_buf); } /** * Constructor copies a 16-bit Unicode string and wraps the result. * @param src the Unicode string to copy and wrap * @param trim trims leading/trailing whitespace from the result (defaults to true) */ auto_ptr_XMLCh(const XMLCh* src, bool trim=true) : m_buf(xercesc::XMLString::replicate(src)) { if (trim && m_buf) xercesc::XMLString::trim(m_buf); } /** * Destructor frees the wrapped buffer using the Xerces memory manager. */ ~auto_ptr_XMLCh() { xercesc::XMLString::release(&m_buf); } /** * Returns the wrapped buffer. * @return a null-terminated Unicode string */ const XMLCh* get() const { return m_buf; } /** * Returns the wrapped buffer and transfers ownership of it to the caller. * @return a null-terminated Unicode string */ XMLCh* release() { XMLCh* temp=m_buf; m_buf=nullptr; return temp; } private: XMLCh* m_buf; }; /** * An auto_ptr that uses array delete on its contents. * * @param T type of pointer to wrap */ template class auto_arrayptr { T* m_ptr; auto_arrayptr(const auto_arrayptr&); auto_arrayptr& operator=(const auto_arrayptr&); public: /** * Constructor. * * @param ptr pointer to wrap */ auto_arrayptr(T* ptr) : m_ptr(ptr) { } /** * Destructor, uses array delete operation on wrapped pointer. */ ~auto_arrayptr() { delete[] m_ptr; } /** * Returns the wrapped pointer. * @return the wrapped pointer */ const T* get() const { return m_ptr; } /** * Returns the wrapped pointer and transfers ownership of it to the caller. * @return the wrapped pointer */ T* release() { T* temp=m_ptr; m_ptr=nullptr; return temp; } }; }; #endif /* __xmltooling_unicode_h__ */ xmltooling-1.5.3/xmltooling/version.h000644 001751 001751 00000006275 12146253675 021161 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * xmltooling/version.h * * Library version macros and constants. */ #if !defined(__xmltooling_version_h__) #define __xmltooling_version_h__ // This is all based on Xerces, on the theory it might be useful to // support this kind of stuff in the future. If they ever yank some // of this stuff, it can be copied into here. #include #include // --------------------------------------------------------------------------- // V E R S I O N S P E C I F I C A T I O N /** * MODIFY THESE NUMERIC VALUES TO COINCIDE WITH XMLTOOLING VERSION * AND DO NOT MODIFY ANYTHING ELSE IN THIS VERSION HEADER FILE */ #define XMLTOOLING_VERSION_MAJOR 1 #define XMLTOOLING_VERSION_MINOR 5 #define XMLTOOLING_VERSION_REVISION 3 /** DO NOT MODIFY BELOW THIS LINE */ /** * MAGIC THAT AUTOMATICALLY GENERATES THE FOLLOWING: * * gXMLToolingVersionStr, gXMLToolingFullVersionStr, gXMLToolingMajVersion, gXMLToolingMinVersion, gXMLToolingRevision */ // --------------------------------------------------------------------------- // V E R S I O N I N F O R M A T I O N // XMLTooling version strings; these particular macros cannot be used for // conditional compilation as they are not numeric constants #define XMLTOOLING_FULLVERSIONSTR INVK_CAT3_SEP_UNDERSCORE(XMLTOOLING_VERSION_MAJOR,XMLTOOLING_VERSION_MINOR,XMLTOOLING_VERSION_REVISION) #define XMLTOOLING_FULLVERSIONDOT INVK_CAT3_SEP_PERIOD(XMLTOOLING_VERSION_MAJOR,XMLTOOLING_VERSION_MINOR,XMLTOOLING_VERSION_REVISION) #define XMLTOOLING_FULLVERSIONNUM INVK_CAT3_SEP_NIL(XMLTOOLING_VERSION_MAJOR,XMLTOOLING_VERSION_MINOR,XMLTOOLING_VERSION_REVISION) #define XMLTOOLING_VERSIONSTR INVK_CAT2_SEP_UNDERSCORE(XMLTOOLING_VERSION_MAJOR,XMLTOOLING_VERSION_MINOR) extern XMLTOOL_API const char* const gXMLToolingVersionStr; extern XMLTOOL_API const char* const gXMLToolingFullVersionStr; extern XMLTOOL_API const char* const gXMLToolingDotVersionStr; extern XMLTOOL_API const unsigned int gXMLToolingMajVersion; extern XMLTOOL_API const unsigned int gXMLToolingMinVersion; extern XMLTOOL_API const unsigned int gXMLToolingRevision; // XMLTooling version numeric constants that can be used for conditional // compilation purposes. #define _XMLTOOLING_VERSION CALC_EXPANDED_FORM (XMLTOOLING_VERSION_MAJOR,XMLTOOLING_VERSION_MINOR,XMLTOOLING_VERSION_REVISION) #endif // __xmltooling_version_h__ xmltooling-1.5.3/xmltooling/XMLObject.h000644 001751 001751 00000032417 12003305017 021234 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/XMLObject.h * * Abstract interface to objects that can be manipulated in and out of XML form. */ #ifndef __xmltooling_xmlobj_h__ #define __xmltooling_xmlobj_h__ #include #include #include #include #include #include #ifndef XMLTOOLING_NO_XMLSEC namespace xmlsignature { class XMLTOOL_API Signature; }; #endif #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif namespace xmltooling { #ifndef XMLTOOLING_NO_XMLSEC class XMLTOOL_API Credential; #endif class XMLTOOL_API QName; /** * Object that represents an XML Element that has been unmarshalled into this C++ object. */ class XMLTOOL_API XMLObject { public: virtual ~XMLObject(); /** * Creates a copy of the object, along with all of its children. * * The new object tree will be completely distinct and independent of * the original in all respects. */ virtual XMLObject* clone() const=0; /** * Specialized function for detaching a child object from its parent * while disposing of the parent. * * This is not a generic way of detaching any child object, but only of * pruning a single child from the root of an XMLObject tree. If the * detached XMLObject's parent is itself a child, an exception will be * thrown. It's mainly useful for turning a child into the new root of * the tree without having to clone the child. */ virtual void detach()=0; /** * Gets the QName for this element. This QName MUST * contain the namespace URI, namespace prefix, and local element name. * * @return constant reference to the QName for this object */ virtual const QName& getElementQName() const=0; /** * Gets the namespaces that are scoped to this element. * * The caller MUST NOT modify the set returned, but may use any * non-modifying operations or algorithms on it. Iterators will * remain valid unless the set member referenced is removed using * the removeNamespace method. * * @return the namespaces that are scoped to this element */ virtual const std::set& getNamespaces() const=0; /** * Adds a namespace to the ones already scoped to this element * * @param ns the namespace to add */ virtual void addNamespace(const Namespace& ns) const=0; /** * Removes a namespace from this element * * @param ns the namespace to remove */ virtual void removeNamespace(const Namespace& ns)=0; /** * Gets the XML schema type of this element. This translates to contents the xsi:type * attribute for the element. * * @return XML schema type of this element */ virtual const QName* getSchemaType() const=0; /** * Gets the value of the ID attribute set on this object, if any. * * @return an ID value or nullptr */ virtual const XMLCh* getXMLID() const=0; /** * Returns the xml:lang property of the object, if any. * * @return an xml:lang value, or nullptr */ virtual const XMLCh* getLang() const; /** * Returns the xsi:nil property of the object, or false if not set. * * @return the xsi:nil property */ bool nil() const { switch (getNil()) { case xmlconstants::XML_BOOL_TRUE: case xmlconstants::XML_BOOL_ONE: return true; case xmlconstants::XML_BOOL_FALSE: case xmlconstants::XML_BOOL_ZERO: default: return false; } } /** * Returns the xsi:nil property as an explicit enumerated value. * * @return the xsi:nil property */ virtual xmlconstants::xmltooling_bool_t getNil() const=0; /** * Sets the xsi:nil property using an enumerated value. * * @param value value to set */ virtual void nil(xmlconstants::xmltooling_bool_t value)=0; /** * Sets the xsi:nil property. * * @param value value to set */ void nil(bool value) { nil(value ? xmlconstants::XML_BOOL_ONE : xmlconstants::XML_BOOL_ZERO); } /** * Sets the xsi:nil property using a string constant. * * @param value value to set */ void setNil(const XMLCh* value); /** * Checks to see if this object has a parent. * * @return true if the object has a parent, false if not */ virtual bool hasParent() const=0; /** * Gets the parent of this element or null if there is no parent. * * @return the parent of this element or null */ virtual XMLObject* getParent() const=0; /** * Sets the parent of this element. * * @param parent the parent of this element */ virtual void setParent(XMLObject* parent)=0; /** * Checks if this XMLObject has children. * * @return true if this XMLObject has children, false if not */ virtual bool hasChildren() const=0; /** * Returns an unmodifiable list of child objects in the order that they * should appear in the serialized representation. * * The validity of the returned list is not maintained if any non-const * operations are performed on the parent object. * * @return the list of children */ virtual const std::list& getOrderedChildren() const=0; /** * Used by a child's detach method to isolate the child from * this parent object in preparation for destroying the parent * (this object). * * @param child the child object to remove */ virtual void removeChild(XMLObject* child)=0; /** * Returns the text content at the specified position relative to * any child elements. A zero represents leading text, 1 comes after * the first child, and so forth. * * @param position the relative child element position of the text * @return the designated text value */ virtual const XMLCh* getTextContent(unsigned int position=0) const=0; /** * Sets (or clears) text content relative to a child element's position. * * @param value value to set, or nullptr to clear * @param position position relative to child element */ virtual void setTextContent(const XMLCh* value, unsigned int position=0)=0; /** * Gets the DOM representation of this XMLObject, if one exists. * * @return the DOM representation of this XMLObject */ virtual xercesc::DOMElement* getDOM() const=0; /** * Sets the DOM representation of this XMLObject. * * @param dom DOM representation of this XMLObject * @param bindDocument true if the object should take ownership of the associated Document */ virtual void setDOM(xercesc::DOMElement* dom, bool bindDocument=false) const=0; /** * Assigns ownership of a DOM document to the XMLObject. * This binds the lifetime of the document to the lifetime of the object. * * @param doc DOM document bound to this object */ virtual void setDocument(xercesc::DOMDocument* doc) const=0; /** * Releases the DOM representation of this XMLObject, if there is one. */ virtual void releaseDOM() const=0; /** * Releases the DOM representation of this XMLObject's parent. * * @param propagateRelease true if all ancestors of this element should release their DOM */ virtual void releaseParentDOM(bool propagateRelease=true) const=0; /** * Releases the DOM representation of this XMLObject's children. * * @param propagateRelease true if all descendants of this element should release their DOM */ virtual void releaseChildrenDOM(bool propagateRelease=true) const=0; /** * A convenience method that is equal to calling releaseDOM() then releaseParentDOM(true). */ void releaseThisandParentDOM() const; /** * A convenience method that is equal to calling releaseChildrenDOM(true) then releaseDOM(). */ void releaseThisAndChildrenDOM() const; /** * Marshalls the XMLObject, and its children, into a DOM element. * If a document is supplied, then it will be used to create the resulting elements. * If the document does not have a Document Element set, then the resulting * element will be set as the Document Element. If no document is supplied, then * a new document will be created and bound to the lifetime of the root object being * marshalled, unless an existing DOM can be reused without creating a new document. * * @param document the DOM document the marshalled element will be placed in, or nullptr * @param sigs ordered array of signatures to create after marshalling is complete * @param credential optional credential to supply signing key and related info * @return the DOM element representing this XMLObject * * @throws MarshallingException thrown if there is a problem marshalling the given object * @throws SignatureException thrown if a problem occurs during signature creation */ virtual xercesc::DOMElement* marshall( xercesc::DOMDocument* document=nullptr #ifndef XMLTOOLING_NO_XMLSEC ,const std::vector* sigs=nullptr ,const Credential* credential=nullptr #endif ) const=0; /** * Marshalls the XMLObject and appends it as a child of the given parent element. * * NOTE: The given Element must be within a DOM tree rooted in * the Document owning the given Element. * * @param parentElement the parent element to append the resulting DOM tree * @param sigs ordered array of signatures to create after marshalling is complete * @param credential optional credential to supply signing key and related info * @return the marshalled element tree * @throws MarshallingException thrown if the given XMLObject can not be marshalled. * @throws SignatureException thrown if a problem occurs during signature creation */ virtual xercesc::DOMElement* marshall( xercesc::DOMElement* parentElement #ifndef XMLTOOLING_NO_XMLSEC ,const std::vector* sigs=nullptr ,const Credential* credential=nullptr #endif ) const=0; /** * Unmarshalls the given W3C DOM element into the XMLObject. * The root of a given XML construct should be unmarshalled with the bindDocument parameter * set to true. * * @param element the DOM element to unmarshall * @param bindDocument true iff the resulting XMLObject should take ownership of the DOM's Document * * @return the unmarshalled XMLObject * * @throws UnmarshallingException thrown if an error occurs unmarshalling the DOM element into the XMLObject */ virtual XMLObject* unmarshall(xercesc::DOMElement* element, bool bindDocument=false)=0; protected: XMLObject(); private: XMLObject& operator=(const XMLObject& src); }; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif #endif /* __xmltooling_xmlobj_h__ */ xmltooling-1.5.3/xmltooling/XMLObjectBuilder.h000644 001751 001751 00000014332 12003305016 022536 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/XMLObjectBuilder.h * * Factory interface for XMLObjects. */ #ifndef __xmltooling_xmlobjbuilder_h__ #define __xmltooling_xmlobjbuilder_h__ #include #include #include #include #include #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif namespace xmltooling { /** * A factory interface for obtaining an XMLObject. */ class XMLTOOL_API XMLObjectBuilder { MAKE_NONCOPYABLE(XMLObjectBuilder); public: virtual ~XMLObjectBuilder(); /** * Creates an empty XMLObject with a particular element name. *

The results are undefined if localName is nullptr or empty. *

The caller is responsible for freeing the resulting object. * * @param nsURI namespace URI for element * @param localName local name of element * @param prefix prefix of element name * @param schemaType xsi:type of the object * @return the empty XMLObject */ virtual XMLObject* buildObject( const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=nullptr, const QName* schemaType=nullptr ) const=0; /** * Creates an empty XMLObject with a particular element name. *

The caller is responsible for freeing the resulting object. * * @param q QName of element for object * @return the empty XMLObject */ XMLObject* buildFromQName(const QName& q) const; /** * Creates an unmarshalled XMLObject from a DOM Element. *

The caller is responsible for freeing the resulting object. * * @param element the unmarshalling source * @param bindDocument true iff the XMLObject should take ownership of the DOM Document * @return the unmarshalled XMLObject */ XMLObject* buildFromElement(xercesc::DOMElement* element, bool bindDocument=false) const; /** * Creates an unmarshalled XMLObject from the root of a DOM Document. *

The caller is responsible for freeing the resulting object. * * @param doc the unmarshalling source * @param bindDocument true iff the XMLObject should take ownership of the DOM Document * @return the unmarshalled XMLObject */ XMLObject* buildFromDocument(xercesc::DOMDocument* doc, bool bindDocument=true) const; /** * Creates an unmarshalled XMLObject using the default build method, if a builder can be found. *

The caller is responsible for freeing the resulting object. * * @param element the unmarshalling source * @param bindDocument true iff the new XMLObject should take ownership of the DOM Document * @return the unmarshalled object or nullptr if no builder is available */ static XMLObject* buildOneFromElement(xercesc::DOMElement* element, bool bindDocument=false); /** * Retrieves an XMLObjectBuilder using the key it was registered with. * * @param key the key used to register the builder * @return the builder or nullptr */ static const XMLObjectBuilder* getBuilder(const QName& key); /** * Retrieves an XMLObjectBuilder for a given DOM element. * If no match is found, the default builder is returned, if any. * * @param element the element for which to locate a builder * @return the builder or nullptr */ static const XMLObjectBuilder* getBuilder(const xercesc::DOMElement* element); /** * Retrieves the default XMLObjectBuilder for DOM elements * * @return the default builder or nullptr */ static const XMLObjectBuilder* getDefaultBuilder(); /** * Gets an immutable list of all the builders currently registered. * * @return list of all the builders currently registered */ static const std::map& getBuilders(); /** * Registers a new builder for the given key. * * @param builderKey the key used to retrieve this builder later * @param builder the builder */ static void registerBuilder(const QName& builderKey, XMLObjectBuilder* builder); /** * Registers a default builder * * @param builder the default builder */ static void registerDefaultBuilder(XMLObjectBuilder* builder); /** * Deregisters a builder. * * @param builderKey the key for the builder to be deregistered */ static void deregisterBuilder(const QName& builderKey); /** * Deregisters default builder. */ static void deregisterDefaultBuilder(); /** * Unregisters and destroys all registered builders. */ static void destroyBuilders(); protected: XMLObjectBuilder(); private: static std::map m_map; static XMLObjectBuilder* m_default; }; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif #endif /* __xmltooling_xmlobjbuilder_h__ */ xmltooling-1.5.3/xmltooling/XMLToolingConfig.h000644 001751 001751 00000030232 12003305016 022557 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/XMLToolingConfig.h * * Library configuration. */ #ifndef __xmltooling_config_h__ #define __xmltooling_config_h__ #include #include #include #include #include #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4251 ) #endif namespace xmltooling { class XMLTOOL_API Mutex; class XMLTOOL_API ParserPool; class XMLTOOL_API PathResolver; class XMLTOOL_API TemplateEngine; class XMLTOOL_API URLEncoder; #ifndef XMLTOOLING_LITE class XMLTOOL_API ReplayCache; class XMLTOOL_API StorageService; #endif #ifndef XMLTOOLING_NO_XMLSEC class XMLTOOL_API CredentialResolver; class XMLTOOL_API KeyInfoResolver; class XMLTOOL_API PathValidator; class XMLTOOL_API TrustEngine; class XMLTOOL_API XSECCryptoX509CRL; #endif /** * Singleton object that manages library startup/shutdown.configuration. * *

A locking interface is supplied as a convenience for code that wants to * obtain a global system lock, but the actual configuration itself is not * synchronized. */ class XMLTOOL_API XMLToolingConfig : public virtual Lockable { MAKE_NONCOPYABLE(XMLToolingConfig); protected: XMLToolingConfig(); #ifndef XMLTOOLING_NO_XMLSEC /** Global KeyInfoResolver instance. */ KeyInfoResolver* m_keyInfoResolver; /** Global ReplayCache instance. */ ReplayCache* m_replayCache; #endif /** Global PathResolver instance. */ PathResolver* m_pathResolver; /** Global TemplateEngine instance. */ TemplateEngine* m_templateEngine; /** Global URLEncoder instance for use by URL-related functions. */ URLEncoder* m_urlEncoder; public: virtual ~XMLToolingConfig(); /** * Returns the global configuration object for the library. * * @return reference to the global library configuration object */ static XMLToolingConfig& getConfig(); /** * Initializes library * * Each process using the library MUST call this function exactly once * before using any library classes except for the LogConfig method. * * @return true iff initialization was successful */ virtual bool init()=0; /** * Shuts down library *

Each process using the library SHOULD call this function exactly once * before terminating itself */ virtual void term()=0; /** * Loads a shared/dynamic library extension. * *

Extension libraries are managed using a pair of "C" linkage functions:
* extern "C" int xmltooling_extension_init(void* context);
* extern "C" void xmltooling_extension_term(); * *

This method is internally synchronized. * * @param path pathname of shared library to load into process * @param context arbitrary data to pass to library initialization hook * @return true iff library was loaded successfully */ virtual bool load_library(const char* path, void* context=nullptr)=0; /** * Configure logging system. *

May be called first, before initializing the library. Other calls to it * must be externally synchronized. * * @param config either a logging configuration file, or a level from the set * (DEBUG, INFO, NOTICE, WARN, ERROR, CRIT, ALERT, FATAL, EMERG) * @return true iff configuration was successful */ virtual bool log_config(const char* config=nullptr)=0; /** * Obtains a non-validating parser pool. *

Library must be initialized first. * * @return reference to a non-validating parser pool. */ virtual ParserPool& getParser() const=0; /** * Obtains a validating parser pool. *

Library must be initialized first. Schema/catalog registration must be * externally synchronized. * * @return reference to a validating parser pool. */ virtual ParserPool& getValidatingParser() const=0; /** * Returns a reference to a named mutex. *

The first access to a given name will create the object. * * @param name name of mutex to access * @return reference to a mutex object */ virtual Mutex& getNamedMutex(const char* name)=0; #ifndef XMLTOOLING_NO_XMLSEC /** * Returns the global KeyInfoResolver instance. * * @return global KeyInfoResolver or nullptr */ const KeyInfoResolver* getKeyInfoResolver() const; /** * Returns the global ReplayCache instance. * * @return global ReplayCache or nullptr */ ReplayCache* getReplayCache() const; /** * Sets the global KeyInfoResolver instance. *

This method must be externally synchronized with any code that uses the object. * Any previously set object is destroyed. * * @param keyInfoResolver new KeyInfoResolver instance to store */ void setKeyInfoResolver(KeyInfoResolver* keyInfoResolver); /** * Sets the global ReplayCache instance. *

This method must be externally synchronized with any code that uses the object. * Any previously set object is destroyed. * * @param replayCache new ReplayCache instance to store */ void setReplayCache(ReplayCache* replayCache); #endif /** * Returns the global PathResolver instance. * * @return global PathResolver or nullptr */ PathResolver* getPathResolver() const; /** * Returns the global TemplateEngine instance. * * @return global TemplateEngine or nullptr */ TemplateEngine* getTemplateEngine() const; /** * Returns the global URLEncoder instance. * * @return global URLEncoder or nullptr */ const URLEncoder* getURLEncoder() const; /** * Sets the global PathResolver instance. *

This method must be externally synchronized with any code that uses the object. * Any previously set object is destroyed. * * @param pathResolver new PathResolver instance to store */ void setPathResolver(PathResolver* pathResolver); /** * Sets the global TemplateEngine instance. *

This method must be externally synchronized with any code that uses the object. * Any previously set object is destroyed. * * @param templateEngine new TemplateEngine instance to store */ void setTemplateEngine(TemplateEngine* templateEngine); /** * Sets the global URLEncoder instance. *

This method must be externally synchronized with any code that uses the object. * Any previously set object is destroyed. * * @param urlEncoder new URLEncoder instance to store */ void setURLEncoder(URLEncoder* urlEncoder); /** * @deprecated * List of catalog files to load into validating parser pool at initialization time. *

Like other path settings, the separator depends on the platform * (semicolon on Windows, colon otherwise). */ std::string catalog_path; /** A User-Agent header to include in HTTP client requests. */ std::string user_agent; /** * Adjusts any clock comparisons to be more liberal/permissive by the * indicated number of seconds. */ unsigned int clock_skew_secs; #ifndef XMLTOOLING_LITE /** * Manages factories for StorageService plugins. */ PluginManager StorageServiceManager; #endif #ifndef XMLTOOLING_NO_XMLSEC /** * Returns an X.509 CRL implementation object. */ virtual XSECCryptoX509CRL* X509CRL() const=0; /** * Manages factories for CredentialResolver plugins. */ PluginManager CredentialResolverManager; /** * Manages factories for KeyInfoResolver plugins. */ PluginManager KeyInfoResolverManager; /** * Manages factories for PathValidator plugins. */ PluginManager PathValidatorManager; /** * Manages factories for TrustEngine plugins. */ PluginManager TrustEngineManager; /** * Maps an XML Signature/Encryption algorithm identifier to a library-specific * key algorithm and size for use in resolving credentials. * * @param xmlAlgorithm XML Signature/Encryption algorithm identifier * @return a general key algorithm and key size (or 0 if the size is irrelevant) */ virtual std::pair mapXMLAlgorithmToKeyAlgorithm(const XMLCh* xmlAlgorithm) const=0; /** * Types of XML Security algorithms. */ enum XMLSecurityAlgorithmType { ALGTYPE_UNK, ALGTYPE_DIGEST, ALGTYPE_SIGN, ALGTYPE_ENCRYPT, ALGTYPE_KEYENCRYPT, ALGTYPE_KEYAGREE, ALGTYPE_AUTHNENCRYPT }; /** * Registers an XML Signature/Encryption algorithm identifier against a library-specific * key algorithm and size for use in resolving credentials. * * @param xmlAlgorithm XML Signature/Encryption algorithm identifier * @param keyAlgorithm a key algorithm * @param size a key size (or 0 if the size is irrelevant) * @param type type of algorithm, if known */ virtual void registerXMLAlgorithm( const XMLCh* xmlAlgorithm, const char* keyAlgorithm, unsigned int size=0, XMLSecurityAlgorithmType type=ALGTYPE_UNK )=0; /** * Checks for implementation support of a particular XML Security algorithm. * * @param xmlAlgorithm XML Signature/Encryption algorithm identifier * @param type type of algorithm, or ALGTYPE_UNK to ignore * @return true iff the algorithm is supported by the underlying libraries */ virtual bool isXMLAlgorithmSupported(const XMLCh* xmlAlgorithm, XMLSecurityAlgorithmType type=ALGTYPE_UNK)=0; #endif /** * Manages factories for SOAPTransport plugins. * *

The factory interface takes a peer name/endpoint pair. */ PluginManager SOAPTransportManager; }; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif #endif /* __xmltooling_config_h__ */ xmltooling-1.5.3/xmltooling/internal.h000644 001751 001751 00000010707 12147443124 021272 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /* * internal.h - internally visible classes */ #ifndef __xmltooling_internal_h__ #define __xmltooling_internal_h__ #ifdef WIN32 # define _CRT_SECURE_NO_DEPRECATE 1 # define _CRT_NONSTDC_NO_DEPRECATE 1 # define _SCL_SECURE_NO_WARNINGS 1 #endif // Export public APIs. #define XMLTOOLING_EXPORTS // eventually we might be able to support autoconf via cygwin... #if defined (_MSC_VER) || defined(__BORLANDC__) # include "config_win32.h" #else # include "config.h" #endif #include "base.h" #include "XMLToolingConfig.h" #include "util/ParserPool.h" #include #include #include #ifndef XMLTOOLING_NO_XMLSEC #include #endif #define XMLTOOLING_LOGCAT "XMLTooling" #define XMLTOOLING_ENTITY_EXPANSION_LIMIT 100 // Macros for path and directory separators. #if defined __CYGWIN32__ && !defined __CYGWIN__ /* For backwards compatibility with Cygwin b19 and earlier, we define __CYGWIN__ here, so that we can rely on checking just for that macro. */ # define __CYGWIN__ __CYGWIN32__ #endif #if defined _WIN32 && !defined __CYGWIN__ /* Use Windows separators on all _WIN32 defining environments, except Cygwin. */ # define DIR_SEPARATOR_CHAR '\\' # define DIR_SEPARATOR_STR "\\" # define PATH_SEPARATOR_CHAR ';' # define PATH_SEPARATOR_STR ";" #endif #ifndef DIR_SEPARATOR_CHAR /* Assume that not having this is an indicator that all are missing. */ # define DIR_SEPARATOR_CHAR '/' # define DIR_SEPARATOR_STR "/" # define PATH_SEPARATOR_CHAR ':' # define PATH_SEPARATOR_STR ":" #endif /* !DIR_SEPARATOR_CHAR */ namespace xmltooling { /// @cond OFF class XMLTOOL_DLLLOCAL XMLToolingInternalConfig : public XMLToolingConfig { public: XMLToolingInternalConfig(); ~XMLToolingInternalConfig(); static XMLToolingInternalConfig& getInternalConfig(); // global per-process setup and shutdown of runtime bool init(); void term(); // global mutex available to library applications Lockable* lock(); void unlock(); // named mutexes to limit lock scope Mutex& getNamedMutex(const char* name); // configuration bool load_library(const char* path, void* context=nullptr); bool log_config(const char* config=nullptr); // parser access ParserPool& getParser() const { return *m_parserPool; } ParserPool& getValidatingParser() const { return *m_validatingPool; } #ifndef XMLTOOLING_NO_XMLSEC XSECCryptoX509CRL* X509CRL() const; std::pair mapXMLAlgorithmToKeyAlgorithm(const XMLCh* xmlAlgorithm) const; void registerXMLAlgorithm( const XMLCh* xmlAlgorithm, const char* keyAlgorithm, unsigned int size=0, XMLSecurityAlgorithmType type=ALGTYPE_UNK ); bool isXMLAlgorithmSupported(const XMLCh* xmlAlgorithm, XMLSecurityAlgorithmType type=ALGTYPE_UNK); void registerXMLAlgorithms(); XSECProvider* m_xsecProvider; private: typedef std::map > > algmap_t; algmap_t m_algorithmMap; #endif private: int m_initCount; std::auto_ptr m_lock; std::map m_namedLocks; std::vector m_libhandles; ParserPool* m_parserPool; ParserPool* m_validatingPool; }; #ifndef XMLTOOLING_NO_XMLSEC void log_openssl(); #endif /// @endcond }; #endif /* __xmltooling_internal_h__ */ xmltooling-1.5.3/xmltooling/Makefile.am000644 001751 001751 00000013247 12146253675 021354 0ustar00scantorscantor000000 000000 AUTOMAKE_OPTIONS = foreign if BUILD_XMLSEC lib_LTLIBRARIES = libxmltooling-lite.la libxmltooling.la else lib_LTLIBRARIES = libxmltooling-lite.la endif libxmltoolingincludedir = $(includedir)/xmltooling encincludedir = $(includedir)/xmltooling/encryption implincludedir = $(includedir)/xmltooling/impl ioincludedir = $(includedir)/xmltooling/io secincludedir = $(includedir)/xmltooling/security sigincludedir = $(includedir)/xmltooling/signature soapincludedir = $(includedir)/xmltooling/soap utilincludedir = $(includedir)/xmltooling/util valincludedir = $(includedir)/xmltooling/validation libxmltoolinginclude_HEADERS = \ AbstractAttributeExtensibleXMLObject.h \ AbstractComplexElement.h \ AbstractDOMCachingXMLObject.h \ AbstractSimpleElement.h \ AbstractXMLObject.h \ AttributeExtensibleXMLObject.h \ base.h \ ConcreteXMLObjectBuilder.h \ char_traits.h \ config_pub.h \ ElementExtensibleXMLObject.h \ ElementProxy.h \ exceptions.h \ Lockable.h \ logging.h \ Namespace.h \ PluginManager.h \ QName.h \ unicode.h \ version.h \ XMLObject.h \ XMLObjectBuilder.h \ XMLToolingConfig.h encinclude_HEADERS = \ encryption/Decrypter.h \ encryption/EncryptedKeyResolver.h \ encryption/Encrypter.h \ encryption/Encryption.h implinclude_HEADERS = \ impl/AnyElement.h \ impl/UnknownElement.h ioinclude_HEADERS = \ io/AbstractXMLObjectMarshaller.h \ io/AbstractXMLObjectUnmarshaller.h \ io/GenericRequest.h \ io/GenericResponse.h \ io/HTTPRequest.h \ io/HTTPResponse.h secinclude_HEADERS = \ security/AbstractPKIXTrustEngine.h \ security/BasicX509Credential.h \ security/ChainingTrustEngine.h \ security/Credential.h \ security/CredentialContext.h \ security/CredentialCriteria.h \ security/CredentialResolver.h \ security/KeyInfoCredentialContext.h \ security/KeyInfoResolver.h \ security/OpenSSLCredential.h \ security/OpenSSLPathValidator.h \ security/PathValidator.h \ security/PKIXPathValidatorParams.h \ security/SecurityHelper.h \ security/SignatureTrustEngine.h \ security/TrustEngine.h \ security/X509Credential.h \ security/X509TrustEngine.h \ security/OpenSSLTrustEngine.h \ security/XSECCryptoX509CRL.h \ security/OpenSSLCryptoX509CRL.h siginclude_HEADERS = \ signature/ContentReference.h \ signature/KeyInfo.h \ signature/Signature.h \ signature/SignatureValidator.h soapinclude_HEADERS = \ soap/SOAP.h \ soap/SOAPClient.h \ soap/SOAPTransport.h \ soap/HTTPSOAPTransport.h \ soap/OpenSSLSOAPTransport.h utilinclude_HEADERS = \ util/CurlURLInputStream.h \ util/DateTime.h \ util/NDC.h \ util/ParserPool.h \ util/PathResolver.h \ util/Predicates.h \ util/ReloadableXMLFile.h \ util/ReplayCache.h \ util/StorageService.h \ util/TemplateEngine.h \ util/Threads.h \ util/URLEncoder.h \ util/XMLConstants.h \ util/XMLHelper.h \ util/XMLObjectChildrenList.h valinclude_HEADERS = \ validation/Validator.h \ validation/ValidatorSuite.h noinst_HEADERS = \ internal.h xmlsec_sources = \ encryption/impl/Decrypter.cpp \ encryption/impl/EncryptedKeyResolver.cpp \ encryption/impl/Encrypter.cpp \ encryption/impl/EncryptionImpl.cpp \ encryption/impl/EncryptionSchemaValidators.cpp \ impl/MemoryStorageService.cpp \ security/impl/AbstractPKIXTrustEngine.cpp \ security/impl/BasicX509Credential.cpp \ security/impl/ChainingCredentialResolver.cpp \ security/impl/ChainingTrustEngine.cpp \ security/impl/CredentialCriteria.cpp \ security/impl/CredentialResolver.cpp \ security/impl/DummyCredentialResolver.cpp \ security/impl/ExplicitKeyTrustEngine.cpp \ security/impl/FilesystemCredentialResolver.cpp \ security/impl/InlineKeyResolver.cpp \ security/impl/KeyInfoResolver.cpp \ security/impl/OpenSSLCryptoX509CRL.cpp \ security/impl/PKIXPathValidator.cpp \ security/impl/SecurityHelper.cpp \ security/impl/StaticPKIXTrustEngine.cpp \ security/impl/TrustEngine.cpp \ security/impl/XSECCryptoX509CRL.cpp \ signature/impl/KeyInfoImpl.cpp \ signature/impl/KeyInfoSchemaValidators.cpp \ signature/impl/SignatureValidator.cpp \ signature/impl/XMLSecSignatureImpl.cpp \ soap/impl/CURLSOAPTransport.cpp \ util/CurlURLInputStream.cpp \ util/ReplayCache.cpp \ util/StorageService.cpp if BUILD_PTHREAD thread_sources = util/PThreads.cpp else thread_sources = endif common_sources = \ AbstractAttributeExtensibleXMLObject.cpp \ AbstractComplexElement.cpp \ AbstractDOMCachingXMLObject.cpp \ AbstractSimpleElement.cpp \ AbstractXMLObject.cpp \ exceptions.cpp \ Lockable.cpp \ Namespace.cpp \ QName.cpp \ unicode.cpp \ version.cpp \ XMLObjectBuilder.cpp \ XMLToolingConfig.cpp \ impl/AnyElement.cpp \ impl/UnknownElement.cpp \ io/AbstractXMLObjectMarshaller.cpp \ io/AbstractXMLObjectUnmarshaller.cpp \ io/HTTPRequest.cpp \ io/HTTPResponse.cpp \ soap/impl/SOAPClient.cpp \ soap/impl/SOAPImpl.cpp \ soap/impl/SOAPSchemaValidators.cpp \ util/DateTime.cpp \ util/NDC.cpp \ util/ParserPool.cpp \ util/PathResolver.cpp \ util/ReloadableXMLFile.cpp \ util/TemplateEngine.cpp \ util/URLEncoder.cpp \ util/XMLConstants.cpp \ util/XMLHelper.cpp \ validation/ValidatorSuite.cpp \ $(thread_sources) libxmltooling_lite_la_SOURCES = \ ${common_sources} libxmltooling_lite_la_CPPFLAGS = -DXMLTOOLING_LITE libxmltooling_lite_la_LDFLAGS = -version-info 6:3:0 if BUILD_XMLSEC libxmltooling_la_SOURCES = \ ${common_sources} \ ${xmlsec_sources} libxmltooling_la_LDFLAGS = $(XMLSEC_LIBS) -version-info 6:3:0 endif install-exec-hook: for la in $(lib_LTLIBRARIES) ; do rm -f $(DESTDIR)$(libdir)/$$la ; done EXTRA_DIST = \ xmltooling.vcxproj \ xmltooling-lite.vcxproj \ xmltooling.vcxproj.filters \ xmltooling-lite.vcxproj.filters \ config_pub.h.in \ config_pub_win32.h\ resource.h\ xmltooling.rc \ util/Win32Threads.cpp xmltooling-1.5.3/xmltooling/Makefile.in000644 001751 001751 00000434570 12147443212 021360 0ustar00scantorscantor000000 000000 # Makefile.in generated by automake 1.12.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = xmltooling DIST_COMMON = $(encinclude_HEADERS) $(implinclude_HEADERS) \ $(ioinclude_HEADERS) $(libxmltoolinginclude_HEADERS) \ $(noinst_HEADERS) $(secinclude_HEADERS) $(siginclude_HEADERS) \ $(soapinclude_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config_pub.h.in \ $(top_srcdir)/build-aux/depcomp $(utilinclude_HEADERS) \ $(valinclude_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ $(top_srcdir)/m4/boost.m4 $(top_srcdir)/m4/doxygen.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h config_pub.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(encincludedir)" \ "$(DESTDIR)$(implincludedir)" "$(DESTDIR)$(ioincludedir)" \ "$(DESTDIR)$(libxmltoolingincludedir)" \ "$(DESTDIR)$(secincludedir)" "$(DESTDIR)$(sigincludedir)" \ "$(DESTDIR)$(soapincludedir)" "$(DESTDIR)$(utilincludedir)" \ "$(DESTDIR)$(valincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libxmltooling_lite_la_LIBADD = am__libxmltooling_lite_la_SOURCES_DIST = \ AbstractAttributeExtensibleXMLObject.cpp \ AbstractComplexElement.cpp AbstractDOMCachingXMLObject.cpp \ AbstractSimpleElement.cpp AbstractXMLObject.cpp exceptions.cpp \ Lockable.cpp Namespace.cpp QName.cpp unicode.cpp version.cpp \ XMLObjectBuilder.cpp XMLToolingConfig.cpp impl/AnyElement.cpp \ impl/UnknownElement.cpp io/AbstractXMLObjectMarshaller.cpp \ io/AbstractXMLObjectUnmarshaller.cpp io/HTTPRequest.cpp \ io/HTTPResponse.cpp soap/impl/SOAPClient.cpp \ soap/impl/SOAPImpl.cpp soap/impl/SOAPSchemaValidators.cpp \ util/DateTime.cpp util/NDC.cpp util/ParserPool.cpp \ util/PathResolver.cpp util/ReloadableXMLFile.cpp \ util/TemplateEngine.cpp util/URLEncoder.cpp \ util/XMLConstants.cpp util/XMLHelper.cpp \ validation/ValidatorSuite.cpp util/PThreads.cpp @BUILD_PTHREAD_TRUE@am__objects_1 = libxmltooling_lite_la-PThreads.lo am__objects_2 = \ libxmltooling_lite_la-AbstractAttributeExtensibleXMLObject.lo \ libxmltooling_lite_la-AbstractComplexElement.lo \ libxmltooling_lite_la-AbstractDOMCachingXMLObject.lo \ libxmltooling_lite_la-AbstractSimpleElement.lo \ libxmltooling_lite_la-AbstractXMLObject.lo \ libxmltooling_lite_la-exceptions.lo \ libxmltooling_lite_la-Lockable.lo \ libxmltooling_lite_la-Namespace.lo \ libxmltooling_lite_la-QName.lo \ libxmltooling_lite_la-unicode.lo \ libxmltooling_lite_la-version.lo \ libxmltooling_lite_la-XMLObjectBuilder.lo \ libxmltooling_lite_la-XMLToolingConfig.lo \ libxmltooling_lite_la-AnyElement.lo \ libxmltooling_lite_la-UnknownElement.lo \ libxmltooling_lite_la-AbstractXMLObjectMarshaller.lo \ libxmltooling_lite_la-AbstractXMLObjectUnmarshaller.lo \ libxmltooling_lite_la-HTTPRequest.lo \ libxmltooling_lite_la-HTTPResponse.lo \ libxmltooling_lite_la-SOAPClient.lo \ libxmltooling_lite_la-SOAPImpl.lo \ libxmltooling_lite_la-SOAPSchemaValidators.lo \ libxmltooling_lite_la-DateTime.lo libxmltooling_lite_la-NDC.lo \ libxmltooling_lite_la-ParserPool.lo \ libxmltooling_lite_la-PathResolver.lo \ libxmltooling_lite_la-ReloadableXMLFile.lo \ libxmltooling_lite_la-TemplateEngine.lo \ libxmltooling_lite_la-URLEncoder.lo \ libxmltooling_lite_la-XMLConstants.lo \ libxmltooling_lite_la-XMLHelper.lo \ libxmltooling_lite_la-ValidatorSuite.lo $(am__objects_1) am_libxmltooling_lite_la_OBJECTS = $(am__objects_2) libxmltooling_lite_la_OBJECTS = $(am_libxmltooling_lite_la_OBJECTS) libxmltooling_lite_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libxmltooling_lite_la_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_XMLSEC_FALSE@am_libxmltooling_lite_la_rpath = -rpath $(libdir) @BUILD_XMLSEC_TRUE@am_libxmltooling_lite_la_rpath = -rpath $(libdir) libxmltooling_la_LIBADD = am__libxmltooling_la_SOURCES_DIST = \ AbstractAttributeExtensibleXMLObject.cpp \ AbstractComplexElement.cpp AbstractDOMCachingXMLObject.cpp \ AbstractSimpleElement.cpp AbstractXMLObject.cpp exceptions.cpp \ Lockable.cpp Namespace.cpp QName.cpp unicode.cpp version.cpp \ XMLObjectBuilder.cpp XMLToolingConfig.cpp impl/AnyElement.cpp \ impl/UnknownElement.cpp io/AbstractXMLObjectMarshaller.cpp \ io/AbstractXMLObjectUnmarshaller.cpp io/HTTPRequest.cpp \ io/HTTPResponse.cpp soap/impl/SOAPClient.cpp \ soap/impl/SOAPImpl.cpp soap/impl/SOAPSchemaValidators.cpp \ util/DateTime.cpp util/NDC.cpp util/ParserPool.cpp \ util/PathResolver.cpp util/ReloadableXMLFile.cpp \ util/TemplateEngine.cpp util/URLEncoder.cpp \ util/XMLConstants.cpp util/XMLHelper.cpp \ validation/ValidatorSuite.cpp util/PThreads.cpp \ encryption/impl/Decrypter.cpp \ encryption/impl/EncryptedKeyResolver.cpp \ encryption/impl/Encrypter.cpp \ encryption/impl/EncryptionImpl.cpp \ encryption/impl/EncryptionSchemaValidators.cpp \ impl/MemoryStorageService.cpp \ security/impl/AbstractPKIXTrustEngine.cpp \ security/impl/BasicX509Credential.cpp \ security/impl/ChainingCredentialResolver.cpp \ security/impl/ChainingTrustEngine.cpp \ security/impl/CredentialCriteria.cpp \ security/impl/CredentialResolver.cpp \ security/impl/DummyCredentialResolver.cpp \ security/impl/ExplicitKeyTrustEngine.cpp \ security/impl/FilesystemCredentialResolver.cpp \ security/impl/InlineKeyResolver.cpp \ security/impl/KeyInfoResolver.cpp \ security/impl/OpenSSLCryptoX509CRL.cpp \ security/impl/PKIXPathValidator.cpp \ security/impl/SecurityHelper.cpp \ security/impl/StaticPKIXTrustEngine.cpp \ security/impl/TrustEngine.cpp \ security/impl/XSECCryptoX509CRL.cpp \ signature/impl/KeyInfoImpl.cpp \ signature/impl/KeyInfoSchemaValidators.cpp \ signature/impl/SignatureValidator.cpp \ signature/impl/XMLSecSignatureImpl.cpp \ soap/impl/CURLSOAPTransport.cpp util/CurlURLInputStream.cpp \ util/ReplayCache.cpp util/StorageService.cpp @BUILD_PTHREAD_TRUE@am__objects_3 = PThreads.lo am__objects_4 = AbstractAttributeExtensibleXMLObject.lo \ AbstractComplexElement.lo AbstractDOMCachingXMLObject.lo \ AbstractSimpleElement.lo AbstractXMLObject.lo exceptions.lo \ Lockable.lo Namespace.lo QName.lo unicode.lo version.lo \ XMLObjectBuilder.lo XMLToolingConfig.lo AnyElement.lo \ UnknownElement.lo AbstractXMLObjectMarshaller.lo \ AbstractXMLObjectUnmarshaller.lo HTTPRequest.lo \ HTTPResponse.lo SOAPClient.lo SOAPImpl.lo \ SOAPSchemaValidators.lo DateTime.lo NDC.lo ParserPool.lo \ PathResolver.lo ReloadableXMLFile.lo TemplateEngine.lo \ URLEncoder.lo XMLConstants.lo XMLHelper.lo ValidatorSuite.lo \ $(am__objects_3) am__objects_5 = Decrypter.lo EncryptedKeyResolver.lo Encrypter.lo \ EncryptionImpl.lo EncryptionSchemaValidators.lo \ MemoryStorageService.lo AbstractPKIXTrustEngine.lo \ BasicX509Credential.lo ChainingCredentialResolver.lo \ ChainingTrustEngine.lo CredentialCriteria.lo \ CredentialResolver.lo DummyCredentialResolver.lo \ ExplicitKeyTrustEngine.lo FilesystemCredentialResolver.lo \ InlineKeyResolver.lo KeyInfoResolver.lo \ OpenSSLCryptoX509CRL.lo PKIXPathValidator.lo SecurityHelper.lo \ StaticPKIXTrustEngine.lo TrustEngine.lo XSECCryptoX509CRL.lo \ KeyInfoImpl.lo KeyInfoSchemaValidators.lo \ SignatureValidator.lo XMLSecSignatureImpl.lo \ CURLSOAPTransport.lo CurlURLInputStream.lo ReplayCache.lo \ StorageService.lo @BUILD_XMLSEC_TRUE@am_libxmltooling_la_OBJECTS = $(am__objects_4) \ @BUILD_XMLSEC_TRUE@ $(am__objects_5) libxmltooling_la_OBJECTS = $(am_libxmltooling_la_OBJECTS) libxmltooling_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libxmltooling_la_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_XMLSEC_TRUE@am_libxmltooling_la_rpath = -rpath $(libdir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libxmltooling_lite_la_SOURCES) $(libxmltooling_la_SOURCES) DIST_SOURCES = $(am__libxmltooling_lite_la_SOURCES_DIST) \ $(am__libxmltooling_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(encinclude_HEADERS) $(implinclude_HEADERS) \ $(ioinclude_HEADERS) $(libxmltoolinginclude_HEADERS) \ $(noinst_HEADERS) $(secinclude_HEADERS) $(siginclude_HEADERS) \ $(soapinclude_HEADERS) $(utilinclude_HEADERS) \ $(valinclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_ROOT = @BOOST_ROOT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTFLAGS = @CXXTESTFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOG4CPP_CONFIG = @LOG4CPP_CONFIG@ LOG4SHIB_CONFIG = @LOG4SHIB_CONFIG@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLSEC_LIBS = @XMLSEC_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_libdir = @pkgconfig_libdir@ pkgconfig_libfile = @pkgconfig_libfile@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign @BUILD_XMLSEC_FALSE@lib_LTLIBRARIES = libxmltooling-lite.la @BUILD_XMLSEC_TRUE@lib_LTLIBRARIES = libxmltooling-lite.la libxmltooling.la libxmltoolingincludedir = $(includedir)/xmltooling encincludedir = $(includedir)/xmltooling/encryption implincludedir = $(includedir)/xmltooling/impl ioincludedir = $(includedir)/xmltooling/io secincludedir = $(includedir)/xmltooling/security sigincludedir = $(includedir)/xmltooling/signature soapincludedir = $(includedir)/xmltooling/soap utilincludedir = $(includedir)/xmltooling/util valincludedir = $(includedir)/xmltooling/validation libxmltoolinginclude_HEADERS = \ AbstractAttributeExtensibleXMLObject.h \ AbstractComplexElement.h \ AbstractDOMCachingXMLObject.h \ AbstractSimpleElement.h \ AbstractXMLObject.h \ AttributeExtensibleXMLObject.h \ base.h \ ConcreteXMLObjectBuilder.h \ char_traits.h \ config_pub.h \ ElementExtensibleXMLObject.h \ ElementProxy.h \ exceptions.h \ Lockable.h \ logging.h \ Namespace.h \ PluginManager.h \ QName.h \ unicode.h \ version.h \ XMLObject.h \ XMLObjectBuilder.h \ XMLToolingConfig.h encinclude_HEADERS = \ encryption/Decrypter.h \ encryption/EncryptedKeyResolver.h \ encryption/Encrypter.h \ encryption/Encryption.h implinclude_HEADERS = \ impl/AnyElement.h \ impl/UnknownElement.h ioinclude_HEADERS = \ io/AbstractXMLObjectMarshaller.h \ io/AbstractXMLObjectUnmarshaller.h \ io/GenericRequest.h \ io/GenericResponse.h \ io/HTTPRequest.h \ io/HTTPResponse.h secinclude_HEADERS = \ security/AbstractPKIXTrustEngine.h \ security/BasicX509Credential.h \ security/ChainingTrustEngine.h \ security/Credential.h \ security/CredentialContext.h \ security/CredentialCriteria.h \ security/CredentialResolver.h \ security/KeyInfoCredentialContext.h \ security/KeyInfoResolver.h \ security/OpenSSLCredential.h \ security/OpenSSLPathValidator.h \ security/PathValidator.h \ security/PKIXPathValidatorParams.h \ security/SecurityHelper.h \ security/SignatureTrustEngine.h \ security/TrustEngine.h \ security/X509Credential.h \ security/X509TrustEngine.h \ security/OpenSSLTrustEngine.h \ security/XSECCryptoX509CRL.h \ security/OpenSSLCryptoX509CRL.h siginclude_HEADERS = \ signature/ContentReference.h \ signature/KeyInfo.h \ signature/Signature.h \ signature/SignatureValidator.h soapinclude_HEADERS = \ soap/SOAP.h \ soap/SOAPClient.h \ soap/SOAPTransport.h \ soap/HTTPSOAPTransport.h \ soap/OpenSSLSOAPTransport.h utilinclude_HEADERS = \ util/CurlURLInputStream.h \ util/DateTime.h \ util/NDC.h \ util/ParserPool.h \ util/PathResolver.h \ util/Predicates.h \ util/ReloadableXMLFile.h \ util/ReplayCache.h \ util/StorageService.h \ util/TemplateEngine.h \ util/Threads.h \ util/URLEncoder.h \ util/XMLConstants.h \ util/XMLHelper.h \ util/XMLObjectChildrenList.h valinclude_HEADERS = \ validation/Validator.h \ validation/ValidatorSuite.h noinst_HEADERS = \ internal.h xmlsec_sources = \ encryption/impl/Decrypter.cpp \ encryption/impl/EncryptedKeyResolver.cpp \ encryption/impl/Encrypter.cpp \ encryption/impl/EncryptionImpl.cpp \ encryption/impl/EncryptionSchemaValidators.cpp \ impl/MemoryStorageService.cpp \ security/impl/AbstractPKIXTrustEngine.cpp \ security/impl/BasicX509Credential.cpp \ security/impl/ChainingCredentialResolver.cpp \ security/impl/ChainingTrustEngine.cpp \ security/impl/CredentialCriteria.cpp \ security/impl/CredentialResolver.cpp \ security/impl/DummyCredentialResolver.cpp \ security/impl/ExplicitKeyTrustEngine.cpp \ security/impl/FilesystemCredentialResolver.cpp \ security/impl/InlineKeyResolver.cpp \ security/impl/KeyInfoResolver.cpp \ security/impl/OpenSSLCryptoX509CRL.cpp \ security/impl/PKIXPathValidator.cpp \ security/impl/SecurityHelper.cpp \ security/impl/StaticPKIXTrustEngine.cpp \ security/impl/TrustEngine.cpp \ security/impl/XSECCryptoX509CRL.cpp \ signature/impl/KeyInfoImpl.cpp \ signature/impl/KeyInfoSchemaValidators.cpp \ signature/impl/SignatureValidator.cpp \ signature/impl/XMLSecSignatureImpl.cpp \ soap/impl/CURLSOAPTransport.cpp \ util/CurlURLInputStream.cpp \ util/ReplayCache.cpp \ util/StorageService.cpp @BUILD_PTHREAD_FALSE@thread_sources = @BUILD_PTHREAD_TRUE@thread_sources = util/PThreads.cpp common_sources = \ AbstractAttributeExtensibleXMLObject.cpp \ AbstractComplexElement.cpp \ AbstractDOMCachingXMLObject.cpp \ AbstractSimpleElement.cpp \ AbstractXMLObject.cpp \ exceptions.cpp \ Lockable.cpp \ Namespace.cpp \ QName.cpp \ unicode.cpp \ version.cpp \ XMLObjectBuilder.cpp \ XMLToolingConfig.cpp \ impl/AnyElement.cpp \ impl/UnknownElement.cpp \ io/AbstractXMLObjectMarshaller.cpp \ io/AbstractXMLObjectUnmarshaller.cpp \ io/HTTPRequest.cpp \ io/HTTPResponse.cpp \ soap/impl/SOAPClient.cpp \ soap/impl/SOAPImpl.cpp \ soap/impl/SOAPSchemaValidators.cpp \ util/DateTime.cpp \ util/NDC.cpp \ util/ParserPool.cpp \ util/PathResolver.cpp \ util/ReloadableXMLFile.cpp \ util/TemplateEngine.cpp \ util/URLEncoder.cpp \ util/XMLConstants.cpp \ util/XMLHelper.cpp \ validation/ValidatorSuite.cpp \ $(thread_sources) libxmltooling_lite_la_SOURCES = \ ${common_sources} libxmltooling_lite_la_CPPFLAGS = -DXMLTOOLING_LITE libxmltooling_lite_la_LDFLAGS = -version-info 6:3:0 @BUILD_XMLSEC_TRUE@libxmltooling_la_SOURCES = \ @BUILD_XMLSEC_TRUE@ ${common_sources} \ @BUILD_XMLSEC_TRUE@ ${xmlsec_sources} @BUILD_XMLSEC_TRUE@libxmltooling_la_LDFLAGS = $(XMLSEC_LIBS) -version-info 6:3:0 EXTRA_DIST = \ xmltooling.vcxproj \ xmltooling-lite.vcxproj \ xmltooling.vcxproj.filters \ xmltooling-lite.vcxproj.filters \ config_pub.h.in \ config_pub_win32.h\ resource.h\ xmltooling.rc \ util/Win32Threads.cpp all: config_pub.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign xmltooling/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign xmltooling/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): config_pub.h: stamp-h2 @if test ! -f $@; then rm -f stamp-h2; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h2; else :; fi stamp-h2: $(srcdir)/config_pub.h.in $(top_builddir)/config.status @rm -f stamp-h2 cd $(top_builddir) && $(SHELL) ./config.status xmltooling/config_pub.h distclean-hdr: -rm -f config_pub.h stamp-h2 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libxmltooling-lite.la: $(libxmltooling_lite_la_OBJECTS) $(libxmltooling_lite_la_DEPENDENCIES) $(EXTRA_libxmltooling_lite_la_DEPENDENCIES) $(libxmltooling_lite_la_LINK) $(am_libxmltooling_lite_la_rpath) $(libxmltooling_lite_la_OBJECTS) $(libxmltooling_lite_la_LIBADD) $(LIBS) libxmltooling.la: $(libxmltooling_la_OBJECTS) $(libxmltooling_la_DEPENDENCIES) $(EXTRA_libxmltooling_la_DEPENDENCIES) $(libxmltooling_la_LINK) $(am_libxmltooling_la_rpath) $(libxmltooling_la_OBJECTS) $(libxmltooling_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AbstractAttributeExtensibleXMLObject.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AbstractComplexElement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AbstractDOMCachingXMLObject.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AbstractPKIXTrustEngine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AbstractSimpleElement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AbstractXMLObject.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AbstractXMLObjectMarshaller.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AbstractXMLObjectUnmarshaller.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AnyElement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BasicX509Credential.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CURLSOAPTransport.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ChainingCredentialResolver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ChainingTrustEngine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CredentialCriteria.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CredentialResolver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CurlURLInputStream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DateTime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Decrypter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DummyCredentialResolver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EncryptedKeyResolver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Encrypter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EncryptionImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EncryptionSchemaValidators.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ExplicitKeyTrustEngine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FilesystemCredentialResolver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTTPRequest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTTPResponse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InlineKeyResolver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/KeyInfoImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/KeyInfoResolver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/KeyInfoSchemaValidators.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Lockable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MemoryStorageService.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NDC.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Namespace.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OpenSSLCryptoX509CRL.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PKIXPathValidator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PThreads.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ParserPool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PathResolver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QName.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ReloadableXMLFile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ReplayCache.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SOAPClient.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SOAPImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SOAPSchemaValidators.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SecurityHelper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SignatureValidator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StaticPKIXTrustEngine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StorageService.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TemplateEngine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TrustEngine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/URLEncoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UnknownElement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ValidatorSuite.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XMLConstants.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XMLHelper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XMLObjectBuilder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XMLSecSignatureImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XMLToolingConfig.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XSECCryptoX509CRL.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exceptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-AbstractAttributeExtensibleXMLObject.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-AbstractComplexElement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-AbstractDOMCachingXMLObject.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-AbstractSimpleElement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-AbstractXMLObject.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-AbstractXMLObjectMarshaller.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-AbstractXMLObjectUnmarshaller.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-AnyElement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-DateTime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-HTTPRequest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-HTTPResponse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-Lockable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-NDC.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-Namespace.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-PThreads.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-ParserPool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-PathResolver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-QName.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-ReloadableXMLFile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-SOAPClient.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-SOAPImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-SOAPSchemaValidators.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-TemplateEngine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-URLEncoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-UnknownElement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-ValidatorSuite.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-XMLConstants.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-XMLHelper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-XMLObjectBuilder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-XMLToolingConfig.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-exceptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-unicode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxmltooling_lite_la-version.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< libxmltooling_lite_la-AbstractAttributeExtensibleXMLObject.lo: AbstractAttributeExtensibleXMLObject.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-AbstractAttributeExtensibleXMLObject.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-AbstractAttributeExtensibleXMLObject.Tpo -c -o libxmltooling_lite_la-AbstractAttributeExtensibleXMLObject.lo `test -f 'AbstractAttributeExtensibleXMLObject.cpp' || echo '$(srcdir)/'`AbstractAttributeExtensibleXMLObject.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-AbstractAttributeExtensibleXMLObject.Tpo $(DEPDIR)/libxmltooling_lite_la-AbstractAttributeExtensibleXMLObject.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='AbstractAttributeExtensibleXMLObject.cpp' object='libxmltooling_lite_la-AbstractAttributeExtensibleXMLObject.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-AbstractAttributeExtensibleXMLObject.lo `test -f 'AbstractAttributeExtensibleXMLObject.cpp' || echo '$(srcdir)/'`AbstractAttributeExtensibleXMLObject.cpp libxmltooling_lite_la-AbstractComplexElement.lo: AbstractComplexElement.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-AbstractComplexElement.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-AbstractComplexElement.Tpo -c -o libxmltooling_lite_la-AbstractComplexElement.lo `test -f 'AbstractComplexElement.cpp' || echo '$(srcdir)/'`AbstractComplexElement.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-AbstractComplexElement.Tpo $(DEPDIR)/libxmltooling_lite_la-AbstractComplexElement.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='AbstractComplexElement.cpp' object='libxmltooling_lite_la-AbstractComplexElement.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-AbstractComplexElement.lo `test -f 'AbstractComplexElement.cpp' || echo '$(srcdir)/'`AbstractComplexElement.cpp libxmltooling_lite_la-AbstractDOMCachingXMLObject.lo: AbstractDOMCachingXMLObject.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-AbstractDOMCachingXMLObject.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-AbstractDOMCachingXMLObject.Tpo -c -o libxmltooling_lite_la-AbstractDOMCachingXMLObject.lo `test -f 'AbstractDOMCachingXMLObject.cpp' || echo '$(srcdir)/'`AbstractDOMCachingXMLObject.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-AbstractDOMCachingXMLObject.Tpo $(DEPDIR)/libxmltooling_lite_la-AbstractDOMCachingXMLObject.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='AbstractDOMCachingXMLObject.cpp' object='libxmltooling_lite_la-AbstractDOMCachingXMLObject.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-AbstractDOMCachingXMLObject.lo `test -f 'AbstractDOMCachingXMLObject.cpp' || echo '$(srcdir)/'`AbstractDOMCachingXMLObject.cpp libxmltooling_lite_la-AbstractSimpleElement.lo: AbstractSimpleElement.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-AbstractSimpleElement.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-AbstractSimpleElement.Tpo -c -o libxmltooling_lite_la-AbstractSimpleElement.lo `test -f 'AbstractSimpleElement.cpp' || echo '$(srcdir)/'`AbstractSimpleElement.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-AbstractSimpleElement.Tpo $(DEPDIR)/libxmltooling_lite_la-AbstractSimpleElement.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='AbstractSimpleElement.cpp' object='libxmltooling_lite_la-AbstractSimpleElement.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-AbstractSimpleElement.lo `test -f 'AbstractSimpleElement.cpp' || echo '$(srcdir)/'`AbstractSimpleElement.cpp libxmltooling_lite_la-AbstractXMLObject.lo: AbstractXMLObject.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-AbstractXMLObject.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-AbstractXMLObject.Tpo -c -o libxmltooling_lite_la-AbstractXMLObject.lo `test -f 'AbstractXMLObject.cpp' || echo '$(srcdir)/'`AbstractXMLObject.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-AbstractXMLObject.Tpo $(DEPDIR)/libxmltooling_lite_la-AbstractXMLObject.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='AbstractXMLObject.cpp' object='libxmltooling_lite_la-AbstractXMLObject.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-AbstractXMLObject.lo `test -f 'AbstractXMLObject.cpp' || echo '$(srcdir)/'`AbstractXMLObject.cpp libxmltooling_lite_la-exceptions.lo: exceptions.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-exceptions.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-exceptions.Tpo -c -o libxmltooling_lite_la-exceptions.lo `test -f 'exceptions.cpp' || echo '$(srcdir)/'`exceptions.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-exceptions.Tpo $(DEPDIR)/libxmltooling_lite_la-exceptions.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='exceptions.cpp' object='libxmltooling_lite_la-exceptions.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-exceptions.lo `test -f 'exceptions.cpp' || echo '$(srcdir)/'`exceptions.cpp libxmltooling_lite_la-Lockable.lo: Lockable.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-Lockable.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-Lockable.Tpo -c -o libxmltooling_lite_la-Lockable.lo `test -f 'Lockable.cpp' || echo '$(srcdir)/'`Lockable.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-Lockable.Tpo $(DEPDIR)/libxmltooling_lite_la-Lockable.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Lockable.cpp' object='libxmltooling_lite_la-Lockable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-Lockable.lo `test -f 'Lockable.cpp' || echo '$(srcdir)/'`Lockable.cpp libxmltooling_lite_la-Namespace.lo: Namespace.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-Namespace.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-Namespace.Tpo -c -o libxmltooling_lite_la-Namespace.lo `test -f 'Namespace.cpp' || echo '$(srcdir)/'`Namespace.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-Namespace.Tpo $(DEPDIR)/libxmltooling_lite_la-Namespace.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Namespace.cpp' object='libxmltooling_lite_la-Namespace.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-Namespace.lo `test -f 'Namespace.cpp' || echo '$(srcdir)/'`Namespace.cpp libxmltooling_lite_la-QName.lo: QName.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-QName.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-QName.Tpo -c -o libxmltooling_lite_la-QName.lo `test -f 'QName.cpp' || echo '$(srcdir)/'`QName.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-QName.Tpo $(DEPDIR)/libxmltooling_lite_la-QName.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='QName.cpp' object='libxmltooling_lite_la-QName.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-QName.lo `test -f 'QName.cpp' || echo '$(srcdir)/'`QName.cpp libxmltooling_lite_la-unicode.lo: unicode.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-unicode.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-unicode.Tpo -c -o libxmltooling_lite_la-unicode.lo `test -f 'unicode.cpp' || echo '$(srcdir)/'`unicode.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-unicode.Tpo $(DEPDIR)/libxmltooling_lite_la-unicode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='unicode.cpp' object='libxmltooling_lite_la-unicode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-unicode.lo `test -f 'unicode.cpp' || echo '$(srcdir)/'`unicode.cpp libxmltooling_lite_la-version.lo: version.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-version.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-version.Tpo -c -o libxmltooling_lite_la-version.lo `test -f 'version.cpp' || echo '$(srcdir)/'`version.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-version.Tpo $(DEPDIR)/libxmltooling_lite_la-version.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='version.cpp' object='libxmltooling_lite_la-version.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-version.lo `test -f 'version.cpp' || echo '$(srcdir)/'`version.cpp libxmltooling_lite_la-XMLObjectBuilder.lo: XMLObjectBuilder.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-XMLObjectBuilder.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-XMLObjectBuilder.Tpo -c -o libxmltooling_lite_la-XMLObjectBuilder.lo `test -f 'XMLObjectBuilder.cpp' || echo '$(srcdir)/'`XMLObjectBuilder.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-XMLObjectBuilder.Tpo $(DEPDIR)/libxmltooling_lite_la-XMLObjectBuilder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='XMLObjectBuilder.cpp' object='libxmltooling_lite_la-XMLObjectBuilder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-XMLObjectBuilder.lo `test -f 'XMLObjectBuilder.cpp' || echo '$(srcdir)/'`XMLObjectBuilder.cpp libxmltooling_lite_la-XMLToolingConfig.lo: XMLToolingConfig.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-XMLToolingConfig.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-XMLToolingConfig.Tpo -c -o libxmltooling_lite_la-XMLToolingConfig.lo `test -f 'XMLToolingConfig.cpp' || echo '$(srcdir)/'`XMLToolingConfig.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-XMLToolingConfig.Tpo $(DEPDIR)/libxmltooling_lite_la-XMLToolingConfig.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='XMLToolingConfig.cpp' object='libxmltooling_lite_la-XMLToolingConfig.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-XMLToolingConfig.lo `test -f 'XMLToolingConfig.cpp' || echo '$(srcdir)/'`XMLToolingConfig.cpp libxmltooling_lite_la-AnyElement.lo: impl/AnyElement.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-AnyElement.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-AnyElement.Tpo -c -o libxmltooling_lite_la-AnyElement.lo `test -f 'impl/AnyElement.cpp' || echo '$(srcdir)/'`impl/AnyElement.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-AnyElement.Tpo $(DEPDIR)/libxmltooling_lite_la-AnyElement.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='impl/AnyElement.cpp' object='libxmltooling_lite_la-AnyElement.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-AnyElement.lo `test -f 'impl/AnyElement.cpp' || echo '$(srcdir)/'`impl/AnyElement.cpp libxmltooling_lite_la-UnknownElement.lo: impl/UnknownElement.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-UnknownElement.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-UnknownElement.Tpo -c -o libxmltooling_lite_la-UnknownElement.lo `test -f 'impl/UnknownElement.cpp' || echo '$(srcdir)/'`impl/UnknownElement.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-UnknownElement.Tpo $(DEPDIR)/libxmltooling_lite_la-UnknownElement.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='impl/UnknownElement.cpp' object='libxmltooling_lite_la-UnknownElement.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-UnknownElement.lo `test -f 'impl/UnknownElement.cpp' || echo '$(srcdir)/'`impl/UnknownElement.cpp libxmltooling_lite_la-AbstractXMLObjectMarshaller.lo: io/AbstractXMLObjectMarshaller.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-AbstractXMLObjectMarshaller.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-AbstractXMLObjectMarshaller.Tpo -c -o libxmltooling_lite_la-AbstractXMLObjectMarshaller.lo `test -f 'io/AbstractXMLObjectMarshaller.cpp' || echo '$(srcdir)/'`io/AbstractXMLObjectMarshaller.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-AbstractXMLObjectMarshaller.Tpo $(DEPDIR)/libxmltooling_lite_la-AbstractXMLObjectMarshaller.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='io/AbstractXMLObjectMarshaller.cpp' object='libxmltooling_lite_la-AbstractXMLObjectMarshaller.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-AbstractXMLObjectMarshaller.lo `test -f 'io/AbstractXMLObjectMarshaller.cpp' || echo '$(srcdir)/'`io/AbstractXMLObjectMarshaller.cpp libxmltooling_lite_la-AbstractXMLObjectUnmarshaller.lo: io/AbstractXMLObjectUnmarshaller.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-AbstractXMLObjectUnmarshaller.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-AbstractXMLObjectUnmarshaller.Tpo -c -o libxmltooling_lite_la-AbstractXMLObjectUnmarshaller.lo `test -f 'io/AbstractXMLObjectUnmarshaller.cpp' || echo '$(srcdir)/'`io/AbstractXMLObjectUnmarshaller.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-AbstractXMLObjectUnmarshaller.Tpo $(DEPDIR)/libxmltooling_lite_la-AbstractXMLObjectUnmarshaller.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='io/AbstractXMLObjectUnmarshaller.cpp' object='libxmltooling_lite_la-AbstractXMLObjectUnmarshaller.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-AbstractXMLObjectUnmarshaller.lo `test -f 'io/AbstractXMLObjectUnmarshaller.cpp' || echo '$(srcdir)/'`io/AbstractXMLObjectUnmarshaller.cpp libxmltooling_lite_la-HTTPRequest.lo: io/HTTPRequest.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-HTTPRequest.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-HTTPRequest.Tpo -c -o libxmltooling_lite_la-HTTPRequest.lo `test -f 'io/HTTPRequest.cpp' || echo '$(srcdir)/'`io/HTTPRequest.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-HTTPRequest.Tpo $(DEPDIR)/libxmltooling_lite_la-HTTPRequest.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='io/HTTPRequest.cpp' object='libxmltooling_lite_la-HTTPRequest.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-HTTPRequest.lo `test -f 'io/HTTPRequest.cpp' || echo '$(srcdir)/'`io/HTTPRequest.cpp libxmltooling_lite_la-HTTPResponse.lo: io/HTTPResponse.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-HTTPResponse.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-HTTPResponse.Tpo -c -o libxmltooling_lite_la-HTTPResponse.lo `test -f 'io/HTTPResponse.cpp' || echo '$(srcdir)/'`io/HTTPResponse.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-HTTPResponse.Tpo $(DEPDIR)/libxmltooling_lite_la-HTTPResponse.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='io/HTTPResponse.cpp' object='libxmltooling_lite_la-HTTPResponse.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-HTTPResponse.lo `test -f 'io/HTTPResponse.cpp' || echo '$(srcdir)/'`io/HTTPResponse.cpp libxmltooling_lite_la-SOAPClient.lo: soap/impl/SOAPClient.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-SOAPClient.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-SOAPClient.Tpo -c -o libxmltooling_lite_la-SOAPClient.lo `test -f 'soap/impl/SOAPClient.cpp' || echo '$(srcdir)/'`soap/impl/SOAPClient.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-SOAPClient.Tpo $(DEPDIR)/libxmltooling_lite_la-SOAPClient.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='soap/impl/SOAPClient.cpp' object='libxmltooling_lite_la-SOAPClient.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-SOAPClient.lo `test -f 'soap/impl/SOAPClient.cpp' || echo '$(srcdir)/'`soap/impl/SOAPClient.cpp libxmltooling_lite_la-SOAPImpl.lo: soap/impl/SOAPImpl.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-SOAPImpl.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-SOAPImpl.Tpo -c -o libxmltooling_lite_la-SOAPImpl.lo `test -f 'soap/impl/SOAPImpl.cpp' || echo '$(srcdir)/'`soap/impl/SOAPImpl.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-SOAPImpl.Tpo $(DEPDIR)/libxmltooling_lite_la-SOAPImpl.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='soap/impl/SOAPImpl.cpp' object='libxmltooling_lite_la-SOAPImpl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-SOAPImpl.lo `test -f 'soap/impl/SOAPImpl.cpp' || echo '$(srcdir)/'`soap/impl/SOAPImpl.cpp libxmltooling_lite_la-SOAPSchemaValidators.lo: soap/impl/SOAPSchemaValidators.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-SOAPSchemaValidators.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-SOAPSchemaValidators.Tpo -c -o libxmltooling_lite_la-SOAPSchemaValidators.lo `test -f 'soap/impl/SOAPSchemaValidators.cpp' || echo '$(srcdir)/'`soap/impl/SOAPSchemaValidators.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-SOAPSchemaValidators.Tpo $(DEPDIR)/libxmltooling_lite_la-SOAPSchemaValidators.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='soap/impl/SOAPSchemaValidators.cpp' object='libxmltooling_lite_la-SOAPSchemaValidators.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-SOAPSchemaValidators.lo `test -f 'soap/impl/SOAPSchemaValidators.cpp' || echo '$(srcdir)/'`soap/impl/SOAPSchemaValidators.cpp libxmltooling_lite_la-DateTime.lo: util/DateTime.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-DateTime.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-DateTime.Tpo -c -o libxmltooling_lite_la-DateTime.lo `test -f 'util/DateTime.cpp' || echo '$(srcdir)/'`util/DateTime.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-DateTime.Tpo $(DEPDIR)/libxmltooling_lite_la-DateTime.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/DateTime.cpp' object='libxmltooling_lite_la-DateTime.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-DateTime.lo `test -f 'util/DateTime.cpp' || echo '$(srcdir)/'`util/DateTime.cpp libxmltooling_lite_la-NDC.lo: util/NDC.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-NDC.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-NDC.Tpo -c -o libxmltooling_lite_la-NDC.lo `test -f 'util/NDC.cpp' || echo '$(srcdir)/'`util/NDC.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-NDC.Tpo $(DEPDIR)/libxmltooling_lite_la-NDC.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/NDC.cpp' object='libxmltooling_lite_la-NDC.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-NDC.lo `test -f 'util/NDC.cpp' || echo '$(srcdir)/'`util/NDC.cpp libxmltooling_lite_la-ParserPool.lo: util/ParserPool.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-ParserPool.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-ParserPool.Tpo -c -o libxmltooling_lite_la-ParserPool.lo `test -f 'util/ParserPool.cpp' || echo '$(srcdir)/'`util/ParserPool.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-ParserPool.Tpo $(DEPDIR)/libxmltooling_lite_la-ParserPool.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/ParserPool.cpp' object='libxmltooling_lite_la-ParserPool.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-ParserPool.lo `test -f 'util/ParserPool.cpp' || echo '$(srcdir)/'`util/ParserPool.cpp libxmltooling_lite_la-PathResolver.lo: util/PathResolver.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-PathResolver.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-PathResolver.Tpo -c -o libxmltooling_lite_la-PathResolver.lo `test -f 'util/PathResolver.cpp' || echo '$(srcdir)/'`util/PathResolver.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-PathResolver.Tpo $(DEPDIR)/libxmltooling_lite_la-PathResolver.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/PathResolver.cpp' object='libxmltooling_lite_la-PathResolver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-PathResolver.lo `test -f 'util/PathResolver.cpp' || echo '$(srcdir)/'`util/PathResolver.cpp libxmltooling_lite_la-ReloadableXMLFile.lo: util/ReloadableXMLFile.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-ReloadableXMLFile.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-ReloadableXMLFile.Tpo -c -o libxmltooling_lite_la-ReloadableXMLFile.lo `test -f 'util/ReloadableXMLFile.cpp' || echo '$(srcdir)/'`util/ReloadableXMLFile.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-ReloadableXMLFile.Tpo $(DEPDIR)/libxmltooling_lite_la-ReloadableXMLFile.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/ReloadableXMLFile.cpp' object='libxmltooling_lite_la-ReloadableXMLFile.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-ReloadableXMLFile.lo `test -f 'util/ReloadableXMLFile.cpp' || echo '$(srcdir)/'`util/ReloadableXMLFile.cpp libxmltooling_lite_la-TemplateEngine.lo: util/TemplateEngine.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-TemplateEngine.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-TemplateEngine.Tpo -c -o libxmltooling_lite_la-TemplateEngine.lo `test -f 'util/TemplateEngine.cpp' || echo '$(srcdir)/'`util/TemplateEngine.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-TemplateEngine.Tpo $(DEPDIR)/libxmltooling_lite_la-TemplateEngine.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/TemplateEngine.cpp' object='libxmltooling_lite_la-TemplateEngine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-TemplateEngine.lo `test -f 'util/TemplateEngine.cpp' || echo '$(srcdir)/'`util/TemplateEngine.cpp libxmltooling_lite_la-URLEncoder.lo: util/URLEncoder.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-URLEncoder.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-URLEncoder.Tpo -c -o libxmltooling_lite_la-URLEncoder.lo `test -f 'util/URLEncoder.cpp' || echo '$(srcdir)/'`util/URLEncoder.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-URLEncoder.Tpo $(DEPDIR)/libxmltooling_lite_la-URLEncoder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/URLEncoder.cpp' object='libxmltooling_lite_la-URLEncoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-URLEncoder.lo `test -f 'util/URLEncoder.cpp' || echo '$(srcdir)/'`util/URLEncoder.cpp libxmltooling_lite_la-XMLConstants.lo: util/XMLConstants.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-XMLConstants.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-XMLConstants.Tpo -c -o libxmltooling_lite_la-XMLConstants.lo `test -f 'util/XMLConstants.cpp' || echo '$(srcdir)/'`util/XMLConstants.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-XMLConstants.Tpo $(DEPDIR)/libxmltooling_lite_la-XMLConstants.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/XMLConstants.cpp' object='libxmltooling_lite_la-XMLConstants.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-XMLConstants.lo `test -f 'util/XMLConstants.cpp' || echo '$(srcdir)/'`util/XMLConstants.cpp libxmltooling_lite_la-XMLHelper.lo: util/XMLHelper.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-XMLHelper.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-XMLHelper.Tpo -c -o libxmltooling_lite_la-XMLHelper.lo `test -f 'util/XMLHelper.cpp' || echo '$(srcdir)/'`util/XMLHelper.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-XMLHelper.Tpo $(DEPDIR)/libxmltooling_lite_la-XMLHelper.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/XMLHelper.cpp' object='libxmltooling_lite_la-XMLHelper.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-XMLHelper.lo `test -f 'util/XMLHelper.cpp' || echo '$(srcdir)/'`util/XMLHelper.cpp libxmltooling_lite_la-ValidatorSuite.lo: validation/ValidatorSuite.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-ValidatorSuite.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-ValidatorSuite.Tpo -c -o libxmltooling_lite_la-ValidatorSuite.lo `test -f 'validation/ValidatorSuite.cpp' || echo '$(srcdir)/'`validation/ValidatorSuite.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-ValidatorSuite.Tpo $(DEPDIR)/libxmltooling_lite_la-ValidatorSuite.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='validation/ValidatorSuite.cpp' object='libxmltooling_lite_la-ValidatorSuite.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-ValidatorSuite.lo `test -f 'validation/ValidatorSuite.cpp' || echo '$(srcdir)/'`validation/ValidatorSuite.cpp libxmltooling_lite_la-PThreads.lo: util/PThreads.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libxmltooling_lite_la-PThreads.lo -MD -MP -MF $(DEPDIR)/libxmltooling_lite_la-PThreads.Tpo -c -o libxmltooling_lite_la-PThreads.lo `test -f 'util/PThreads.cpp' || echo '$(srcdir)/'`util/PThreads.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libxmltooling_lite_la-PThreads.Tpo $(DEPDIR)/libxmltooling_lite_la-PThreads.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/PThreads.cpp' object='libxmltooling_lite_la-PThreads.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libxmltooling_lite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libxmltooling_lite_la-PThreads.lo `test -f 'util/PThreads.cpp' || echo '$(srcdir)/'`util/PThreads.cpp AnyElement.lo: impl/AnyElement.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT AnyElement.lo -MD -MP -MF $(DEPDIR)/AnyElement.Tpo -c -o AnyElement.lo `test -f 'impl/AnyElement.cpp' || echo '$(srcdir)/'`impl/AnyElement.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/AnyElement.Tpo $(DEPDIR)/AnyElement.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='impl/AnyElement.cpp' object='AnyElement.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o AnyElement.lo `test -f 'impl/AnyElement.cpp' || echo '$(srcdir)/'`impl/AnyElement.cpp UnknownElement.lo: impl/UnknownElement.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT UnknownElement.lo -MD -MP -MF $(DEPDIR)/UnknownElement.Tpo -c -o UnknownElement.lo `test -f 'impl/UnknownElement.cpp' || echo '$(srcdir)/'`impl/UnknownElement.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/UnknownElement.Tpo $(DEPDIR)/UnknownElement.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='impl/UnknownElement.cpp' object='UnknownElement.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o UnknownElement.lo `test -f 'impl/UnknownElement.cpp' || echo '$(srcdir)/'`impl/UnknownElement.cpp AbstractXMLObjectMarshaller.lo: io/AbstractXMLObjectMarshaller.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT AbstractXMLObjectMarshaller.lo -MD -MP -MF $(DEPDIR)/AbstractXMLObjectMarshaller.Tpo -c -o AbstractXMLObjectMarshaller.lo `test -f 'io/AbstractXMLObjectMarshaller.cpp' || echo '$(srcdir)/'`io/AbstractXMLObjectMarshaller.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/AbstractXMLObjectMarshaller.Tpo $(DEPDIR)/AbstractXMLObjectMarshaller.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='io/AbstractXMLObjectMarshaller.cpp' object='AbstractXMLObjectMarshaller.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o AbstractXMLObjectMarshaller.lo `test -f 'io/AbstractXMLObjectMarshaller.cpp' || echo '$(srcdir)/'`io/AbstractXMLObjectMarshaller.cpp AbstractXMLObjectUnmarshaller.lo: io/AbstractXMLObjectUnmarshaller.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT AbstractXMLObjectUnmarshaller.lo -MD -MP -MF $(DEPDIR)/AbstractXMLObjectUnmarshaller.Tpo -c -o AbstractXMLObjectUnmarshaller.lo `test -f 'io/AbstractXMLObjectUnmarshaller.cpp' || echo '$(srcdir)/'`io/AbstractXMLObjectUnmarshaller.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/AbstractXMLObjectUnmarshaller.Tpo $(DEPDIR)/AbstractXMLObjectUnmarshaller.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='io/AbstractXMLObjectUnmarshaller.cpp' object='AbstractXMLObjectUnmarshaller.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o AbstractXMLObjectUnmarshaller.lo `test -f 'io/AbstractXMLObjectUnmarshaller.cpp' || echo '$(srcdir)/'`io/AbstractXMLObjectUnmarshaller.cpp HTTPRequest.lo: io/HTTPRequest.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HTTPRequest.lo -MD -MP -MF $(DEPDIR)/HTTPRequest.Tpo -c -o HTTPRequest.lo `test -f 'io/HTTPRequest.cpp' || echo '$(srcdir)/'`io/HTTPRequest.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/HTTPRequest.Tpo $(DEPDIR)/HTTPRequest.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='io/HTTPRequest.cpp' object='HTTPRequest.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HTTPRequest.lo `test -f 'io/HTTPRequest.cpp' || echo '$(srcdir)/'`io/HTTPRequest.cpp HTTPResponse.lo: io/HTTPResponse.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HTTPResponse.lo -MD -MP -MF $(DEPDIR)/HTTPResponse.Tpo -c -o HTTPResponse.lo `test -f 'io/HTTPResponse.cpp' || echo '$(srcdir)/'`io/HTTPResponse.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/HTTPResponse.Tpo $(DEPDIR)/HTTPResponse.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='io/HTTPResponse.cpp' object='HTTPResponse.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HTTPResponse.lo `test -f 'io/HTTPResponse.cpp' || echo '$(srcdir)/'`io/HTTPResponse.cpp SOAPClient.lo: soap/impl/SOAPClient.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SOAPClient.lo -MD -MP -MF $(DEPDIR)/SOAPClient.Tpo -c -o SOAPClient.lo `test -f 'soap/impl/SOAPClient.cpp' || echo '$(srcdir)/'`soap/impl/SOAPClient.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/SOAPClient.Tpo $(DEPDIR)/SOAPClient.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='soap/impl/SOAPClient.cpp' object='SOAPClient.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SOAPClient.lo `test -f 'soap/impl/SOAPClient.cpp' || echo '$(srcdir)/'`soap/impl/SOAPClient.cpp SOAPImpl.lo: soap/impl/SOAPImpl.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SOAPImpl.lo -MD -MP -MF $(DEPDIR)/SOAPImpl.Tpo -c -o SOAPImpl.lo `test -f 'soap/impl/SOAPImpl.cpp' || echo '$(srcdir)/'`soap/impl/SOAPImpl.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/SOAPImpl.Tpo $(DEPDIR)/SOAPImpl.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='soap/impl/SOAPImpl.cpp' object='SOAPImpl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SOAPImpl.lo `test -f 'soap/impl/SOAPImpl.cpp' || echo '$(srcdir)/'`soap/impl/SOAPImpl.cpp SOAPSchemaValidators.lo: soap/impl/SOAPSchemaValidators.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SOAPSchemaValidators.lo -MD -MP -MF $(DEPDIR)/SOAPSchemaValidators.Tpo -c -o SOAPSchemaValidators.lo `test -f 'soap/impl/SOAPSchemaValidators.cpp' || echo '$(srcdir)/'`soap/impl/SOAPSchemaValidators.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/SOAPSchemaValidators.Tpo $(DEPDIR)/SOAPSchemaValidators.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='soap/impl/SOAPSchemaValidators.cpp' object='SOAPSchemaValidators.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SOAPSchemaValidators.lo `test -f 'soap/impl/SOAPSchemaValidators.cpp' || echo '$(srcdir)/'`soap/impl/SOAPSchemaValidators.cpp DateTime.lo: util/DateTime.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT DateTime.lo -MD -MP -MF $(DEPDIR)/DateTime.Tpo -c -o DateTime.lo `test -f 'util/DateTime.cpp' || echo '$(srcdir)/'`util/DateTime.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/DateTime.Tpo $(DEPDIR)/DateTime.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/DateTime.cpp' object='DateTime.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o DateTime.lo `test -f 'util/DateTime.cpp' || echo '$(srcdir)/'`util/DateTime.cpp NDC.lo: util/NDC.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT NDC.lo -MD -MP -MF $(DEPDIR)/NDC.Tpo -c -o NDC.lo `test -f 'util/NDC.cpp' || echo '$(srcdir)/'`util/NDC.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/NDC.Tpo $(DEPDIR)/NDC.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/NDC.cpp' object='NDC.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o NDC.lo `test -f 'util/NDC.cpp' || echo '$(srcdir)/'`util/NDC.cpp ParserPool.lo: util/ParserPool.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ParserPool.lo -MD -MP -MF $(DEPDIR)/ParserPool.Tpo -c -o ParserPool.lo `test -f 'util/ParserPool.cpp' || echo '$(srcdir)/'`util/ParserPool.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/ParserPool.Tpo $(DEPDIR)/ParserPool.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/ParserPool.cpp' object='ParserPool.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ParserPool.lo `test -f 'util/ParserPool.cpp' || echo '$(srcdir)/'`util/ParserPool.cpp PathResolver.lo: util/PathResolver.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PathResolver.lo -MD -MP -MF $(DEPDIR)/PathResolver.Tpo -c -o PathResolver.lo `test -f 'util/PathResolver.cpp' || echo '$(srcdir)/'`util/PathResolver.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PathResolver.Tpo $(DEPDIR)/PathResolver.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/PathResolver.cpp' object='PathResolver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PathResolver.lo `test -f 'util/PathResolver.cpp' || echo '$(srcdir)/'`util/PathResolver.cpp ReloadableXMLFile.lo: util/ReloadableXMLFile.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ReloadableXMLFile.lo -MD -MP -MF $(DEPDIR)/ReloadableXMLFile.Tpo -c -o ReloadableXMLFile.lo `test -f 'util/ReloadableXMLFile.cpp' || echo '$(srcdir)/'`util/ReloadableXMLFile.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/ReloadableXMLFile.Tpo $(DEPDIR)/ReloadableXMLFile.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/ReloadableXMLFile.cpp' object='ReloadableXMLFile.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ReloadableXMLFile.lo `test -f 'util/ReloadableXMLFile.cpp' || echo '$(srcdir)/'`util/ReloadableXMLFile.cpp TemplateEngine.lo: util/TemplateEngine.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT TemplateEngine.lo -MD -MP -MF $(DEPDIR)/TemplateEngine.Tpo -c -o TemplateEngine.lo `test -f 'util/TemplateEngine.cpp' || echo '$(srcdir)/'`util/TemplateEngine.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/TemplateEngine.Tpo $(DEPDIR)/TemplateEngine.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/TemplateEngine.cpp' object='TemplateEngine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o TemplateEngine.lo `test -f 'util/TemplateEngine.cpp' || echo '$(srcdir)/'`util/TemplateEngine.cpp URLEncoder.lo: util/URLEncoder.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT URLEncoder.lo -MD -MP -MF $(DEPDIR)/URLEncoder.Tpo -c -o URLEncoder.lo `test -f 'util/URLEncoder.cpp' || echo '$(srcdir)/'`util/URLEncoder.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/URLEncoder.Tpo $(DEPDIR)/URLEncoder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/URLEncoder.cpp' object='URLEncoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o URLEncoder.lo `test -f 'util/URLEncoder.cpp' || echo '$(srcdir)/'`util/URLEncoder.cpp XMLConstants.lo: util/XMLConstants.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT XMLConstants.lo -MD -MP -MF $(DEPDIR)/XMLConstants.Tpo -c -o XMLConstants.lo `test -f 'util/XMLConstants.cpp' || echo '$(srcdir)/'`util/XMLConstants.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/XMLConstants.Tpo $(DEPDIR)/XMLConstants.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/XMLConstants.cpp' object='XMLConstants.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o XMLConstants.lo `test -f 'util/XMLConstants.cpp' || echo '$(srcdir)/'`util/XMLConstants.cpp XMLHelper.lo: util/XMLHelper.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT XMLHelper.lo -MD -MP -MF $(DEPDIR)/XMLHelper.Tpo -c -o XMLHelper.lo `test -f 'util/XMLHelper.cpp' || echo '$(srcdir)/'`util/XMLHelper.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/XMLHelper.Tpo $(DEPDIR)/XMLHelper.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/XMLHelper.cpp' object='XMLHelper.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o XMLHelper.lo `test -f 'util/XMLHelper.cpp' || echo '$(srcdir)/'`util/XMLHelper.cpp ValidatorSuite.lo: validation/ValidatorSuite.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ValidatorSuite.lo -MD -MP -MF $(DEPDIR)/ValidatorSuite.Tpo -c -o ValidatorSuite.lo `test -f 'validation/ValidatorSuite.cpp' || echo '$(srcdir)/'`validation/ValidatorSuite.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/ValidatorSuite.Tpo $(DEPDIR)/ValidatorSuite.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='validation/ValidatorSuite.cpp' object='ValidatorSuite.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ValidatorSuite.lo `test -f 'validation/ValidatorSuite.cpp' || echo '$(srcdir)/'`validation/ValidatorSuite.cpp PThreads.lo: util/PThreads.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PThreads.lo -MD -MP -MF $(DEPDIR)/PThreads.Tpo -c -o PThreads.lo `test -f 'util/PThreads.cpp' || echo '$(srcdir)/'`util/PThreads.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PThreads.Tpo $(DEPDIR)/PThreads.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/PThreads.cpp' object='PThreads.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PThreads.lo `test -f 'util/PThreads.cpp' || echo '$(srcdir)/'`util/PThreads.cpp Decrypter.lo: encryption/impl/Decrypter.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Decrypter.lo -MD -MP -MF $(DEPDIR)/Decrypter.Tpo -c -o Decrypter.lo `test -f 'encryption/impl/Decrypter.cpp' || echo '$(srcdir)/'`encryption/impl/Decrypter.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Decrypter.Tpo $(DEPDIR)/Decrypter.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='encryption/impl/Decrypter.cpp' object='Decrypter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Decrypter.lo `test -f 'encryption/impl/Decrypter.cpp' || echo '$(srcdir)/'`encryption/impl/Decrypter.cpp EncryptedKeyResolver.lo: encryption/impl/EncryptedKeyResolver.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT EncryptedKeyResolver.lo -MD -MP -MF $(DEPDIR)/EncryptedKeyResolver.Tpo -c -o EncryptedKeyResolver.lo `test -f 'encryption/impl/EncryptedKeyResolver.cpp' || echo '$(srcdir)/'`encryption/impl/EncryptedKeyResolver.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/EncryptedKeyResolver.Tpo $(DEPDIR)/EncryptedKeyResolver.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='encryption/impl/EncryptedKeyResolver.cpp' object='EncryptedKeyResolver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o EncryptedKeyResolver.lo `test -f 'encryption/impl/EncryptedKeyResolver.cpp' || echo '$(srcdir)/'`encryption/impl/EncryptedKeyResolver.cpp Encrypter.lo: encryption/impl/Encrypter.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Encrypter.lo -MD -MP -MF $(DEPDIR)/Encrypter.Tpo -c -o Encrypter.lo `test -f 'encryption/impl/Encrypter.cpp' || echo '$(srcdir)/'`encryption/impl/Encrypter.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Encrypter.Tpo $(DEPDIR)/Encrypter.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='encryption/impl/Encrypter.cpp' object='Encrypter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Encrypter.lo `test -f 'encryption/impl/Encrypter.cpp' || echo '$(srcdir)/'`encryption/impl/Encrypter.cpp EncryptionImpl.lo: encryption/impl/EncryptionImpl.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT EncryptionImpl.lo -MD -MP -MF $(DEPDIR)/EncryptionImpl.Tpo -c -o EncryptionImpl.lo `test -f 'encryption/impl/EncryptionImpl.cpp' || echo '$(srcdir)/'`encryption/impl/EncryptionImpl.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/EncryptionImpl.Tpo $(DEPDIR)/EncryptionImpl.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='encryption/impl/EncryptionImpl.cpp' object='EncryptionImpl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o EncryptionImpl.lo `test -f 'encryption/impl/EncryptionImpl.cpp' || echo '$(srcdir)/'`encryption/impl/EncryptionImpl.cpp EncryptionSchemaValidators.lo: encryption/impl/EncryptionSchemaValidators.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT EncryptionSchemaValidators.lo -MD -MP -MF $(DEPDIR)/EncryptionSchemaValidators.Tpo -c -o EncryptionSchemaValidators.lo `test -f 'encryption/impl/EncryptionSchemaValidators.cpp' || echo '$(srcdir)/'`encryption/impl/EncryptionSchemaValidators.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/EncryptionSchemaValidators.Tpo $(DEPDIR)/EncryptionSchemaValidators.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='encryption/impl/EncryptionSchemaValidators.cpp' object='EncryptionSchemaValidators.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o EncryptionSchemaValidators.lo `test -f 'encryption/impl/EncryptionSchemaValidators.cpp' || echo '$(srcdir)/'`encryption/impl/EncryptionSchemaValidators.cpp MemoryStorageService.lo: impl/MemoryStorageService.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT MemoryStorageService.lo -MD -MP -MF $(DEPDIR)/MemoryStorageService.Tpo -c -o MemoryStorageService.lo `test -f 'impl/MemoryStorageService.cpp' || echo '$(srcdir)/'`impl/MemoryStorageService.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/MemoryStorageService.Tpo $(DEPDIR)/MemoryStorageService.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='impl/MemoryStorageService.cpp' object='MemoryStorageService.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o MemoryStorageService.lo `test -f 'impl/MemoryStorageService.cpp' || echo '$(srcdir)/'`impl/MemoryStorageService.cpp AbstractPKIXTrustEngine.lo: security/impl/AbstractPKIXTrustEngine.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT AbstractPKIXTrustEngine.lo -MD -MP -MF $(DEPDIR)/AbstractPKIXTrustEngine.Tpo -c -o AbstractPKIXTrustEngine.lo `test -f 'security/impl/AbstractPKIXTrustEngine.cpp' || echo '$(srcdir)/'`security/impl/AbstractPKIXTrustEngine.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/AbstractPKIXTrustEngine.Tpo $(DEPDIR)/AbstractPKIXTrustEngine.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='security/impl/AbstractPKIXTrustEngine.cpp' object='AbstractPKIXTrustEngine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o AbstractPKIXTrustEngine.lo `test -f 'security/impl/AbstractPKIXTrustEngine.cpp' || echo '$(srcdir)/'`security/impl/AbstractPKIXTrustEngine.cpp BasicX509Credential.lo: security/impl/BasicX509Credential.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT BasicX509Credential.lo -MD -MP -MF $(DEPDIR)/BasicX509Credential.Tpo -c -o BasicX509Credential.lo `test -f 'security/impl/BasicX509Credential.cpp' || echo '$(srcdir)/'`security/impl/BasicX509Credential.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/BasicX509Credential.Tpo $(DEPDIR)/BasicX509Credential.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='security/impl/BasicX509Credential.cpp' object='BasicX509Credential.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o BasicX509Credential.lo `test -f 'security/impl/BasicX509Credential.cpp' || echo '$(srcdir)/'`security/impl/BasicX509Credential.cpp ChainingCredentialResolver.lo: security/impl/ChainingCredentialResolver.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ChainingCredentialResolver.lo -MD -MP -MF $(DEPDIR)/ChainingCredentialResolver.Tpo -c -o ChainingCredentialResolver.lo `test -f 'security/impl/ChainingCredentialResolver.cpp' || echo '$(srcdir)/'`security/impl/ChainingCredentialResolver.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/ChainingCredentialResolver.Tpo $(DEPDIR)/ChainingCredentialResolver.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='security/impl/ChainingCredentialResolver.cpp' object='ChainingCredentialResolver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ChainingCredentialResolver.lo `test -f 'security/impl/ChainingCredentialResolver.cpp' || echo '$(srcdir)/'`security/impl/ChainingCredentialResolver.cpp ChainingTrustEngine.lo: security/impl/ChainingTrustEngine.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ChainingTrustEngine.lo -MD -MP -MF $(DEPDIR)/ChainingTrustEngine.Tpo -c -o ChainingTrustEngine.lo `test -f 'security/impl/ChainingTrustEngine.cpp' || echo '$(srcdir)/'`security/impl/ChainingTrustEngine.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/ChainingTrustEngine.Tpo $(DEPDIR)/ChainingTrustEngine.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='security/impl/ChainingTrustEngine.cpp' object='ChainingTrustEngine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ChainingTrustEngine.lo `test -f 'security/impl/ChainingTrustEngine.cpp' || echo '$(srcdir)/'`security/impl/ChainingTrustEngine.cpp CredentialCriteria.lo: security/impl/CredentialCriteria.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT CredentialCriteria.lo -MD -MP -MF $(DEPDIR)/CredentialCriteria.Tpo -c -o CredentialCriteria.lo `test -f 'security/impl/CredentialCriteria.cpp' || echo '$(srcdir)/'`security/impl/CredentialCriteria.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/CredentialCriteria.Tpo $(DEPDIR)/CredentialCriteria.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='security/impl/CredentialCriteria.cpp' object='CredentialCriteria.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o CredentialCriteria.lo `test -f 'security/impl/CredentialCriteria.cpp' || echo '$(srcdir)/'`security/impl/CredentialCriteria.cpp CredentialResolver.lo: security/impl/CredentialResolver.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT CredentialResolver.lo -MD -MP -MF $(DEPDIR)/CredentialResolver.Tpo -c -o CredentialResolver.lo `test -f 'security/impl/CredentialResolver.cpp' || echo '$(srcdir)/'`security/impl/CredentialResolver.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/CredentialResolver.Tpo $(DEPDIR)/CredentialResolver.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='security/impl/CredentialResolver.cpp' object='CredentialResolver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o CredentialResolver.lo `test -f 'security/impl/CredentialResolver.cpp' || echo '$(srcdir)/'`security/impl/CredentialResolver.cpp DummyCredentialResolver.lo: security/impl/DummyCredentialResolver.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT DummyCredentialResolver.lo -MD -MP -MF $(DEPDIR)/DummyCredentialResolver.Tpo -c -o DummyCredentialResolver.lo `test -f 'security/impl/DummyCredentialResolver.cpp' || echo '$(srcdir)/'`security/impl/DummyCredentialResolver.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/DummyCredentialResolver.Tpo $(DEPDIR)/DummyCredentialResolver.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='security/impl/DummyCredentialResolver.cpp' object='DummyCredentialResolver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o DummyCredentialResolver.lo `test -f 'security/impl/DummyCredentialResolver.cpp' || echo '$(srcdir)/'`security/impl/DummyCredentialResolver.cpp ExplicitKeyTrustEngine.lo: security/impl/ExplicitKeyTrustEngine.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ExplicitKeyTrustEngine.lo -MD -MP -MF $(DEPDIR)/ExplicitKeyTrustEngine.Tpo -c -o ExplicitKeyTrustEngine.lo `test -f 'security/impl/ExplicitKeyTrustEngine.cpp' || echo '$(srcdir)/'`security/impl/ExplicitKeyTrustEngine.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/ExplicitKeyTrustEngine.Tpo $(DEPDIR)/ExplicitKeyTrustEngine.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='security/impl/ExplicitKeyTrustEngine.cpp' object='ExplicitKeyTrustEngine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ExplicitKeyTrustEngine.lo `test -f 'security/impl/ExplicitKeyTrustEngine.cpp' || echo '$(srcdir)/'`security/impl/ExplicitKeyTrustEngine.cpp FilesystemCredentialResolver.lo: security/impl/FilesystemCredentialResolver.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FilesystemCredentialResolver.lo -MD -MP -MF $(DEPDIR)/FilesystemCredentialResolver.Tpo -c -o FilesystemCredentialResolver.lo `test -f 'security/impl/FilesystemCredentialResolver.cpp' || echo '$(srcdir)/'`security/impl/FilesystemCredentialResolver.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FilesystemCredentialResolver.Tpo $(DEPDIR)/FilesystemCredentialResolver.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='security/impl/FilesystemCredentialResolver.cpp' object='FilesystemCredentialResolver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FilesystemCredentialResolver.lo `test -f 'security/impl/FilesystemCredentialResolver.cpp' || echo '$(srcdir)/'`security/impl/FilesystemCredentialResolver.cpp InlineKeyResolver.lo: security/impl/InlineKeyResolver.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT InlineKeyResolver.lo -MD -MP -MF $(DEPDIR)/InlineKeyResolver.Tpo -c -o InlineKeyResolver.lo `test -f 'security/impl/InlineKeyResolver.cpp' || echo '$(srcdir)/'`security/impl/InlineKeyResolver.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/InlineKeyResolver.Tpo $(DEPDIR)/InlineKeyResolver.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='security/impl/InlineKeyResolver.cpp' object='InlineKeyResolver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o InlineKeyResolver.lo `test -f 'security/impl/InlineKeyResolver.cpp' || echo '$(srcdir)/'`security/impl/InlineKeyResolver.cpp KeyInfoResolver.lo: security/impl/KeyInfoResolver.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT KeyInfoResolver.lo -MD -MP -MF $(DEPDIR)/KeyInfoResolver.Tpo -c -o KeyInfoResolver.lo `test -f 'security/impl/KeyInfoResolver.cpp' || echo '$(srcdir)/'`security/impl/KeyInfoResolver.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/KeyInfoResolver.Tpo $(DEPDIR)/KeyInfoResolver.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='security/impl/KeyInfoResolver.cpp' object='KeyInfoResolver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o KeyInfoResolver.lo `test -f 'security/impl/KeyInfoResolver.cpp' || echo '$(srcdir)/'`security/impl/KeyInfoResolver.cpp OpenSSLCryptoX509CRL.lo: security/impl/OpenSSLCryptoX509CRL.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT OpenSSLCryptoX509CRL.lo -MD -MP -MF $(DEPDIR)/OpenSSLCryptoX509CRL.Tpo -c -o OpenSSLCryptoX509CRL.lo `test -f 'security/impl/OpenSSLCryptoX509CRL.cpp' || echo '$(srcdir)/'`security/impl/OpenSSLCryptoX509CRL.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/OpenSSLCryptoX509CRL.Tpo $(DEPDIR)/OpenSSLCryptoX509CRL.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='security/impl/OpenSSLCryptoX509CRL.cpp' object='OpenSSLCryptoX509CRL.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o OpenSSLCryptoX509CRL.lo `test -f 'security/impl/OpenSSLCryptoX509CRL.cpp' || echo '$(srcdir)/'`security/impl/OpenSSLCryptoX509CRL.cpp PKIXPathValidator.lo: security/impl/PKIXPathValidator.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PKIXPathValidator.lo -MD -MP -MF $(DEPDIR)/PKIXPathValidator.Tpo -c -o PKIXPathValidator.lo `test -f 'security/impl/PKIXPathValidator.cpp' || echo '$(srcdir)/'`security/impl/PKIXPathValidator.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PKIXPathValidator.Tpo $(DEPDIR)/PKIXPathValidator.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='security/impl/PKIXPathValidator.cpp' object='PKIXPathValidator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PKIXPathValidator.lo `test -f 'security/impl/PKIXPathValidator.cpp' || echo '$(srcdir)/'`security/impl/PKIXPathValidator.cpp SecurityHelper.lo: security/impl/SecurityHelper.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SecurityHelper.lo -MD -MP -MF $(DEPDIR)/SecurityHelper.Tpo -c -o SecurityHelper.lo `test -f 'security/impl/SecurityHelper.cpp' || echo '$(srcdir)/'`security/impl/SecurityHelper.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/SecurityHelper.Tpo $(DEPDIR)/SecurityHelper.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='security/impl/SecurityHelper.cpp' object='SecurityHelper.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SecurityHelper.lo `test -f 'security/impl/SecurityHelper.cpp' || echo '$(srcdir)/'`security/impl/SecurityHelper.cpp StaticPKIXTrustEngine.lo: security/impl/StaticPKIXTrustEngine.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT StaticPKIXTrustEngine.lo -MD -MP -MF $(DEPDIR)/StaticPKIXTrustEngine.Tpo -c -o StaticPKIXTrustEngine.lo `test -f 'security/impl/StaticPKIXTrustEngine.cpp' || echo '$(srcdir)/'`security/impl/StaticPKIXTrustEngine.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/StaticPKIXTrustEngine.Tpo $(DEPDIR)/StaticPKIXTrustEngine.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='security/impl/StaticPKIXTrustEngine.cpp' object='StaticPKIXTrustEngine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o StaticPKIXTrustEngine.lo `test -f 'security/impl/StaticPKIXTrustEngine.cpp' || echo '$(srcdir)/'`security/impl/StaticPKIXTrustEngine.cpp TrustEngine.lo: security/impl/TrustEngine.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT TrustEngine.lo -MD -MP -MF $(DEPDIR)/TrustEngine.Tpo -c -o TrustEngine.lo `test -f 'security/impl/TrustEngine.cpp' || echo '$(srcdir)/'`security/impl/TrustEngine.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/TrustEngine.Tpo $(DEPDIR)/TrustEngine.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='security/impl/TrustEngine.cpp' object='TrustEngine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o TrustEngine.lo `test -f 'security/impl/TrustEngine.cpp' || echo '$(srcdir)/'`security/impl/TrustEngine.cpp XSECCryptoX509CRL.lo: security/impl/XSECCryptoX509CRL.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT XSECCryptoX509CRL.lo -MD -MP -MF $(DEPDIR)/XSECCryptoX509CRL.Tpo -c -o XSECCryptoX509CRL.lo `test -f 'security/impl/XSECCryptoX509CRL.cpp' || echo '$(srcdir)/'`security/impl/XSECCryptoX509CRL.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/XSECCryptoX509CRL.Tpo $(DEPDIR)/XSECCryptoX509CRL.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='security/impl/XSECCryptoX509CRL.cpp' object='XSECCryptoX509CRL.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o XSECCryptoX509CRL.lo `test -f 'security/impl/XSECCryptoX509CRL.cpp' || echo '$(srcdir)/'`security/impl/XSECCryptoX509CRL.cpp KeyInfoImpl.lo: signature/impl/KeyInfoImpl.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT KeyInfoImpl.lo -MD -MP -MF $(DEPDIR)/KeyInfoImpl.Tpo -c -o KeyInfoImpl.lo `test -f 'signature/impl/KeyInfoImpl.cpp' || echo '$(srcdir)/'`signature/impl/KeyInfoImpl.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/KeyInfoImpl.Tpo $(DEPDIR)/KeyInfoImpl.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='signature/impl/KeyInfoImpl.cpp' object='KeyInfoImpl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o KeyInfoImpl.lo `test -f 'signature/impl/KeyInfoImpl.cpp' || echo '$(srcdir)/'`signature/impl/KeyInfoImpl.cpp KeyInfoSchemaValidators.lo: signature/impl/KeyInfoSchemaValidators.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT KeyInfoSchemaValidators.lo -MD -MP -MF $(DEPDIR)/KeyInfoSchemaValidators.Tpo -c -o KeyInfoSchemaValidators.lo `test -f 'signature/impl/KeyInfoSchemaValidators.cpp' || echo '$(srcdir)/'`signature/impl/KeyInfoSchemaValidators.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/KeyInfoSchemaValidators.Tpo $(DEPDIR)/KeyInfoSchemaValidators.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='signature/impl/KeyInfoSchemaValidators.cpp' object='KeyInfoSchemaValidators.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o KeyInfoSchemaValidators.lo `test -f 'signature/impl/KeyInfoSchemaValidators.cpp' || echo '$(srcdir)/'`signature/impl/KeyInfoSchemaValidators.cpp SignatureValidator.lo: signature/impl/SignatureValidator.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SignatureValidator.lo -MD -MP -MF $(DEPDIR)/SignatureValidator.Tpo -c -o SignatureValidator.lo `test -f 'signature/impl/SignatureValidator.cpp' || echo '$(srcdir)/'`signature/impl/SignatureValidator.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/SignatureValidator.Tpo $(DEPDIR)/SignatureValidator.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='signature/impl/SignatureValidator.cpp' object='SignatureValidator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SignatureValidator.lo `test -f 'signature/impl/SignatureValidator.cpp' || echo '$(srcdir)/'`signature/impl/SignatureValidator.cpp XMLSecSignatureImpl.lo: signature/impl/XMLSecSignatureImpl.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT XMLSecSignatureImpl.lo -MD -MP -MF $(DEPDIR)/XMLSecSignatureImpl.Tpo -c -o XMLSecSignatureImpl.lo `test -f 'signature/impl/XMLSecSignatureImpl.cpp' || echo '$(srcdir)/'`signature/impl/XMLSecSignatureImpl.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/XMLSecSignatureImpl.Tpo $(DEPDIR)/XMLSecSignatureImpl.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='signature/impl/XMLSecSignatureImpl.cpp' object='XMLSecSignatureImpl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o XMLSecSignatureImpl.lo `test -f 'signature/impl/XMLSecSignatureImpl.cpp' || echo '$(srcdir)/'`signature/impl/XMLSecSignatureImpl.cpp CURLSOAPTransport.lo: soap/impl/CURLSOAPTransport.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT CURLSOAPTransport.lo -MD -MP -MF $(DEPDIR)/CURLSOAPTransport.Tpo -c -o CURLSOAPTransport.lo `test -f 'soap/impl/CURLSOAPTransport.cpp' || echo '$(srcdir)/'`soap/impl/CURLSOAPTransport.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/CURLSOAPTransport.Tpo $(DEPDIR)/CURLSOAPTransport.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='soap/impl/CURLSOAPTransport.cpp' object='CURLSOAPTransport.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o CURLSOAPTransport.lo `test -f 'soap/impl/CURLSOAPTransport.cpp' || echo '$(srcdir)/'`soap/impl/CURLSOAPTransport.cpp CurlURLInputStream.lo: util/CurlURLInputStream.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT CurlURLInputStream.lo -MD -MP -MF $(DEPDIR)/CurlURLInputStream.Tpo -c -o CurlURLInputStream.lo `test -f 'util/CurlURLInputStream.cpp' || echo '$(srcdir)/'`util/CurlURLInputStream.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/CurlURLInputStream.Tpo $(DEPDIR)/CurlURLInputStream.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/CurlURLInputStream.cpp' object='CurlURLInputStream.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o CurlURLInputStream.lo `test -f 'util/CurlURLInputStream.cpp' || echo '$(srcdir)/'`util/CurlURLInputStream.cpp ReplayCache.lo: util/ReplayCache.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ReplayCache.lo -MD -MP -MF $(DEPDIR)/ReplayCache.Tpo -c -o ReplayCache.lo `test -f 'util/ReplayCache.cpp' || echo '$(srcdir)/'`util/ReplayCache.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/ReplayCache.Tpo $(DEPDIR)/ReplayCache.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/ReplayCache.cpp' object='ReplayCache.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ReplayCache.lo `test -f 'util/ReplayCache.cpp' || echo '$(srcdir)/'`util/ReplayCache.cpp StorageService.lo: util/StorageService.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT StorageService.lo -MD -MP -MF $(DEPDIR)/StorageService.Tpo -c -o StorageService.lo `test -f 'util/StorageService.cpp' || echo '$(srcdir)/'`util/StorageService.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/StorageService.Tpo $(DEPDIR)/StorageService.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='util/StorageService.cpp' object='StorageService.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o StorageService.lo `test -f 'util/StorageService.cpp' || echo '$(srcdir)/'`util/StorageService.cpp mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-encincludeHEADERS: $(encinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(encinclude_HEADERS)'; test -n "$(encincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(encincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(encincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(encincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(encincludedir)" || exit $$?; \ done uninstall-encincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(encinclude_HEADERS)'; test -n "$(encincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(encincludedir)'; $(am__uninstall_files_from_dir) install-implincludeHEADERS: $(implinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(implinclude_HEADERS)'; test -n "$(implincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(implincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(implincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(implincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(implincludedir)" || exit $$?; \ done uninstall-implincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(implinclude_HEADERS)'; test -n "$(implincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(implincludedir)'; $(am__uninstall_files_from_dir) install-ioincludeHEADERS: $(ioinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(ioinclude_HEADERS)'; test -n "$(ioincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(ioincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(ioincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(ioincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(ioincludedir)" || exit $$?; \ done uninstall-ioincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(ioinclude_HEADERS)'; test -n "$(ioincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(ioincludedir)'; $(am__uninstall_files_from_dir) install-libxmltoolingincludeHEADERS: $(libxmltoolinginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(libxmltoolinginclude_HEADERS)'; test -n "$(libxmltoolingincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(libxmltoolingincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libxmltoolingincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libxmltoolingincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(libxmltoolingincludedir)" || exit $$?; \ done uninstall-libxmltoolingincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(libxmltoolinginclude_HEADERS)'; test -n "$(libxmltoolingincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libxmltoolingincludedir)'; $(am__uninstall_files_from_dir) install-secincludeHEADERS: $(secinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(secinclude_HEADERS)'; test -n "$(secincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(secincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(secincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(secincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(secincludedir)" || exit $$?; \ done uninstall-secincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(secinclude_HEADERS)'; test -n "$(secincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(secincludedir)'; $(am__uninstall_files_from_dir) install-sigincludeHEADERS: $(siginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(siginclude_HEADERS)'; test -n "$(sigincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sigincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sigincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sigincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sigincludedir)" || exit $$?; \ done uninstall-sigincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(siginclude_HEADERS)'; test -n "$(sigincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sigincludedir)'; $(am__uninstall_files_from_dir) install-soapincludeHEADERS: $(soapinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(soapinclude_HEADERS)'; test -n "$(soapincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(soapincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(soapincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(soapincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(soapincludedir)" || exit $$?; \ done uninstall-soapincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(soapinclude_HEADERS)'; test -n "$(soapincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(soapincludedir)'; $(am__uninstall_files_from_dir) install-utilincludeHEADERS: $(utilinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(utilinclude_HEADERS)'; test -n "$(utilincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(utilincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(utilincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(utilincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(utilincludedir)" || exit $$?; \ done uninstall-utilincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(utilinclude_HEADERS)'; test -n "$(utilincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(utilincludedir)'; $(am__uninstall_files_from_dir) install-valincludeHEADERS: $(valinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(valinclude_HEADERS)'; test -n "$(valincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(valincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(valincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(valincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(valincludedir)" || exit $$?; \ done uninstall-valincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(valinclude_HEADERS)'; test -n "$(valincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(valincludedir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config_pub.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config_pub.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config_pub.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config_pub.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) config_pub.h installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(encincludedir)" "$(DESTDIR)$(implincludedir)" "$(DESTDIR)$(ioincludedir)" "$(DESTDIR)$(libxmltoolingincludedir)" "$(DESTDIR)$(secincludedir)" "$(DESTDIR)$(sigincludedir)" "$(DESTDIR)$(soapincludedir)" "$(DESTDIR)$(utilincludedir)" "$(DESTDIR)$(valincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-encincludeHEADERS install-implincludeHEADERS \ install-ioincludeHEADERS install-libxmltoolingincludeHEADERS \ install-secincludeHEADERS install-sigincludeHEADERS \ install-soapincludeHEADERS install-utilincludeHEADERS \ install-valincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-encincludeHEADERS uninstall-implincludeHEADERS \ uninstall-ioincludeHEADERS uninstall-libLTLIBRARIES \ uninstall-libxmltoolingincludeHEADERS \ uninstall-secincludeHEADERS uninstall-sigincludeHEADERS \ uninstall-soapincludeHEADERS uninstall-utilincludeHEADERS \ uninstall-valincludeHEADERS .MAKE: all install-am install-exec-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool cscopelist ctags distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am \ install-encincludeHEADERS install-exec install-exec-am \ install-exec-hook install-html install-html-am \ install-implincludeHEADERS install-info install-info-am \ install-ioincludeHEADERS install-libLTLIBRARIES \ install-libxmltoolingincludeHEADERS install-man install-pdf \ install-pdf-am install-ps install-ps-am \ install-secincludeHEADERS install-sigincludeHEADERS \ install-soapincludeHEADERS install-strip \ install-utilincludeHEADERS install-valincludeHEADERS \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-encincludeHEADERS \ uninstall-implincludeHEADERS uninstall-ioincludeHEADERS \ uninstall-libLTLIBRARIES uninstall-libxmltoolingincludeHEADERS \ uninstall-secincludeHEADERS uninstall-sigincludeHEADERS \ uninstall-soapincludeHEADERS uninstall-utilincludeHEADERS \ uninstall-valincludeHEADERS install-exec-hook: for la in $(lib_LTLIBRARIES) ; do rm -f $(DESTDIR)$(libdir)/$$la ; done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xmltooling-1.5.3/xmltooling/config_pub.h.in000644 001751 001751 00000002002 12061244532 022160 0ustar00scantorscantor000000 000000 /* Define if C++ compiler supports covariant virtual methods. */ #undef HAVE_COVARIANT_RETURNS /* Define to 1 if C++ compiler supports nullptr keyword. */ #undef HAVE_NULLPTR /* Define to 1 if you have an STL implementation that supports useful string specialization. */ #undef HAVE_GOOD_STL /* Define to 1 if you have an STL implementation that supports std::iterator_traits. */ #undef HAVE_ITERATOR_TRAITS /* Define if log4shib library is used. */ #undef XMLTOOLING_LOG4SHIB /* Define if log4cpp library is used. */ #undef XMLTOOLING_LOG4CPP /* Define to 1 to disable XML-Security-dependent features. */ #undef XMLTOOLING_NO_XMLSEC /* Define to 1 if Xerces supports a compliant DOMLS API. */ #undef XMLTOOLING_XERCESC_COMPLIANT_DOMLS /* Define to 1 if Xerces DOM ID methods take extra parameter. */ #undef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE /* Define to 1 if Xerces has a 64-bit-safe API. */ #undef XMLTOOLING_XERCESC_64BITSAFE /* Define to 1 if you have the `xsecsize_t' type. */ #undef HAVE_XSECSIZE_T xmltooling-1.5.3/xmltooling/AbstractAttributeExtensibleXMLObject.cpp000644 001751 001751 00000016273 12003305016 027163 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * AbstractAttributeExtensibleXMLObject.cpp * * Extension of AbstractDOMCachingXMLObject that implements an AttributeExtensibleXMLObject. */ #include "internal.h" #include "AbstractAttributeExtensibleXMLObject.h" #include "ElementExtensibleXMLObject.h" #include "ElementProxy.h" #include #include #include #include #include using namespace xmltooling; using namespace xercesc; using namespace boost::lambda; using namespace boost; using namespace std; ElementExtensibleXMLObject::ElementExtensibleXMLObject() { } ElementExtensibleXMLObject::~ElementExtensibleXMLObject() { } ElementProxy::ElementProxy() { } ElementProxy::~ElementProxy() { } set AttributeExtensibleXMLObject::m_idAttributeSet; AttributeExtensibleXMLObject::AttributeExtensibleXMLObject() { } AttributeExtensibleXMLObject::~AttributeExtensibleXMLObject() { } const set& AttributeExtensibleXMLObject::getRegisteredIDAttributes() { return m_idAttributeSet; } bool AttributeExtensibleXMLObject::isRegisteredIDAttribute(const xmltooling::QName& name) { return m_idAttributeSet.find(name)!=m_idAttributeSet.end(); } void AttributeExtensibleXMLObject::registerIDAttribute(const xmltooling::QName& name) { m_idAttributeSet.insert(name); } void AttributeExtensibleXMLObject::deregisterIDAttribute(const xmltooling::QName& name) { m_idAttributeSet.erase(name); } void AttributeExtensibleXMLObject::deregisterIDAttributes() { m_idAttributeSet.clear(); } AbstractAttributeExtensibleXMLObject::AbstractAttributeExtensibleXMLObject() { m_idAttribute = m_attributeMap.end(); } AbstractAttributeExtensibleXMLObject::AbstractAttributeExtensibleXMLObject(const AbstractAttributeExtensibleXMLObject& src) : AbstractXMLObject(src) { m_idAttribute = m_attributeMap.end(); for (map::const_iterator i = src.m_attributeMap.begin(); i != src.m_attributeMap.end(); ++i) { m_attributeMap[i->first] = XMLString::replicate(i->second); } if (src.m_idAttribute != src.m_attributeMap.end()) { m_idAttribute = m_attributeMap.find(src.m_idAttribute->first); } } AbstractAttributeExtensibleXMLObject::~AbstractAttributeExtensibleXMLObject() { #ifdef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE static void (*release)(XMLCh**) = &XMLString::release; #else static void (*release)(XMLCh**,MemoryManager*) = &XMLString::release; #endif for_each( m_attributeMap.begin(), m_attributeMap.end(), lambda::bind( release, &lambda::bind(&map::value_type::second, boost::ref(_1)) #ifndef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE ,XMLPlatformUtils::fgMemoryManager #endif ) ); } const XMLCh* AbstractAttributeExtensibleXMLObject::getAttribute(const xmltooling::QName& qualifiedName) const { map::const_iterator i = m_attributeMap.find(qualifiedName); return (i != m_attributeMap.end()) ? i->second : nullptr; } const XMLCh* AbstractAttributeExtensibleXMLObject::getLang() const { static const XMLCh _lang[] = UNICODE_LITERAL_4(l,a,n,g); static xmltooling::QName qname(xmlconstants::XML_NS, _lang); return getAttribute(qname); } void AbstractAttributeExtensibleXMLObject::setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID) { map::iterator i=m_attributeMap.find(qualifiedName); if (i != m_attributeMap.end()) { releaseThisandParentDOM(); XMLString::release(&(i->second)); if (value && *value) { i->second = XMLString::replicate(value); if (ID) m_idAttribute = i; } else { if (m_idAttribute == i) m_idAttribute = m_attributeMap.end(); m_attributeMap.erase(i); } } else if (value && *value) { releaseThisandParentDOM(); m_attributeMap[qualifiedName] = XMLString::replicate(value); if (ID) m_idAttribute = m_attributeMap.find(qualifiedName); Namespace newNamespace(qualifiedName.getNamespaceURI(), qualifiedName.getPrefix(), false, Namespace::VisiblyUsed); addNamespace(newNamespace); } } void AttributeExtensibleXMLObject::setAttribute(const xmltooling::QName& qualifiedName, const xmltooling::QName& value) { if (!value.hasLocalPart()) return; if (value.hasPrefix()) { xstring buf(value.getPrefix()); buf = buf + chColon + value.getLocalPart(); setAttribute(qualifiedName, buf.c_str()); } else { setAttribute(qualifiedName, value.getLocalPart()); } Namespace newNamespace(value.getNamespaceURI(), value.getPrefix(), false, Namespace::NonVisiblyUsed); addNamespace(newNamespace); } const map& AbstractAttributeExtensibleXMLObject::getExtensionAttributes() const { return m_attributeMap; } const XMLCh* AbstractAttributeExtensibleXMLObject::getXMLID() const { return (m_idAttribute != m_attributeMap.end()) ? m_idAttribute->second : nullptr; } void AbstractAttributeExtensibleXMLObject::unmarshallExtensionAttribute(const DOMAttr* attribute) { xmltooling::QName q(attribute->getNamespaceURI(), attribute->getLocalName(), attribute->getPrefix()); bool ID = attribute->isId() || isRegisteredIDAttribute(q); setAttribute(q,attribute->getNodeValue(),ID); if (ID) { #ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE attribute->getOwnerElement()->setIdAttributeNode(attribute, true); #else attribute->getOwnerElement()->setIdAttributeNode(attribute); #endif } } void AbstractAttributeExtensibleXMLObject::marshallExtensionAttributes(DOMElement* domElement) const { for (map::const_iterator i = m_attributeMap.begin(); i != m_attributeMap.end(); ++i) { DOMAttr* attr = domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(), i->first.getLocalPart()); if (i->first.hasPrefix()) attr->setPrefix(i->first.getPrefix()); attr->setNodeValue(i->second); domElement->setAttributeNodeNS(attr); if (m_idAttribute == i) { #ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE domElement->setIdAttributeNode(attr, true); #else domElement->setIdAttributeNode(attr); #endif } } } xmltooling-1.5.3/xmltooling/AbstractComplexElement.cpp000644 001751 001751 00000006372 12003305016 024405 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * AbstractComplexElement.cpp * * Implementation of AbstractComplexElement. */ #include "internal.h" #include "AbstractComplexElement.h" #include #include #include using namespace xmltooling; using namespace xercesc; using namespace boost::lambda; using namespace boost; using namespace std; AbstractComplexElement::AbstractComplexElement() { } AbstractComplexElement::AbstractComplexElement(const AbstractComplexElement& src) { static void (vector::* push_back)(XMLCh* const&) = &vector::push_back; static XMLCh* (*replicate)(const XMLCh*,MemoryManager*) = &XMLString::replicate; for_each( src.m_text.begin(), src.m_text.end(), lambda::bind(push_back, boost::ref(m_text), lambda::bind(replicate, _1, XMLPlatformUtils::fgMemoryManager)) ); } AbstractComplexElement::~AbstractComplexElement() { #ifdef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE static void (*release)(XMLCh**) = &XMLString::release; #else static void (*release)(XMLCh**,MemoryManager*) = &XMLString::release; #endif for_each(m_children.begin(), m_children.end(), cleanup()); for_each(m_text.begin(), m_text.end(), lambda::bind( release, &_1 #ifndef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE ,XMLPlatformUtils::fgMemoryManager #endif ) ); } bool AbstractComplexElement::hasChildren() const { if (m_children.empty()) return false; return (find_if(m_children.begin(), m_children.end(), (_1 != ((XMLObject*)nullptr))) != m_children.end()); } const list& AbstractComplexElement::getOrderedChildren() const { return m_children; } void AbstractComplexElement::removeChild(XMLObject* child) { m_children.erase(remove(m_children.begin(), m_children.end(), child), m_children.end()); } const XMLCh* AbstractComplexElement::getTextContent(unsigned int position) const { return (m_text.size() > position) ? m_text[position] : nullptr; } void AbstractComplexElement::setTextContent(const XMLCh* value, unsigned int position) { if (position > m_children.size()) throw XMLObjectException("Can't set text content relative to non-existent child position."); vector::size_type size = m_text.size(); while (position >= size) { m_text.push_back(nullptr); ++size; } m_text[position] = prepareForAssignment(m_text[position], value); } xmltooling-1.5.3/xmltooling/AbstractDOMCachingXMLObject.cpp000644 001751 001751 00000013751 12003305016 025067 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * AbstractDOMCachingXMLObject.cpp * * Extension of AbstractXMLObject that implements a DOMCachingXMLObject. */ #include "internal.h" #include "AbstractDOMCachingXMLObject.h" #include "exceptions.h" #include "XMLObjectBuilder.h" #include "util/XMLHelper.h" #include #include using namespace xmltooling; using namespace xercesc; using namespace std; AbstractDOMCachingXMLObject::AbstractDOMCachingXMLObject() : m_dom(nullptr), m_document(nullptr) { } AbstractDOMCachingXMLObject::AbstractDOMCachingXMLObject(const AbstractDOMCachingXMLObject& src) : AbstractXMLObject(src), m_dom(nullptr), m_document(nullptr) { } AbstractDOMCachingXMLObject::~AbstractDOMCachingXMLObject() { if (m_document) m_document->release(); } DOMElement* AbstractDOMCachingXMLObject::getDOM() const { return m_dom; } void AbstractDOMCachingXMLObject::setDOM(DOMElement* dom, bool bindDocument) const { m_dom = dom; if (dom && bindDocument) { DOMDocument* doc = dom->getOwnerDocument(); setDocument(doc); DOMElement* documentRoot = doc->getDocumentElement(); if (!documentRoot) doc->appendChild(dom); else if (documentRoot != dom) doc->replaceChild(dom, documentRoot); } } void AbstractDOMCachingXMLObject::setDocument(DOMDocument* doc) const { if (m_document != doc) { if (m_document) m_document->release(); m_document=doc; } } void AbstractDOMCachingXMLObject::releaseDOM() const { if (m_dom) { if (m_log.isDebugEnabled()) { string qname=getElementQName().toString(); m_log.debug("releasing cached DOM representation for (%s)", qname.empty() ? "unknown" : qname.c_str()); } setDOM(nullptr); } } void AbstractDOMCachingXMLObject::releaseParentDOM(bool propagateRelease) const { if (getParent() && getParent()->getDOM()) { m_log.debug( "releasing cached DOM representation for parent object with propagation set to %s", propagateRelease ? "true" : "false" ); getParent()->releaseDOM(); if (propagateRelease) getParent()->releaseParentDOM(propagateRelease); } } namespace { class _release : public binary_function { public: void operator()(XMLObject* obj, bool propagate) const { if (obj) { obj->releaseDOM(); if (propagate) obj->releaseChildrenDOM(propagate); } } }; }; void AbstractDOMCachingXMLObject::releaseChildrenDOM(bool propagateRelease) const { if (hasChildren()) { m_log.debug( "releasing cached DOM representation for children with propagation set to %s", propagateRelease ? "true" : "false" ); const list& children=getOrderedChildren(); for_each(children.begin(),children.end(),bind2nd(_release(),propagateRelease)); } } DOMElement* AbstractDOMCachingXMLObject::cloneDOM(DOMDocument* doc) const { if (getDOM()) { DOMDocument* cloneDoc = doc; if (!cloneDoc) cloneDoc=DOMImplementationRegistry::getDOMImplementation(nullptr)->createDocument(); try { return static_cast(cloneDoc->importNode(getDOM(),true)); } catch (XMLException& ex) { if (!doc) cloneDoc->release(); auto_ptr_char temp(ex.getMessage()); m_log.error("DOM clone failed: %s", temp.get()); } } return nullptr; } XMLObject* AbstractDOMCachingXMLObject::clone() const { // See if we can clone via the DOM. DOMElement* domCopy=cloneDOM(); if (domCopy) { // Seemed to work, so now we unmarshall the DOM to produce the clone. const XMLObjectBuilder* b=XMLObjectBuilder::getBuilder(domCopy); if (!b) { auto_ptr q(XMLHelper::getNodeQName(domCopy)); m_log.error( "DOM clone failed, unable to locate builder for element (%s)", q->toString().c_str() ); domCopy->getOwnerDocument()->release(); throw UnmarshallingException("Unable to locate builder for cloned element."); } XercesJanitor janitor(domCopy->getOwnerDocument()); XMLObject* ret = b->buildFromElement(domCopy,true); // bind document janitor.release(); // safely transferred return ret; } return nullptr; } void AbstractDOMCachingXMLObject::detach() { // This is an override that duplicates some of the checking in the base class but // adds document management in preparation for deletion of the parent. if (!getParent()) return; if (getParent()->hasParent()) throw XMLObjectException("Cannot detach an object whose parent is itself a child."); AbstractDOMCachingXMLObject* parent = dynamic_cast(getParent()); if (parent && parent->m_document) { // Transfer control of document to me... setDocument(parent->m_document); parent->m_document = nullptr; } // The rest is done by the base. AbstractXMLObject::detach(); } xmltooling-1.5.3/xmltooling/QName.cpp000644 001751 001751 00000006433 12003305016 020777 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * QName.cpp * * Representing XML QNames */ #include "internal.h" #include "QName.h" using namespace xmltooling; using namespace std; using xercesc::XMLString; QName::QName(const XMLCh* uri, const XMLCh* localPart, const XMLCh* prefix) { setNamespaceURI(uri); setLocalPart(localPart); setPrefix(prefix); } QName::QName(const char* uri, const char* localPart, const char* prefix) { setNamespaceURI(uri); setLocalPart(localPart); setPrefix(prefix); } QName::~QName() { } void QName::setPrefix(const XMLCh* prefix) { if (prefix) m_prefix=prefix; else m_prefix.erase(); } void QName::setNamespaceURI(const XMLCh* uri) { if (uri) m_uri=uri; else m_uri.erase(); } void QName::setLocalPart(const XMLCh* localPart) { if (localPart) m_local=localPart; else m_local.erase(); } void QName::setPrefix(const char* prefix) { if (prefix) { auto_ptr_XMLCh temp(prefix); m_prefix=temp.get(); } else m_prefix.erase(); } void QName::setNamespaceURI(const char* uri) { if (uri) { auto_ptr_XMLCh temp(uri); m_uri=temp.get(); } else m_uri.erase(); } void QName::setLocalPart(const char* localPart) { if (localPart) { auto_ptr_XMLCh temp(localPart); m_local=temp.get(); } else m_local.erase(); } bool xmltooling::operator==(const QName& op1, const QName& op2) { if (&op1 == &op2) return true; return (!XMLString::compareString(op1.getNamespaceURI(),op2.getNamespaceURI()) && !XMLString::compareString(op1.getLocalPart(),op2.getLocalPart())); } bool xmltooling::operator!=(const QName& op1, const QName& op2) { return !(op1==op2); } bool xmltooling::operator<(const QName& op1, const QName& op2) { int i=XMLString::compareString(op1.getNamespaceURI(),op2.getNamespaceURI()); if (i<0) return true; else if (i==0) return (XMLString::compareString(op1.getLocalPart(),op2.getLocalPart())<0); else return false; } string QName::toString() const { if (!hasLocalPart()) return ""; auto_ptr_char local(getLocalPart()); if (hasPrefix()) { auto_ptr_char pre(getPrefix()); return string(pre.get()) + ':' + local.get(); } else if (hasNamespaceURI()) { auto_ptr_char ns(getNamespaceURI()); return string("{") + ns.get() + '}' + local.get(); } else return local.get(); } xmltooling-1.5.3/xmltooling/AbstractSimpleElement.cpp000644 001751 001751 00000005137 12003305016 024225 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * AbstractSimpleElement.cpp * * Extension of AbstractXMLObject that implements simple elements. */ #include "internal.h" #include "AbstractSimpleElement.h" #include using namespace xmltooling; using xercesc::XMLString; using xercesc::XMLChar1_0; using namespace std; // shared "empty" list of children for childless objects list AbstractSimpleElement::m_no_children; AbstractSimpleElement::AbstractSimpleElement() : m_value(nullptr) { } AbstractSimpleElement::AbstractSimpleElement(const AbstractSimpleElement& src) : AbstractXMLObject(src), m_value(XMLString::replicate(src.m_value)) { } AbstractSimpleElement::~AbstractSimpleElement() { XMLString::release(&m_value); } bool AbstractSimpleElement::hasChildren() const { return false; } const list& AbstractSimpleElement::getOrderedChildren() const { return m_no_children; } void AbstractSimpleElement::removeChild(XMLObject* child) { throw XMLObjectException("Cannot remove child from a childless object."); } const XMLCh* AbstractSimpleElement::getTextContent(unsigned int position) const { return (position==0) ? m_value : nullptr; } void AbstractSimpleElement::setTextContent(const XMLCh* value, unsigned int position) { if (position > 0) throw XMLObjectException("Cannot set text content in simple element at position > 0."); // We overwrite the "one" piece of Text content if: // - the new value is null // - there is no existing value // - the old value is all whitespace // If there's a non-whitespace value set, we leave it alone unless we're clearing it with a null. if (!value || !m_value || XMLChar1_0::isAllSpaces(m_value, XMLString::stringLen(m_value))) m_value=prepareForAssignment(m_value, value); } xmltooling-1.5.3/xmltooling/AbstractXMLObject.cpp000644 001751 001751 00000020626 12003305016 023251 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * AbstractXMLObject.cpp * * An abstract implementation of XMLObject. */ #include "internal.h" #include "exceptions.h" #include "AbstractXMLObject.h" #include "util/DateTime.h" #include using namespace xmltooling; using std::set; using xercesc::XMLString; XMLObject::XMLObject() { } XMLObject::~XMLObject() { } void XMLObject::releaseThisandParentDOM() const { releaseDOM(); releaseParentDOM(true); } void XMLObject::releaseThisAndChildrenDOM() const { releaseChildrenDOM(true); releaseDOM(); } const XMLCh* XMLObject::getLang() const { return nullptr; } void XMLObject::setNil(const XMLCh* value) { if (value) { switch (*value) { case xercesc::chLatin_t: nil(xmlconstants::XML_BOOL_TRUE); break; case xercesc::chLatin_f: nil(xmlconstants::XML_BOOL_FALSE); break; case xercesc::chDigit_1: nil(xmlconstants::XML_BOOL_ONE); break; case xercesc::chDigit_0: nil(xmlconstants::XML_BOOL_ZERO); break; default: nil(xmlconstants::XML_BOOL_NULL); } } else { nil(xmlconstants::XML_BOOL_NULL); } } AbstractXMLObject::AbstractXMLObject(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType) : m_log(logging::Category::getInstance(XMLTOOLING_LOGCAT".XMLObject")), m_schemaLocation(nullptr), m_noNamespaceSchemaLocation(nullptr), m_nil(xmlconstants::XML_BOOL_NULL), m_parent(nullptr), m_elementQname(nsURI, localName, prefix) { addNamespace(Namespace(nsURI, prefix, false, Namespace::VisiblyUsed)); if (schemaType) { m_typeQname.reset(new QName(*schemaType)); addNamespace(Namespace(m_typeQname->getNamespaceURI(), m_typeQname->getPrefix(), false, Namespace::NonVisiblyUsed)); } } AbstractXMLObject::AbstractXMLObject(const AbstractXMLObject& src) : m_namespaces(src.m_namespaces), m_log(src.m_log), m_schemaLocation(XMLString::replicate(src.m_schemaLocation)), m_noNamespaceSchemaLocation(XMLString::replicate(src.m_noNamespaceSchemaLocation)), m_nil(src.m_nil), m_parent(nullptr), m_elementQname(src.m_elementQname), m_typeQname(src.m_typeQname.get() ? new QName(*src.m_typeQname) : nullptr) { } AbstractXMLObject::~AbstractXMLObject() { xercesc::XMLString::release(&m_schemaLocation); xercesc::XMLString::release(&m_noNamespaceSchemaLocation); } void AbstractXMLObject::detach() { if (!getParent()) return; else if (getParent()->hasParent()) throw XMLObjectException("Cannot detach an object whose parent is itself a child."); // Pull ourselves out of the parent and then blast him. getParent()->removeChild(this); delete m_parent; m_parent = nullptr; } const QName& AbstractXMLObject::getElementQName() const { return m_elementQname; } const set& AbstractXMLObject::getNamespaces() const { return m_namespaces; } void AbstractXMLObject::addNamespace(const Namespace& ns) const { for (set::const_iterator n = m_namespaces.begin(); n != m_namespaces.end(); ++n) { // Look for the prefix in the existing set. if (XMLString::equals(ns.getNamespacePrefix(), n->getNamespacePrefix())) { // See if it's the same declaration, and overlay various properties if so. if (XMLString::equals(ns.getNamespaceURI(), n->getNamespaceURI())) { if (ns.alwaysDeclare()) const_cast(*n).setAlwaysDeclare(true); switch (ns.usage()) { case Namespace::Indeterminate: break; case Namespace::VisiblyUsed: const_cast(*n).setUsage(Namespace::VisiblyUsed); break; case Namespace::NonVisiblyUsed: if (n->usage() == Namespace::Indeterminate) const_cast(*n).setUsage(Namespace::NonVisiblyUsed); break; } } return; } } // If the prefix is now, go ahead and add it. m_namespaces.insert(ns); } void AbstractXMLObject::removeNamespace(const Namespace& ns) { m_namespaces.erase(ns); } const QName* AbstractXMLObject::getSchemaType() const { return m_typeQname.get(); } const XMLCh* AbstractXMLObject::getXMLID() const { return nullptr; } xmlconstants::xmltooling_bool_t AbstractXMLObject::getNil() const { return m_nil; } void AbstractXMLObject::nil(xmlconstants::xmltooling_bool_t value) { if (m_nil != value) { releaseThisandParentDOM(); m_nil = value; } } bool AbstractXMLObject::hasParent() const { return m_parent != nullptr; } XMLObject* AbstractXMLObject::getParent() const { return m_parent; } void AbstractXMLObject::setParent(XMLObject* parent) { m_parent = parent; } XMLCh* AbstractXMLObject::prepareForAssignment(XMLCh* oldValue, const XMLCh* newValue) { if (!XMLString::equals(oldValue,newValue)) { releaseThisandParentDOM(); XMLCh* newString = XMLString::replicate(newValue); XMLString::release(&oldValue); return newString; } return oldValue; } QName* AbstractXMLObject::prepareForAssignment(QName* oldValue, const QName* newValue) { if (!oldValue) { if (newValue) { releaseThisandParentDOM(); addNamespace(Namespace(newValue->getNamespaceURI(), newValue->getPrefix(), false, Namespace::NonVisiblyUsed)); return new QName(*newValue); } return nullptr; } delete oldValue; releaseThisandParentDOM(); if (newValue) { // Attach a non-visibly used namespace. addNamespace(Namespace(newValue->getNamespaceURI(), newValue->getPrefix(), false, Namespace::NonVisiblyUsed)); return new QName(*newValue); } return nullptr; } DateTime* AbstractXMLObject::prepareForAssignment(DateTime* oldValue, const DateTime* newValue) { if (!oldValue) { if (newValue) { releaseThisandParentDOM(); return new DateTime(*newValue); } return nullptr; } delete oldValue; releaseThisandParentDOM(); return newValue ? new DateTime(*newValue) : nullptr; } DateTime* AbstractXMLObject::prepareForAssignment(DateTime* oldValue, time_t newValue, bool duration) { delete oldValue; releaseThisandParentDOM(); DateTime* ret = new DateTime(newValue, duration); if (duration) ret->parseDuration(); else ret->parseDateTime(); return ret; } DateTime* AbstractXMLObject::prepareForAssignment(DateTime* oldValue, const XMLCh* newValue, bool duration) { delete oldValue; releaseThisandParentDOM(); if (!newValue || !*newValue) return nullptr; DateTime* ret = new DateTime(newValue); if (duration) ret->parseDuration(); else ret->parseDateTime(); return ret; } XMLObject* AbstractXMLObject::prepareForAssignment(XMLObject* oldValue, XMLObject* newValue) { if (newValue && newValue->hasParent()) throw XMLObjectException("child XMLObject cannot be added - it is already the child of another XMLObject"); if (!oldValue) { if (newValue) { releaseThisandParentDOM(); newValue->setParent(this); } return newValue; } if (oldValue != newValue) { delete oldValue; releaseThisandParentDOM(); if (newValue) newValue->setParent(this); } return newValue; } xmltooling-1.5.3/xmltooling/exceptions.cpp000644 001751 001751 00000021426 12003305016 022156 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * exceptions.cpp * * Exception classes */ #include "internal.h" #include "exceptions.h" #include "XMLToolingConfig.h" #include "util/URLEncoder.h" #include "util/XMLConstants.h" #include "util/XMLHelper.h" #include #include #include #include #include using namespace xmltooling; using namespace xercesc; using namespace boost; using namespace std; using xmlconstants::XMLTOOLING_NS; params::params(int count,...) { va_list args; va_start(args,count); while (count--) v.push_back(va_arg(args,char*)); va_end(args); } namedparams::namedparams(int count,...) { count*=2; va_list args; va_start(args,count); while (count--) v.push_back(va_arg(args,char*)); va_end(args); } XMLToolingException::ExceptionFactoryMap XMLToolingException::m_factoryMap; XMLToolingException* XMLToolingException::getInstance(const char* exceptionClass) { if (exceptionClass) { ExceptionFactoryMap::const_iterator i=m_factoryMap.find(exceptionClass); if (i!=m_factoryMap.end()) return (i->second)(); } return new XMLToolingException(); } XMLToolingException::XMLToolingException(const char* msg, const params& p) { if (msg) m_msg=msg; addProperties(p); } XMLToolingException::XMLToolingException(const char* msg, const namedparams& p) { if (msg) m_msg=msg; addProperties(p); } XMLToolingException::XMLToolingException(const std::string& msg, const params& p) : m_msg(msg) { addProperties(p); } XMLToolingException::XMLToolingException(const std::string& msg, const namedparams& p) : m_msg(msg) { addProperties(p); } void XMLToolingException::setMessage(const char* msg) { if (msg) m_msg=msg; else m_msg.erase(); m_processedmsg.erase(); } void XMLToolingException::addProperties(const params& p) { m_processedmsg.erase(); map::size_type i = m_params.size() + 1; const vector& v=p.get(); for (vector::const_iterator ci = v.begin(); ci != v.end(); ++ci) { try { m_params[lexical_cast(i++)] = *ci; } catch (bad_lexical_cast&) { } } } void XMLToolingException::addProperties(const namedparams& p) { m_processedmsg.erase(); const vector& v = p.get(); for (vector::const_iterator ci = v.begin(); ci != v.end(); ++ci) { m_params.erase(*ci); m_params[*ci] = *(ci+1); ++ci; // advance past name to value, then loop will advance it again } } const char* XMLToolingException::getProperty(unsigned int index) const { try { map::const_iterator i = m_params.find(lexical_cast(index)); return (i==m_params.end()) ? nullptr : i->second.c_str(); } catch (bad_lexical_cast&) { return nullptr; } } const char* XMLToolingException::getProperty(const char* name) const { map::const_iterator i = m_params.find(name); return (i==m_params.end()) ? nullptr : i->second.c_str(); } const char* XMLToolingException::getMessage() const { if (!m_processedmsg.empty()) return m_processedmsg.c_str(); else if (m_params.empty()) return m_msg.c_str(); static const char* legal="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890_"; // Replace any parameters in the message. string::size_type i=0,start=0; while (start!=string::npos && startstart) m_processedmsg += m_msg.substr(start,i-start); // append everything in between start=i+1; // move start to the beginning of the token name i=m_msg.find_first_not_of(legal,start); // find token delimiter if (i==start) { // append a non legal character m_processedmsg+=m_msg[start++]; continue; } // search for token in map map::const_iterator param=m_params.find(m_msg.substr(start,(i==string::npos) ? i : i-start)); if (param!=m_params.end()) { m_processedmsg+=param->second; start=i; } } if (start!=string::npos && start&"); if (pos > 0) { s.append(start, pos); start += pos; } else { switch (*start) { case '\'': s += "'"; break; case '<': s += "<"; break; case '>': s += ">"; break; case '&': s += "&"; break; default: s += *start; } start++; } } s += post; } string XMLToolingException::toString() const { string xml=string(""; const char* msg=getMessage(); if (msg) xml_encode(xml, "", msg, ""); const URLEncoder* encoder = XMLToolingConfig::getConfig().getURLEncoder(); for (map::const_iterator i = m_params.begin(); i != m_params.end(); ++i) { xml_encode(xml, "", encoder->encode(i->second.c_str()).c_str(), ""); } xml+=""; return xml; } string XMLToolingException::toQueryString() const { string q; const URLEncoder* enc = XMLToolingConfig::getConfig().getURLEncoder(); for (map::const_iterator i = m_params.begin(); i != m_params.end(); ++i) { if (!q.empty()) q += '&'; q = q + i->first + '=' + enc->encode(i->second.c_str()); } return q; } XMLToolingException* XMLToolingException::fromStream(std::istream& in) { static const XMLCh exception[] = UNICODE_LITERAL_9(e,x,c,e,p,t,i,o,n); static const XMLCh message[] = UNICODE_LITERAL_7(m,e,s,s,a,g,e); static const XMLCh name[] = UNICODE_LITERAL_4(n,a,m,e); static const XMLCh param[] = UNICODE_LITERAL_5(p,a,r,a,m); static const XMLCh type[] = UNICODE_LITERAL_4(t,y,p,e); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(in); // Check root element. const DOMElement* root=doc->getDocumentElement(); if (!XMLHelper::isNodeNamed(root,XMLTOOLING_NS,exception)) { doc->release(); throw XMLToolingException("Invalid root element on serialized exception."); } auto_ptr_char classname(root->getAttributeNS(nullptr,type)); auto_ptr excep(XMLToolingException::getInstance(classname.get())); DOMElement* child=XMLHelper::getFirstChildElement(root,XMLTOOLING_NS,message); if (child && child->hasChildNodes()) { auto_ptr_char m(child->getFirstChild()->getNodeValue()); excep->setMessage(m.get()); } const URLEncoder* encoder = XMLToolingConfig::getConfig().getURLEncoder(); child=XMLHelper::getFirstChildElement(root,XMLTOOLING_NS,param); while (child && child->hasChildNodes()) { auto_ptr_char n(child->getAttributeNS(nullptr,name)); char* encoded = XMLString::transcode(child->getFirstChild()->getNodeValue()); if (n.get() && encoded) { encoder->decode(encoded); excep->addProperty(n.get(), encoded); } XMLString::release(&encoded); child=XMLHelper::getNextSiblingElement(child,XMLTOOLING_NS,param); } doc->release(); return excep.release(); } XMLToolingException* XMLToolingException::fromString(const char* s) { istringstream in(s); return fromStream(in); } xmltooling-1.5.3/xmltooling/Lockable.cpp000644 001751 001751 00000002666 12003305016 021516 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * Lockable.cpp * * Locking abstraction. */ #include "internal.h" #include "Lockable.h" using namespace xmltooling; Lockable::Lockable() { } Lockable::~Lockable() { } Locker::Locker(Lockable* lockee, bool lock) { if (lockee && lock) m_lockee = lockee->lock(); else m_lockee = lockee; } void Locker::assign(Lockable* lockee, bool lock) { if (m_lockee) m_lockee->unlock(); m_lockee = nullptr; if (lockee && lock) m_lockee = lockee->lock(); else m_lockee = lockee; } Locker::~Locker() { if (m_lockee) m_lockee->unlock(); } xmltooling-1.5.3/xmltooling/Namespace.cpp000644 001751 001751 00000004054 12003305016 021667 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * Namespace.cpp * * Representing XML namespace attributes. */ #include "internal.h" #include "Namespace.h" using namespace xmltooling; using xercesc::XMLString; Namespace::Namespace(const XMLCh* uri, const XMLCh* prefix, bool alwaysDeclare, namespace_usage_t usage) : m_pinned(alwaysDeclare), m_usage(usage) { setNamespaceURI(uri); setNamespacePrefix(prefix); } Namespace::~Namespace() { } void Namespace::setNamespacePrefix(const XMLCh* prefix) { if (prefix) m_prefix=prefix; else m_prefix.erase(); } void Namespace::setNamespaceURI(const XMLCh* uri) { if (uri) m_uri=uri; else m_uri.erase(); } bool xmltooling::operator<(const Namespace& op1, const Namespace& op2) { int i=XMLString::compareString(op1.getNamespaceURI(),op2.getNamespaceURI()); if (i<0) return true; else if (i==0) return (XMLString::compareString(op1.getNamespacePrefix(),op2.getNamespacePrefix())<0); else return false; } bool xmltooling::operator==(const Namespace& op1, const Namespace& op2) { return (XMLString::equals(op1.getNamespacePrefix(), op2.getNamespacePrefix()) && XMLString::equals(op1.getNamespaceURI(), op2.getNamespaceURI())); } xmltooling-1.5.3/xmltooling/unicode.cpp000644 001751 001751 00000005764 12003305017 021433 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * unicode.cpp * * Helper classes and types for manipulating Unicode */ #include "internal.h" #include "unicode.h" #include #include using namespace xercesc; static const XMLCh UTF8[]={ chLatin_U, chLatin_T, chLatin_F, chDigit_8, chNull }; char* xmltooling::toUTF8(const XMLCh* src, bool use_malloc) { xsecsize_t eaten,factor=1,bufsize; xsecsize_t srclen=XMLString::stringLen(src); XMLUTF8Transcoder t(UTF8, 4096); // block size isn't used any more anyway do { bufsize = factor*srclen + 10; char* buf = use_malloc ? reinterpret_cast(malloc(bufsize)) : new char[bufsize]; memset(buf,0,bufsize); try { t.transcodeTo( src,srclen, reinterpret_cast(buf),bufsize-1, eaten, XMLTranscoder::UnRep_Throw); } catch (XMLException&) { if (use_malloc) free(buf); else delete[] buf; throw XMLToolingException("Source string contained an unrepresentable character."); } if (eaten >= srclen) return buf; if (use_malloc) free(buf); else delete[] buf; factor++; } while (1); } XMLCh* xmltooling::fromUTF8(const char* src, bool use_malloc) { xsecsize_t eaten; xsecsize_t srclen=strlen(src); XMLUTF8Transcoder t(UTF8, 4096); // block size isn't used any more anyway XMLCh* buf = use_malloc ? reinterpret_cast(malloc((srclen+1)*sizeof(XMLCh))) : new XMLCh[srclen + 1]; unsigned char* sizes=new unsigned char[srclen]; memset(buf,0,(srclen+1)*sizeof(XMLCh)); t.transcodeFrom( reinterpret_cast(src),srclen, buf,srclen, eaten,sizes); delete[] sizes; return buf; } std::ostream& xmltooling::operator<<(std::ostream& ostr, const XMLCh* s) { if (s) { char* p=xmltooling::toUTF8(s); ostr << p; delete[] p; } return ostr; } std::ostream& xmltooling::operator<<(std::ostream& ostr, const xstring& s) { return ostr << s.c_str(); } xmltooling-1.5.3/xmltooling/version.cpp000644 001751 001751 00000002667 12003305016 021470 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * version.cpp * * Library version macros and constants. */ #include "internal.h" #include "version.h" XMLTOOL_API const char* const gXMLToolingVersionStr = XMLTOOLING_VERSIONSTR; XMLTOOL_API const char* const gXMLToolingFullVersionStr = XMLTOOLING_FULLVERSIONSTR; XMLTOOL_API const char* const gXMLToolingDotVersionStr = XMLTOOLING_FULLVERSIONDOT; XMLTOOL_API const unsigned int gXMLToolingMajVersion = XMLTOOLING_VERSION_MAJOR; XMLTOOL_API const unsigned int gXMLToolingMinVersion = XMLTOOLING_VERSION_MINOR; XMLTOOL_API const unsigned int gXMLToolingRevision = XMLTOOLING_VERSION_REVISION; xmltooling-1.5.3/xmltooling/XMLObjectBuilder.cpp000644 001751 001751 00000011061 12003305016 023065 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * XMLObjectBuilder.cpp * * Factory interface for XMLObjects */ #include "internal.h" #include "logging.h" #include "ConcreteXMLObjectBuilder.h" #include "util/NDC.h" #include "util/XMLHelper.h" using namespace xmltooling::logging; using namespace xmltooling; using namespace std; using xercesc::DOMDocument; using xercesc::DOMElement; map XMLObjectBuilder::m_map; XMLObjectBuilder* XMLObjectBuilder::m_default = nullptr; XMLObjectBuilder::XMLObjectBuilder() { } XMLObjectBuilder::~XMLObjectBuilder() { } XMLObject* XMLObjectBuilder::buildFromQName(const QName& q) const { return buildObject(q.getNamespaceURI(),q.getLocalPart(),q.getPrefix()); } XMLObject* XMLObjectBuilder::buildFromElement(DOMElement* element, bool bindDocument) const { auto_ptr schemaType(XMLHelper::getXSIType(element)); auto_ptr ret( buildObject(element->getNamespaceURI(),element->getLocalName(),element->getPrefix(),schemaType.get()) ); ret->unmarshall(element,bindDocument); return ret.release(); } XMLObject* XMLObjectBuilder::buildFromDocument(DOMDocument* doc, bool bindDocument) const { return buildFromElement(doc->getDocumentElement(),bindDocument); } XMLObject* XMLObjectBuilder::buildOneFromElement(xercesc::DOMElement* element, bool bindDocument) { const XMLObjectBuilder* b=getBuilder(element); return b ? b->buildFromElement(element,bindDocument) : nullptr; } const XMLObjectBuilder* XMLObjectBuilder::getBuilder(const QName& key) { map::const_iterator i=m_map.find(key); return (i==m_map.end()) ? nullptr : i->second; } const XMLObjectBuilder* XMLObjectBuilder::getBuilder(const DOMElement* domElement) { #ifdef _DEBUG xmltooling::NDC ndc("getBuilder"); #endif Category& log=Category::getInstance(XMLTOOLING_LOGCAT".XMLObject.Builder"); auto_ptr schemaType(XMLHelper::getXSIType(domElement)); const XMLObjectBuilder* xmlObjectBuilder = schemaType.get() ? getBuilder(*(schemaType.get())) : nullptr; if (xmlObjectBuilder) { if (log.isDebugEnabled()) { log.debug("located XMLObjectBuilder for schema type: %s", schemaType->toString().c_str()); } return xmlObjectBuilder; } auto_ptr elementName(XMLHelper::getNodeQName(domElement)); xmlObjectBuilder = getBuilder(*(elementName.get())); if (xmlObjectBuilder) { if (log.isDebugEnabled()) { log.debug("located XMLObjectBuilder for element name: %s", elementName->toString().c_str()); } return xmlObjectBuilder; } if (log.isDebugEnabled()) { log.debug("no XMLObjectBuilder registered for element (%s), returning default", elementName->toString().c_str()); } return m_default; } const XMLObjectBuilder* XMLObjectBuilder::getDefaultBuilder() { return m_default; } const map& XMLObjectBuilder::getBuilders() { return m_map; } void XMLObjectBuilder::registerBuilder(const QName& builderKey, XMLObjectBuilder* builder) { deregisterBuilder(builderKey); m_map[builderKey]=builder; } void XMLObjectBuilder::registerDefaultBuilder(XMLObjectBuilder* builder) { deregisterDefaultBuilder(); m_default=builder; } void XMLObjectBuilder::deregisterBuilder(const QName& builderKey) { delete getBuilder(builderKey); m_map.erase(builderKey); } void XMLObjectBuilder::deregisterDefaultBuilder() { delete m_default; m_default = nullptr; } void XMLObjectBuilder::destroyBuilders() { for_each(m_map.begin(),m_map.end(),cleanup_pair()); m_map.clear(); deregisterDefaultBuilder(); } ConcreteXMLObjectBuilder::ConcreteXMLObjectBuilder() { } ConcreteXMLObjectBuilder::~ConcreteXMLObjectBuilder() { } xmltooling-1.5.3/xmltooling/XMLToolingConfig.cpp000644 001751 001751 00000070473 12147443124 023141 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * XMLToolingConfig.cpp * * Library configuration. */ #include "internal.h" #include "exceptions.h" #include "logging.h" #include "XMLToolingConfig.h" #include "encryption/Encryption.h" #include "encryption/Encrypter.h" #include "impl/UnknownElement.h" #include "io/HTTPResponse.h" #include "security/TrustEngine.h" #include "security/OpenSSLCryptoX509CRL.h" #include "security/CredentialResolver.h" #include "security/KeyInfoResolver.h" #include "security/PathValidator.h" #include "signature/KeyInfo.h" #include "signature/Signature.h" #include "soap/SOAP.h" #include "soap/SOAPTransport.h" #include "util/NDC.h" #include "util/PathResolver.h" #include "util/ReplayCache.h" #include "util/StorageService.h" #include "util/TemplateEngine.h" #include "util/Threads.h" #include "util/URLEncoder.h" #include "validation/ValidatorSuite.h" #ifdef HAVE_DLFCN_H # include #endif #include #include #if defined(XMLTOOLING_LOG4SHIB) # include # include #elif defined(XMLTOOLING_LOG4CPP) # include # include #endif #include #include #ifndef XMLTOOLING_NO_XMLSEC # include # include # include # include # include # include # include #endif using namespace soap11; using namespace xmltooling::logging; using namespace xmltooling; using namespace xercesc; using namespace boost; using namespace std; #ifdef WIN32 # if (OPENSSL_VERSION_NUMBER >= 0x00908000) # define XMLTOOLING_OPENSSL_HAVE_SHA2 1 # endif #endif DECL_XMLTOOLING_EXCEPTION_FACTORY(XMLParserException,xmltooling); DECL_XMLTOOLING_EXCEPTION_FACTORY(XMLObjectException,xmltooling); DECL_XMLTOOLING_EXCEPTION_FACTORY(MarshallingException,xmltooling); DECL_XMLTOOLING_EXCEPTION_FACTORY(UnmarshallingException,xmltooling); DECL_XMLTOOLING_EXCEPTION_FACTORY(UnknownElementException,xmltooling); DECL_XMLTOOLING_EXCEPTION_FACTORY(UnknownAttributeException,xmltooling); DECL_XMLTOOLING_EXCEPTION_FACTORY(UnknownExtensionException,xmltooling); DECL_XMLTOOLING_EXCEPTION_FACTORY(ValidationException,xmltooling); DECL_XMLTOOLING_EXCEPTION_FACTORY(IOException,xmltooling); #ifndef XMLTOOLING_NO_XMLSEC using namespace xmlencryption; using namespace xmlsignature; DECL_XMLTOOLING_EXCEPTION_FACTORY(XMLSecurityException,xmltooling); DECL_XMLTOOLING_EXCEPTION_FACTORY(SignatureException,xmlsignature); DECL_XMLTOOLING_EXCEPTION_FACTORY(EncryptionException,xmlencryption); #endif namespace { static XMLToolingInternalConfig g_config; #ifndef XMLTOOLING_NO_XMLSEC static ptr_vector g_openssl_locks; extern "C" void openssl_locking_callback(int mode,int n,const char *file,int line) { if (mode & CRYPTO_LOCK) g_openssl_locks[n].lock(); else g_openssl_locks[n].unlock(); } # ifndef WIN32 extern "C" unsigned long openssl_thread_id(void) { return (unsigned long)(pthread_self()); } # endif # ifdef XMLTOOLING_XMLSEC_DEBUGLOGGING class TXFMOutputLog : public TXFMBase { TXFMOutputLog(); public: TXFMOutputLog(DOMDocument* doc) : TXFMBase(doc), m_log(Category::getInstance(XMLTOOLING_LOGCAT".Signature.Debugger")) { input = nullptr; } ~TXFMOutputLog() { m_log.debug("\n----- END SIGNATURE DEBUG -----\n"); } void setInput(TXFMBase *newInput) { input = newInput; if (newInput->getOutputType() != TXFMBase::BYTE_STREAM) throw XSECException(XSECException::TransformInputOutputFail, "OutputLog transform requires BYTE_STREAM input"); keepComments = input->getCommentsStatus(); m_log.debug("\n----- BEGIN SIGNATURE DEBUG -----\n"); } TXFMBase::ioType getInputType() { return TXFMBase::BYTE_STREAM; } TXFMBase::ioType getOutputType() { return TXFMBase::BYTE_STREAM; } TXFMBase::nodeType getNodeType() { return TXFMBase::DOM_NODE_NONE; } unsigned int readBytes(XMLByte * const toFill, const unsigned int maxToFill) { unsigned int sz = input->readBytes(toFill, maxToFill); m_log.debug(string(reinterpret_cast(toFill), sz)); return sz; } DOMDocument* getDocument() { return nullptr; } DOMNode* getFragmentNode() { return nullptr; } const XMLCh* getFragmentId() { return nullptr; } private: Category& m_log; }; TXFMBase* TXFMOutputLogFactory(DOMDocument* doc) { if (Category::getInstance(XMLTOOLING_LOGCAT".Signature.Debugger").isDebugEnabled()) return new TXFMOutputLog(doc); return nullptr; } # endif #endif #ifdef WIN32 BOOL LogEvent( LPCSTR lpUNCServerName, WORD wType, DWORD dwEventID, PSID lpUserSid, LPCSTR message) { LPCSTR messages[] = {message, nullptr}; HANDLE hElog = RegisterEventSource(lpUNCServerName, "OpenSAML XMLTooling Library"); BOOL res = ReportEvent(hElog, wType, 0, dwEventID, lpUserSid, 1, 0, messages, nullptr); return (DeregisterEventSource(hElog) && res); } #endif } XMLToolingConfig& XMLToolingConfig::getConfig() { return g_config; } XMLToolingInternalConfig& XMLToolingInternalConfig::getInternalConfig() { return g_config; } #ifndef XMLTOOLING_NO_XMLSEC XMLToolingConfig::XMLToolingConfig() : m_keyInfoResolver(nullptr), m_replayCache(nullptr), m_pathResolver(nullptr), m_templateEngine(nullptr), m_urlEncoder(nullptr), clock_skew_secs(180) #else XMLToolingConfig::XMLToolingConfig() : m_pathResolver(nullptr), m_templateEngine(nullptr), m_urlEncoder(nullptr), clock_skew_secs(180) #endif { } XMLToolingConfig::~XMLToolingConfig() { } #ifndef XMLTOOLING_LITE const KeyInfoResolver* XMLToolingConfig::getKeyInfoResolver() const { return m_keyInfoResolver; } ReplayCache* XMLToolingConfig::getReplayCache() const { return m_replayCache; } void XMLToolingConfig::setKeyInfoResolver(xmltooling::KeyInfoResolver *keyInfoResolver) { delete m_keyInfoResolver; m_keyInfoResolver = keyInfoResolver; } void XMLToolingConfig::setReplayCache(ReplayCache* replayCache) { delete m_replayCache; m_replayCache = replayCache; } #endif PathResolver* XMLToolingConfig::getPathResolver() const { return m_pathResolver; } TemplateEngine* XMLToolingConfig::getTemplateEngine() const { return m_templateEngine; } const URLEncoder* XMLToolingConfig::getURLEncoder() const { return m_urlEncoder; } void XMLToolingConfig::setPathResolver(PathResolver* pathResolver) { delete m_pathResolver; m_pathResolver = pathResolver; } void XMLToolingConfig::setTemplateEngine(TemplateEngine* templateEngine) { delete m_templateEngine; m_templateEngine = templateEngine; } void XMLToolingConfig::setURLEncoder(URLEncoder* urlEncoder) { delete m_urlEncoder; m_urlEncoder = urlEncoder; } XMLToolingInternalConfig::XMLToolingInternalConfig() : #ifndef XMLTOOLING_NO_XMLSEC m_xsecProvider(nullptr), #endif m_initCount(0), m_lock(Mutex::create()), m_parserPool(nullptr), m_validatingPool(nullptr) { } XMLToolingInternalConfig::~XMLToolingInternalConfig() { } bool XMLToolingInternalConfig::log_config(const char* config) { try { if (!config || !*config) config=getenv("XMLTOOLING_LOG_CONFIG"); if (!config || !*config) config="WARN"; bool level=false; Category& root = Category::getRoot(); if (!strcmp(config,"DEBUG")) { root.setPriority(Priority::DEBUG); level=true; } else if (!strcmp(config,"INFO")) { root.setPriority(Priority::INFO); level=true; } else if (!strcmp(config,"NOTICE")) { root.setPriority(Priority::NOTICE); level=true; } else if (!strcmp(config,"WARN")) { root.setPriority(Priority::WARN); level=true; } else if (!strcmp(config,"ERROR")) { root.setPriority(Priority::ERROR); level=true; } else if (!strcmp(config,"CRIT")) { root.setPriority(Priority::CRIT); level=true; } else if (!strcmp(config,"ALERT")) { root.setPriority(Priority::ALERT); level=true; } else if (!strcmp(config,"EMERG")) { root.setPriority(Priority::EMERG); level=true; } else if (!strcmp(config,"FATAL")) { root.setPriority(Priority::FATAL); level=true; } if (level) { root.setAppender(new OstreamAppender("default",&cerr)); } else { string path(config); PropertyConfigurator::configure(m_pathResolver ? m_pathResolver->resolve(path, PathResolver::XMLTOOLING_CFG_FILE) : path); } #ifndef XMLTOOLING_NO_XMLSEC Category::getInstance(XMLTOOLING_LOGCAT".Signature.Debugger").setAdditivity(false); #endif } catch (const ConfigureFailure& e) { string msg = string("error in file permissions or logging configuration: ") + e.what(); Category::getInstance(XMLTOOLING_LOGCAT".Logging").crit(msg); #ifdef WIN32 LogEvent(nullptr, EVENTLOG_ERROR_TYPE, 2100, nullptr, msg.c_str()); #endif return false; } return true; } bool XMLToolingInternalConfig::init() { #ifdef _DEBUG xmltooling::NDC ndc("init"); #endif Category& log=Category::getInstance(XMLTOOLING_LOGCAT".Config"); Lock initLock(m_lock); if (m_initCount == INT_MAX) { log.crit("library initialized too many times"); return false; } if (m_initCount >= 1) { ++m_initCount; return true; } try { log.debug("library initialization started"); #ifndef XMLTOOLING_NO_XMLSEC if (curl_global_init(CURL_GLOBAL_ALL)) { log.fatal("failed to initialize libcurl, OpenSSL, or Winsock"); return false; } curl_version_info_data* curlver = curl_version_info(CURLVERSION_NOW); if (curlver) { log.debug("libcurl %s initialization complete", curlver->version); if (!(curlver->features & CURL_VERSION_SSL)) { log.crit("libcurl lacks TLS/SSL support, this will greatly limit functionality"); } else if (curlver->ssl_version && !strstr(curlver->ssl_version, "OpenSSL")) { log.crit("libcurl lacks OpenSSL-specific options, this will greatly limit functionality"); } } else { log.debug("libcurl %s initialization complete", LIBCURL_VERSION); } #endif XMLPlatformUtils::Initialize(); log.debug("Xerces %s initialization complete", XERCES_FULLVERSIONDOT); #ifndef XMLTOOLING_NO_XMLSEC XSECPlatformUtils::Initialise(); # ifdef XMLTOOLING_XMLSEC_DEBUGLOGGING XSECPlatformUtils::SetReferenceLoggingSink(TXFMOutputLogFactory); # endif m_xsecProvider = new XSECProvider(); log.debug("XML-Security %s initialization complete", XSEC_FULLVERSIONDOT); #endif m_parserPool = new ParserPool(); m_validatingPool = new ParserPool(true,true); m_pathResolver = new PathResolver(); m_urlEncoder = new URLEncoder(); // Load catalogs from deprecated path setting. if (!catalog_path.empty()) m_validatingPool->loadCatalogs(catalog_path.c_str()); // default registrations XMLObjectBuilder::registerDefaultBuilder(new UnknownElementBuilder()); registerSOAPClasses(); REGISTER_XMLTOOLING_EXCEPTION_FACTORY(XMLParserException,xmltooling); REGISTER_XMLTOOLING_EXCEPTION_FACTORY(XMLObjectException,xmltooling); REGISTER_XMLTOOLING_EXCEPTION_FACTORY(MarshallingException,xmltooling); REGISTER_XMLTOOLING_EXCEPTION_FACTORY(UnmarshallingException,xmltooling); REGISTER_XMLTOOLING_EXCEPTION_FACTORY(UnknownElementException,xmltooling); REGISTER_XMLTOOLING_EXCEPTION_FACTORY(UnknownAttributeException,xmltooling); REGISTER_XMLTOOLING_EXCEPTION_FACTORY(ValidationException,xmltooling); REGISTER_XMLTOOLING_EXCEPTION_FACTORY(IOException,xmltooling); #ifndef XMLTOOLING_NO_XMLSEC XMLObjectBuilder::registerBuilder(QName(xmlconstants::XMLSIG_NS,Signature::LOCAL_NAME),new SignatureBuilder()); REGISTER_XMLTOOLING_EXCEPTION_FACTORY(XMLSecurityException,xmltooling); REGISTER_XMLTOOLING_EXCEPTION_FACTORY(SignatureException,xmlsignature); REGISTER_XMLTOOLING_EXCEPTION_FACTORY(EncryptionException,xmlencryption); registerKeyInfoClasses(); registerEncryptionClasses(); registerCredentialResolvers(); registerKeyInfoResolvers(); registerPathValidators(); registerTrustEngines(); registerXMLAlgorithms(); m_keyInfoResolver = KeyInfoResolverManager.newPlugin(INLINE_KEYINFO_RESOLVER,nullptr); #endif #ifndef XMLTOOLING_LITE registerStorageServices(); #endif registerSOAPTransports(); initSOAPTransports(); HTTPResponse::getAllowedSchemes().push_back("https"); HTTPResponse::getAllowedSchemes().push_back("http"); // Register xml:id as an ID attribute. static const XMLCh xmlid[] = UNICODE_LITERAL_2(i,d); AttributeExtensibleXMLObject::registerIDAttribute(QName(xmlconstants::XML_NS, xmlid)); } catch (const xercesc::XMLException&) { log.fatal("caught exception while initializing Xerces"); #ifndef XMLTOOLING_NO_XMLSEC curl_global_cleanup(); #endif return false; } #ifndef XMLTOOLING_NO_XMLSEC // Set up OpenSSL locking. for (int i=0; i 0) { return; } #ifndef XMLTOOLING_NO_XMLSEC CRYPTO_set_locking_callback(nullptr); g_openssl_locks.clear(); #endif SchemaValidators.destroyValidators(); XMLObjectBuilder::destroyBuilders(); XMLToolingException::deregisterFactories(); AttributeExtensibleXMLObject::deregisterIDAttributes(); termSOAPTransports(); SOAPTransportManager.deregisterFactories(); #ifndef XMLTOOLING_LITE StorageServiceManager.deregisterFactories(); #endif #ifndef XMLTOOLING_NO_XMLSEC TrustEngineManager.deregisterFactories(); CredentialResolverManager.deregisterFactories(); KeyInfoResolverManager.deregisterFactories(); m_algorithmMap.clear(); delete m_keyInfoResolver; m_keyInfoResolver = nullptr; delete m_replayCache; m_replayCache = nullptr; #endif delete m_pathResolver; m_pathResolver = nullptr; delete m_templateEngine; m_templateEngine = nullptr; delete m_urlEncoder; m_urlEncoder = nullptr; for (vector::reverse_iterator i=m_libhandles.rbegin(); i!=m_libhandles.rend(); i++) { #if defined(WIN32) FARPROC fn=GetProcAddress(static_cast(*i),"xmltooling_extension_term"); if (fn) fn(); FreeLibrary(static_cast(*i)); #elif defined(HAVE_DLFCN_H) void (*fn)()=(void (*)())dlsym(*i,"xmltooling_extension_term"); if (fn) fn(); dlclose(*i); #else # error "Don't know about dynamic loading on this platform!" #endif } m_libhandles.clear(); delete m_parserPool; m_parserPool=nullptr; delete m_validatingPool; m_validatingPool=nullptr; for_each(m_namedLocks.begin(), m_namedLocks.end(), cleanup_pair()); m_namedLocks.clear(); #ifndef XMLTOOLING_NO_XMLSEC delete m_xsecProvider; m_xsecProvider=nullptr; XSECPlatformUtils::Terminate(); #endif XMLPlatformUtils::Terminate(); #ifndef XMLTOOLING_NO_XMLSEC curl_global_cleanup(); #endif Category::getInstance(XMLTOOLING_LOGCAT".Config").info("%s library shutdown complete", PACKAGE_STRING); } Lockable* XMLToolingInternalConfig::lock() { m_lock->lock(); return this; } void XMLToolingInternalConfig::unlock() { m_lock->unlock(); } Mutex& XMLToolingInternalConfig::getNamedMutex(const char* name) { Locker glock(this); map::const_iterator m = m_namedLocks.find(name); if (m != m_namedLocks.end()) return *(m->second); Mutex* newlock = Mutex::create(); m_namedLocks[name] = newlock; return *newlock; } bool XMLToolingInternalConfig::load_library(const char* path, void* context) { #ifdef _DEBUG xmltooling::NDC ndc("LoadLibrary"); #endif Category& log=Category::getInstance(XMLTOOLING_LOGCAT".Config"); log.info("loading extension: %s", path); Locker locker(this); string resolved(path); m_pathResolver->resolve(resolved, PathResolver::XMLTOOLING_LIB_FILE); #if defined(WIN32) HMODULE handle=nullptr; for (string::iterator i = resolved.begin(); i != resolved.end(); ++i) if (*i == '/') *i = '\\'; UINT em=SetErrorMode(SEM_FAILCRITICALERRORS); try { handle=LoadLibraryEx(resolved.c_str(),nullptr,LOAD_WITH_ALTERED_SEARCH_PATH); if (!handle) handle=LoadLibraryEx(resolved.c_str(),nullptr,0); if (!handle) throw runtime_error(string("unable to load extension library: ") + resolved); FARPROC fn=GetProcAddress(handle,"xmltooling_extension_init"); if (!fn) throw runtime_error(string("unable to locate xmltooling_extension_init entry point: ") + resolved); if (reinterpret_cast(fn)(context)!=0) throw runtime_error(string("detected error in xmltooling_extension_init: ") + resolved); SetErrorMode(em); } catch(std::exception&) { if (handle) FreeLibrary(handle); SetErrorMode(em); throw; } #elif defined(HAVE_DLFCN_H) void* handle=dlopen(resolved.c_str(),RTLD_LAZY); if (!handle) throw runtime_error(string("unable to load extension library '") + resolved + "': " + dlerror()); int (*fn)(void*)=(int (*)(void*))(dlsym(handle,"xmltooling_extension_init")); if (!fn) { dlclose(handle); throw runtime_error( string("unable to locate xmltooling_extension_init entry point in '") + resolved + "': " + (dlerror() ? dlerror() : "unknown error") ); } try { if (fn(context)!=0) throw runtime_error(string("detected error in xmltooling_extension_init in ") + resolved); } catch(std::exception&) { if (handle) dlclose(handle); throw; } #else # error "Don't know about dynamic loading on this platform!" #endif m_libhandles.push_back(handle); log.info("loaded extension: %s", resolved.c_str()); return true; } #ifndef XMLTOOLING_NO_XMLSEC void xmltooling::log_openssl() { const char* file; const char* data; int flags,line; unsigned long code=ERR_get_error_line_data(&file,&line,&data,&flags); while (code) { Category& log=Category::getInstance("OpenSSL"); log.errorStream() << "error code: " << code << " in " << file << ", line " << line << logging::eol; if (data && (flags & ERR_TXT_STRING)) log.errorStream() << "error data: " << data << logging::eol; code=ERR_get_error_line_data(&file,&line,&data,&flags); } } XSECCryptoX509CRL* XMLToolingInternalConfig::X509CRL() const { return new OpenSSLCryptoX509CRL(); } pair XMLToolingInternalConfig::mapXMLAlgorithmToKeyAlgorithm(const XMLCh* xmlAlgorithm) const { for (algmap_t::const_iterator i = m_algorithmMap.begin(); i != m_algorithmMap.end(); ++i) { algmap_t::value_type::second_type::const_iterator j = i->second.find(xmlAlgorithm); if (j != i->second.end()) return pair(j->second.first.c_str(), j->second.second); } return pair(nullptr, 0); } void XMLToolingInternalConfig::registerXMLAlgorithm( const XMLCh* xmlAlgorithm, const char* keyAlgorithm, unsigned int size, XMLSecurityAlgorithmType type ) { m_algorithmMap[type][xmlAlgorithm] = pair((keyAlgorithm ? keyAlgorithm : ""), size); // Authenticated encryption algorithms are also generic encryption algorithms. if (type == ALGTYPE_AUTHNENCRYPT) m_algorithmMap[ALGTYPE_ENCRYPT][xmlAlgorithm] = pair((keyAlgorithm ? keyAlgorithm : ""), size); } bool XMLToolingInternalConfig::isXMLAlgorithmSupported(const XMLCh* xmlAlgorithm, XMLSecurityAlgorithmType type) { try { // First check for basic support from the xmlsec layer. if (XSECPlatformUtils::g_algorithmMapper->mapURIToHandler(xmlAlgorithm)) { // Make sure the algorithm is registered. algmap_t::const_iterator i = m_algorithmMap.find(type); if (i != m_algorithmMap.end()) { algmap_t::value_type::second_type::const_iterator j = i->second.find(xmlAlgorithm); if (j != i->second.end()) return true; } } } catch (XSECException&) { } return false; } void XMLToolingInternalConfig::registerXMLAlgorithms() { // The deal with all the macros is to try and figure out with no false positives whether // the OpenSSL version *and* the XML-Security version support the algorithms. // With ECDSA, XML-Security exports a public macro for OpenSSL's support, and any // versions of XML-Security that didn't provide the macro don't handle ECDSA anyway. // However, the SHA-224 variant was left out of the initial XML-Security release. // With AES and GCM, all supported XML-Security versions export a macro for OpenSSL's support. // With SHA2, only the very latest XML-Security exports a macro, but all the versions // will handle SHA2 *if* OpenSSL does. So we use our own macro to check OpenSSL's // support, and then add checks to see if specific versions are compiled out. registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIMD5, nullptr, 0, ALGTYPE_DIGEST); registerXMLAlgorithm(DSIGConstants::s_unicodeStrURISHA1, nullptr, 0, ALGTYPE_DIGEST); #if defined(XMLTOOLING_OPENSSL_HAVE_SHA2) && !defined(OPENSSL_NO_SHA256) registerXMLAlgorithm(DSIGConstants::s_unicodeStrURISHA224, nullptr, 0, ALGTYPE_DIGEST); registerXMLAlgorithm(DSIGConstants::s_unicodeStrURISHA256, nullptr, 0, ALGTYPE_DIGEST); #endif #if defined(XMLTOOLING_OPENSSL_HAVE_SHA2) && !defined(OPENSSL_NO_SHA512) registerXMLAlgorithm(DSIGConstants::s_unicodeStrURISHA384, nullptr, 0, ALGTYPE_DIGEST); registerXMLAlgorithm(DSIGConstants::s_unicodeStrURISHA512, nullptr, 0, ALGTYPE_DIGEST); #endif registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIDSA_SHA1, "DSA", 0, ALGTYPE_SIGN); #if defined(URI_ID_DSA_SHA256) && defined(XMLTOOLING_OPENSSL_HAVE_SHA2) && !defined(OPENSSL_NO_SHA256) registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIDSA_SHA256, "DSA", 0, ALGTYPE_SIGN); #endif registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIRSA_MD5, "RSA", 0, ALGTYPE_SIGN); registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIRSA_SHA1, "RSA", 0, ALGTYPE_SIGN); #if defined(XMLTOOLING_OPENSSL_HAVE_SHA2) && !defined(OPENSSL_NO_SHA256) registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIRSA_SHA224, "RSA", 0, ALGTYPE_SIGN); registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIRSA_SHA256, "RSA", 0, ALGTYPE_SIGN); #endif #if defined(XMLTOOLING_OPENSSL_HAVE_SHA2) && !defined(OPENSSL_NO_SHA512) registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIRSA_SHA384, "RSA", 0, ALGTYPE_SIGN); registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIRSA_SHA512, "RSA", 0, ALGTYPE_SIGN); #endif #ifdef XSEC_OPENSSL_HAVE_EC registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIECDSA_SHA1, "EC", 0, ALGTYPE_SIGN); # if defined(XMLTOOLING_OPENSSL_HAVE_SHA2) && !defined(OPENSSL_NO_SHA256) registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIECDSA_SHA256, "EC", 0, ALGTYPE_SIGN); # ifdef URI_ID_ECDSA_SHA224 registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIECDSA_SHA224, "EC", 0, ALGTYPE_SIGN); # endif # endif # if defined(XMLTOOLING_OPENSSL_HAVE_SHA2) && !defined(OPENSSL_NO_SHA512) registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIECDSA_SHA384, "EC", 0, ALGTYPE_SIGN); registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIECDSA_SHA512, "EC", 0, ALGTYPE_SIGN); # endif #endif registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIHMAC_SHA1, "HMAC", 0, ALGTYPE_SIGN); #if defined(XMLTOOLING_OPENSSL_HAVE_SHA2) && !defined(OPENSSL_NO_SHA256) registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIHMAC_SHA224, "HMAC", 0, ALGTYPE_SIGN); registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIHMAC_SHA256, "HMAC", 0, ALGTYPE_SIGN); #endif #if defined(XMLTOOLING_OPENSSL_HAVE_SHA2) && !defined(OPENSSL_NO_SHA512) registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIHMAC_SHA384, "HMAC", 0, ALGTYPE_SIGN); registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIHMAC_SHA512, "HMAC", 0, ALGTYPE_SIGN); #endif registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIRSA_1_5, "RSA", 0, ALGTYPE_KEYENCRYPT); registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIRSA_OAEP_MGFP1, "RSA", 0, ALGTYPE_KEYENCRYPT); #ifdef URI_ID_RSA_OAEP registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIRSA_OAEP, "RSA", 0, ALGTYPE_KEYENCRYPT); #endif registerXMLAlgorithm(DSIGConstants::s_unicodeStrURI3DES_CBC, "DESede", 192, ALGTYPE_ENCRYPT); registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIKW_3DES, "DESede", 192, ALGTYPE_KEYENCRYPT); #ifdef XSEC_OPENSSL_HAVE_AES registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIAES128_CBC, "AES", 128, ALGTYPE_ENCRYPT); registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIKW_AES128, "AES", 128, ALGTYPE_KEYENCRYPT); registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIAES192_CBC, "AES", 192, ALGTYPE_ENCRYPT); registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIKW_AES192, "AES", 192, ALGTYPE_KEYENCRYPT); registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIAES256_CBC, "AES", 256, ALGTYPE_ENCRYPT); registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIKW_AES256, "AES", 256, ALGTYPE_KEYENCRYPT); # ifdef URI_ID_KW_AES128_PAD registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIKW_AES128_PAD, "AES", 128, ALGTYPE_KEYENCRYPT); registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIKW_AES192_PAD, "AES", 192, ALGTYPE_KEYENCRYPT); registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIKW_AES256_PAD, "AES", 256, ALGTYPE_KEYENCRYPT); # endif #endif #ifdef XSEC_OPENSSL_HAVE_GCM registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIAES128_GCM, "AES", 128, ALGTYPE_AUTHNENCRYPT); registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIAES192_GCM, "AES", 192, ALGTYPE_AUTHNENCRYPT); registerXMLAlgorithm(DSIGConstants::s_unicodeStrURIAES256_GCM, "AES", 256, ALGTYPE_AUTHNENCRYPT); #endif } #endif #ifdef WIN32 extern "C" __declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID) { if (fdwReason == DLL_THREAD_DETACH || fdwReason == DLL_PROCESS_DETACH) ThreadKey::onDetach(); return TRUE; } #endif xmltooling-1.5.3/xmltooling/xmltooling.vcxproj000644 001751 001751 00000046270 12147443124 023122 0ustar00scantorscantor000000 000000 Debug Win32 Debug x64 Release Win32 Release x64 {06B55A46-D3B3-41AE-B5A5-B57830BA010D} xmltooling Win32Proj DynamicLibrary MultiByte true DynamicLibrary MultiByte DynamicLibrary MultiByte true DynamicLibrary MultiByte <_ProjectFileVersion>10.0.30319.1 true $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ true $(SolutionDir)$(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset $(ProjectName)1_5D $(ProjectName)1_5D $(ProjectName)1_5 $(ProjectName)1_5 Disabled $(SolutionDir);$(ProjectDir);%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) EnableFastChecks true Level3 EditAndContinue MultiThreadedDebugDLL _DEBUG;%(PreprocessorDefinitions) wsock32.lib;log4shib1D.lib;xerces-c_3D.lib;xsec_1D.lib;libeay32D.lib;ssleay32D.lib;libcurl5d_imp.lib;%(AdditionalDependencies) true Windows $(TargetDir)$(ProjectName)1D.lib X64 Disabled $(SolutionDir);$(ProjectDir);%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) EnableFastChecks true Level3 ProgramDatabase MultiThreadedDebugDLL _DEBUG;%(PreprocessorDefinitions) wsock32.lib;log4shib1D.lib;xerces-c_3D.lib;xsec_1D.lib;libeay32D.lib;ssleay32D.lib;libcurl5d_imp.lib;%(AdditionalDependencies) true Windows $(TargetDir)$(ProjectName)1D.lib $(SolutionDir);$(ProjectDir);%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) Level3 ProgramDatabase wsock32.lib;log4shib1.lib;xerces-c_3.lib;xsec_1.lib;libeay32.lib;ssleay32.lib;libcurl5_imp.lib;%(AdditionalDependencies) true Windows true true $(TargetDir)$(ProjectName)1.lib X64 $(SolutionDir);$(ProjectDir);%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) Level3 ProgramDatabase wsock32.lib;log4shib1.lib;xerces-c_3.lib;xsec_1.lib;libeay32.lib;ssleay32.lib;libcurl5_imp.lib;%(AdditionalDependencies) true Windows true true $(TargetDir)$(ProjectName)1.lib xmltooling-1.5.3/xmltooling/xmltooling-lite.vcxproj000644 001751 001751 00000037513 12147443124 024055 0ustar00scantorscantor000000 000000 Debug Win32 Debug x64 Release Win32 Release x64 {06B55A46-D3B3-41AE-B5A5-B57830BA010E} xmltooling-lite Win32Proj DynamicLibrary MultiByte true DynamicLibrary MultiByte DynamicLibrary MultiByte true DynamicLibrary MultiByte <_ProjectFileVersion>10.0.30319.1 $(ProjectName)-$(Configuration)\ true $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(ProjectName)-$(Configuration)\ true $(ProjectName)-$(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(ProjectName)-$(Configuration)\ AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset $(ProjectName)1_5 $(ProjectName)1_5 $(ProjectName)1_5D $(ProjectName)1_5D Disabled $(SolutionDir);$(ProjectDir);%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;XMLTOOLING_LITE;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL true Level3 EditAndContinue _DEBUG;XMLTOOLING_LITE;%(PreprocessorDefinitions) wsock32.lib;log4shib1D.lib;xerces-c_3D.lib;%(AdditionalDependencies) true Windows false $(TargetDir)$(ProjectName)1D.lib MachineX86 X64 Disabled $(SolutionDir);$(ProjectDir);%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;XMLTOOLING_LITE;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL true Level3 ProgramDatabase _DEBUG;XMLTOOLING_LITE;%(PreprocessorDefinitions) wsock32.lib;log4shib1D.lib;xerces-c_3D.lib;%(AdditionalDependencies) true Windows $(TargetDir)$(ProjectName)1D.lib $(SolutionDir);$(ProjectDir);%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;XMLTOOLING_LITE;%(PreprocessorDefinitions) MultiThreadedDLL Level3 ProgramDatabase XMLTOOLING_LITE;%(PreprocessorDefinitions) wsock32.lib;log4shib1.lib;xerces-c_3.lib;%(AdditionalDependencies) true Windows true true false $(TargetDir)$(ProjectName)1.lib MachineX86 X64 $(SolutionDir);$(ProjectDir);%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;XMLTOOLING_LITE;%(PreprocessorDefinitions) MultiThreadedDLL Level3 ProgramDatabase XMLTOOLING_LITE;%(PreprocessorDefinitions) wsock32.lib;log4shib1.lib;xerces-c_3.lib;%(AdditionalDependencies) true Windows true true $(TargetDir)$(ProjectName)1.lib xmltooling-1.5.3/xmltooling/xmltooling.vcxproj.filters000644 001751 001751 00000050255 12003305016 024553 0ustar00scantorscantor000000 000000  {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {8b8038f5-ba25-456b-9734-a70686aef04a} {0d7d667e-e1f1-4c0b-a151-d7c4627907aa} {122b507b-6147-4892-8a43-f30af20ef523} {4bd22bc7-71ca-4d3b-8998-8ebea451cc3c} {a4dfe3ee-9b1f-4cd1-9260-04ec12f59cf9} {3d91cda3-da09-4fca-991b-b3162ac58c3b} {0f737f2b-cabf-4da5-a02a-e3df621ed5d3} {b8372dbb-c996-4ef7-8d1e-2877eb272885} {b04066c6-8949-4a59-89b3-1521e6cec860} {306c16b4-af6b-4c21-948d-0149253aa0f0} {bd52f91d-88db-49be-a9cd-445b6a6a61d2} {733d4fc4-edbf-43d3-a95d-6796bd93c296} {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hpp;hxx;hm;inl;inc;xsd {d470e7cb-b341-46f8-8ebf-2df760ca7caa} {74549b82-97e3-4c43-8603-07ca45818106} {64d95fff-366e-4a00-bf4b-2fc8e3b3a805} {0b7707f6-d7b6-4a2d-a853-83c43810c997} {90125fa2-c1da-4526-88ff-4a45f7c53150} {a88763c2-8c35-46e5-8ecb-ba1f28a11577} {fe2da4fa-ae43-4671-ab6e-8e8abf39703f} {3409a378-6623-4990-97a5-a84925dc0f43} {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files\util Source Files\util Source Files\util Source Files\util Source Files\util Source Files\util Source Files\util Source Files\util Source Files\util Source Files\util Source Files\util Source Files\util Source Files\util Source Files\io Source Files\io Source Files\io Source Files\io Source Files\impl Source Files\impl Source Files\impl Source Files\validation Source Files\signature\impl Source Files\signature\impl Source Files\signature\impl Source Files\signature\impl Source Files\encryption\impl Source Files\encryption\impl Source Files\encryption\impl Source Files\encryption\impl Source Files\encryption\impl Source Files\security\impl Source Files\security\impl Source Files\security\impl Source Files\security\impl Source Files\security\impl Source Files\security\impl Source Files\security\impl Source Files\security\impl Source Files\security\impl Source Files\security\impl Source Files\security\impl Source Files\security\impl Source Files\security\impl Source Files\security\impl Source Files\security\impl Source Files\security\impl Source Files\soap\impl Source Files\soap\impl Source Files\soap\impl Source Files\soap\impl Source Files Source Files\security\impl Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files\util Header Files\util Header Files\util Header Files\util Header Files\util Header Files\util Header Files\util Header Files\util Header Files\util Header Files\util Header Files\util Header Files\util Header Files\util Header Files\util Header Files\util Header Files\io Header Files\io Header Files\io Header Files\io Header Files\io Header Files\io Header Files\impl Header Files\impl Header Files\validation Header Files\validation Header Files\signature Header Files\signature Header Files\signature Header Files\signature Header Files\encryption Header Files\encryption Header Files\encryption Header Files\encryption Header Files\security Header Files\security Header Files\security Header Files\security Header Files\security Header Files\security Header Files\security Header Files\security Header Files\security Header Files\security Header Files\security Header Files\security Header Files\security Header Files\security Header Files\security Header Files\security Header Files\security Header Files\security Header Files\soap Header Files\soap Header Files\soap Header Files\soap Header Files\soap Header Files\security Header Files\security Header Files\security Resource Files xmltooling-1.5.3/xmltooling/xmltooling-lite.vcxproj.filters000644 001751 001751 00000025262 12003305016 025506 0ustar00scantorscantor000000 000000  {5FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {6b31e0fe-3ed6-42a1-91ab-01785706b725} {0192d858-4723-4ee6-b664-45090a294e58} {a8379edd-bc5d-4566-861b-1609b8be7556} {d8ada3a2-c249-495c-a156-23be280c8f7e} {c8607946-d663-43ef-b1a9-d45aa87d2561} {e166c754-ceb0-4852-88e5-77c7ef6d519a} {93995380-89BD-4b04-88EB-625FBE52EBFC} h;hpp;hxx;hm;inl;inc;xsd {c7d3c01c-c0f1-4f9d-99b9-9e6292ee7907} {63cd591c-270f-489a-bd8f-f0a10c3ed035} {5c74a183-c6f1-433e-8f7a-1b540d7f6661} {ebed0c01-a837-40f8-8e5d-87308964abb6} {dc121f87-4caa-478c-a125-2bb8240b92e9} {67DA6AB6-F800-4c08-8B7A-83BB121AAD02} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files\util Source Files\util Source Files\util Source Files\util Source Files\util Source Files\util Source Files\util Source Files\util Source Files\util Source Files\util Source Files\io Source Files\io Source Files\io Source Files\io Source Files\impl Source Files\impl Source Files\validation Source Files\soap\impl Source Files\soap\impl Source Files\soap\impl Source Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files\util Header Files\util Header Files\util Header Files\util Header Files\util Header Files\util Header Files\util Header Files\util Header Files\util Header Files\util Header Files\util Header Files\util Header Files\io Header Files\io Header Files\impl Header Files\impl Header Files\validation Header Files\validation Header Files\soap Header Files\soap Header Files\soap Header Files\soap Resource Files xmltooling-1.5.3/xmltooling/config_pub_win32.h000644 001751 001751 00000004402 12003305016 022572 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /* Define if C++ compiler supports covariant virtual methods. */ #define HAVE_COVARIANT_RETURNS 1 /* Define to 1 if C++ compiler supports nullptr keyword. */ #if _MSC_VER >= 1600 # define HAVE_NULLPTR 1 #endif /* Define to 1 if you have an STL implementation that supports useful string specialization. */ #define HAVE_GOOD_STL 1 /* Define to 1 if you have an STL implementation that supports std::iterator_traits. */ #define HAVE_ITERATOR_TRAITS 1 /* Define if log4shib library is used. */ #define XMLTOOLING_LOG4SHIB 1 /* Define if log4cpp library is used. */ /* #undef XMLTOOLING_LOG4CPP */ /* Define to 1 to disable XML-Security-dependent features. */ /* #undef XMLTOOLING_NO_XMLSEC */ /* Define if you wish to disable Xalan-dependent features. */ #define XSEC_NO_XALAN #include #if (XERCES_VERSION_MAJOR >= 3) # define XMLTOOLING_XERCESC_COMPLIANT_DOMLS 1 # define XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE 1 # define XMLTOOLING_XERCESC_64BITSAFE 1 #endif /* Define to 1 if you have the `xsecsize_t' type. */ #define HAVE_XSECSIZE_T 1 #ifndef XMLTOOLING_NO_XMLSEC # include # if (_XSEC_VERSION_FULL >= 10500) # define XMLTOOLING_XMLSEC_C14N11 1 # endif # if (_XSEC_VERSION_FULL >= 10600) # define XMLTOOLING_XMLSEC_MULTIPLECRL 1 # define XMLTOOLING_XMLSEC_SIGALGORITHM 1 # define XMLTOOLING_XMLSEC_ECC 1 # define XMLTOOLING_XMLSEC_DEBUGLOGGING 1 # endif #endif xmltooling-1.5.3/xmltooling/resource.h000644 001751 001751 00000002326 12003305016 021267 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ //{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file. // Used by shibsp.rc // // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1000 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif xmltooling-1.5.3/xmltooling/xmltooling.rc000644 001751 001751 00000006340 12157725407 022035 0ustar00scantorscantor000000 000000 //Microsoft Developer Studio generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifndef _MAC ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 1,5,3,0 PRODUCTVERSION 2,5,3,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x40004L FILETYPE 0x2L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "Shibboleth Consortium\0" #ifdef XMLTOOLING_LITE VALUE "FileDescription", "OpenSAML XMLTooling-Lite Library\0" #else VALUE "FileDescription", "OpenSAML XMLTooling Library\0" #endif VALUE "FileVersion", "1, 5, 3, 0\0" #ifdef XMLTOOLING_LITE #ifdef _DEBUG VALUE "InternalName", "xmltooling-lite1_5D\0" #else VALUE "InternalName", "xmltooling-lite1_5\0" #endif #else #ifdef _DEBUG VALUE "InternalName", "xmltooling1_5D\0" #else VALUE "InternalName", "xmltooling1_5\0" #endif #endif VALUE "LegalCopyright", "Copyright © 2013 UCAID\0" VALUE "LegalTrademarks", "\0" #ifdef XMLTOOLING_LITE #ifdef _DEBUG VALUE "OriginalFilename", "xmltooling-lite1_5D.dll\0" #else VALUE "OriginalFilename", "xmltooling-lite1_5.dll\0" #endif #else #ifdef _DEBUG VALUE "OriginalFilename", "xmltooling1_5D.dll\0" #else VALUE "OriginalFilename", "xmltooling1_5.dll\0" #endif #endif VALUE "PrivateBuild", "\0" VALUE "ProductName", "OpenSAML 2.5.3\0" VALUE "ProductVersion", "2, 5, 3, 0\0" VALUE "SpecialBuild", "\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END #endif // !_MAC #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE DISCARDABLE BEGIN "resource.h\0" END 2 TEXTINCLUDE DISCARDABLE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE DISCARDABLE BEGIN "\r\n" "\0" END #endif // APSTUDIO_INVOKED #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED xmltooling-1.5.3/xmltooling/validation/Validator.h000644 001751 001751 00000003212 12003305016 023512 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/validation/Validator.h * * Rules checking of XMLObjects. */ #ifndef __xmltooling_validator_h__ #define __xmltooling_validator_h__ #include namespace xmltooling { /** * An interface for classes that implement rules for checking the * validity of XMLObjects. */ class XMLTOOL_API Validator { MAKE_NONCOPYABLE(Validator); public: virtual ~Validator(); /** * Checks to see if an XMLObject is valid. * * @param xmlObject the XMLObject to validate * @throws ValidationException thrown if the element is not valid */ virtual void validate(const XMLObject* xmlObject) const=0; protected: Validator(); }; }; #endif /* __xmltooling_validator_h__ */ xmltooling-1.5.3/xmltooling/validation/ValidatorSuite.h000644 001751 001751 00000007033 12003305016 024531 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/validation/ValidatorSuite.h * * Groups of rule checkers of XMLObjects based on type or element name. */ #ifndef __xmltooling_valsuite_h__ #define __xmltooling_valsuite_h__ #include #include #include #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif namespace xmltooling { class XMLTOOL_API Validator; /** * A collection of validators that can be applied to an XMLObject and its children. These collections can represent * usage specific checks, such as those outlined in schemas or profiles of specific XML specifications. * * Registered Validators must be stateless. Validators are fetched based on schema type and * element name, in that order. */ class XMLTOOL_API ValidatorSuite { MAKE_NONCOPYABLE(ValidatorSuite); public: /** * Creates a new suite. * * @param id an identifier for the suite */ ValidatorSuite(const char* id); ~ValidatorSuite(); /** * Gets a unique ID for this suite. * * @return a unique ID for this suite */ const char* getId(); /** * Evaluates the registered validators against the given XMLObject and it's children. * * @param xmlObject the XMLObject tree to validate * * @throws ValidationException thrown if the element tree is not valid */ void validate(const XMLObject* xmlObject) const; /** * Registers a new validator for the given key. * * @param key the key used to retrieve the validator * @param validator the validator */ void registerValidator(const QName& key, Validator* validator); /** * Deregisters validators. * * @param key the key for the validators to be deregistered */ void deregisterValidators(const QName& key); /** * Unregisters and destroys all registered validators. */ void destroyValidators(); private: std::string m_id; std::multimap m_map; }; /** * Validator suite for schema-style structural validation. * * This is NOT a comprehensive replacement for real * schema validation, but it does basic structural checking of overall * element relationships and some basic attribute presence checking. */ extern XMLTOOL_API xmltooling::ValidatorSuite SchemaValidators; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif #endif /* __xmltooling_valsuite_h__ */ xmltooling-1.5.3/xmltooling/validation/ValidatorSuite.cpp000644 001751 001751 00000005400 12003305016 025060 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * ValidatorSuite.cpp * * Groups of rule checkers of XMLObjects based on type or element name. */ #include "internal.h" #include "validation/Validator.h" #include "validation/ValidatorSuite.h" using namespace xmltooling; using namespace std; Validator::Validator() { } Validator::~Validator() { } ValidatorSuite xmltooling::SchemaValidators("SchemaValidators"); ValidatorSuite::ValidatorSuite(const char* id) : m_id(id) { } ValidatorSuite::~ValidatorSuite() { destroyValidators(); } const char* ValidatorSuite::getId() { return m_id.c_str(); } void ValidatorSuite::registerValidator(const QName& key, Validator* validator) { m_map.insert(pair(key, validator)); } void ValidatorSuite::deregisterValidators(const QName& key) { pair::iterator,multimap::iterator> range=m_map.equal_range(key); for_each(range.first, range.second, xmltooling::cleanup_pair()); m_map.erase(range.first, range.second); } void ValidatorSuite::destroyValidators() { for_each(m_map.begin(),m_map.end(),xmltooling::cleanup_pair()); m_map.clear(); } void ValidatorSuite::validate(const XMLObject* xmlObject) const { if (!xmlObject) return; pair::const_iterator,multimap::const_iterator> range; if (xmlObject->getSchemaType()) { range=m_map.equal_range(*(xmlObject->getSchemaType())); while (range.first!=range.second) { range.first->second->validate(xmlObject); ++range.first; } } range=m_map.equal_range(xmlObject->getElementQName()); while (range.first!=range.second) { range.first->second->validate(xmlObject); ++range.first; } const list& kids=xmlObject->getOrderedChildren(); for (list::const_iterator j=kids.begin(); j!=kids.end(); j++) validate(*j); } xmltooling-1.5.3/xmltooling/util/CurlURLInputStream.h000644 001751 001751 00000011414 12003305017 024100 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/util/CurlURLInputStream.h * * Asynchronous use of curl to fetch data from a URL. */ #if !defined(__xmltooling_curlinstr_h__) && !defined(XMLTOOLING_LITE) #define __xmltooling_curlinstr_h__ #include #include #include #include #include namespace xmltooling { /** * Adapted from Xerces-C as a more advanced input stream implementation * for subsequent use in parsing remote documents. */ class XMLTOOL_API CurlURLInputStream : public xercesc::BinInputStream { public : /** * Constructor. * * @param url the URL of the resource to fetch * @param cacheTag optional pointer to string used for cache management */ CurlURLInputStream(const char* url, std::string* cacheTag=nullptr); /** * Constructor. * * @param url the URL of the resource to fetch * @param cacheTag optional pointer to string used for cache management */ CurlURLInputStream(const XMLCh* url, std::string* cacheTag=nullptr); /** * Constructor taking a DOM element supporting the following content: * *

*
uri | url
*
identifies the remote resource
*
verifyHost
*
true iff name of host should be matched against TLS/SSL certificate
*
TransportOption elements, like so:
*
<TransportOption provider="CURL" option="150">0</TransportOption>
*
* * @param e DOM to supply configuration * @param cacheTag optional pointer to string used for cache management */ CurlURLInputStream(const xercesc::DOMElement* e, std::string* cacheTag=nullptr); ~CurlURLInputStream(); #ifdef XMLTOOLING_XERCESC_64BITSAFE XMLFilePos #else unsigned int #endif curPos() const { return fTotalBytesRead; } #ifdef XMLTOOLING_XERCESC_INPUTSTREAM_HAS_CONTENTTYPE const XMLCh* getContentType() const { return fContentType; } #endif xsecsize_t readBytes(XMLByte* const toFill, const xsecsize_t maxToRead); /** * Access the OpenSSL context options in place for this object. * * @return bitmask suitable for use with SSL_CTX_set_options */ int getOpenSSLOps() const { return fOpenSSLOps; } private : CurlURLInputStream(const CurlURLInputStream&); CurlURLInputStream& operator=(const CurlURLInputStream&); // libcurl callbacks for data read/write static size_t staticWriteCallback(char *buffer, size_t size, size_t nitems, void *outstream); size_t writeCallback(char *buffer, size_t size, size_t nitems); void init(const xercesc::DOMElement* e=nullptr); bool readMore(int *runningHandles); logging::Category& fLog; std::string* fCacheTag; std::string fURL; std::vector fSavedOptions; int fOpenSSLOps; CURLM* fMulti; CURL* fEasy; struct curl_slist* fHeaders; unsigned long fTotalBytesRead; XMLByte* fWritePtr; xsecsize_t fBytesRead; xsecsize_t fBytesToRead; bool fDataAvailable; // Overflow buffer for when curl writes more data to us // than we've asked for. XMLByte* fBuffer; XMLByte* fBufferHeadPtr; XMLByte* fBufferTailPtr; size_t fBufferSize; XMLCh* fContentType; long fStatusCode; char fError[CURL_ERROR_SIZE]; }; }; #endif // __xmltooling_curlinstr_h__ xmltooling-1.5.3/xmltooling/util/DateTime.h000644 001751 001751 00000012115 12003305017 022107 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/util/DateTime.h * * Manipulation of XML date/time data. */ #ifndef __xmltool_datetime_h__ #define __xmltool_datetime_h__ #include #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4244 ) #endif #include #include #if defined (_MSC_VER) #pragma warning( pop ) #endif namespace xmltooling { /** * Class for manipulating XML date/time information. * * This is mostly copied from Xerces-C, but they haven't produced a usable date/time * class, so we had to incorporate a version of it for now. It can't be inherited * since the fields needed are private. */ class XMLTOOL_API DateTime { public: /// @cond OFF DateTime(); DateTime(const XMLCh* const); DateTime(time_t epoch, bool duration=false); DateTime(const DateTime&); DateTime& operator=(const DateTime&); ~DateTime(); void setBuffer(const XMLCh* const); const XMLCh* getRawData() const; const XMLCh* getFormattedString() const; int getSign() const; XMLCh* getDateTimeCanonicalRepresentation() const; XMLCh* getTimeCanonicalRepresentation() const; void parseDateTime(); void parseDate(); void parseTime(); void parseDay(); void parseMonth(); void parseYear(); void parseMonthDay(); void parseYearMonth(); void parseDuration(); static int compare(const DateTime* const, const DateTime* const); static int compare(const DateTime* const, const DateTime* const, bool); static int compareOrder(const DateTime* const, const DateTime* const); int getYear() const {return fValue[CentYear];} int getMonth() const {return fValue[Month];} int getDay() const {return fValue[Day];} int getHour() const {return fValue[Hour];} int getMinute() const {return fValue[Minute];} int getSecond() const {return fValue[Second];} time_t getEpoch(bool duration=false) const; /// @endcond private: enum valueIndex { CentYear = 0, Month , Day , Hour , Minute , Second , MiliSecond , //not to be used directly utc , TOTAL_SIZE }; enum utcType { UTC_UNKNOWN = 0, UTC_STD , // set in parse() or normalize() UTC_POS , // set in parse() UTC_NEG // set in parse() }; enum timezoneIndex { hh = 0, mm , TIMEZONE_ARRAYSIZE }; static int compareResult(int, int, bool); static void addDuration(DateTime* pDuration, const DateTime* const pBaseDate, int index); static int compareResult(const DateTime* const, const DateTime* const, bool, int); static int getRetVal(int, int); void reset(); //inline void assertBuffer() const; void copy(const DateTime&); void initParser(); bool isNormalized() const; void getDate(); void getTime(); void getYearMonth(); void getTimeZone(const int); void parseTimeZone(); int findUTCSign(const int start); int indexOf(const int start, const int end, const XMLCh ch) const; int parseInt(const int start, const int end) const; int parseIntYear(const int end) const; double parseMiliSecond(const int start, const int end) const; void validateDateTime() const; void normalize(); void fillString(XMLCh*& ptr, valueIndex ind, int expLen) const; int fillYearString(XMLCh*& ptr, valueIndex ind) const; void searchMiliSeconds(XMLCh*& miliStartPtr, XMLCh*& miliEndPtr) const; bool operator==(const DateTime& toCompare) const; static const int DATETIMES[][TOTAL_SIZE]; int fValue[TOTAL_SIZE]; int fTimeZone[TIMEZONE_ARRAYSIZE]; int fStart; int fEnd; int fBufferMaxLen; XMLCh* fBuffer; double fMiliSecond; bool fHasTime; }; } #endif /* __xmltool_datetime_h__ */ xmltooling-1.5.3/xmltooling/util/NDC.h000644 001751 001751 00000003310 12003305017 021014 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/util/NDC.h * * Diagnostic context for logging */ #ifndef __xmltooling_ndc_h__ #define __xmltooling_ndc_h__ #include #include namespace xmltooling { /** * A portable stack-based context for diagnostic logging */ class XMLTOOL_API NDC { MAKE_NONCOPYABLE(NDC); public: /** * Constructor pushes logging context onto diagnostic stack * @param context null-terminated label for context */ NDC(const char* context); /** * Constructor pushes logging context onto diagnostic stack * @param context string label for context */ NDC(const std::string& context); /** * Destructor pops context off of diagnostic stack */ ~NDC(); }; }; #endif /* __xmltooling_ndc_h__ */ xmltooling-1.5.3/xmltooling/util/ParserPool.h000644 001751 001751 00000024266 12003305017 022513 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/util/ParserPool.h * * A thread-safe pool of parsers that share characteristics. */ #ifndef __xmltooling_pool_h__ #define __xmltooling_pool_h__ #include #include #include #include #include #include #include #include #include #include #include #ifndef XMLTOOLING_NO_XMLSEC # include #endif #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif namespace xmltooling { class XMLTOOL_API Mutex; /** * A thread-safe pool of DOMBuilders that share characteristics. */ class XMLTOOL_API ParserPool : #ifdef XMLTOOLING_XERCESC_COMPLIANT_DOMLS public xercesc::DOMLSResourceResolver #else public xercesc::DOMEntityResolver #endif { MAKE_NONCOPYABLE(ParserPool); public: /** * Constructs a new pool * * @param namespaceAware indicates whether parsers should be namespace-aware or not * @param schemaAware indicates whether parsers should be schema-validating or not */ ParserPool(bool namespaceAware=true, bool schemaAware=false); ~ParserPool(); /** * Creates a new document using a parser from this pool. * * @return new XML document * */ xercesc::DOMDocument* newDocument(); /** * Parses a document using a pooled parser with the proper settings * * @param domsrc An input source containing the content to be parsed * @return The DOM document resulting from the parse * @throws XMLParserException thrown if there was a problem reading, parsing, or validating the XML */ xercesc::DOMDocument* parse( #ifdef XMLTOOLING_XERCESC_COMPLIANT_DOMLS xercesc::DOMLSInput& domsrc #else xercesc::DOMInputSource& domsrc #endif ); /** * Parses a document using a pooled parser with the proper settings * * @param is An input stream containing the content to be parsed * @return The DOM document resulting from the parse * @throws XMLParserException thrown if there was a problem reading, parsing, or validating the XML */ xercesc::DOMDocument* parse(std::istream& is); /** * Load OASIS catalog files to map schema namespace URIs to filenames. * *

This does not provide real catalog support; only the <uri> element * is supported to map from a namespace URI to a relative path or file:// URI. * *

Multiple files can be specified using a platform-specific path delimiter. * * @param pathname path to one or more catalog files * @return true iff the catalogs were successfully processed */ bool loadCatalogs(const char* pathnames); /** * Load an OASIS catalog file to map schema namespace URIs to filenames. * *

This does not provide real catalog support; only the <uri> element * is supported to map from a namespace URI to a relative path or file:// URI. * * @param pathname path to a catalog file * @return true iff the catalog was successfully processed */ bool loadCatalog(const char* pathnames); /** * Load an OASIS catalog file to map schema namespace URIs to filenames. * * This does not provide real catalog support; only the <uri> element * is supported to map from a namespace URI to a relative path or file:// URI. * * @param pathname path to a catalog file * @return true iff the catalog was successfully processed */ bool loadCatalog(const XMLCh* pathname); /** * Load a schema explicitly from a local file. * * Note that "successful processing" does not imply that the schema is valid, * only that a reference to it was successfully registered with the pool. * * @param nsURI XML namespace to load * @param pathname path to schema file * @return true iff the schema was successfully processed */ bool loadSchema(const XMLCh* nsURI, const XMLCh* pathname); /** * Supplies all external entities (primarily schemas) to the parser */ #ifdef XMLTOOLING_XERCESC_COMPLIANT_DOMLS xercesc::DOMLSInput* resolveResource( const XMLCh *const resourceType, const XMLCh *const namespaceUri, const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const baseURI ); #else xercesc::DOMInputSource* resolveEntity( const XMLCh* const publicId, const XMLCh* const systemId, const XMLCh* const baseURI ); #endif private: #ifdef XMLTOOLING_XERCESC_COMPLIANT_DOMLS xercesc::DOMLSParser* createBuilder(); xercesc::DOMLSParser* checkoutBuilder(); void checkinBuilder(xercesc::DOMLSParser* builder); #else xercesc::DOMBuilder* createBuilder(); xercesc::DOMBuilder* checkoutBuilder(); void checkinBuilder(xercesc::DOMBuilder* builder); #endif xstring m_schemaLocations; std::map m_schemaLocMap; bool m_namespaceAware,m_schemaAware; #ifdef XMLTOOLING_XERCESC_COMPLIANT_DOMLS std::stack m_pool; #else std::stack m_pool; #endif std::auto_ptr m_lock; std::auto_ptr m_security; }; /** * A parser source that wraps a C++ input stream */ class XMLTOOL_API StreamInputSource : public xercesc::InputSource { MAKE_NONCOPYABLE(StreamInputSource); public: /** * Constructs an input source around an input stream reference. * * @param is reference to an input stream * @param systemId optional system identifier to attach to the stream */ StreamInputSource(std::istream& is, const char* systemId=nullptr); /// @cond off xercesc::BinInputStream* makeStream() const; /// @endcond /** * A Xerces input stream that wraps a C++ input stream */ class XMLTOOL_API StreamBinInputStream : public xercesc::BinInputStream { public: /** * Constructs a Xerces input stream around a C++ input stream reference. * * @param is reference to an input stream */ StreamBinInputStream(std::istream& is); /// @cond off #ifdef XMLTOOLING_XERCESC_64BITSAFE XMLFilePos curPos() const; const XMLCh* getContentType() const; #else unsigned int curPos() const; #endif xsecsize_t readBytes(XMLByte* const toFill, const xsecsize_t maxToRead); /// @endcond private: std::istream& m_is; xsecsize_t m_pos; }; private: std::istream& m_is; }; /** * A URL-based parser source that supports a more advanced input stream. */ class XMLTOOL_API URLInputSource : public xercesc::InputSource { MAKE_NONCOPYABLE(URLInputSource); public: /** * Constructor. * * @param url source of input * @param systemId optional system identifier to attach to the source * @param cacheTag optional pointer to string used for cache management */ URLInputSource(const XMLCh* url, const char* systemId=nullptr, std::string* cacheTag=nullptr); /** * Constructor taking a DOM element supporting the following content: * *

*
uri | url
*
identifies the remote resource
*
verifyHost
*
true iff name of host should be matched against TLS/SSL certificate
*
TransportOption elements, like so:
*
<TransportOption provider="CURL" option="150">0</TransportOption>
*
* * @param e DOM to supply configuration * @param systemId optional system identifier to attach to the source * @param cacheTag optional pointer to string used for cache management */ URLInputSource(const xercesc::DOMElement* e, const char* systemId=nullptr, std::string* cacheTag=nullptr); /// @cond off virtual xercesc::BinInputStream* makeStream() const; /// @endcond /** Element name used to signal a non-successful response when fetching a remote document. */ static const char asciiStatusCodeElementName[]; /** Element name used to signal a non-successful response when fetching a remote document. */ static const XMLCh utf16StatusCodeElementName[]; private: #ifdef XMLTOOLING_LITE xercesc::XMLURL m_url; #else std::string* m_cacheTag; xmltooling::auto_ptr_char m_url; const xercesc::DOMElement* m_root; #endif }; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif #endif /* __xmltooling_pool_h__ */ xmltooling-1.5.3/xmltooling/util/PathResolver.h000644 001751 001751 00000010617 12003305017 023036 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/util/PathResolver.h * * Resolves local filenames into absolute pathnames. */ #if !defined(__xmltooling_pathres_h__) #define __xmltooling_pathres_h__ #include #include namespace xmltooling { /** * Resolves local filenames into absolute pathnames. */ class XMLTOOL_API PathResolver { MAKE_NONCOPYABLE(PathResolver); public: PathResolver(); virtual ~PathResolver(); /** Types of file resources to resolve. */ enum file_type_t { XMLTOOLING_LIB_FILE, XMLTOOLING_LOG_FILE, XMLTOOLING_XML_FILE, XMLTOOLING_RUN_FILE, XMLTOOLING_CFG_FILE, XMLTOOLING_CACHE_FILE }; /** * Set the default package to use when resolving files. * * @param pkgname name of default package to use */ virtual void setDefaultPackageName(const char* pkgname); /** * Set the default installation prefix to use when resolving files. * * @param prefix name of default prefix to use */ virtual void setDefaultPrefix(const char* prefix); /** * Set the lib directory to use when resolving files. *

If relative, the default prefix will be prepended. * * @param dir the library directory to use */ virtual void setLibDir(const char* dir); /** * Set the log directory to use when resolving files. *

If relative, the default prefix will be prepended. * * @param dir the log directory to use */ virtual void setLogDir(const char* dir); /** * Set the XML directory to use when resolving files. *

If relative, the default prefix will be prepended. * * @param dir the XML directory to use */ virtual void setXMLDir(const char* dir); /** * Set the run directory to use when resolving files. *

If relative, the default prefix will be prepended. * * @param dir the run directory to use */ virtual void setRunDir(const char* dir); /** * Set the config directory to use when resolving files. *

If relative, the default prefix will be prepended. * * @param dir the config directory to use */ virtual void setCfgDir(const char* dir); /** * Set the cache directory to use when resolving files. *

If relative, the default prefix will be prepended. * * @param dir the cache directory to use */ virtual void setCacheDir(const char* dir); /** * Changes the input filename into an absolute pathname to the same file. * * @param s filename to resolve * @param filetype type of file being resolved * @param pkgname application package name to use in resolving the file (or nullptr for the default) * @param prefix installation prefix to use in resolving the file (or nullptr for the default) * * @return a const reference to the input string */ virtual const std::string& resolve(std::string& s, file_type_t filetype, const char* pkgname=nullptr, const char* prefix=nullptr) const; private: bool isAbsolute(const char* s) const; std::string m_defaultPackage,m_defaultPrefix,m_lib,m_log,m_xml,m_run,m_cfg,m_cache; }; }; #endif /* __xmltooling_pathres_h__ */ xmltooling-1.5.3/xmltooling/util/Predicates.h000644 001751 001751 00000007206 12003305017 022503 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/util/Predicates.h * * Useful XMLObject predicates for use with STL algorithms. */ #ifndef __xmltooling_predicates_h__ #define __xmltooling_predicates_h__ #include #include #include namespace xmltooling { /** * Predicate that checks the QName of an XMLObject. */ class hasQName { public: /** * Constructor. * * @param q the QName to check for */ hasQName(const QName& q) : m_q(q) { } /** * Returns true iff the provided object's QName matches the constructor argument. * * @param xmlObject the object to examine */ bool operator()(const XMLObject* xmlObject) const { return xmlObject ? (xmlObject->getElementQName() == m_q) : false; } private: const QName& m_q; }; /** * Predicate that checks the xsi:type of an XMLObject. */ class hasSchemaType { public: /** * Constructor. * * @param q the QName to check for */ hasSchemaType(const QName& q) : m_q(q) { } /** * Returns true iff the provided object's xsi:type matches the constructor argument. * * @param xmlObject the object to examine */ bool operator()(const XMLObject* xmlObject) const { const QName* xsitype = xmlObject ? xmlObject->getSchemaType() : nullptr; return xsitype ? (*xsitype == m_q) : false; } private: const QName& m_q; }; /** * Template algorithm returns first pointer element from a container that matches a predicate. * * @param c read-only container of pointer-based objects * @param p a predicate function * @return the first object in the container matching the predicate, or nullptr */ template typename Container::value_type find_if(const Container& c, const Predicate& p) { typename Container::const_iterator i = std::find_if(c.begin(), c.end(), p); return (i!=c.end()) ? *i : nullptr; } /** * Template algorithm returns first pointer element from a container that matches a predicate. * * @param c read-only container of pointer-based objects * @param p a predicate function * @return the first object in the container matching the predicate, or nullptr */ template typename Container::value_type find_if(Container& c, const Predicate& p) { typename Container::iterator i = std::find_if(c.begin(), c.end(), p); return (i!=c.end()) ? *i : nullptr; } }; #endif /* __xmltooling_predicates_h__ */ xmltooling-1.5.3/xmltooling/util/ReloadableXMLFile.h000644 001751 001751 00000020534 12003305017 023632 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/util/ReloadableXMLFile.h * * Base class for file-based XML configuration. */ #ifndef __xmltooling_reloadable_h__ #define __xmltooling_reloadable_h__ #include #include #include #include #include #ifndef XMLTOOLING_LITE namespace xmlsignature { class XMLTOOL_API Signature; }; #endif namespace xmltooling { class XMLTOOL_API CondWait; class XMLTOOL_API RWLock; class XMLTOOL_API Thread; #ifndef XMLTOOLING_LITE class XMLTOOL_API CredentialResolver; class XMLTOOL_API SignatureTrustEngine; #endif /** * Base class for file-based XML configuration. */ class XMLTOOL_API ReloadableXMLFile : protected virtual Lockable { MAKE_NONCOPYABLE(ReloadableXMLFile); protected: /** * Constructor taking a DOM element supporting the following content: * *

*
file | filename | path | pathname
*
identifies a local file
*
uri | url
*
identifies a remote resource
*
validate
*
use a validating parser
*
reloadChanges
*
enables monitoring of local file for changes
*
reloadInterval or maxRefreshDelay
*
enables periodic refresh of remote file
*
backingFilePath
*
location for backup of remote resource
*
id
*
identifies the plugin instance for logging purposes
*
certificate
*
requires XML be signed with an enveloped signature verifiable with specified key
*
signerName
*
requires XML be signed with an enveloped signature verifiable with <TrustEngine> * by certificate containing this name
*
<CredentialResolver>
*
requires XML be signed with an enveloped signature verifiable with specified key
*
<TrustEngine>
*
requires XML be signed with an enveloped signature verifiable with specified TrustEngine
*
* * @param e DOM to supply configuration * @param log logging object to use * @param startReloadThread true iff refresh thread for resources should be started by constructor */ ReloadableXMLFile(const xercesc::DOMElement* e, logging::Category& log, bool startReloadThread=true); virtual ~ReloadableXMLFile(); /** * Loads configuration material. * *

This method is called to load configuration material * initially and any time a change is detected. The base version * performs basic parsing duties and returns the result. * *

This method is not called with the object locked, so actual * modification of implementation state requires explicit locking within * the method override. * * @return a pair consisting of a flag indicating whether to take ownership of * the document, and the root element of the tree to load */ virtual std::pair background_load(); /** * @deprecated * Basic load/parse of configuration material. * *

The base version performs basic parsing duties and returns the result. * Subclasses should override the new background_load() method and perform * their own locking in conjunction with use of this method. * *

Subclasses that continue to override this method will function, but * a write lock will be acquired and held for the entire operation. * * @return a pair consisting of a flag indicating whether to take ownership of * the document, and the root element of the tree to load */ virtual std::pair load(); /** * Basic load/parse of configuration material. * *

The base version performs basic parsing duties and returns the result. * Subclasses should override the new background_load() method and perform * their own locking in conjunction with use of this method. * *

This version allows subclasses to explicitly control the use of a * backup for remote resources, which allows additional validation to be * performed besides just successful XML parsing. * * @param backup true iff the backup source should be loaded * @return a pair consisting of a flag indicating whether to take ownership of * the document, and the root element of the tree to load */ virtual std::pair load(bool backup); /** * Accesses a lock interface protecting use of backup file associated with the * object. * *

The lock is NOT acquired automatically. * * @return pointer to a lock interface, or nullptr if unnecessary */ virtual Lockable* getBackupLock(); /** * Preserves the last remote resource caching identifier in a backup file * for use on the next restart. */ void preserveCacheTag(); /** * Starts up reload thread, can be automatically called by constructor, or * manually invoked by subclass. */ void startup(); /** * Shuts down reload thread, should be called from subclass destructor. */ void shutdown(); /** Root of the original DOM element passed into constructor. */ const xercesc::DOMElement* m_root; /** Indicates whether resources is local or remote. */ bool m_local; /** Use a validating parser when parsing XML. */ bool m_validate; /** Resource location, may be a local path or a URI. */ std::string m_source; /** Path to backup copy for remote resource. */ std::string m_backing; /** Last modification of local resource. */ time_t m_filestamp; /** Time in seconds to wait before trying for new copy of remote resource. */ time_t m_reloadInterval; /** Caching tag associated with remote resource. */ std::string m_cacheTag; /** Shared lock for guarding reloads. */ RWLock* m_lock; /** Logging object. */ logging::Category& m_log; /** Plugin identifier. */ std::string m_id; /** Indicates whether a usable version of the resource is in place. */ bool m_loaded; #ifndef XMLTOOLING_LITE /** CredentialResolver for signature verification. */ CredentialResolver* m_credResolver; /** TrustEngine for signature verification. */ SignatureTrustEngine* m_trust; /** Name of signer for signature verification. */ std::string m_signerName; #endif public: Lockable* lock(); void unlock(); private: #ifndef XMLTOOLING_LITE void validateSignature(xmlsignature::Signature& sigObj) const; #endif // Used to manage background reload/refresh. bool m_shutdown; CondWait* m_reload_wait; Thread* m_reload_thread; static void* reload_fn(void*); }; }; #endif /* __xmltooling_reloadable_h__ */ xmltooling-1.5.3/xmltooling/util/ReplayCache.h000644 001751 001751 00000005321 12003305017 022574 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/util/ReplayCache.h * * Helper class on top of StorageService for detecting message replay. */ #if !defined(__xmltooling_replay_h__) && !defined(XMLTOOLING_LITE) #define __xmltooling_replay_h__ #include #include namespace xmltooling { class XMLTOOL_API StorageService; /** * Helper class on top of StorageService for detecting message replay. */ class XMLTOOL_API ReplayCache { MAKE_NONCOPYABLE(ReplayCache); public: /** * Creates a replay cache on top of a particular StorageService. * * The lifetime of the StorageService MUST be longer than * the lifetime of the ReplayCache. * * @param storage pointer to a StorageService, or nullptr to keep cache in memory */ ReplayCache(StorageService* storage=nullptr); virtual ~ReplayCache(); /** * Returns true iff the check value is not found in the cache, and stores it. * * @param context a context label to subdivide the cache * @param s value to check * @param expires time for disposal of value from cache */ virtual bool check(const char* context, const char* s, time_t expires); /** * Returns true iff the check value is not found in the cache, and stores it. * * @param context a context label to subdivide the cache * @param s value to check * @param expires time for disposal of value from cache */ bool check(const char* context, const XMLCh* s, time_t expires); private: bool m_owned; StorageService* m_storage; const StorageService::Capabilities& m_storageCaps; }; }; #endif /* __xmltooling_replay_h__ */ xmltooling-1.5.3/xmltooling/util/StorageService.h000644 001751 001751 00000025002 12003305017 023337 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/util/StorageService.h * * Generic data storage interface. */ #if !defined(__xmltooling_storage_h__) && !defined(XMLTOOLING_LITE) #define __xmltooling_storage_h__ #include #include namespace xmltooling { /** * Generic data storage facility for use by services that require * some degree of persistence. Implementations will vary in how much * persistence they can supply. * *

Storage is divided into "contexts" identified by a string label. * Keys need to be unique only within a given context, so multiple * components can share a single storage service safely as long as they * use different labels. * *

The allowable sizes for contexts, keys, and short values can vary * and be reported by the implementation to callers, but MUST be at least * 255 bytes. */ class XMLTOOL_API StorageService { MAKE_NONCOPYABLE(StorageService); public: virtual ~StorageService(); class XMLTOOL_API Capabilities { MAKE_NONCOPYABLE(Capabilities); unsigned int m_contextSize, m_keySize, m_stringSize; public: /** * Constructor. * * @param contextSize max size of context labels in characters * @param keysize max size of keys in characters * @param stringSize max size of string values in characters */ Capabilities(unsigned int contextSize, unsigned int keySize, unsigned int stringSize); ~Capabilities(); /** * Returns max size of context labels in characters * @return max size of context labels in characters */ unsigned int getContextSize() const; /** * Returns max size of keys in characters * @return max size of keys in characters */ unsigned int getKeySize() const; /** * Returns max size of string values in characters * @return max size of string values in characters */ unsigned int getStringSize() const; }; /** * Returns the capabilities of the underlying service. *

If implementations support only the 255 character minimum, the default * implementation of this method will suffice. * * @return a reference to an interface to access the service's capabilities */ virtual const Capabilities& getCapabilities() const; /** * Creates a new "short" record in the storage service. * * @param context a storage context label * @param key null-terminated unique key * @param value null-terminated value * @param expiration an expiration timestamp, after which the record can be purged * @return true iff record was inserted, false iff a duplicate was found * * @throws IOException raised if fatal errors occur in the insertion process */ virtual bool createString(const char* context, const char* key, const char* value, time_t expiration)=0; /** * Returns an existing "short" record from the storage service. * *

The version parameter can be set for "If-Modified-Since" semantics. * * @param context a storage context label * @param key null-terminated unique key * @param pvalue location in which to return the record value * @param pexpiration location in which to return the expiration timestamp * @param version if > 0, only copy back data if newer than supplied version * @return the version of the record read back, or 0 if no record exists * * @throws IOException raised if errors occur in the read process */ virtual int readString( const char* context, const char* key, std::string* pvalue=nullptr, time_t* pexpiration=nullptr, int version=0 )=0; /** * Updates an existing "short" record in the storage service. * * @param context a storage context label * @param key null-terminated unique key * @param value null-terminated value to store, or nullptr to leave alone * @param expiration a new expiration timestamp, or 0 to leave alone * @param version if > 0, only update if the current version matches this value * @return the version of the record after update, 0 if no record exists, or -1 if the version * parameter is non-zero and does not match the current version before update (so the caller is out of sync) * * @throws IOException raised if errors occur in the update process */ virtual int updateString( const char* context, const char* key, const char* value=nullptr, time_t expiration=0, int version=0 )=0; /** * Deletes an existing "short" record from the storage service. * * @param context a storage context label * @param key null-terminated unique key * @return true iff the record existed and was deleted * * @throws IOException raised if errors occur in the deletion process */ virtual bool deleteString(const char* context, const char* key)=0; /** * Creates a new "long" record in the storage service. * * @param context a storage context label * @param key null-terminated unique key * @param value null-terminated value of arbitrary length * @param expiration an expiration timestamp, after which the record can be purged * @return true iff record was inserted, false iff a duplicate was found * * @throws IOException raised if errors occur in the insertion process */ virtual bool createText(const char* context, const char* key, const char* value, time_t expiration)=0; /** * Returns an existing "long" record from the storage service. * *

The version parameter can be set for "If-Modified-Since" semantics. * * @param context a storage context label * @param key null-terminated unique key * @param pvalue location in which to return the record value * @param pexpiration location in which to return the expiration timestamp * @param version if > 0, only copy back data if newer than supplied version * @return the version of the record read back, or 0 if no record exists * * @throws IOException raised if errors occur in the read process */ virtual int readText( const char* context, const char* key, std::string* pvalue=nullptr, time_t* pexpiration=nullptr, int version=0 )=0; /** * Updates an existing "long" record in the storage service. * * @param context a storage context label * @param key null-terminated unique key * @param value null-terminated value of arbitrary length to store, or nullptr to leave alone * @param expiration a new expiration timestamp, or 0 to leave alone * @param version if > 0, only update if the current version matches this value * @return the version of the record after update, 0 if no record exists, or -1 if the version * parameter is non-zero and does not match the current version before update (so the caller is out of sync) * * @throws IOException raised if errors occur in the update process */ virtual int updateText( const char* context, const char* key, const char* value=nullptr, time_t expiration=0, int version=0 )=0; /** * Deletes an existing "long" record from the storage service. * * @param context a storage context label * @param key null-terminated unique key * @return true iff the record existed and was deleted * * @throws IOException raised if errors occur in the deletion process */ virtual bool deleteText(const char* context, const char* key)=0; /** * Manually trigger a cleanup of expired records. * The method MAY return without guaranteeing that * cleanup has already occurred. * * @param context a storage context label */ virtual void reap(const char* context)=0; /** * Updates the expiration time of all records in the context. * * @param context a storage context label * @param expiration a new expiration timestamp */ virtual void updateContext(const char* context, time_t expiration)=0; /** * Forcibly removes all records in a given context along with any * associated resources devoted to maintaining the context. * * @param context a storage context label */ virtual void deleteContext(const char* context)=0; protected: StorageService(); }; /** * Registers StorageService classes into the runtime. */ void XMLTOOL_API registerStorageServices(); /** StorageService based on in-memory caching. */ #define MEMORY_STORAGE_SERVICE "Memory" }; #endif /* __xmltooling_storage_h__ */ xmltooling-1.5.3/xmltooling/util/TemplateEngine.h000644 001751 001751 00000011707 12003305017 023322 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/util/TemplateEngine.h * * Simple template replacement engine. */ #ifndef __xmltooling_template_h__ #define __xmltooling_template_h__ #include #include #include #include #include #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4251 ) #endif namespace xmltooling { class XMLTOOL_API GenericRequest; /** * Simple template replacement engine. Supports the following: *

    *
  • <mlp key/>
  • *
  • <mlpif key> stuff </mlpif>
  • *
  • <mlpifnot key> stuff </mlpifnot>
  • *
  • <mlpfor key> stuff </mlpfor>
  • *
  • <mlp $name/> (in for loop only)
  • *
  • <mlp $value/> (in for loop only)
  • *
* * The default tag prefix is "mlp". This can be overridden for * compatibility. */ class XMLTOOL_API TemplateEngine { MAKE_NONCOPYABLE(TemplateEngine); public: /** Default constructor. */ TemplateEngine(); virtual ~TemplateEngine(); /** * Sets the tag name to use when locating template replacement tags. * * @param tagPrefix base prefix for tags */ void setTagPrefix(const char* tagPrefix); /** * Interface to parameters to plug into templates. * Allows callers to supply a more dynamic lookup mechanism to supplement a basic map. */ class XMLTOOL_API TemplateParameters { public: TemplateParameters(); virtual ~TemplateParameters(); /** Map of known parameters to supply to template. */ std::map m_map; /** Map of sub-collections used in for loops. */ std::map< std::string,std::multimap > m_collectionMap; /** Request from client that resulted in template being processed. */ const GenericRequest* m_request; /** * Returns the value of a parameter to plug into the template. * * @param name name of parameter * @return value of parameter, or nullptr */ virtual const char* getParameter(const char* name) const; /** * Returns a named collection of sub-parameters to pass into a loop. * * @param name name of sub-collection * @return pointer to a multimap of sub-parameters, or nullptr */ virtual const std::multimap* getLoopCollection(const char* name) const; }; /** * Processes template from an input stream and executes replacements and * conditional logic based on parameters. * * @param is input stream providing template * @param os output stream to send results of executing template * @param parameters parameters to plug into template * @param e optional exception to extract parameters from */ virtual void run( std::istream& is, std::ostream& os, const TemplateParameters& parameters, const XMLToolingException* e=nullptr ) const; /** * List of non-built-in characters considered "unsafe" and requiring HTML encoding. * The default set is #%&():[]\\`{} */ static std::string unsafe_chars; private: void html_encode(std::ostream& os, const char* start) const; void process( bool visible, const std::string& buf, const char*& lastpos, std::ostream& os, const TemplateParameters& parameters, const std::pair& loopentry, const XMLToolingException* e ) const; std::string keytag,iftag,ifendtag,ifnottag,ifnotendtag,fortag,forendtag; }; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif #endif /* __xmltooling_template_h__ */ xmltooling-1.5.3/xmltooling/util/Threads.h000644 001751 001751 00000025512 12003305017 022012 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/util/Threads.h * * Thread and locking wrappers. */ #ifndef _xmltooling_threads_h #define _xmltooling_threads_h #include #include #include #include namespace xmltooling { DECL_XMLTOOLING_EXCEPTION(ThreadingException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmltooling,XMLToolingException,Exceptions during threading/locking operations); /** * A class for manual thread creation and synchronization. */ class XMLTOOL_API Thread { MAKE_NONCOPYABLE(Thread); protected: Thread() {} public: virtual ~Thread() {} /** * Disassociate from the thread. * * @return 0 for success, non-zero for failure */ virtual int detach()=0; /** * Join with the thread and wait for its completion. * * @param thread_return holds the return value of the thread routine * @return 0 for success, non-zero for failure */ virtual int join(void** thread_return)=0; /** * Kill the thread. * * @param signo the signal to send to the thread * @return 0 for success, non-zero for failure */ virtual int kill(int signo)=0; /** * Creates a new thread object to run the supplied start routine. * * @param start_routine the function to execute on the thread * @param arg a parameter for the start routine * @param stacksize size of stack to use, or 0 for default * @return the created and running thread object */ static Thread* create(void* (*start_routine)(void*), void* arg, size_t stacksize=0); /** * Exits a thread gracefully. * * @param return_val the return value for the thread */ static void exit(void* return_val); /** * Sleeps the current thread for the specified amount of time. * * @param seconds time to sleep */ static void sleep(int seconds); #ifndef WIN32 /** * Masks all signals from a thread. */ static void mask_all_signals(void); /** * Masks specific signals from a thread. * * @param how * @param newmask the new signal mask * @param oldmask the old signal mask * @return 0 for success, non-zero for failure */ static int mask_signals(int how, const sigset_t *newmask, sigset_t *oldmask); #endif }; /** * A class for managing Thread Local Storage values. */ class XMLTOOL_API ThreadKey { MAKE_NONCOPYABLE(ThreadKey); protected: ThreadKey() {} public: virtual ~ThreadKey() {} /** * Sets the value for a TLS key. * * @param data the value to set * @return 0 for success, non-zero for failure */ virtual int setData(void* data)=0; /** * Returns the value for a TLS key. * * @return the value or nullptr */ virtual void* getData() const=0; /** * Creates a new TLS key. * * @param destroy_fn a functon to cleanup key values * @return the new key */ static ThreadKey* create(void (*destroy_fn)(void*)); #ifdef WIN32 /** * Allows system to notify TLS implementation when a thread completes. * *

Windows doesn't support TLS destructors, so only the DllMain detach * notification can be used to trigger per-thread cleanup. */ static void onDetach(); #endif }; /** * A class for managing exclusive access to resources. */ class XMLTOOL_API Mutex { MAKE_NONCOPYABLE(Mutex); protected: Mutex() {} public: virtual ~Mutex() {} /** * Locks the mutex for exclusive access. * * @return 0 for success, non-zero for failure */ virtual int lock()=0; /** * Unlocks the mutex for exclusive access. * * @return 0 for success, non-zero for failure */ virtual int unlock()=0; /** * Creates a new mutex object. * * @return the new mutex */ static Mutex* create(); }; /** * A class for managing shared and exclusive access to resources. */ class XMLTOOL_API RWLock { MAKE_NONCOPYABLE(RWLock); protected: RWLock() {} public: virtual ~RWLock() {} /** * Obtains a shared lock. * * @return 0 for success, non-zero for failure */ virtual int rdlock()=0; /** * Obtains an exclusive lock. * * @return 0 for success, non-zero for failure */ virtual int wrlock()=0; /** * Unlocks the lock. * * @return 0 for success, non-zero for failure */ virtual int unlock()=0; /** * Creates a new read/write lock. * * @return the new lock */ static RWLock* create(); }; /** * A class for establishing queues on a mutex based on a periodic condition. */ class XMLTOOL_API CondWait { MAKE_NONCOPYABLE(CondWait); protected: CondWait() {} public: virtual ~CondWait() {} /** * Waits for a condition variable using the supplied mutex as a queue. * * @param lock mutex to queue on * @return 0 for success, non-zero for failure */ virtual int wait(Mutex* lock)=0; /** * Waits for a condition variable using the supplied mutex as a queue, * but only for a certain time limit. * * @param lock mutex to queue on * @param delay_seconds maximum time to wait before waking up * @return 0 for success, non-zero for failure */ virtual int timedwait(Mutex* lock, int delay_seconds)=0; /** * Signal a single thread to wake up if a condition changes. * * @return 0 for success, non-zero for failure */ virtual int signal()=0; /** * Signal all threads to wake up if a condition changes. * * @return 0 for success, non-zero for failure */ virtual int broadcast()=0; /** * Creates a new condition variable. * * @return the new condition variable */ static CondWait* create(); }; /** * RAII wrapper for a mutex lock. */ class XMLTOOL_API Lock { MAKE_NONCOPYABLE(Lock); public: /** * Locks and wraps the designated mutex. * * @param mtx mutex to lock */ Lock(Mutex* mtx) : mutex(mtx) { if (mutex) mutex->lock(); } /** * Locks and wraps the designated mutex. * * @param mtx mutex to lock */ Lock(Mutex& mtx) : mutex(&mtx) { mtx.lock(); } /** * Locks and wraps the designated mutex. * * @param mtx mutex to lock */ Lock(const std::auto_ptr& mtx) : mutex(mtx.get()) { if (mutex) mutex->lock(); } /** * Locks and wraps the designated mutex. * * @param mtx mutex to lock */ Lock(const boost::scoped_ptr& mtx) : mutex(mtx.get()) { if (mutex) mutex->lock(); } /** * Unlocks the wrapped mutex, if any. */ ~Lock() { if (mutex) mutex->unlock(); } /** * Releases control of the original Mutex and returns it without unlocking it. * * @return the original, locked Mutex */ Mutex* release() { Mutex* ret = mutex; mutex = nullptr; return ret; } private: Mutex* mutex; }; /** * RAII wrapper for a shared lock. */ class XMLTOOL_API SharedLock { MAKE_NONCOPYABLE(SharedLock); public: /** * Locks and wraps the designated shared lock. * * @param lock lock to acquire * @param lockit true if the lock should be acquired here, false if already acquired */ SharedLock(RWLock* lock, bool lockit=true) : rwlock(lock) { if (rwlock && lockit) rwlock->rdlock(); } /** * Locks and wraps the designated shared lock. * * @param lock lock to acquire * @param lockit true if the lock should be acquired here, false if already acquired */ SharedLock(const std::auto_ptr& lock, bool lockit=true) : rwlock(lock.get()) { if (rwlock && lockit) rwlock->rdlock(); } /** * Locks and wraps the designated shared lock. * * @param lock lock to acquire * @param lockit true if the lock should be acquired here, false if already acquired */ SharedLock(const boost::scoped_ptr& lock, bool lockit=true) : rwlock(lock.get()) { if (rwlock && lockit) rwlock->rdlock(); } /** * Unlocks the wrapped shared lock, if any. */ ~SharedLock() { if (rwlock) rwlock->unlock(); } /** * Releases control of the original shared lock and returns it without unlocking it. * * @return the original shared lock */ RWLock* release() { RWLock* ret = rwlock; rwlock = nullptr; return ret; } private: RWLock* rwlock; }; } #endif /* _xmltooling_threads_h */ xmltooling-1.5.3/xmltooling/util/URLEncoder.h000644 001751 001751 00000004617 12003305017 022365 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/util/URLEncoder.h * * Interface to a URL-encoding mechanism along with a default implementation. */ #ifndef __xmltool_urlenc_h__ #define __xmltool_urlenc_h__ #include namespace xmltooling { /** * Interface to a URL-encoding mechanism along with a default implementation. * * Since URL-encoding is not canonical, it's important that the same * encoder is used during some library operations and the calling code. * Applications can supply an alternative implementation to the library * if required. */ class XMLTOOL_API URLEncoder { MAKE_NONCOPYABLE(URLEncoder); public: URLEncoder(); virtual ~URLEncoder(); /** * Produce a URL-safe but equivalent version of the input string. * * @param s input string to encode * @return a string object containing the result of encoding the input */ virtual std::string encode(const char* s) const; /** * Perform an in-place decoding operation on the input string. * The resulting string will be NULL-terminated. * * @param s input string to decode in a writable buffer */ virtual void decode(char* s) const; protected: /** * Returns true iff the input character requires encoding. * * @param ch the character to check * @return true iff the character should be encoded */ virtual bool isBad(char ch) const; }; }; #endif /* __xmltool_urlenc_h__ */ xmltooling-1.5.3/xmltooling/util/XMLConstants.h000644 001751 001751 00000007703 12007564200 022764 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/util/XMLConstants.h * * Fundamental XML namespace constants. */ #ifndef __xmltooling_xmlconstants_h__ #define __xmltooling_xmlconstants_h__ #include #include /** * XML related constants. */ namespace xmlconstants { /** XML core namespace ("http://www.w3.org/XML/1998/namespace") */ extern XMLTOOL_API const XMLCh XML_NS[]; /** XML namespace prefix for special xml attributes ("xml") */ extern XMLTOOL_API const XMLCh XML_PREFIX[]; /** XML namespace for xmlns attributes ("http://www.w3.org/2000/xmlns/") */ extern XMLTOOL_API const XMLCh XMLNS_NS[]; /** XML namespace prefix for xmlns attributes ("xmlns") */ extern XMLTOOL_API const XMLCh XMLNS_PREFIX[]; /** XML Schema namespace ("http://www.w3.org/2001/XMLSchema") */ extern XMLTOOL_API const XMLCh XSD_NS[]; /** XML Schema QName prefix ("xs") */ extern XMLTOOL_API const XMLCh XSD_PREFIX[]; /** XML Schema Instance namespace ("http://www.w3.org/2001/XMLSchema-instance") */ extern XMLTOOL_API const XMLCh XSI_NS[]; /** XML Schema Instance QName prefix ("xsi") */ extern XMLTOOL_API const XMLCh XSI_PREFIX[]; /** XML Signature namespace ("http://www.w3.org/2000/09/xmldsig#") */ extern XMLTOOL_API const XMLCh XMLSIG_NS[]; /** XML Signature QName prefix ("ds") */ extern XMLTOOL_API const XMLCh XMLSIG_PREFIX[]; /** XML Signature 1.1 namespace ("http://www.w3.org/2009/xmldsig11#") */ extern XMLTOOL_API const XMLCh XMLSIG11_NS[]; /** XML Signature 1.1 QName prefix ("ds11") */ extern XMLTOOL_API const XMLCh XMLSIG11_PREFIX[]; /** XML Encryption namespace ("http://www.w3.org/2001/04/xmlenc#") */ extern XMLTOOL_API const XMLCh XMLENC_NS[]; /** XML Encryption QName prefix ("xenc") */ extern XMLTOOL_API const XMLCh XMLENC_PREFIX[]; /** XML Encryption 1.1 namespace ("http://www.w3.org/2009/xmlenc11#") */ extern XMLTOOL_API const XMLCh XMLENC11_NS[]; /** XML Encryption 1.1 QName prefix ("xenc11") */ extern XMLTOOL_API const XMLCh XMLENC11_PREFIX[]; /** SOAP 1.1 Envelope XML namespace ("http://schemas.xmlsoap.org/soap/envelope/") */ extern XMLTOOL_API const XMLCh SOAP11ENV_NS[]; /** SOAP 1.1 Envelope QName prefix ("S") */ extern XMLTOOL_API const XMLCh SOAP11ENV_PREFIX[]; /** XML Tooling namespace ("http://www.opensaml.org/xmltooling") */ extern XMLTOOL_API const XMLCh XMLTOOLING_NS[]; /** XML "true" boolean constant */ extern XMLTOOL_API const XMLCh XML_TRUE[]; /** XML "false" boolean constant */ extern XMLTOOL_API const XMLCh XML_FALSE[]; /** XML "1" boolean constant */ extern XMLTOOL_API const XMLCh XML_ONE[]; /** XML "0" boolean constant */ extern XMLTOOL_API const XMLCh XML_ZERO[]; /** Enumerations of the different values of a boolean attribute or element */ enum xmltooling_bool_t { XML_BOOL_NULL, XML_BOOL_TRUE, XML_BOOL_FALSE, XML_BOOL_ONE, XML_BOOL_ZERO }; }; #endif /* __xmltooling_xmlconstants_h__ */ xmltooling-1.5.3/xmltooling/util/XMLHelper.h000644 001751 001751 00000034650 12003305017 022223 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/util/XMLHelper.h * * A helper class for working with W3C DOM objects. */ #ifndef __xmltooling_xmlhelper_h__ #define __xmltooling_xmlhelper_h__ #include #include #include #include namespace xmltooling { class XMLTOOL_API QName; class XMLTOOL_API XMLObject; /** * RAII wrapper for Xerces resources. */ template class XercesJanitor { MAKE_NONCOPYABLE(XercesJanitor); T* m_held; public: /** * Constructor * * @param resource object to release when leaving scope */ XercesJanitor(T* resource) : m_held(resource) {} ~XercesJanitor() { if (m_held) m_held->release(); } /** * Returns resource held by this object. * * @return the resource held or nullptr */ T* get() { return m_held; } /** * Returns resource held by this object. * * @return the resource held or nullptr */ T* operator->() { return m_held; } /** * Returns resource held by this object and releases it to the caller. * * @return the resource held or nullptr */ T* release() { T* ret=m_held; m_held=nullptr; return ret; } }; /** * A helper class for working with W3C DOM objects. */ class XMLTOOL_API XMLHelper { public: /** * Checks if the given element has an xsi:type defined for it * * @param e the DOM element * @return true if there is a type, false if not */ static bool hasXSIType(const xercesc::DOMElement* e); /** * Gets the XSI type for a given element if it has one. *

The caller is responsible for freeing the result. * * @param e the element * @return the type or null */ static QName* getXSIType(const xercesc::DOMElement* e); /** * Gets the ID attribute of a DOM element. * * @param domElement the DOM element * @return the ID attribute or null if there isn't one */ static xercesc::DOMAttr* getIdAttribute(const xercesc::DOMElement* domElement); /** * Attempts to locate an XMLObject from this point downward in the tree whose * XML ID matches the supplied value. * * @param tree root of tree to search * @param id ID value to locate * @return XMLObject in the tree with a matching ID value, or nullptr */ static const XMLObject* getXMLObjectById(const XMLObject& tree, const XMLCh* id); /** * Attempts to locate an XMLObject from this point downward in the tree whose * XML ID matches the supplied value. * * @param tree root of tree to search * @param id ID value to locate * @return XMLObject in the tree with a matching ID value, or nullptr */ static XMLObject* getXMLObjectById(XMLObject& tree, const XMLCh* id); /** * Returns the set of non-visibly-used namespace declarations found in a tree. *

Each member of the set is a prefix/URI pair. * * @param tree root of tree to search * @param prefixes container to store declarations */ static void getNonVisiblyUsedPrefixes(const XMLObject& tree, std::map& prefixes); /** * Gets the QName for the given DOM node. * * @param domNode the DOM node * @return the QName for the element or null if the element was null */ static QName* getNodeQName(const xercesc::DOMNode* domNode); /** * @deprecated * Constructs a QName from an attribute's value. *

The caller is responsible for freeing the result. * * @param attribute the attribute with a QName value * @return a QName from an attribute's value, or null if the given attribute is null */ static QName* getAttributeValueAsQName(const xercesc::DOMAttr* attribute); /** * Constructs a QName from a node's value. *

The caller is responsible for freeing the result. * * @param domNode the DOM node with a QName value * @return a QName from a node's value, or null if the given node has no value */ static QName* getNodeValueAsQName(const xercesc::DOMNode* domNode); /** * Returns a boolean based on a node's value. * * @param domNode the DOM node with a boolean (1/0/true/false) value * @param def value to return if the node is null/missing * @return a bool value based on the node's value, or a default value */ static bool getNodeValueAsBool(const xercesc::DOMNode* domNode, bool def); /** * Appends the child Element to the parent Element, * importing the child Element into the parent's Document if needed. * * @param parentElement the parent Element * @param childElement the child Element * @return the child Element that was added (may be an imported copy) */ static xercesc::DOMElement* appendChildElement(xercesc::DOMElement* parentElement, xercesc::DOMElement* childElement); /** * Checks the qualified name of a node. * * @param n node to check * @param ns namespace to compare with * @param local local name to compare with * @return true iff the node's qualified name matches the other parameters */ static bool isNodeNamed(const xercesc::DOMNode* n, const XMLCh* ns, const XMLCh* local); /** * Returns the first matching child element of the node if any. * * @param n node to check * @param localName local name to compare with or nullptr for any match * @return the first matching child node of type Element, or nullptr */ static xercesc::DOMElement* getFirstChildElement(const xercesc::DOMNode* n, const XMLCh* localName=nullptr); /** * Returns the last matching child element of the node if any. * * @param n node to check * @param localName local name to compare with or nullptr for any match * @return the last matching child node of type Element, or nullptr */ static xercesc::DOMElement* getLastChildElement(const xercesc::DOMNode* n, const XMLCh* localName=nullptr); /** * Returns the next matching sibling element of the node if any. * * @param n node to check * @param localName local name to compare with or nullptr for any match * @return the next matching sibling node of type Element, or nullptr */ static xercesc::DOMElement* getNextSiblingElement(const xercesc::DOMNode* n, const XMLCh* localName=nullptr); /** * Returns the previous matching sibling element of the node if any. * * @param n node to check * @param localName local name to compare with or nullptr for any match * @return the previous matching sibling node of type Element, or nullptr */ static xercesc::DOMElement* getPreviousSiblingElement(const xercesc::DOMNode* n, const XMLCh* localName=nullptr); /** * Returns the first matching child element of the node if any. * * @param n node to check * @param ns namespace to compare with * @param localName local name to compare with * @return the first matching child node of type Element, or nullptr */ static xercesc::DOMElement* getFirstChildElement(const xercesc::DOMNode* n, const XMLCh* ns, const XMLCh* localName); /** * Returns the last matching child element of the node if any. * * @param n node to check * @param ns namespace to compare with * @param localName local name to compare with * @return the last matching child node of type Element, or nullptr */ static xercesc::DOMElement* getLastChildElement(const xercesc::DOMNode* n, const XMLCh* ns, const XMLCh* localName); /** * Returns the next matching sibling element of the node if any. * * @param n node to check * @param ns namespace to compare with * @param localName local name to compare with * @return the next matching sibling node of type Element, or nullptr */ static xercesc::DOMElement* getNextSiblingElement(const xercesc::DOMNode* n, const XMLCh* ns, const XMLCh* localName); /** * Returns the previous matching sibling element of the node if any. * * @param n node to check * @param ns namespace to compare with * @param localName local name to compare with * @return the previous matching sibling node of type Element, or nullptr */ static xercesc::DOMElement* getPreviousSiblingElement(const xercesc::DOMNode* n, const XMLCh* ns, const XMLCh* localName); /** * Returns the content of the first Text node found in the element, if any. * This is roughly similar to the DOM getTextContent function, but only * examines the immediate children of the element. * * @param e element to examine * @return the content of the first Text node found, or nullptr */ static const XMLCh* getTextContent(const xercesc::DOMElement* e); /** * Returns the content of the specified attribute node as a string, * or the default value, if the attribute is not present. * * @param e element to examine (may be nullptr) * @param defValue default value to return * @param localName local name of attribute * @param ns namespace of attribute * @return the specified attribute's value, or the specified default */ static std::string getAttrString( const xercesc::DOMElement* e, const char* defValue, const XMLCh* localName, const XMLCh* ns=nullptr ); /** * Returns the content of the specified attribute node as an integer, * or the default value, if the attribute is not present. * * @param e element to examine (may be nullptr) * @param defValue default value to return * @param localName local name of attribute * @param ns namespace of attribute * @return the specified attribute's value, or the specified default */ static int getAttrInt( const xercesc::DOMElement* e, int defValue, const XMLCh* localName, const XMLCh* ns=nullptr ); /** * Returns the content of the specified attribute node as a boolean, * or the default value, if the attribute is not present. * * @param e element to examine (may be nullptr) * @param defValue default value to return * @param localName local name of attribute * @param ns namespace of attribute * @return the specified attribute's value, or the specified default */ static bool getAttrBool( const xercesc::DOMElement* e, bool defValue, const XMLCh* localName, const XMLCh* ns=nullptr ); /** * Serializes the DOM node provided into a buffer using UTF-8 encoding and * the default XML serializer available. No manipulation or formatting is applied. * * @param n node to serialize * @param buf buffer to serialize element into * @param pretty enable pretty printing if supported */ static void serialize(const xercesc::DOMNode* n, std::string& buf, bool pretty=false); /** * Serializes the DOM node provided to a stream using UTF-8 encoding and * the default XML serializer available. No manipulation or formatting is applied. * * @param n node to serialize * @param out stream to serialize element into * @param pretty enable pretty printing if supported * @return reference to output stream */ static std::ostream& serialize(const xercesc::DOMNode* n, std::ostream& out, bool pretty=false); }; /** * Serializes the DOM node provided to a stream using UTF-8 encoding and * the default XML serializer available. No manipulation or formatting is applied. * * @param n node to serialize * @param ostr stream to serialize element into * @return reference to output stream */ extern XMLTOOL_API std::ostream& operator<<(std::ostream& ostr, const xercesc::DOMNode& n); /** * Marshalls and serializes the XMLObject provided to a stream using UTF-8 encoding and * the default XML serializer available. No manipulation or formatting is applied. * *

The marshaller operation takes no parameters. * * @param obj object to serialize * @param ostr stream to serialize object into * @return reference to output stream */ extern XMLTOOL_API std::ostream& operator<<(std::ostream& ostr, const XMLObject& obj); }; #endif /* __xmltooling_xmlhelper_h__ */ xmltooling-1.5.3/xmltooling/util/XMLObjectChildrenList.h000644 001751 001751 00000057105 12003305017 024517 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/util/XMLObjectChildrenList.h * * STL-compatible container wrapper. */ #ifndef __xmltooling_list_h__ #define __xmltooling_list_h__ #include #include #include /** * Shorthand for an XMLObjectChildrenList wrapped around a vector * * @param type the type of object in the vector */ #define VectorOf(type) xmltooling::XMLObjectChildrenList< std::vector > /** * Shorthand for an XMLObjectChildrenList wrapped around a list * * @param type the type of object in the list */ #define ListOf(type) xmltooling::XMLObjectChildrenList< std::list > /** * Shorthand for an XMLObjectChildrenList wrapped around a deque * * @param type the type of object in the deque */ #define DequeOf(type) xmltooling::XMLObjectChildrenList< std::deque > /** * Shorthand for an XMLObjectPairList wrapped around a vector * * @param type1 the first type of object in the vector * @param type2 the second type of object in the vector */ #define VectorOfPairs(type1,type2) xmltooling::XMLObjectPairList< std::vector< std::pair > > /** * Shorthand for an XMLObjectPairList wrapped around a list * * @param type1 the first type of object in the vector * @param type2 the second type of object in the vector */ #define ListOfPairs(type1,type2) xmltooling::XMLObjectPairList< std::list< std::pair > > /** * Shorthand for an XMLObjectPairList wrapped around a deque * * @param type1 the first type of object in the vector * @param type2 the second type of object in the vector */ #define DequeOfPairs(type1,type2) xmltooling::XMLObjectPairList< std::deque< std::pair > > namespace xmltooling { // Forward reference template class XMLObjectChildrenList; template class XMLObjectPairList; /** * STL iterator that mediates access to an iterator over typed XML children. * * @param Container type of container * @param _Ty a bidrectional iterator to guard */ template class XMLObjectChildrenIterator { /// @cond OFF _Ty m_iter; template friend class XMLObjectChildrenList; template friend class XMLObjectPairList; public: #ifdef HAVE_ITERATOR_TRAITS typedef typename std::iterator_traits<_Ty>::iterator_category iterator_category; typedef typename std::iterator_traits<_Ty>::value_type value_type; typedef typename std::iterator_traits<_Ty>::difference_type difference_type; typedef typename std::iterator_traits<_Ty>::pointer pointer; typedef typename std::iterator_traits<_Ty>::reference reference; #else typedef typename _Ty::iterator_category iterator_category; typedef typename _Ty::value_type value_type; typedef typename _Ty::difference_type difference_type; typedef typename _Ty::pointer pointer; typedef typename _Ty::reference reference; #endif typedef typename Container::const_reference const_reference; typedef typename Container::const_pointer const_pointer; XMLObjectChildrenIterator() { } XMLObjectChildrenIterator(_Ty iter) { m_iter=iter; } const_reference operator*() const { return *m_iter; } const_reference operator->() const { return *m_iter; } XMLObjectChildrenIterator& operator++() { // preincrement ++m_iter; return (*this); } XMLObjectChildrenIterator& operator--() { // predecrement --m_iter; return (*this); } XMLObjectChildrenIterator operator++(int) { // postincrement XMLObjectChildrenIterator _Tmp = *this; ++*this; return (_Tmp); } XMLObjectChildrenIterator operator--(int) { // postdecrement XMLObjectChildrenIterator _Tmp = *this; --*this; return (_Tmp); } XMLObjectChildrenIterator& operator+=(difference_type _Off) { // increment by integer m_iter += _Off; return (*this); } XMLObjectChildrenIterator operator+(difference_type _Off) const { // return this + integer return m_iter + _Off; } XMLObjectChildrenIterator& operator-=(difference_type _Off) { // decrement by integer return (*this += -_Off); } XMLObjectChildrenIterator operator-(difference_type _Off) const { // return this - integer XMLObjectChildrenIterator _Tmp = *this; return (_Tmp -= _Off); } difference_type operator-(const XMLObjectChildrenIterator& _Right) const { // return difference of iterators return m_iter - _Right.m_iter; } const_reference operator[](difference_type _Off) const { // subscript return (*(*this + _Off)); } bool operator==(const XMLObjectChildrenIterator &_Right) const { // test for iterator equality return (m_iter == _Right.m_iter); } bool operator!=(const XMLObjectChildrenIterator &_Right) const { // test for iterator inequality return (!(m_iter == _Right.m_iter)); } bool operator<(const XMLObjectChildrenIterator &_Right) const { return (m_iter < _Right.m_iter); } /// @endcond }; #ifndef HAVE_ITERATOR_TRAITS /** * STL iterator that mediates access to an iterator that's a pointer. * * @param Container type of container * @param _Ty the type of object being referenced */ template class XMLObjectChildrenIterator { /// @cond OFF typename _Ty* m_iter; template friend class XMLObjectChildrenList; template friend class XMLObjectPairList; public: typedef std::random_access_iterator_tag iterator_category; typedef _Ty value_type; typedef ptrdiff_t difference_type; typedef _Ty* pointer; typedef _Ty& reference; typedef const _Ty& const_reference; typedef const _Ty* const_pointer; XMLObjectChildrenIterator() { } XMLObjectChildrenIterator(_Ty* iter) { m_iter=iter; } const_reference operator*() const { return *m_iter; } const_reference operator->() const { return *m_iter; } XMLObjectChildrenIterator& operator++() { // preincrement ++m_iter; return (*this); } XMLObjectChildrenIterator& operator--() { // predecrement --m_iter; return (*this); } XMLObjectChildrenIterator operator++(int) { // postincrement XMLObjectChildrenIterator _Tmp = *this; ++*this; return (_Tmp); } XMLObjectChildrenIterator operator--(int) { // postdecrement XMLObjectChildrenIterator _Tmp = *this; --*this; return (_Tmp); } XMLObjectChildrenIterator& operator+=(difference_type _Off) { // increment by integer m_iter += _Off; return (*this); } XMLObjectChildrenIterator operator+(difference_type _Off) const { // return this + integer return m_iter + _Off; } XMLObjectChildrenIterator& operator-=(difference_type _Off) { // decrement by integer return (*this += -_Off); } XMLObjectChildrenIterator operator-(difference_type _Off) const { // return this - integer XMLObjectChildrenIterator _Tmp = *this; return (_Tmp -= _Off); } difference_type operator-(const XMLObjectChildrenIterator& _Right) const { // return difference of iterators return m_iter - _Right.m_iter; } const_reference operator[](difference_type _Off) const { // subscript return (*(*this + _Off)); } bool operator==(const XMLObjectChildrenIterator &_Right) const { // test for iterator equality return (m_iter == _Right.m_iter); } bool operator!=(const XMLObjectChildrenIterator &_Right) const { // test for iterator inequality return (!(m_iter == _Right.m_iter)); } bool operator<(const XMLObjectChildrenIterator &_Right) const { return (m_iter < _Right.m_iter); } /// @endcond }; /** * STL iterator that mediates access to an iterator that's a const pointer. * * @param Container type of container * @param _Ty the type of object being referenced */ template class XMLObjectChildrenIterator { /// @cond OFF typename const _Ty* m_iter; template friend class XMLObjectChildrenList; template friend class XMLObjectPairList; public: typedef std::random_access_iterator_tag iterator_category; typedef _Ty value_type; typedef ptrdiff_t difference_type; typedef const _Ty* pointer; typedef const _Ty& reference; typedef const _Ty& const_reference; typedef const _Ty* const_pointer; XMLObjectChildrenIterator() { } XMLObjectChildrenIterator(_Ty* iter) { m_iter=iter; } const_reference operator*() const { return *m_iter; } const_reference operator->() const { return *m_iter; } XMLObjectChildrenIterator& operator++() { // preincrement ++m_iter; return (*this); } XMLObjectChildrenIterator& operator--() { // predecrement --m_iter; return (*this); } XMLObjectChildrenIterator operator++(int) { // postincrement XMLObjectChildrenIterator _Tmp = *this; ++*this; return (_Tmp); } XMLObjectChildrenIterator operator--(int) { // postdecrement XMLObjectChildrenIterator _Tmp = *this; --*this; return (_Tmp); } XMLObjectChildrenIterator& operator+=(difference_type _Off) { // increment by integer m_iter += _Off; return (*this); } XMLObjectChildrenIterator operator+(difference_type _Off) const { // return this + integer return m_iter + _Off; } XMLObjectChildrenIterator& operator-=(difference_type _Off) { // decrement by integer return (*this += -_Off); } XMLObjectChildrenIterator operator-(difference_type _Off) const { // return this - integer XMLObjectChildrenIterator _Tmp = *this; return (_Tmp -= _Off); } difference_type operator-(const XMLObjectChildrenIterator& _Right) const { // return difference of iterators return m_iter - _Right.m_iter; } const_reference operator[](difference_type _Off) const { // subscript return (*(*this + _Off)); } bool operator==(const XMLObjectChildrenIterator &_Right) const { // test for iterator equality return (m_iter == _Right.m_iter); } bool operator!=(const XMLObjectChildrenIterator &_Right) const { // test for iterator inequality return (!(m_iter == _Right.m_iter)); } bool operator<(const XMLObjectChildrenIterator &_Right) const { return (m_iter < _Right.m_iter); } /// @endcond }; #endif /** * STL-compatible container that mediates access to underlying lists of typed XML children. * @param _Tx the subtype container to encapsulate * @param _Ty the base type in the underlying list (defaults to XMLObject) */ template class XMLObjectChildrenList { Container& m_container; typename std::list<_Ty*>* m_list; typename std::list<_Ty*>::iterator m_fence; XMLObject* m_parent; public: /// @cond OFF typedef typename Container::value_type value_type; typedef typename Container::reference reference; typedef typename Container::const_reference const_reference; typedef typename Container::difference_type difference_type; typedef typename Container::size_type size_type; // We override the iterator types with our constrained wrapper. typedef XMLObjectChildrenIterator iterator; typedef XMLObjectChildrenIterator const_iterator; /// @endcond /** * Constructor to expose a typed collection of children backed by a list of a base type. * * @param parent parent object of the collection * @param sublist underlying container to expose * @param backing pointer to backing list for children, if any * @param ins_fence a marker designating where new children of this type should be added */ XMLObjectChildrenList( XMLObject* parent, Container& sublist, typename std::list<_Ty*>* backing, typename std::list<_Ty*>::iterator ins_fence ) : m_container(sublist), m_list(backing), m_fence(ins_fence), m_parent(parent) { } /// @cond OFF size_type size() const { // return length of sequence return m_container.size(); } bool empty() const { // test if sequence is empty return m_container.empty(); } iterator begin() { // return iterator for beginning of mutable sequence return m_container.begin(); } iterator end() { // return iterator for end of mutable sequence return m_container.end(); } const_iterator begin() const { // return iterator for beginning of const sequence return const_cast(m_container).begin(); } const_iterator end() const { // return iterator for end of const sequence return const_cast(m_container).end(); } const_reference at(size_type _Pos) const { // subscript nonmutable sequence with checking return m_container.at(_Pos); } const_reference operator[](size_type _Pos) const { // subscript nonmutable sequence return m_container[_Pos]; } const_reference front() const { // return first element of nonmutable sequence return m_container.front(); } const_reference back() const { // return last element of nonmutable sequence return m_container.back(); } void push_back(const_reference _Val) { setParent(_Val); if (m_list) m_list->insert(m_fence,_Val); m_container.push_back(_Val); } iterator erase(iterator _Where) { removeParent(*_Where); if (m_list) removeChild(*_Where); else delete *_Where.m_iter; return m_container.erase(_Where.m_iter); } iterator erase(iterator _First, iterator _Last) { for (iterator i=_First; i!=_Last; i++) { removeParent(*i); if (m_list) removeChild(*i); else delete *i.m_iter; } return m_container.erase(_First.m_iter,_Last.m_iter); } void clear() { erase(begin(),end()); } private: void setParent(const_reference _Val) { if (_Val->getParent()) throw XMLObjectException("Child object already has a parent."); _Val->setParent(m_parent); _Val->releaseParentDOM(true); } void removeParent(const_reference _Val) { if (_Val->getParent()!=m_parent) throw XMLObjectException("Child object not owned by this parent."); _Val->setParent(nullptr); m_parent->releaseParentDOM(true); } void removeChild(const_reference _Val) { for (typename std::list<_Ty*>::iterator i=m_list->begin(); i!=m_list->end(); i++) { if ((*i)==_Val) { m_list->erase(i); delete _Val; return; } } } /// @endcond }; /** * STL-compatible container that mediates access to underlying lists of typed XML children * that come in pairs. * * @param _Tx the subtype container to encapsulate * @param _Ty the base type in the underlying list (defaults to XMLObject) */ template class XMLObjectPairList { Container& m_container; typename std::list<_Ty*>* m_list; typename std::list<_Ty*>::iterator m_fence; XMLObject* m_parent; public: /// @cond OFF typedef typename Container::value_type value_type; typedef typename Container::reference reference; typedef typename Container::const_reference const_reference; typedef typename Container::difference_type difference_type; typedef typename Container::size_type size_type; // We override the iterator types with our constrained wrapper. typedef XMLObjectChildrenIterator iterator; typedef XMLObjectChildrenIterator const_iterator; /// @endcond /** * Constructor to expose a typed collection of pairs backed by a list of a base type. * * @param parent parent object of the collection * @param sublist underlying container to expose * @param backing pointer to backing list for children, if any * @param ins_fence a marker designating where new children of this type should be added */ XMLObjectPairList( XMLObject* parent, Container& sublist, typename std::list<_Ty*>* backing, typename std::list<_Ty*>::iterator ins_fence ) : m_container(sublist), m_list(backing), m_fence(ins_fence), m_parent(parent) { } /// @cond OFF size_type size() const { // return length of sequence return m_container.size(); } bool empty() const { // test if sequence is empty return m_container.empty(); } iterator begin() { // return iterator for beginning of mutable sequence return m_container.begin(); } iterator end() { // return iterator for end of mutable sequence return m_container.end(); } const_iterator begin() const { // return iterator for beginning of const sequence return const_cast(m_container).begin(); } const_iterator end() const { // return iterator for end of const sequence return const_cast(m_container).end(); } const_reference at(size_type _Pos) const { // subscript nonmutable sequence with checking return m_container.at(_Pos); } const_reference operator[](size_type _Pos) const { // subscript nonmutable sequence return m_container[_Pos]; } const_reference front() const { // return first element of nonmutable sequence return m_container.front(); } const_reference back() const { // return last element of nonmutable sequence return m_container.back(); } void push_back(const_reference _Val) { setParent(_Val); if (m_list) { m_list->insert(m_fence,_Val.first); m_list->insert(m_fence,_Val.second); } m_container.push_back(_Val); } iterator erase(iterator _Where) { removeParent(*_Where); if (m_list) removeChild(*_Where); else { delete _Where.m_iter->first; delete _Where.m_iter->second; } return m_container.erase(_Where.m_iter); } iterator erase(iterator _First, iterator _Last) { for (iterator i=_First; i!=_Last; i++) { removeParent(*i); if (m_list) removeChild(*i); else { delete i.m_iter->first; delete i.m_iter->second; } } return m_container.erase(_First,_Last); } void clear() { erase(begin(),end()); } private: void setParent(const_reference _Val) { if (_Val.first->getParent() || (_Val.second && _Val.second->getParent())) throw XMLObjectException("One of the child objects already has a parent."); _Val.first->setParent(m_parent); if (_Val.second) _Val.second->setParent(m_parent); _Val.first->releaseParentDOM(true); } void removeParent(const_reference _Val) { if (_Val.first->getParent()!=m_parent || (_Val.second && _Val.second->getParent()!=m_parent)) throw XMLObjectException("One of the child objects not owned by this parent."); _Val.first->setParent(nullptr); if (_Val.second) _Val.second->setParent(nullptr); m_parent->releaseParentDOM(true); } void removeChild(const_reference _Val) { for (typename std::list<_Ty*>::iterator i=m_list->begin(); i!=m_list->end(); i++) { if ((*i)==_Val.first) { typename std::list<_Ty*>::iterator j=i++; m_list->erase(j); m_list->erase(i); delete _Val.first; delete _Val.second; return; } i++; } } /// @endcond }; }; #endif /* __xmltooling_list_h__ */ xmltooling-1.5.3/xmltooling/util/DateTime.cpp000644 001751 001751 00000123350 12003305017 022446 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * DateTime.cpp * * Manipulation of XML date/time data. */ /* * This is mostly copied from Xerces-C, but they don't seem inclined to produce a usable * class, so I had to incorporate my own version of it for now. I can't inherit it * since the fields I need are private. */ #include "internal.h" #include "unicode.h" #include "util/DateTime.h" #ifndef WIN32 # include #endif #include #include #include #include using namespace xmltooling; using namespace xercesc; using namespace std; // // constants used to process raw data (fBuffer) // // [-]{CCYY-MM-DD}'T'{HH:MM:SS.MS}['Z'] // [{+|-}hh:mm'] // static const XMLCh DURATION_STARTER = chLatin_P; // 'P' static const XMLCh DURATION_Y = chLatin_Y; // 'Y' static const XMLCh DURATION_M = chLatin_M; // 'M' static const XMLCh DURATION_D = chLatin_D; // 'D' static const XMLCh DURATION_H = chLatin_H; // 'H' static const XMLCh DURATION_S = chLatin_S; // 'S' static const XMLCh DATE_SEPARATOR = chDash; // '-' static const XMLCh TIME_SEPARATOR = chColon; // ':' static const XMLCh TIMEZONE_SEPARATOR = chColon; // ':' static const XMLCh DATETIME_SEPARATOR = chLatin_T; // 'T' static const XMLCh MILISECOND_SEPARATOR = chPeriod; // '.' static const XMLCh UTC_STD_CHAR = chLatin_Z; // 'Z' static const XMLCh UTC_POS_CHAR = chPlus; // '+' static const XMLCh UTC_NEG_CHAR = chDash; // '-' static const XMLCh UTC_SET[] = {UTC_STD_CHAR //"Z+-" , UTC_POS_CHAR , UTC_NEG_CHAR , chNull}; static const int YMD_MIN_SIZE = 10; // CCYY-MM-DD static const int YMONTH_MIN_SIZE = 7; // CCYY_MM static const int TIME_MIN_SIZE = 8; // hh:mm:ss static const int TIMEZONE_SIZE = 5; // hh:mm static const int DAY_SIZE = 5; // ---DD //static const int MONTH_SIZE = 6; // --MM-- static const int MONTHDAY_SIZE = 7; // --MM-DD static const int NOT_FOUND = -1; //define constants to be used in assigning default values for //all date/time excluding duration static const int YEAR_DEFAULT = 2000; static const int MONTH_DEFAULT = 01; static const int DAY_DEFAULT = 15; // order-relation on duration is a partial order. The dates below are used to // for comparison of 2 durations, based on the fact that // duration x and y is x<=y iff s+x<=s+y // see 3.2.6 duration W3C schema datatype specs // // the dates are in format: {CCYY,MM,DD, H, S, M, MS, timezone} const int DateTime::DATETIMES[][TOTAL_SIZE] = { {1696, 9, 1, 0, 0, 0, 0, UTC_STD}, {1697, 2, 1, 0, 0, 0, 0, UTC_STD}, {1903, 3, 1, 0, 0, 0, 0, UTC_STD}, {1903, 7, 1, 0, 0, 0, 0, UTC_STD} }; // --------------------------------------------------------------------------- // local methods // --------------------------------------------------------------------------- static inline int fQuotient(int a, int b) { div_t div_result = div(a, b); return div_result.quot; } static inline int fQuotient(int temp, int low, int high) { return fQuotient(temp - low, high - low); } static inline int mod(int a, int b, int quotient) { return (a - quotient*b) ; } static inline int modulo (int temp, int low, int high) { //modulo(a - low, high - low) + low int a = temp - low; int b = high - low; return (mod (a, b, fQuotient(a, b)) + low) ; } static inline bool isLeapYear(int year) { return((year%4 == 0) && ((year%100 != 0) || (year%400 == 0))); } static int maxDayInMonthFor(int year, int month) { if ( month == 4 || month == 6 || month == 9 || month == 11 ) { return 30; } else if ( month==2 ) { if ( isLeapYear(year) ) return 29; else return 28; } else { return 31; } } // --------------------------------------------------------------------------- // static methods : for duration // --------------------------------------------------------------------------- /** * Compares 2 given durations. (refer to W3C Schema Datatypes "3.2.6 duration") * * 3.2.6.2 Order relation on duration * * In general, the order-relation on duration is a partial order since there is no * determinate relationship between certain durations such as one month (P1M) and 30 days (P30D). * The order-relation of two duration values x and y is x < y iff s+x < s+y for each qualified * dateTime s in the list below. * * These values for s cause the greatest deviations in the addition of dateTimes and durations * **/ int DateTime::compare(const DateTime* const pDate1 , const DateTime* const pDate2 , bool strict) { //REVISIT: this is unoptimazed vs of comparing 2 durations // Algorithm is described in 3.2.6.2 W3C Schema Datatype specs // int resultA, resultB = XMLDateTime::INDETERMINATE; //try and see if the objects are equal if ( (resultA = compareOrder(pDate1, pDate2)) == XMLDateTime::EQUAL) return XMLDateTime::EQUAL; //long comparison algorithm is required DateTime tempA, *pTempA = &tempA; DateTime tempB, *pTempB = &tempB; addDuration(pTempA, pDate1, 0); addDuration(pTempB, pDate2, 0); resultA = compareOrder(pTempA, pTempB); if ( resultA == XMLDateTime::INDETERMINATE ) return XMLDateTime::INDETERMINATE; addDuration(pTempA, pDate1, 1); addDuration(pTempB, pDate2, 1); resultB = compareOrder(pTempA, pTempB); resultA = compareResult(resultA, resultB, strict); if ( resultA == XMLDateTime::INDETERMINATE ) return XMLDateTime::INDETERMINATE; addDuration(pTempA, pDate1, 2); addDuration(pTempB, pDate2, 2); resultB = compareOrder(pTempA, pTempB); resultA = compareResult(resultA, resultB, strict); if ( resultA == XMLDateTime::INDETERMINATE ) return XMLDateTime::INDETERMINATE; addDuration(pTempA, pDate1, 3); addDuration(pTempB, pDate2, 3); resultB = compareOrder(pTempA, pTempB); resultA = compareResult(resultA, resultB, strict); return resultA; } // // Form a new DateTime with duration and baseDate array // Note: C++ Java // fNewDate duration // fDuration date // void DateTime::addDuration(DateTime* fNewDate , const DateTime* const fDuration , int index) { //REVISIT: some code could be shared between normalize() and this method, // however is it worth moving it? The structures are different... // fNewDate->reset(); //add months (may be modified additionaly below) int temp = DATETIMES[index][Month] + fDuration->fValue[Month]; fNewDate->fValue[Month] = modulo(temp, 1, 13); int carry = fQuotient(temp, 1, 13); //add years (may be modified additionaly below) fNewDate->fValue[CentYear] = DATETIMES[index][CentYear] + fDuration->fValue[CentYear] + carry; //add seconds temp = DATETIMES[index][Second] + fDuration->fValue[Second]; carry = fQuotient (temp, 60); fNewDate->fValue[Second] = mod(temp, 60, carry); //add minutes temp = DATETIMES[index][Minute] + fDuration->fValue[Minute] + carry; carry = fQuotient(temp, 60); fNewDate->fValue[Minute] = mod(temp, 60, carry); //add hours temp = DATETIMES[index][Hour] + fDuration->fValue[Hour] + carry; carry = fQuotient(temp, 24); fNewDate->fValue[Hour] = mod(temp, 24, carry); fNewDate->fValue[Day] = DATETIMES[index][Day] + fDuration->fValue[Day] + carry; while ( true ) { temp = maxDayInMonthFor(fNewDate->fValue[CentYear], fNewDate->fValue[Month]); if ( fNewDate->fValue[Day] < 1 ) { //original fNewDate was negative fNewDate->fValue[Day] += maxDayInMonthFor(fNewDate->fValue[CentYear], fNewDate->fValue[Month]-1); carry = -1; } else if ( fNewDate->fValue[Day] > temp ) { fNewDate->fValue[Day] -= temp; carry = 1; } else { break; } temp = fNewDate->fValue[Month] + carry; fNewDate->fValue[Month] = modulo(temp, 1, 13); fNewDate->fValue[CentYear] += fQuotient(temp, 1, 13); } //fNewDate->fValue[utc] = UTC_STD_CHAR; fNewDate->fValue[utc] = UTC_STD; } int DateTime::compareResult(int resultA , int resultB , bool strict) { if ( resultB == XMLDateTime::INDETERMINATE ) { return XMLDateTime::INDETERMINATE; } else if ( (resultA != resultB) && strict ) { return XMLDateTime::INDETERMINATE; } else if ( (resultA != resultB) && !strict ) { if ( (resultA != XMLDateTime::EQUAL) && (resultB != XMLDateTime::EQUAL) ) { return XMLDateTime::INDETERMINATE; } else { return (resultA != XMLDateTime::EQUAL)? resultA : resultB; } } return resultA; } // --------------------------------------------------------------------------- // static methods : for others // --------------------------------------------------------------------------- int DateTime::compare(const DateTime* const pDate1 , const DateTime* const pDate2) { if (pDate1->fValue[utc] == pDate2->fValue[utc]) { return DateTime::compareOrder(pDate1, pDate2); } int c1, c2; if ( pDate1->isNormalized()) { c1 = compareResult(pDate1, pDate2, false, UTC_POS); c2 = compareResult(pDate1, pDate2, false, UTC_NEG); return getRetVal(c1, c2); } else if ( pDate2->isNormalized()) { c1 = compareResult(pDate1, pDate2, true, UTC_POS); c2 = compareResult(pDate1, pDate2, true, UTC_NEG); return getRetVal(c1, c2); } return XMLDateTime::INDETERMINATE; } int DateTime::compareResult(const DateTime* const pDate1 , const DateTime* const pDate2 , bool set2Left , int utc_type) { DateTime tmpDate = (set2Left ? *pDate1 : *pDate2); tmpDate.fTimeZone[hh] = 14; tmpDate.fTimeZone[mm] = 0; tmpDate.fValue[utc] = utc_type; tmpDate.normalize(); return (set2Left? DateTime::compareOrder(&tmpDate, pDate2) : DateTime::compareOrder(pDate1, &tmpDate)); } int DateTime::compareOrder(const DateTime* const lValue , const DateTime* const rValue) //, MemoryManager* const memMgr) { // // If any of the them is not normalized() yet, // we need to do something here. // DateTime lTemp = *lValue; DateTime rTemp = *rValue; lTemp.normalize(); rTemp.normalize(); for ( int i = 0 ; i < TOTAL_SIZE; i++ ) { if ( lTemp.fValue[i] < rTemp.fValue[i] ) { return XMLDateTime::LESS_THAN; } else if ( lTemp.fValue[i] > rTemp.fValue[i] ) { return XMLDateTime::GREATER_THAN; } } if ( lTemp.fHasTime) { if ( lTemp.fMiliSecond < rTemp.fMiliSecond ) { return XMLDateTime::LESS_THAN; } else if ( lTemp.fMiliSecond > rTemp.fMiliSecond ) { return XMLDateTime::GREATER_THAN; } } return XMLDateTime::EQUAL; } // --------------------------------------------------------------------------- // ctor and dtor // --------------------------------------------------------------------------- DateTime::~DateTime() { delete[] fBuffer; } DateTime::DateTime() : fStart(0) , fEnd(0) , fBufferMaxLen(0) , fBuffer(0) , fMiliSecond(0) , fHasTime(false) { reset(); } DateTime::DateTime(const XMLCh* const aString) : fStart(0) , fEnd(0) , fBufferMaxLen(0) , fBuffer(0) , fMiliSecond(0) , fHasTime(false) { setBuffer(aString); } DateTime::DateTime(time_t epoch, bool duration) : fStart(0) , fEnd(0) , fBufferMaxLen(0) , fBuffer(0) , fMiliSecond(0) , fHasTime(false) { if (duration) { ostringstream s; if (epoch < 0) { s << "-"; epoch = -epoch; } time_t days = epoch / 86400; epoch %= 86400; time_t hours = epoch / 3600; epoch %= 3600; time_t minutes = epoch / 60; epoch %= 60; s << "P" << days << "DT" << hours << "H" << minutes << "M" << epoch << "S"; auto_ptr_XMLCh timeptr(s.str().c_str()); setBuffer(timeptr.get()); } else { #ifndef HAVE_GMTIME_R struct tm* ptime=gmtime(&epoch); #else struct tm res; struct tm* ptime=gmtime_r(&epoch,&res); #endif char timebuf[32]; strftime(timebuf,32,"%Y-%m-%dT%H:%M:%SZ",ptime); auto_ptr_XMLCh timeptr(timebuf); setBuffer(timeptr.get()); } } // ----------------------------------------------------------------------- // Copy ctor and Assignment operators // ----------------------------------------------------------------------- DateTime::DateTime(const DateTime &toCopy) : fBufferMaxLen(0) , fBuffer(0) { copy(toCopy); } DateTime& DateTime::operator=(const DateTime& rhs) { if (this == &rhs) return *this; copy(rhs); return *this; } // ----------------------------------------------------------------------- // Implementation of Abstract Interface // ----------------------------------------------------------------------- // // We may simply return the handle to fBuffer // const XMLCh* DateTime::getRawData() const { //assertBuffer(); return fBuffer; } const XMLCh* DateTime::getFormattedString() const { return getRawData(); } int DateTime::getSign() const { return fValue[utc]; } time_t DateTime::getEpoch(bool duration) const { if (duration) { time_t epoch = getSecond() + (60 * getMinute()) + (3600 * getHour()) + (86400 * getDay()); if (getMonth()) epoch += (((365 * 4) + 1)/48 * 86400); if (getYear()) epoch += 365.25 * 86400; return getSign()!=UTC_NEG ? epoch : -epoch; } else { struct tm t; t.tm_sec=getSecond(); t.tm_min=getMinute(); t.tm_hour=getHour(); t.tm_mday=getDay(); t.tm_mon=getMonth()-1; t.tm_year=getYear()-1900; t.tm_isdst=0; #if defined(HAVE_TIMEGM) return timegm(&t); #else // Windows, and hopefully most others...? return mktime(&t) - timezone; #endif } } // --------------------------------------------------------------------------- // Parsers // --------------------------------------------------------------------------- // // [-]{CCYY-MM-DD}'T'{HH:MM:SS.MS}[TimeZone] // void DateTime::parseDateTime() { initParser(); getDate(); //fStart is supposed to point to 'T' if (fBuffer[fStart++] != DATETIME_SEPARATOR) throw XMLParserException("Invalid separator between date and time."); getTime(); validateDateTime(); normalize(); fHasTime = true; } // // [-]{CCYY-MM-DD}[TimeZone] // void DateTime::parseDate() { initParser(); getDate(); parseTimeZone(); validateDateTime(); normalize(); } void DateTime::parseTime() { initParser(); // time initialize to default values fValue[CentYear]= YEAR_DEFAULT; fValue[Month] = MONTH_DEFAULT; fValue[Day] = DAY_DEFAULT; getTime(); validateDateTime(); normalize(); fHasTime = true; } // // {---DD}[TimeZone] // 01234 // void DateTime::parseDay() { initParser(); if (fBuffer[0] != DATE_SEPARATOR || fBuffer[1] != DATE_SEPARATOR || fBuffer[2] != DATE_SEPARATOR ) { throw XMLParserException("Invalid character in date."); } //initialize values fValue[CentYear] = YEAR_DEFAULT; fValue[Month] = MONTH_DEFAULT; fValue[Day] = parseInt(fStart+3, fStart+5); if ( DAY_SIZE < fEnd ) { int sign = findUTCSign(DAY_SIZE); if ( sign < 0 ) { throw XMLParserException("Invalid character in date."); } else { getTimeZone(sign); } } validateDateTime(); normalize(); } // // {--MM--}[TimeZone] // {--MM}[TimeZone] // 012345 // void DateTime::parseMonth() { initParser(); if (fBuffer[0] != DATE_SEPARATOR || fBuffer[1] != DATE_SEPARATOR ) { throw XMLParserException("Invalid character in date."); } //set constants fValue[CentYear] = YEAR_DEFAULT; fValue[Day] = DAY_DEFAULT; fValue[Month] = parseInt(2, 4); // REVISIT: allow both --MM and --MM-- now. // need to remove the following lines to disallow --MM-- // when the errata is officially in the rec. fStart = 4; if ( fEnd >= fStart+2 && fBuffer[fStart] == DATE_SEPARATOR && fBuffer[fStart+1] == DATE_SEPARATOR ) { fStart += 2; } // // parse TimeZone if any // if ( fStart < fEnd ) { int sign = findUTCSign(fStart); if ( sign < 0 ) { throw XMLParserException("Invalid character in date."); } else { getTimeZone(sign); } } validateDateTime(); normalize(); } // //[-]{CCYY}[TimeZone] // 0 1234 // void DateTime::parseYear() { initParser(); // skip the first '-' and search for timezone // int sign = findUTCSign((fBuffer[0] == chDash) ? 1 : 0); if (sign == NOT_FOUND) { fValue[CentYear] = parseIntYear(fEnd); } else { fValue[CentYear] = parseIntYear(sign); getTimeZone(sign); } //initialize values fValue[Month] = MONTH_DEFAULT; fValue[Day] = DAY_DEFAULT; //java is 1 validateDateTime(); normalize(); } // //{--MM-DD}[TimeZone] // 0123456 // void DateTime::parseMonthDay() { initParser(); if (fBuffer[0] != DATE_SEPARATOR || fBuffer[1] != DATE_SEPARATOR || fBuffer[4] != DATE_SEPARATOR ) { throw XMLParserException("Invalid character in date."); } //initialize fValue[CentYear] = YEAR_DEFAULT; fValue[Month] = parseInt(2, 4); fValue[Day] = parseInt(5, 7); if ( MONTHDAY_SIZE < fEnd ) { int sign = findUTCSign(MONTHDAY_SIZE); if ( sign<0 ) { throw XMLParserException("Invalid character in date."); } else { getTimeZone(sign); } } validateDateTime(); normalize(); } void DateTime::parseYearMonth() { initParser(); // get date getYearMonth(); fValue[Day] = DAY_DEFAULT; parseTimeZone(); validateDateTime(); normalize(); } // //PnYn MnDTnH nMnS: -P1Y2M3DT10H30M // // [-]{'P'{[n'Y'][n'M'][n'D']['T'][n'H'][n'M'][n'S']}} // // Note: the n above shall be >= 0 // if no time element found, 'T' shall be absent // void DateTime::parseDuration() { initParser(); // must start with '-' or 'P' // XMLCh c = fBuffer[fStart++]; if ( (c != DURATION_STARTER) && (c != chDash) ) { throw XMLParserException("Invalid character in time."); } // 'P' must ALWAYS be present in either case if ( (c == chDash) && (fBuffer[fStart++]!= DURATION_STARTER )) { throw XMLParserException("Invalid character in time."); } // java code //date[utc]=(c=='-')?'-':0; //fValue[utc] = UTC_STD; fValue[utc] = (fBuffer[0] == chDash? UTC_NEG : UTC_STD); int negate = ( fBuffer[0] == chDash ? -1 : 1); // // No negative value is allowed after 'P' // // eg P-1234, invalid // if (indexOf(fStart, fEnd, chDash) != NOT_FOUND) { throw XMLParserException("Invalid character in time."); } //at least one number and designator must be seen after P bool designator = false; int endDate = indexOf(fStart, fEnd, DATETIME_SEPARATOR); if ( endDate == NOT_FOUND ) { endDate = fEnd; // 'T' absent } //find 'Y' int end = indexOf(fStart, endDate, DURATION_Y); if ( end != NOT_FOUND ) { //scan year fValue[CentYear] = negate * parseInt(fStart, end); fStart = end+1; designator = true; } end = indexOf(fStart, endDate, DURATION_M); if ( end != NOT_FOUND ) { //scan month fValue[Month] = negate * parseInt(fStart, end); fStart = end+1; designator = true; } end = indexOf(fStart, endDate, DURATION_D); if ( end != NOT_FOUND ) { //scan day fValue[Day] = negate * parseInt(fStart,end); fStart = end+1; designator = true; } if ( (fEnd == endDate) && // 'T' absent (fStart != fEnd) ) // something after Day { throw XMLParserException("Invalid character in time."); } if ( fEnd != endDate ) // 'T' present { //scan hours, minutes, seconds // // skip 'T' first end = indexOf(++fStart, fEnd, DURATION_H); if ( end != NOT_FOUND ) { //scan hours fValue[Hour] = negate * parseInt(fStart, end); fStart = end+1; designator = true; } end = indexOf(fStart, fEnd, DURATION_M); if ( end != NOT_FOUND ) { //scan min fValue[Minute] = negate * parseInt(fStart, end); fStart = end+1; designator = true; } end = indexOf(fStart, fEnd, DURATION_S); if ( end != NOT_FOUND ) { //scan seconds int mlsec = indexOf (fStart, end, MILISECOND_SEPARATOR); /*** * Schema Errata: E2-23 * at least one digit must follow the decimal point if it appears. * That is, the value of the seconds component must conform * to the following pattern: [0-9]+(.[0-9]+)? */ if ( mlsec != NOT_FOUND ) { /*** * make usure there is something after the '.' and before the end. */ if ( mlsec+1 == end ) { throw XMLParserException("Invalid character in time."); } fValue[Second] = negate * parseInt(fStart, mlsec); fMiliSecond = negate * parseMiliSecond(mlsec+1, end); } else { fValue[Second] = negate * parseInt(fStart,end); } fStart = end+1; designator = true; } // no additional data should appear after last item // P1Y1M1DT is illigal value as well if ( (fStart != fEnd) || fBuffer[--fStart] == DATETIME_SEPARATOR ) { throw XMLParserException("Invalid character in time."); } } if ( !designator ) { throw XMLParserException("Invalid character in time."); } } // --------------------------------------------------------------------------- // Scanners // --------------------------------------------------------------------------- // // [-]{CCYY-MM-DD} // // Note: CCYY could be more than 4 digits // Assuming fStart point to the beginning of the Date Section // fStart updated to point to the position right AFTER the second 'D' // Since the lenght of CCYY might be variable, we can't check format upfront // void DateTime::getDate() { // Ensure enough chars in buffer if ( (fStart+YMD_MIN_SIZE) > fEnd) throw XMLParserException("Date/time string not complete."); getYearMonth(); // Scan YearMonth and // fStart point to the next '-' if (fBuffer[fStart++] != DATE_SEPARATOR) { throw XMLParserException("CCYY-MM must be followed by '-' sign."); } fValue[Day] = parseInt(fStart, fStart+2); fStart += 2 ; //fStart points right after the Day return; } // // hh:mm:ss[.msssss]['Z'] // hh:mm:ss[.msssss][['+'|'-']hh:mm] // 012345678 // // Note: Assuming fStart point to the beginning of the Time Section // fStart updated to point to the position right AFTER the second 's' // or ms if any // void DateTime::getTime() { // Ensure enough chars in buffer if ( (fStart+TIME_MIN_SIZE) > fEnd) throw XMLParserException("Incomplete Time Format."); // check (fixed) format first if ((fBuffer[fStart + 2] != TIME_SEPARATOR) || (fBuffer[fStart + 5] != TIME_SEPARATOR) ) { throw XMLParserException("Error in parsing time."); } // // get hours, minute and second // fValue[Hour] = parseInt(fStart + 0, fStart + 2); fValue[Minute] = parseInt(fStart + 3, fStart + 5); fValue[Second] = parseInt(fStart + 6, fStart + 8); fStart += 8; // to see if any ms and/or utc part after that if (fStart >= fEnd) return; //find UTC sign if any int sign = findUTCSign(fStart); //parse miliseconds int milisec = (fBuffer[fStart] == MILISECOND_SEPARATOR)? fStart : NOT_FOUND; if ( milisec != NOT_FOUND ) { fStart++; // skip the '.' // make sure we have some thing between the '.' and fEnd if (fStart >= fEnd) { throw XMLParserException("ms should be present once '.' is present."); } if ( sign == NOT_FOUND ) { fMiliSecond = parseMiliSecond(fStart, fEnd); //get ms between '.' and fEnd fStart = fEnd; } else { fMiliSecond = parseMiliSecond(fStart, sign); //get ms between UTC sign and fEnd } } else if(sign == 0 || sign != fStart) { throw XMLParserException("Seconds has more than 2 digits."); } //parse UTC time zone (hh:mm) if ( sign > 0 ) { getTimeZone(sign); } } // // [-]{CCYY-MM} // // Note: CCYY could be more than 4 digits // fStart updated to point AFTER the second 'M' (probably meet the fEnd) // void DateTime::getYearMonth() { // Ensure enough chars in buffer if ( (fStart+YMONTH_MIN_SIZE) > fEnd) throw XMLParserException("Incomplete YearMonth Format."); // skip the first leading '-' int start = ( fBuffer[0] == chDash ) ? fStart + 1 : fStart; // // search for year separator '-' // int yearSeparator = indexOf(start, fEnd, DATE_SEPARATOR); if ( yearSeparator == NOT_FOUND) throw XMLParserException("Year separator is missing or misplaced."); fValue[CentYear] = parseIntYear(yearSeparator); fStart = yearSeparator + 1; //skip the '-' and point to the first M // //gonna check we have enough byte for month // if ((fStart + 2) > fEnd ) throw XMLParserException("No month in buffer."); fValue[Month] = parseInt(fStart, yearSeparator + 3); fStart += 2; //fStart points right after the MONTH return; } void DateTime::parseTimeZone() { if ( fStart < fEnd ) { int sign = findUTCSign(fStart); if ( sign < 0 ) { throw XMLParserException("Error in month parsing."); } else { getTimeZone(sign); } } return; } // // 'Z' // ['+'|'-']hh:mm // // Note: Assuming fStart points to the beginning of TimeZone section // fStart updated to meet fEnd // void DateTime::getTimeZone(const int sign) { if ( fBuffer[sign] == UTC_STD_CHAR ) { if ((sign + 1) != fEnd ) { throw XMLParserException("Error in parsing time zone."); } return; } // // otherwise, it has to be this format // '[+|-]'hh:mm // 1 23456 7 // sign fEnd // if ( ( ( sign + TIMEZONE_SIZE + 1) != fEnd ) || ( fBuffer[sign + 3] != TIMEZONE_SEPARATOR ) ) { throw XMLParserException("Error in parsing time zone."); } fTimeZone[hh] = parseInt(sign+1, sign+3); fTimeZone[mm] = parseInt(sign+4, fEnd); return; } // --------------------------------------------------------------------------- // Validator and normalizer // --------------------------------------------------------------------------- /** * If timezone present - normalize dateTime [E Adding durations to dateTimes] * * @param date CCYY-MM-DDThh:mm:ss+03 * @return CCYY-MM-DDThh:mm:ssZ */ void DateTime::normalize() { if ((fValue[utc] == UTC_UNKNOWN) || (fValue[utc] == UTC_STD) ) return; int negate = (fValue[utc] == UTC_POS)? -1: 1; // add mins int temp = fValue[Minute] + negate * fTimeZone[mm]; int carry = fQuotient(temp, 60); fValue[Minute] = mod(temp, 60, carry); //add hours temp = fValue[Hour] + negate * fTimeZone[hh] + carry; carry = fQuotient(temp, 24); fValue[Hour] = mod(temp, 24, carry); fValue[Day] += carry; while (1) { temp = maxDayInMonthFor(fValue[CentYear], fValue[Month]); if (fValue[Day] < 1) { fValue[Day] += maxDayInMonthFor(fValue[CentYear], fValue[Month] - 1); carry = -1; } else if ( fValue[Day] > temp ) { fValue[Day] -= temp; carry = 1; } else { break; } temp = fValue[Month] + carry; fValue[Month] = modulo(temp, 1, 13); fValue[CentYear] += fQuotient(temp, 1, 13); } // set to normalized fValue[utc] = UTC_STD; return; } void DateTime::validateDateTime() const { //REVISIT: should we throw an exception for not valid dates // or reporting an error message should be sufficient? if ( fValue[CentYear] == 0 ) { throw XMLParserException("The year \"0000\" is an illegal year value"); } if ( fValue[Month] < 1 || fValue[Month] > 12 ) { throw XMLParserException("The month must have values 1 to 12"); } //validate days if ( fValue[Day] > maxDayInMonthFor( fValue[CentYear], fValue[Month]) || fValue[Day] == 0 ) { throw XMLParserException("The day must have values 1 to 31"); } //validate hours if ((fValue[Hour] < 0) || (fValue[Hour] > 24) || ((fValue[Hour] == 24) && ((fValue[Minute] !=0) || (fValue[Second] !=0) || (fMiliSecond !=0)))) { throw XMLParserException("Hour must have values 0-23"); } //validate minutes if ( fValue[Minute] < 0 || fValue[Minute] > 59 ) { throw XMLParserException("Minute must have values 0-59"); } //validate seconds if ( fValue[Second] < 0 || fValue[Second] > 60 ) { throw XMLParserException("Second must have values 0-60"); } //validate time-zone hours if ( (abs(fTimeZone[hh]) > 14) || ((abs(fTimeZone[hh]) == 14) && (fTimeZone[mm] != 0)) ) { throw XMLParserException("Time zone should have range -14..+14"); } //validate time-zone minutes if ( abs(fTimeZone[mm]) > 59 ) { throw XMLParserException("Minute must have values 0-59"); } return; } // ----------------------------------------------------------------------- // locator and converter // ----------------------------------------------------------------------- int DateTime::indexOf(const int start, const int end, const XMLCh ch) const { for ( int i = start; i < end; i++ ) if ( fBuffer[i] == ch ) return i; return NOT_FOUND; } int DateTime::findUTCSign (const int start) { int pos; for ( int index = start; index < fEnd; index++ ) { pos = XMLString::indexOf(UTC_SET, fBuffer[index]); if ( pos != NOT_FOUND) { fValue[utc] = pos+1; // refer to utcType, there is 1 diff return index; } } return NOT_FOUND; } // // Note: // start: starting point in fBuffer // end: ending point in fBuffer (exclusive) // fStart NOT updated // int DateTime::parseInt(const int start, const int end) const { unsigned int retVal = 0; for (int i=start; i < end; i++) { if (fBuffer[i] < chDigit_0 || fBuffer[i] > chDigit_9) throw XMLParserException("Invalid non-numeric characters."); retVal = (retVal * 10) + (unsigned int) (fBuffer[i] - chDigit_0); } return (int) retVal; } // // Note: // start: pointing to the first digit after the '.' // end: pointing to one position after the last digit // fStart NOT updated // double DateTime::parseMiliSecond(const int start, const int end) const { unsigned int miliSecLen = (end-1) - (start-1) + 1; //to include the '.' XMLCh* miliSecData = new XMLCh[miliSecLen + 1]; ArrayJanitor janMili(miliSecData); XMLString::copyNString(miliSecData, &(fBuffer[start-1]), miliSecLen); *(miliSecData + miliSecLen) = chNull; auto_ptr_char nptr(miliSecData); size_t strLen = strlen(nptr.get()); char *endptr = 0; errno = 0; //printf("milisec=<%s>\n", nptr); double retVal = strtod(nptr.get(), &endptr); // check if all chars are valid char if ( (endptr - nptr.get()) != strLen) throw XMLParserException("Invalid non-numeric characters."); // we don't check underflow occurs since // nothing we can do about it. return retVal; } // // [-]CCYY // // Note: start from fStart // end (exclusive) // fStart NOT updated // int DateTime::parseIntYear(const int end) const { // skip the first leading '-' int start = ( fBuffer[0] == chDash ) ? fStart + 1 : fStart; int length = end - start; if (length < 4) { throw XMLParserException("Year must have 'CCYY' format"); } else if (length > 4 && fBuffer[start] == chDigit_0) { throw XMLParserException("Leading zeros are required if the year value would otherwise have fewer than four digits; otherwise they are forbidden."); } bool negative = (fBuffer[0] == chDash); int yearVal = parseInt((negative ? 1 : 0), end); return ( negative ? (-1) * yearVal : yearVal ); } /*** * E2-41 * * 3.2.7.2 Canonical representation * * Except for trailing fractional zero digits in the seconds representation, * '24:00:00' time representations, and timezone (for timezoned values), * the mapping from literals to values is one-to-one. Where there is more * than one possible representation, the canonical representation is as follows: * redundant trailing zero digits in fractional-second literals are prohibited. * An hour representation of '24' is prohibited. Timezoned values are canonically * represented by appending 'Z' to the nontimezoned representation. (All * timezoned dateTime values are UTC.) * * .'24:00:00' -> '00:00:00' * .milisecond: trailing zeros removed * .'Z' * ***/ XMLCh* DateTime::getDateTimeCanonicalRepresentation() const { XMLCh *miliStartPtr, *miliEndPtr; searchMiliSeconds(miliStartPtr, miliEndPtr); size_t miliSecondsLen = miliEndPtr - miliStartPtr; XMLCh* retBuf = new XMLCh[21 + miliSecondsLen + 2]; XMLCh* retPtr = retBuf; // (-?) cc+yy-mm-dd'T'hh:mm:ss'Z' ('.'s+)? // 2+ 8 1 8 1 // int additionalLen = fillYearString(retPtr, CentYear); if(additionalLen != 0) { // very bad luck; have to resize the buffer... XMLCh *tmpBuf = new XMLCh[additionalLen+21+miliSecondsLen +2]; XMLString::moveChars(tmpBuf, retBuf, 4+additionalLen); retPtr = tmpBuf+(retPtr-retBuf); delete[] retBuf; retBuf = tmpBuf; } *retPtr++ = DATE_SEPARATOR; fillString(retPtr, Month, 2); *retPtr++ = DATE_SEPARATOR; fillString(retPtr, Day, 2); *retPtr++ = DATETIME_SEPARATOR; fillString(retPtr, Hour, 2); if (fValue[Hour] == 24) { *(retPtr - 2) = chDigit_0; *(retPtr - 1) = chDigit_0; } *retPtr++ = TIME_SEPARATOR; fillString(retPtr, Minute, 2); *retPtr++ = TIME_SEPARATOR; fillString(retPtr, Second, 2); if (miliSecondsLen) { *retPtr++ = chPeriod; XMLString::copyNString(retPtr, miliStartPtr, miliSecondsLen); retPtr += miliSecondsLen; } *retPtr++ = UTC_STD_CHAR; *retPtr = chNull; return retBuf; } /*** * 3.2.8 time * * . either the time zone must be omitted or, * if present, the time zone must be Coordinated Universal Time (UTC) indicated by a "Z". * * . Additionally, the canonical representation for midnight is 00:00:00. * ***/ XMLCh* DateTime::getTimeCanonicalRepresentation() const { XMLCh *miliStartPtr, *miliEndPtr; searchMiliSeconds(miliStartPtr, miliEndPtr); size_t miliSecondsLen = miliEndPtr - miliStartPtr; XMLCh* retBuf = new XMLCh[10 + miliSecondsLen + 2]; XMLCh* retPtr = retBuf; // 'hh:mm:ss'Z' ('.'s+)? // 8 1 // fillString(retPtr, Hour, 2); if (fValue[Hour] == 24) { *(retPtr - 2) = chDigit_0; *(retPtr - 1) = chDigit_0; } *retPtr++ = TIME_SEPARATOR; fillString(retPtr, Minute, 2); *retPtr++ = TIME_SEPARATOR; fillString(retPtr, Second, 2); if (miliSecondsLen) { *retPtr++ = chPeriod; XMLString::copyNString(retPtr, miliStartPtr, miliSecondsLen); retPtr += miliSecondsLen; } *retPtr++ = UTC_STD_CHAR; *retPtr = chNull; return retBuf; } void DateTime::fillString(XMLCh*& ptr, valueIndex ind, int expLen) const { XMLCh strBuffer[16]; assert(expLen < 16); XMLString::binToText(fValue[ind], strBuffer, expLen, 10); int actualLen = (int) XMLString::stringLen(strBuffer); int i; //append leading zeros for (i = 0; i < expLen - actualLen; i++) { *ptr++ = chDigit_0; } for (i = 0; i < actualLen; i++) { *ptr++ = strBuffer[i]; } } int DateTime::fillYearString(XMLCh*& ptr, valueIndex ind) const { XMLCh strBuffer[16]; // let's hope we get no years of 15 digits... XMLString::binToText(fValue[ind], strBuffer, 15, 10); int actualLen = (int) XMLString::stringLen(strBuffer); // don't forget that years can be negative... int negativeYear = 0; if(strBuffer[0] == chDash) { *ptr++ = strBuffer[0]; negativeYear = 1; } int i; //append leading zeros for (i = 0; i < 4 - actualLen+negativeYear; i++) { *ptr++ = chDigit_0; } for (i = negativeYear; i < actualLen; i++) { *ptr++ = strBuffer[i]; } if(actualLen > 4) return actualLen-4; return 0; } /*** * * .check if the rawData has the mili second component * .capture the substring * ***/ void DateTime::searchMiliSeconds(XMLCh*& miliStartPtr, XMLCh*& miliEndPtr) const { miliStartPtr = miliEndPtr = 0; int milisec = XMLString::indexOf(fBuffer, MILISECOND_SEPARATOR); if (milisec == -1) return; miliStartPtr = fBuffer + milisec + 1; miliEndPtr = miliStartPtr; while (*miliEndPtr) { if ((*miliEndPtr < chDigit_0) || (*miliEndPtr > chDigit_9)) break; miliEndPtr++; } //remove trailing zeros while( *(miliEndPtr - 1) == chDigit_0) miliEndPtr--; return; } void DateTime::setBuffer(const XMLCh* const aString) { reset(); fEnd = (int) xercesc::XMLString::stringLen(aString); if (fEnd > 0) { if (fEnd > fBufferMaxLen) { delete[] fBuffer; fBufferMaxLen = fEnd + 8; fBuffer = new XMLCh[fBufferMaxLen+1]; } memcpy(fBuffer, aString, (fEnd+1) * sizeof(XMLCh)); } } void DateTime::reset() { for ( int i=0; i < xercesc::XMLDateTime::TOTAL_SIZE; i++ ) fValue[i] = 0; fMiliSecond = 0; fHasTime = false; fTimeZone[hh] = fTimeZone[mm] = 0; fStart = fEnd = 0; if (fBuffer) *fBuffer = 0; } void DateTime::copy(const DateTime& rhs) { for ( int i = 0; i < xercesc::XMLDateTime::TOTAL_SIZE; i++ ) fValue[i] = rhs.fValue[i]; fMiliSecond = rhs.fMiliSecond; fHasTime = rhs.fHasTime; fTimeZone[hh] = rhs.fTimeZone[hh]; fTimeZone[mm] = rhs.fTimeZone[mm]; fStart = rhs.fStart; fEnd = rhs.fEnd; if (fEnd > 0) { if (fEnd > fBufferMaxLen) { delete[] fBuffer; fBufferMaxLen = rhs.fBufferMaxLen; fBuffer = new XMLCh[fBufferMaxLen+1]; } memcpy(fBuffer, rhs.fBuffer, (fEnd+1) * sizeof(XMLCh)); } } void DateTime::initParser() { fStart = 0; // to ensure scan from the very first beginning // in case the pointer is updated accidentally by someone else. } bool DateTime::isNormalized() const { return (fValue[xercesc::XMLDateTime::utc] == xercesc::XMLDateTime::UTC_STD ? true : false); } int DateTime::getRetVal(int c1, int c2) { if ((c1 == xercesc::XMLDateTime::LESS_THAN && c2 == xercesc::XMLDateTime::GREATER_THAN) || (c1 == xercesc::XMLDateTime::GREATER_THAN && c2 == xercesc::XMLDateTime::LESS_THAN)) return xercesc::XMLDateTime::INDETERMINATE; return (c1 != xercesc::XMLDateTime::INDETERMINATE) ? c1 : c2; } xmltooling-1.5.3/xmltooling/util/NDC.cpp000644 001751 001751 00000002437 12003305017 021360 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * NDC.cpp * * Diagnostic context for logging */ #include "internal.h" #include "logging.h" #include "util/NDC.h" #if defined(XMLTOOLING_LOG4SHIB) # include #elif defined(XMLTOOLING_LOG4CPP) # include #endif using namespace xmltooling; NDC::NDC(const char* context) { logging::NDC::push(context); } NDC::NDC(const std::string& context) { logging::NDC::push(context); } NDC::~NDC() { logging::NDC::pop(); } xmltooling-1.5.3/xmltooling/util/ParserPool.cpp000644 001751 001751 00000051242 12147443124 023053 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * ParserPool.cpp * * A thread-safe pool of parsers that share characteristics. */ #include "internal.h" #include "exceptions.h" #include "logging.h" #include "util/CurlURLInputStream.h" #include "util/NDC.h" #include "util/PathResolver.h" #include "util/ParserPool.h" #include "util/Threads.h" #include "util/XMLHelper.h" #include #include #include #include #include #include #include #include #include #include #include #include using namespace xmltooling::logging; using namespace xmltooling; using namespace xercesc; using namespace boost; using namespace std; namespace { class MyErrorHandler : public DOMErrorHandler { public: unsigned int errors; MyErrorHandler() : errors(0) {} bool handleError(const DOMError& e) { #ifdef _DEBUG xmltooling::NDC ndc("handleError"); #endif Category& log=Category::getInstance(XMLTOOLING_LOGCAT".ParserPool"); DOMLocator* locator=e.getLocation(); auto_ptr_char temp(e.getMessage()); switch (e.getSeverity()) { case DOMError::DOM_SEVERITY_WARNING: log.warnStream() << "warning on line " << locator->getLineNumber() << ", column " << locator->getColumnNumber() << ", message: " << temp.get() << logging::eol; return true; case DOMError::DOM_SEVERITY_ERROR: ++errors; log.errorStream() << "error on line " << locator->getLineNumber() << ", column " << locator->getColumnNumber() << ", message: " << temp.get() << logging::eol; return true; case DOMError::DOM_SEVERITY_FATAL_ERROR: ++errors; log.errorStream() << "fatal error on line " << locator->getLineNumber() << ", column " << locator->getColumnNumber() << ", message: " << temp.get() << logging::eol; return true; } ++errors; log.errorStream() << "undefined error type on line " << locator->getLineNumber() << ", column " << locator->getColumnNumber() << ", message: " << temp.get() << logging::eol; return false; } }; } ParserPool::ParserPool(bool namespaceAware, bool schemaAware) : m_namespaceAware(namespaceAware), m_schemaAware(schemaAware), m_lock(Mutex::create()), m_security(new SecurityManager()) { int expLimit = 0; const char* env = getenv("XMLTOOLING_ENTITY_EXPANSION_LIMIT"); if (env) { expLimit = atoi(env); } if (expLimit <= 0) expLimit = XMLTOOLING_ENTITY_EXPANSION_LIMIT; m_security->setEntityExpansionLimit(expLimit); } ParserPool::~ParserPool() { while(!m_pool.empty()) { m_pool.top()->release(); m_pool.pop(); } } DOMDocument* ParserPool::newDocument() { return DOMImplementationRegistry::getDOMImplementation(nullptr)->createDocument(); } #ifdef XMLTOOLING_XERCESC_COMPLIANT_DOMLS DOMDocument* ParserPool::parse(DOMLSInput& domsrc) { DOMLSParser* parser=checkoutBuilder(); XercesJanitor janitor(parser); try { MyErrorHandler deh; parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, dynamic_cast(&deh)); DOMDocument* doc=parser->parse(&domsrc); if (deh.errors) { if (doc) doc->release(); throw XMLParserException("XML error(s) during parsing, check log for specifics"); } parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, (void*)nullptr); parser->getDomConfig()->setParameter(XMLUni::fgXercesUserAdoptsDOMDocument, true); checkinBuilder(janitor.release()); return doc; } catch (XMLException& ex) { parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, (void*)nullptr); parser->getDomConfig()->setParameter(XMLUni::fgXercesUserAdoptsDOMDocument, true); checkinBuilder(janitor.release()); auto_ptr_char temp(ex.getMessage()); throw XMLParserException(string("Xerces error during parsing: ") + (temp.get() ? temp.get() : "no message")); } catch (XMLToolingException&) { parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, (void*)nullptr); parser->getDomConfig()->setParameter(XMLUni::fgXercesUserAdoptsDOMDocument, true); checkinBuilder(janitor.release()); throw; } } #else DOMDocument* ParserPool::parse(DOMInputSource& domsrc) { DOMBuilder* parser=checkoutBuilder(); XercesJanitor janitor(parser); try { MyErrorHandler deh; parser->setErrorHandler(&deh); DOMDocument* doc=parser->parse(domsrc); if (deh.errors) { if (doc) doc->release(); throw XMLParserException("XML error(s) during parsing, check log for specifics"); } parser->setErrorHandler(nullptr); parser->setFeature(XMLUni::fgXercesUserAdoptsDOMDocument, true); checkinBuilder(janitor.release()); return doc; } catch (XMLException& ex) { parser->setErrorHandler(nullptr); parser->setFeature(XMLUni::fgXercesUserAdoptsDOMDocument, true); checkinBuilder(janitor.release()); auto_ptr_char temp(ex.getMessage()); throw XMLParserException(string("Xerces error during parsing: ") + (temp.get() ? temp.get() : "no message")); } catch (XMLToolingException&) { parser->setErrorHandler(nullptr); parser->setFeature(XMLUni::fgXercesUserAdoptsDOMDocument, true); checkinBuilder(janitor.release()); throw; } } #endif DOMDocument* ParserPool::parse(istream& is) { StreamInputSource src(is); Wrapper4InputSource domsrc(&src,false); return parse(domsrc); } // Functor to double its argument separated by a character and append to a buffer template class doubleit { public: doubleit(T& t, const typename T::value_type& s) : temp(t), sep(s) {} void operator() (const pair& s) { temp += s.first + sep + s.first + sep; } T& temp; const typename T::value_type& sep; }; bool ParserPool::loadSchema(const XMLCh* nsURI, const XMLCh* pathname) { // Just check the pathname and then directly register the pair into the map. auto_ptr_char p(pathname); #ifdef WIN32 struct _stat stat_buf; if (_stat(p.get(), &stat_buf) != 0) #else struct stat stat_buf; if (stat(p.get(), &stat_buf) != 0) #endif { #if _DEBUG xmltooling::NDC ndc("loadSchema"); #endif Category& log=Category::getInstance(XMLTOOLING_LOGCAT".ParserPool"); auto_ptr_char n(nsURI); log.error("failed to load schema for (%s), file not found (%s)",n.get(),p.get()); return false; } // Roundtrip to local code page and back to translate path as needed. string topath(p.get()); XMLToolingConfig::getConfig().getPathResolver()->resolve(topath, PathResolver::XMLTOOLING_XML_FILE); auto_ptr_XMLCh temp(topath.c_str()); Lock lock(m_lock); m_schemaLocMap[nsURI] = temp.get(); m_schemaLocations.erase(); for_each(m_schemaLocMap.begin(), m_schemaLocMap.end(), doubleit(m_schemaLocations,chSpace)); return true; } bool ParserPool::loadCatalogs(const char* pathnames) { string temp(pathnames); vector catpaths; split(catpaths, temp, is_any_of(PATH_SEPARATOR_STR), algorithm::token_compress_on); static bool (ParserPool::* lc)(const char*) = &ParserPool::loadCatalog; for_each(catpaths.begin(), catpaths.end(), boost::bind(lc, this, boost::bind(&string::c_str, _1))); return !catpaths.empty(); } bool ParserPool::loadCatalog(const char* pathname) { string p(pathname); XMLToolingConfig::getConfig().getPathResolver()->resolve(p, PathResolver::XMLTOOLING_XML_FILE); auto_ptr_XMLCh temp(p.c_str()); return loadCatalog(temp.get()); } bool ParserPool::loadCatalog(const XMLCh* pathname) { #if _DEBUG xmltooling::NDC ndc("loadCatalog"); #endif Category& log=Category::getInstance(XMLTOOLING_LOGCAT".ParserPool"); // XML constants static const XMLCh catalog[] = UNICODE_LITERAL_7(c,a,t,a,l,o,g); static const XMLCh system[] = UNICODE_LITERAL_6(s,y,s,t,e,m); static const XMLCh systemId[] = UNICODE_LITERAL_8(s,y,s,t,e,m,I,d); static const XMLCh uri[] = UNICODE_LITERAL_3(u,r,i); static const XMLCh CATALOG_NS[] = { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon, chLatin_e, chLatin_n, chLatin_t, chLatin_i, chLatin_t, chLatin_y, chColon, chLatin_x, chLatin_m, chLatin_l, chLatin_n, chLatin_s, chColon, chLatin_x, chLatin_m, chLatin_l, chColon, chLatin_c, chLatin_a, chLatin_t, chLatin_a, chLatin_l, chLatin_o, chLatin_g, chNull }; // Parse the catalog with the internal parser pool. if (log.isDebugEnabled()) { auto_ptr_char temp(pathname); log.debug("loading XML catalog from %s", temp.get()); } LocalFileInputSource fsrc(nullptr,pathname); Wrapper4InputSource domsrc(&fsrc,false); try { DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(domsrc); XercesJanitor janitor(doc); // Check root element. const DOMElement* root=doc->getDocumentElement(); if (!XMLHelper::isNodeNamed(root,CATALOG_NS,catalog)) { auto_ptr_char temp(pathname); log.error("unknown root element, failed to load XML catalog from %s", temp.get()); return false; } // Fetch all the elements. DOMNodeList* mappings = root->getElementsByTagNameNS(CATALOG_NS,system); Lock lock(m_lock); for (XMLSize_t i = 0; i < mappings->getLength(); i++) { root = static_cast(mappings->item(i)); const XMLCh* from = root->getAttributeNS(nullptr,systemId); const XMLCh* to = root->getAttributeNS(nullptr,uri); // Roundtrip to local code page and back to translate path as needed. auto_ptr_char temp(to); string topath(temp.get()); XMLToolingConfig::getConfig().getPathResolver()->resolve(topath, PathResolver::XMLTOOLING_XML_FILE); auto_ptr_XMLCh temp2(topath.c_str()); m_schemaLocMap[from] = temp2.get(); } m_schemaLocations.erase(); for_each(m_schemaLocMap.begin(), m_schemaLocMap.end(), doubleit(m_schemaLocations,chSpace)); } catch (std::exception& e) { log.error("catalog loader caught exception: %s", e.what()); return false; } return true; } #ifdef XMLTOOLING_XERCESC_COMPLIANT_DOMLS DOMLSInput* ParserPool::resolveResource( const XMLCh *const resourceType, const XMLCh *const namespaceUri, const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const baseURI ) #else DOMInputSource* ParserPool::resolveEntity( const XMLCh* const publicId, const XMLCh* const systemId, const XMLCh* const baseURI ) #endif { #if _DEBUG xmltooling::NDC ndc("resolveEntity"); #endif if (!systemId) return nullptr; xstring sysId(systemId); Category& log=Category::getInstance(XMLTOOLING_LOGCAT".ParserPool"); if (log.isDebugEnabled()) { auto_ptr_char sysId(systemId); auto_ptr_char base(baseURI); log.debug("asked to resolve %s with baseURI %s",sysId.get(),base.get() ? base.get() : "(null)"); } // Find well-known schemas in the specified location. map::const_iterator i = m_schemaLocMap.find(sysId); if (i != m_schemaLocMap.end()) return new Wrapper4InputSource(new LocalFileInputSource(baseURI, i->second.c_str())); // Check for entity as a suffix of a value in the map. bool (*p_ends_with)(const xstring&, const xstring&) = ends_with; i = find_if( m_schemaLocMap.begin(), m_schemaLocMap.end(), boost::bind(p_ends_with, boost::bind(&map::value_type::second, _1), boost::ref(sysId)) ); if (i != m_schemaLocMap.end()) return new Wrapper4InputSource(new LocalFileInputSource(baseURI, i->second.c_str())); // We'll allow anything without embedded slashes. if (XMLString::indexOf(systemId, chForwardSlash) == -1 && XMLString::indexOf(systemId, chBackSlash) == -1) return new Wrapper4InputSource(new LocalFileInputSource(baseURI, systemId)); // Shortcircuit the request. auto_ptr_char temp(systemId); log.debug("unauthorized entity request (%s), blocking it", temp.get()); static const XMLByte nullbuf[] = {0}; return new Wrapper4InputSource(new MemBufInputSource(nullbuf, 0, systemId)); } #ifdef XMLTOOLING_XERCESC_COMPLIANT_DOMLS DOMLSParser* ParserPool::createBuilder() { static const XMLCh impltype[] = { chLatin_L, chLatin_S, chNull }; DOMImplementation* impl=DOMImplementationRegistry::getDOMImplementation(impltype); DOMLSParser* parser=static_cast(impl)->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS,nullptr); parser->getDomConfig()->setParameter(XMLUni::fgDOMNamespaces, m_namespaceAware); if (m_schemaAware) { parser->getDomConfig()->setParameter(XMLUni::fgDOMNamespaces, true); parser->getDomConfig()->setParameter(XMLUni::fgXercesSchema, true); parser->getDomConfig()->setParameter(XMLUni::fgDOMValidate, true); parser->getDomConfig()->setParameter(XMLUni::fgXercesCacheGrammarFromParse, true); // We build a "fake" schema location hint that binds each namespace to itself. // This ensures the entity resolver will be given the namespace as a systemId it can check. parser->getDomConfig()->setParameter(XMLUni::fgXercesSchemaExternalSchemaLocation, const_cast(m_schemaLocations.c_str())); } parser->getDomConfig()->setParameter(XMLUni::fgXercesUserAdoptsDOMDocument, true); parser->getDomConfig()->setParameter(XMLUni::fgXercesDisableDefaultEntityResolution, true); parser->getDomConfig()->setParameter(XMLUni::fgDOMResourceResolver, dynamic_cast(this)); parser->getDomConfig()->setParameter(XMLUni::fgXercesSecurityManager, m_security.get()); return parser; } DOMLSParser* ParserPool::checkoutBuilder() { Lock lock(m_lock); if (m_pool.empty()) { DOMLSParser* builder=createBuilder(); return builder; } DOMLSParser* p=m_pool.top(); m_pool.pop(); if (m_schemaAware) p->getDomConfig()->setParameter(XMLUni::fgXercesSchemaExternalSchemaLocation, const_cast(m_schemaLocations.c_str())); return p; } void ParserPool::checkinBuilder(DOMLSParser* builder) { if (builder) { Lock lock(m_lock); m_pool.push(builder); } } #else DOMBuilder* ParserPool::createBuilder() { static const XMLCh impltype[] = { chLatin_L, chLatin_S, chNull }; DOMImplementation* impl=DOMImplementationRegistry::getDOMImplementation(impltype); DOMBuilder* parser=static_cast(impl)->createDOMBuilder(DOMImplementationLS::MODE_SYNCHRONOUS,0); parser->setFeature(XMLUni::fgDOMNamespaces, m_namespaceAware); if (m_schemaAware) { parser->setFeature(XMLUni::fgDOMNamespaces, true); parser->setFeature(XMLUni::fgXercesSchema, true); parser->setFeature(XMLUni::fgDOMValidation, true); parser->setFeature(XMLUni::fgXercesCacheGrammarFromParse, true); // We build a "fake" schema location hint that binds each namespace to itself. // This ensures the entity resolver will be given the namespace as a systemId it can check. parser->setProperty(XMLUni::fgXercesSchemaExternalSchemaLocation,const_cast(m_schemaLocations.c_str())); } parser->setProperty(XMLUni::fgXercesSecurityManager, m_security.get()); parser->setFeature(XMLUni::fgXercesUserAdoptsDOMDocument, true); parser->setFeature(XMLUni::fgXercesDisableDefaultEntityResolution, true); parser->setEntityResolver(this); return parser; } DOMBuilder* ParserPool::checkoutBuilder() { Lock lock(m_lock); if (m_pool.empty()) { DOMBuilder* builder=createBuilder(); return builder; } DOMBuilder* p=m_pool.top(); m_pool.pop(); if (m_schemaAware) p->setProperty(XMLUni::fgXercesSchemaExternalSchemaLocation,const_cast(m_schemaLocations.c_str())); return p; } void ParserPool::checkinBuilder(DOMBuilder* builder) { if (builder) { Lock lock(m_lock); m_pool.push(builder); } } #endif StreamInputSource::StreamInputSource(istream& is, const char* systemId) : InputSource(systemId), m_is(is) { } BinInputStream* StreamInputSource::makeStream() const { return new StreamBinInputStream(m_is); } StreamInputSource::StreamBinInputStream::StreamBinInputStream(istream& is) : m_is(is), m_pos(0) { } #ifdef XMLTOOLING_XERCESC_64BITSAFE XMLFilePos #else unsigned int #endif StreamInputSource::StreamBinInputStream::curPos() const { return m_pos; } #ifdef XMLTOOLING_XERCESC_64BITSAFE const XMLCh* StreamInputSource::StreamBinInputStream::getContentType() const { return nullptr; } #endif xsecsize_t StreamInputSource::StreamBinInputStream::readBytes(XMLByte* const toFill, const xsecsize_t maxToRead) { XMLByte* target=toFill; xsecsize_t bytes_read=0,request=maxToRead; // Fulfill the rest by reading from the stream. if (request && !m_is.eof() && !m_is.fail()) { try { m_is.read(reinterpret_cast(target),request); m_pos+=m_is.gcount(); bytes_read+=m_is.gcount(); } catch(ios_base::failure& e) { Category::getInstance(XMLTOOLING_LOGCAT".StreamInputSource").critStream() << "XML::StreamInputSource::StreamBinInputStream::readBytes caught an exception: " << e.what() << logging::eol; *toFill=0; return 0; } } return bytes_read; } #ifdef XMLTOOLING_LITE URLInputSource::URLInputSource(const XMLCh* url, const char* systemId, string* cacheTag) : InputSource(systemId), m_url(url) { } URLInputSource::URLInputSource(const DOMElement* e, const char* systemId, string* cacheTag) : InputSource(systemId) { static const XMLCh uri[] = UNICODE_LITERAL_3(u,r,i); static const XMLCh url[] = UNICODE_LITERAL_3(u,r,l); const XMLCh* attr = e->getAttributeNS(nullptr, url); if (!attr || !*attr) { attr = e->getAttributeNS(nullptr, uri); if (!attr || !*attr) throw IOException("No URL supplied via DOM to URLInputSource constructor."); } m_url.setURL(attr); } BinInputStream* URLInputSource::makeStream() const { // Ask the URL to create us an appropriate input stream return m_url.makeNewStream(); } #else URLInputSource::URLInputSource(const XMLCh* url, const char* systemId, string* cacheTag) : InputSource(systemId), m_cacheTag(cacheTag), m_url(url), m_root(nullptr) { } URLInputSource::URLInputSource(const DOMElement* e, const char* systemId, string* cacheTag) : InputSource(systemId), m_cacheTag(cacheTag), m_root(e) { } BinInputStream* URLInputSource::makeStream() const { return m_root ? new CurlURLInputStream(m_root, m_cacheTag) : new CurlURLInputStream(m_url.get(), m_cacheTag); } #endif const char URLInputSource::asciiStatusCodeElementName[] = "URLInputSourceStatus"; const XMLCh URLInputSource::utf16StatusCodeElementName[] = UNICODE_LITERAL_20(U,R,L,I,n,p,u,t,S,o,u,r,c,e,S,t,a,t,u,s); xmltooling-1.5.3/xmltooling/util/PathResolver.cpp000644 001751 001751 00000012730 12023406255 023377 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * PathResolver.cpp * * Resolves local filenames into absolute pathnames. */ #include "internal.h" #include "exceptions.h" #include "util/PathResolver.h" #ifdef WIN32 # include #endif using namespace xmltooling; using namespace std; PathResolver::PathResolver() : m_defaultPackage(PACKAGE_NAME), m_defaultPrefix("/usr") { setLibDir("/usr/lib"); setLogDir("/var/log"); setXMLDir("/usr/share/xml"); setRunDir("/var/run"); setCfgDir("/etc"); setCacheDir("/var/cache"); } PathResolver::~PathResolver() { } void PathResolver::setDefaultPackageName(const char* pkgname) { m_defaultPackage = pkgname; } void PathResolver::setDefaultPrefix(const char* prefix) { m_defaultPrefix = prefix; } void PathResolver::setLibDir(const char* dir) { m_lib = dir; } void PathResolver::setLogDir(const char* dir) { m_log = dir; } void PathResolver::setXMLDir(const char* dir) { m_xml = dir; } void PathResolver::setRunDir(const char* dir) { m_run = dir; } void PathResolver::setCfgDir(const char* dir) { m_cfg = dir; } void PathResolver::setCacheDir(const char* dir) { m_cache = dir; } bool PathResolver::isAbsolute(const char* s) const { switch (*s) { case 0: return false; case '/': case '\\': return true; case '.': return (*(s+1) == '.' || *(s+1) == '/' || *(s+1) == '\\'); } return *(s+1) == ':'; } const string& PathResolver::resolve(string& s, file_type_t filetype, const char* pkgname, const char* prefix) const { #ifdef WIN32 // Check for possible environment variable(s). if (s.find('%') != string::npos) { // This is an ugly workaround for Windows XP/2003, which don't support the PROGRAMDATA variable. if (!getenv("PROGRAMDATA") && s.find("%PROGRAMDATA%") != string::npos) { char appdatapath[MAX_PATH + 2]; if (SHGetFolderPath(NULL, CSIDL_COMMON_APPDATA, NULL, SHGFP_TYPE_CURRENT, appdatapath) == S_OK) { s.replace(s.find("%PROGRAMDATA%"), 13, appdatapath); } } char expbuf[MAX_PATH + 2]; DWORD cnt = ExpandEnvironmentStrings(s.c_str(), expbuf, sizeof(expbuf)); if (cnt != 0 && cnt <= sizeof(expbuf)) s = expbuf; } #endif if (!isAbsolute(s.c_str())) { switch (filetype) { case XMLTOOLING_LIB_FILE: s = m_lib + '/' + (pkgname ? pkgname : m_defaultPackage) + '/' + s; if (!isAbsolute(m_lib.c_str())) s = string(prefix ? prefix : m_defaultPrefix) + '/' + s; break; case XMLTOOLING_LOG_FILE: s = m_log + '/' + (pkgname ? pkgname : m_defaultPackage) + '/' + s; if (!isAbsolute(m_log.c_str())) { if (prefix || m_defaultPrefix != "/usr") s = string(prefix ? prefix : m_defaultPrefix) + '/' + s; else s = string("/") + s; } break; case XMLTOOLING_XML_FILE: s = m_xml + '/' + (pkgname ? pkgname : m_defaultPackage) + '/' + s; if (!isAbsolute(m_xml.c_str())) s = string(prefix ? prefix : m_defaultPrefix) + '/' + s; break; case XMLTOOLING_RUN_FILE: s = m_run + '/' + (pkgname ? pkgname : m_defaultPackage) + '/' + s; if (!isAbsolute(m_run.c_str())) { if (prefix || m_defaultPrefix != "/usr") s = string(prefix ? prefix : m_defaultPrefix) + '/' + s; else s = string("/") + s; } break; case XMLTOOLING_CFG_FILE: s = m_cfg + '/' + (pkgname ? pkgname : m_defaultPackage) + '/' + s; if (!isAbsolute(m_cfg.c_str())) { if (prefix || m_defaultPrefix != "/usr") s = string(prefix ? prefix : m_defaultPrefix) + '/' + s; else s = string("/") + s; } break; case XMLTOOLING_CACHE_FILE: s = m_cache + '/' + (pkgname ? pkgname : m_defaultPackage) + '/' + s; if (!isAbsolute(m_cache.c_str())) { if (prefix || m_defaultPrefix != "/usr") s = string(prefix ? prefix : m_defaultPrefix) + '/' + s; else s = string("/") + s; } break; default: throw XMLToolingException("Unknown file type to resolve."); } } return s; } xmltooling-1.5.3/xmltooling/util/TemplateEngine.cpp000644 001751 001751 00000022716 12003305017 023657 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * TemplateEngine.cpp * * Simple template replacement engine. */ #include "internal.h" #include "io/GenericRequest.h" #include "util/TemplateEngine.h" #include using namespace xmltooling; using namespace std; using boost::trim; namespace { static const pair emptyPair; } TemplateEngine::TemplateEngine() { setTagPrefix("mlp"); } TemplateEngine::~TemplateEngine() { } TemplateEngine::TemplateParameters::TemplateParameters() : m_request(nullptr) { } TemplateEngine::TemplateParameters::~TemplateParameters() { } const char* TemplateEngine::TemplateParameters::getParameter(const char* name) const { map::const_iterator i=m_map.find(name); return (i!=m_map.end() ? i->second.c_str() : (m_request ? m_request->getParameter(name) : nullptr)); } const multimap* TemplateEngine::TemplateParameters::getLoopCollection(const char* name) const { map< string,multimap >::const_iterator i=m_collectionMap.find(name); return (i!=m_collectionMap.end() ? &(i->second) : nullptr); } void TemplateEngine::setTagPrefix(const char* tagPrefix) { keytag = string("<") + tagPrefix + " "; iftag = string("<") + tagPrefix + "if "; ifnottag = string("<") + tagPrefix + "ifnot "; ifendtag = string(""; ifnotendtag = string(""; fortag = string("<") + tagPrefix + "for "; forendtag = string(""; } string TemplateEngine::unsafe_chars = "#%&():[]\\`{}"; void TemplateEngine::html_encode(ostream& os, const char* start) const { while (start && *start) { switch (*start) { case '<': os << "<"; break; case '>': os << ">"; break; case '"': os << """; break; case '&': os << "&"; break; case '\'': os << "'"; break; default: if (unsafe_chars.find_first_of(*start) != string::npos) os << "&#" << static_cast(*start) << ';'; else os << *start; /* case '#': os << "#"; break; case '%': os << "%"; break; case '(': os << "("; break; case ')': os << ")"; break; case ':': os << ":"; break; case '[': os << "["; break; case '\\': os << "\"; break; case ']': os << "]"; break; case '`': os << "`"; break; case '{': os << "{"; break; case '}': os << "}"; break; default: os << *start; */ } start++; } } void TemplateEngine::process( bool visible, const string& buf, const char*& lastpos, ostream& os, const TemplateParameters& parameters, const pair& loopentry, const XMLToolingException* e ) const { const char* line = buf.c_str(); const char* thispos; while ((thispos = strchr(lastpos, '<')) != nullptr) { // Output the string up to this token. if (visible) os << buf.substr(lastpos-line, thispos-lastpos); // Make sure this token matches our tokens. #ifdef HAVE_STRCASECMP if (visible && !strncasecmp(thispos, keytag.c_str(), keytag.length())) #else if (visible && !_strnicmp(thispos, keytag.c_str(), keytag.length())) #endif { // Save this position off. lastpos = thispos + keytag.length(); // search for the end-tag if ((thispos = strstr(lastpos, "/>")) != nullptr) { string key = buf.substr(lastpos-line, thispos-lastpos); trim(key); if (key == "$name" && !loopentry.first.empty()) html_encode(os,loopentry.first.c_str()); else if (key == "$value" && !loopentry.second.empty()) html_encode(os,loopentry.second.c_str()); else { const char* p = parameters.getParameter(key.c_str()); if (!p && e) p = e->getProperty(key.c_str()); if (p) html_encode(os,p); } lastpos = thispos + 2; // strlen("/>") } } #ifdef HAVE_STRCASECMP else if (!strncasecmp(thispos, iftag.c_str(), iftag.length())) #else else if (!_strnicmp(thispos, iftag.c_str(), iftag.length())) #endif { // Save this position off. lastpos = thispos + iftag.length(); // search for the end of this tag if ((thispos = strchr(lastpos, '>')) != nullptr) { string key = buf.substr(lastpos-line, thispos-lastpos); trim(key); bool cond=false; if (visible) cond = parameters.getParameter(key.c_str()) || (e && e->getProperty(key.c_str())); lastpos = thispos + 1; // strlen(">") process(cond, buf, lastpos, os, parameters, loopentry, e); } } #ifdef HAVE_STRCASECMP else if (!strncasecmp(thispos, ifendtag.c_str(), ifendtag.length())) #else else if (!_strnicmp(thispos, ifendtag.c_str(), ifendtag.length())) #endif { // Save this position off and pop the stack. lastpos = thispos + ifendtag.length(); return; } #ifdef HAVE_STRCASECMP else if (!strncasecmp(thispos, ifnottag.c_str(), ifnottag.length())) #else else if (!_strnicmp(thispos, ifnottag.c_str(), ifnottag.length())) #endif { // Save this position off. lastpos = thispos + ifnottag.length(); // search for the end of this tag if ((thispos = strchr(lastpos, '>')) != nullptr) { string key = buf.substr(lastpos-line, thispos-lastpos); trim(key); bool cond=visible; if (visible) cond = !(parameters.getParameter(key.c_str()) || (e && e->getProperty(key.c_str()))); lastpos = thispos + 1; // strlen(">") process(cond, buf, lastpos, os, parameters, loopentry, e); } } #ifdef HAVE_STRCASECMP else if (!strncasecmp(thispos, ifnotendtag.c_str(), ifnotendtag.length())) #else else if (!_strnicmp(thispos, ifnotendtag.c_str(), ifnotendtag.length())) #endif { // Save this position off and pop the stack. lastpos = thispos + ifnotendtag.length(); return; } #ifdef HAVE_STRCASECMP else if (!strncasecmp(thispos, fortag.c_str(), fortag.length())) #else else if (!_strnicmp(thispos, fortag.c_str(), fortag.length())) #endif { // Save this position off. lastpos = thispos + iftag.length(); string key; bool cond = visible; // search for the end of this tag if ((thispos = strchr(lastpos, '>')) != nullptr) { key = buf.substr(lastpos-line, thispos-lastpos); trim(key); lastpos = thispos + 1; // strlen(">") } const multimap* forParams = parameters.getLoopCollection(key.c_str()); if (!forParams || forParams->size() == 0) { process(false, buf, lastpos, os, parameters, emptyPair, e); } else { const char* savlastpos = lastpos; for (multimap::const_iterator i=forParams->begin(); i!=forParams->end(); ++i) { lastpos = savlastpos; process(cond, buf, lastpos, os, parameters, *i, e); } } } #ifdef HAVE_STRCASECMP else if (!strncasecmp(thispos, forendtag.c_str(), forendtag.length())) #else else if (!_strnicmp(thispos, forendtag.c_str(), forendtag.length())) #endif { // Save this position off and pop the stack. lastpos = thispos + forendtag.length(); return; } else { // Skip it. if (visible) os << '<'; lastpos = thispos + 1; } } if (visible) os << buf.substr(lastpos-line); } void TemplateEngine::run(istream& is, ostream& os, const TemplateParameters& parameters, const XMLToolingException* e) const { string buf,line; while (getline(is, line)) buf += line + '\n'; const char* pos=buf.c_str(); process(true, buf, pos, os, parameters, emptyPair, e); } xmltooling-1.5.3/xmltooling/util/ReloadableXMLFile.cpp000644 001751 001751 00000053345 12003305017 024173 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file ReloadableXMLFile.cpp * * Base class for file-based XML configuration. */ #include "internal.h" #include "io/HTTPResponse.h" #ifndef XMLTOOLING_LITE # include "security/Credential.h" # include "security/CredentialCriteria.h" # include "security/CredentialResolver.h" # include "security/SignatureTrustEngine.h" # include "signature/Signature.h" # include "signature/SignatureValidator.h" #endif #include "util/NDC.h" #include "util/PathResolver.h" #include "util/ReloadableXMLFile.h" #include "util/Threads.h" #include "util/XMLConstants.h" #include "util/XMLHelper.h" #if defined(XMLTOOLING_LOG4SHIB) # include #elif defined(XMLTOOLING_LOG4CPP) # include #endif #include #include #include #include #include #include #include #ifndef XMLTOOLING_LITE # include # include using namespace xmlsignature; #endif using namespace xmltooling::logging; using namespace xmltooling; using namespace xercesc; using namespace std; static const XMLCh id[] = UNICODE_LITERAL_2(i,d); static const XMLCh uri[] = UNICODE_LITERAL_3(u,r,i); static const XMLCh url[] = UNICODE_LITERAL_3(u,r,l); static const XMLCh path[] = UNICODE_LITERAL_4(p,a,t,h); static const XMLCh pathname[] = UNICODE_LITERAL_8(p,a,t,h,n,a,m,e); static const XMLCh file[] = UNICODE_LITERAL_4(f,i,l,e); static const XMLCh filename[] = UNICODE_LITERAL_8(f,i,l,e,n,a,m,e); static const XMLCh validate[] = UNICODE_LITERAL_8(v,a,l,i,d,a,t,e); static const XMLCh reloadChanges[] = UNICODE_LITERAL_13(r,e,l,o,a,d,C,h,a,n,g,e,s); static const XMLCh reloadInterval[] = UNICODE_LITERAL_14(r,e,l,o,a,d,I,n,t,e,r,v,a,l); static const XMLCh maxRefreshDelay[] = UNICODE_LITERAL_15(m,a,x,R,e,f,r,e,s,h,D,e,l,a,y); static const XMLCh backingFilePath[] = UNICODE_LITERAL_15(b,a,c,k,i,n,g,F,i,l,e,P,a,t,h); static const XMLCh type[] = UNICODE_LITERAL_4(t,y,p,e); static const XMLCh certificate[] = UNICODE_LITERAL_11(c,e,r,t,i,f,i,c,a,t,e); static const XMLCh signerName[] = UNICODE_LITERAL_10(s,i,g,n,e,r,N,a,m,e); static const XMLCh _TrustEngine[] = UNICODE_LITERAL_11(T,r,u,s,t,E,n,g,i,n,e); static const XMLCh _CredentialResolver[] = UNICODE_LITERAL_18(C,r,e,d,e,n,t,i,a,l,R,e,s,o,l,v,e,r); ReloadableXMLFile::ReloadableXMLFile(const DOMElement* e, Category& log, bool startReloadThread) : m_root(e), m_local(true), m_validate(false), m_filestamp(0), m_reloadInterval(0), m_lock(nullptr), m_log(log), m_loaded(false), #ifndef XMLTOOLING_LITE m_credResolver(nullptr), m_trust(nullptr), #endif m_shutdown(false), m_reload_wait(nullptr), m_reload_thread(nullptr) { #ifdef _DEBUG NDC ndc("ReloadableXMLFile"); #endif // Establish source of data... const XMLCh* source=e->getAttributeNS(nullptr,uri); if (!source || !*source) { source=e->getAttributeNS(nullptr,url); if (!source || !*source) { source=e->getAttributeNS(nullptr,path); if (!source || !*source) { source=e->getAttributeNS(nullptr,pathname); if (!source || !*source) { source=e->getAttributeNS(nullptr,file); if (!source || !*source) { source=e->getAttributeNS(nullptr,filename); } } } } else { m_local=false; } } else { m_local=false; } if (source && *source) { m_validate = XMLHelper::getAttrBool(e, false, validate); auto_ptr_char temp(source); m_source = temp.get(); if (!m_local && !strstr(m_source.c_str(),"://")) { log.warn("deprecated usage of uri/url attribute for a local resource, use path instead"); m_local = true; } #ifndef XMLTOOLING_LITE // Check for signature bits. if (e->hasAttributeNS(nullptr, certificate)) { // Use a file-based credential resolver rooted here. m_credResolver = XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(FILESYSTEM_CREDENTIAL_RESOLVER, e); } else { const DOMElement* sub = XMLHelper::getFirstChildElement(e, _CredentialResolver); string t(XMLHelper::getAttrString(sub, nullptr, type)); if (!t.empty()) { m_credResolver = XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(t.c_str(), sub); } else { sub = XMLHelper::getFirstChildElement(e, _TrustEngine); t = XMLHelper::getAttrString(sub, nullptr, type); if (!t.empty()) { TrustEngine* trust = XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(t.c_str(), sub); if (!(m_trust = dynamic_cast(trust))) { delete trust; throw XMLToolingException("TrustEngine-based ReloadableXMLFile requires a SignatureTrustEngine plugin."); } m_signerName = XMLHelper::getAttrString(e, nullptr, signerName); } } } #endif if (m_local) { XMLToolingConfig::getConfig().getPathResolver()->resolve(m_source, PathResolver::XMLTOOLING_CFG_FILE); bool flag = XMLHelper::getAttrBool(e, true, reloadChanges); if (flag) { #ifdef WIN32 struct _stat stat_buf; if (_stat(m_source.c_str(), &stat_buf) == 0) #else struct stat stat_buf; if (stat(m_source.c_str(), &stat_buf) == 0) #endif m_filestamp = stat_buf.st_mtime; else throw IOException("Unable to access local file ($1)", params(1,m_source.c_str())); m_lock = RWLock::create(); } FILE* cfile = fopen(m_source.c_str(), "r"); if (cfile) fclose(cfile); else throw IOException("Unable to access local file ($1)", params(1,m_source.c_str())); log.debug("using local resource (%s), will %smonitor for changes", m_source.c_str(), m_lock ? "" : "not "); } else { log.debug("using remote resource (%s)", m_source.c_str()); m_backing = XMLHelper::getAttrString(e, nullptr, backingFilePath); if (!m_backing.empty()) { XMLToolingConfig::getConfig().getPathResolver()->resolve(m_backing, PathResolver::XMLTOOLING_CACHE_FILE); log.debug("backup remote resource to (%s)", m_backing.c_str()); try { string tagname = m_backing + ".tag"; ifstream backer(tagname.c_str()); if (backer) { char cachebuf[256]; if (backer.getline(cachebuf, 255)) { m_cacheTag = cachebuf; log.debug("loaded initial cache tag (%s)", m_cacheTag.c_str()); } } } catch (exception&) { } } m_reloadInterval = XMLHelper::getAttrInt(e, 0, reloadInterval); if (m_reloadInterval == 0) m_reloadInterval = XMLHelper::getAttrInt(e, 0, maxRefreshDelay); if (m_reloadInterval > 0) { m_log.debug("will reload remote resource at most every %d seconds", m_reloadInterval); m_lock = RWLock::create(); } m_filestamp = time(nullptr); // assume it gets loaded initially } if (startReloadThread) startup(); } else { log.debug("no resource uri/path/name supplied, will load inline configuration"); } m_id = XMLHelper::getAttrString(e, nullptr, id); } ReloadableXMLFile::~ReloadableXMLFile() { shutdown(); delete m_lock; } void ReloadableXMLFile::startup() { if (m_lock && !m_reload_thread) { m_reload_wait = CondWait::create(); m_reload_thread = Thread::create(&reload_fn, this); } } void ReloadableXMLFile::shutdown() { if (m_reload_thread) { // Shut down the reload thread and let it know. m_shutdown = true; m_reload_wait->signal(); m_reload_thread->join(nullptr); delete m_reload_thread; delete m_reload_wait; m_reload_thread = nullptr; m_reload_wait = nullptr; } } void* ReloadableXMLFile::reload_fn(void* pv) { ReloadableXMLFile* r = reinterpret_cast(pv); #ifndef WIN32 // First, let's block all signals Thread::mask_all_signals(); #endif if (!r->m_id.empty()) { string threadid("["); threadid += r->m_id + ']'; logging::NDC::push(threadid); } #ifdef _DEBUG NDC ndc("reload"); #endif auto_ptr mutex(Mutex::create()); mutex->lock(); if (r->m_local) r->m_log.info("reload thread started...running when signaled"); else r->m_log.info("reload thread started...running every %d seconds", r->m_reloadInterval); while (!r->m_shutdown) { if (r->m_local) r->m_reload_wait->wait(mutex.get()); else r->m_reload_wait->timedwait(mutex.get(), r->m_reloadInterval); if (r->m_shutdown) break; try { r->m_log.info("reloading %s resource...", r->m_local ? "local" : "remote"); pair ret = r->background_load(); if (ret.first) ret.second->getOwnerDocument()->release(); } catch (long& ex) { if (ex == HTTPResponse::XMLTOOLING_HTTP_STATUS_NOTMODIFIED) { r->m_log.info("remote resource (%s) unchanged from cached version", r->m_source.c_str()); } else { // Shouldn't happen, we should only get codes intended to be gracefully handled. r->m_log.crit("maintaining existing configuration, remote resource fetch returned atypical status code (%d)", ex); } } catch (exception& ex) { r->m_log.crit("maintaining existing configuration, error reloading resource (%s): %s", r->m_source.c_str(), ex.what()); } } r->m_log.info("reload thread finished"); mutex->unlock(); if (!r->m_id.empty()) { logging::NDC::pop(); } return nullptr; } Lockable* ReloadableXMLFile::lock() { if (!m_lock) return this; m_lock->rdlock(); if (m_local) { // Check if we need to refresh. #ifdef WIN32 struct _stat stat_buf; if (_stat(m_source.c_str(), &stat_buf) != 0) return this; #else struct stat stat_buf; if (stat(m_source.c_str(), &stat_buf) != 0) return this; #endif if (m_filestamp >= stat_buf.st_mtime) return this; // Elevate lock and recheck. m_log.debug("timestamp of local resource changed, elevating to a write lock"); m_lock->unlock(); m_lock->wrlock(); if (m_filestamp >= stat_buf.st_mtime) { // Somebody else handled it, just downgrade. m_log.debug("update of local resource handled by another thread, downgrading lock"); m_lock->unlock(); m_lock->rdlock(); return this; } // Update the timestamp regardless. m_filestamp = stat_buf.st_mtime; if (m_reload_wait) { m_log.info("change detected, signaling reload thread..."); m_reload_wait->signal(); } else { m_log.warn("change detected, but reload thread not started"); } } return this; } void ReloadableXMLFile::unlock() { if (m_lock) m_lock->unlock(); } pair ReloadableXMLFile::load(bool backup) { #ifdef _DEBUG NDC ndc("load"); #endif try { if (m_source.empty()) { // Data comes from the DOM we were handed. m_log.debug("loading inline configuration..."); return make_pair(false, XMLHelper::getFirstChildElement(m_root)); } else { // Data comes from a file we have to parse. if (backup) m_log.info("using local backup of remote resource"); else m_log.debug("loading configuration from external resource..."); DOMDocument* doc=nullptr; if (m_local || backup) { auto_ptr_XMLCh widenit(backup ? m_backing.c_str() : m_source.c_str()); // Use library-wide lock for now, nothing else is using it anyway. Locker locker(backup ? getBackupLock() : nullptr); LocalFileInputSource src(widenit.get()); Wrapper4InputSource dsrc(&src, false); if (m_validate) doc=XMLToolingConfig::getConfig().getValidatingParser().parse(dsrc); else doc=XMLToolingConfig::getConfig().getParser().parse(dsrc); } else { URLInputSource src(m_root, nullptr, &m_cacheTag); Wrapper4InputSource dsrc(&src, false); if (m_validate) doc=XMLToolingConfig::getConfig().getValidatingParser().parse(dsrc); else doc=XMLToolingConfig::getConfig().getParser().parse(dsrc); // Check for a response code signal. if (XMLHelper::isNodeNamed(doc->getDocumentElement(), xmlconstants::XMLTOOLING_NS, URLInputSource::utf16StatusCodeElementName)) { int responseCode = XMLString::parseInt(doc->getDocumentElement()->getFirstChild()->getNodeValue()); doc->release(); if (responseCode == HTTPResponse::XMLTOOLING_HTTP_STATUS_NOTMODIFIED) throw (long)responseCode; // toss out as a "known" case to handle gracefully else { m_log.warn("remote resource fetch returned atypical status code (%d)", responseCode); throw IOException("remote resource fetch failed, check log for status code of response"); } } } m_log.infoStream() << "loaded XML resource (" << (backup ? m_backing : m_source) << ")" << logging::eol; #ifndef XMLTOOLING_LITE if (m_credResolver || m_trust) { m_log.debug("checking signature on XML resource"); try { DOMElement* sigel = XMLHelper::getFirstChildElement(doc->getDocumentElement(), xmlconstants::XMLSIG_NS, Signature::LOCAL_NAME); if (!sigel) throw XMLSecurityException("Signature validation required, but no signature found."); // Wrap and unmarshall the signature for the duration of the check. auto_ptr sigobj(dynamic_cast(SignatureBuilder::buildOneFromElement(sigel))); // don't bind to document validateSignature(*sigobj.get()); } catch (exception&) { doc->release(); throw; } } #endif return make_pair(true, doc->getDocumentElement()); } } catch (XMLException& e) { auto_ptr_char msg(e.getMessage()); m_log.errorStream() << "Xerces error while loading resource (" << (backup ? m_backing : m_source) << "): " << msg.get() << logging::eol; throw XMLParserException(msg.get()); } catch (exception& e) { m_log.errorStream() << "error while loading resource (" << (m_source.empty() ? "inline" : (backup ? m_backing : m_source)) << "): " << e.what() << logging::eol; throw; } } pair ReloadableXMLFile::load() { // If this method is used, we're responsible for managing failover to a // backup of a remote resource (if available), and for backing up remote // resources. try { pair ret = load(false); if (!m_backing.empty()) { m_log.debug("backing up remote resource to (%s)", m_backing.c_str()); try { Locker locker(getBackupLock()); ofstream backer(m_backing.c_str()); backer << *(ret.second->getOwnerDocument()); preserveCacheTag(); } catch (exception& ex) { m_log.crit("exception while backing up resource: %s", ex.what()); } } return ret; } catch (long& responseCode) { // If there's an HTTP error or the document hasn't changed, // use the backup iff we have no "valid" resource in place. // That prevents reload of the backup copy any time the document // hasn't changed. if (responseCode == HTTPResponse::XMLTOOLING_HTTP_STATUS_NOTMODIFIED) m_log.info("remote resource (%s) unchanged from cached version", m_source.c_str()); if (!m_loaded && !m_backing.empty()) return load(true); throw; } catch (exception&) { // Same as above, but for general load/parse errors. if (!m_loaded && !m_backing.empty()) return load(true); throw; } } pair ReloadableXMLFile::background_load() { // If this method isn't overridden, we acquire a write lock // and just call the old override. if (m_lock) m_lock->wrlock(); SharedLock locker(m_lock, false); return load(); } Lockable* ReloadableXMLFile::getBackupLock() { return &XMLToolingConfig::getConfig(); } void ReloadableXMLFile::preserveCacheTag() { if (!m_cacheTag.empty() && !m_backing.empty()) { try { string tagname = m_backing + ".tag"; ofstream backer(tagname.c_str()); backer << m_cacheTag; } catch (exception&) { } } } #ifndef XMLTOOLING_LITE void ReloadableXMLFile::validateSignature(Signature& sigObj) const { DSIGSignature* sig=sigObj.getXMLSignature(); if (!sig) throw XMLSecurityException("Signature does not exist yet."); // Make sure the whole document was signed. bool valid=false; DSIGReferenceList* refs=sig->getReferenceList(); if (refs && refs->getSize()==1) { DSIGReference* ref=refs->item(0); if (ref) { const XMLCh* URI=ref->getURI(); if (URI==nullptr || *URI==0) { DSIGTransformList* tlist=ref->getTransforms(); if (tlist->getSize() <= 2) { for (unsigned int i=0; tlist && igetSize(); i++) { if (tlist->item(i)->getTransformType()==TRANSFORM_ENVELOPED_SIGNATURE) valid=true; else if (tlist->item(i)->getTransformType()!=TRANSFORM_EXC_C14N && tlist->item(i)->getTransformType()!=TRANSFORM_C14N #ifdef XMLTOOLING_XMLSEC_C14N11 && tlist->item(i)->getTransformType()!=TRANSFORM_C14N11 #endif ) { valid=false; break; } } } } } } if (!valid) throw XMLSecurityException("Invalid signature profile for signed configuration resource."); // Set up criteria. CredentialCriteria cc; cc.setUsage(Credential::SIGNING_CREDENTIAL); cc.setSignature(sigObj, CredentialCriteria::KEYINFO_EXTRACTION_KEY); if (!m_signerName.empty()) cc.setPeerName(m_signerName.c_str()); if (m_credResolver) { Locker locker(m_credResolver); vector creds; if (m_credResolver->resolve(creds, &cc)) { SignatureValidator sigValidator; for (vector::const_iterator i = creds.begin(); i != creds.end(); ++i) { try { sigValidator.setCredential(*i); sigValidator.validate(&sigObj); return; // success! } catch (exception&) { } } throw XMLSecurityException("Unable to verify signature with supplied key(s)."); } else { throw XMLSecurityException("CredentialResolver did not supply any candidate keys."); } } else if (m_trust) { auto_ptr dummy( XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(DUMMY_CREDENTIAL_RESOLVER, nullptr) ); if (m_trust->validate(sigObj, *(dummy.get()), &cc)) return; throw XMLSecurityException("TrustEngine unable to verify signature."); } throw XMLSecurityException("Unable to verify signature."); } #endif xmltooling-1.5.3/xmltooling/util/URLEncoder.cpp000644 001751 001751 00000004342 12003305017 022713 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * URLEncoder.cpp * * Interface to a URL-encoding mechanism along with a * default implementation. */ #include "internal.h" #include "util/URLEncoder.h" using namespace xmltooling; using namespace std; static char x2c(char *what) { register char digit; digit = (what[0] >= 'A' ? ((what[0] & 0xdf) - 'A')+10 : (what[0] - '0')); digit *= 16; digit += (what[1] >= 'A' ? ((what[1] & 0xdf) - 'A')+10 : (what[1] - '0')); return(digit); } URLEncoder::URLEncoder() { } URLEncoder::~URLEncoder() { } void URLEncoder::decode(char* s) const { register int x,y; for(x=0,y=0;s[y];++x,++y) { if((s[x] = s[y]) == '%' && isxdigit(s[y+1]) && isxdigit(s[y+2])) { s[x] = x2c(&s[y+1]); y+=2; } else if (s[x] == '+') { s[x] = ' '; } } s[x] = '\0'; } static inline char hexchar(unsigned short s) { return (s<=9) ? ('0' + s) : ('A' + s - 10); } string URLEncoder::encode(const char* s) const { string ret; for (; *s; s++) { if (isBad(*s)) { ret+='%'; ret+=hexchar((unsigned char)*s >> 4); ret+=hexchar((unsigned char)*s & 0x0F); } else ret+=*s; } return ret; } bool URLEncoder::isBad(char ch) const { static char badchars[]="=&/?:\"\\+<>#%{}|^~[],`;@"; return (ch<=0x20 || ch>=0x7F || strchr(badchars,ch)); } xmltooling-1.5.3/xmltooling/util/XMLConstants.cpp000644 001751 001751 00000015770 12007564200 023322 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * XMLConstants.cpp * * Fundamental XML namespace constants */ #include "internal.h" #include "util/XMLConstants.h" #include using namespace xercesc; const XMLCh xmlconstants::XML_NS[] = // http://www.w3.org/XML/1998/namespace { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash, chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash, chLatin_X, chLatin_M, chLatin_L, chForwardSlash, chDigit_1, chDigit_9, chDigit_9, chDigit_8, chForwardSlash, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chLatin_p, chLatin_a, chLatin_c, chLatin_e, chNull }; const XMLCh xmlconstants::XMLNS_NS[] = // http://www.w3.org/2000/xmlns/ { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash, chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash, chDigit_2, chDigit_0, chDigit_0, chDigit_0, chForwardSlash, chLatin_x, chLatin_m, chLatin_l, chLatin_n, chLatin_s, chForwardSlash, chNull }; const XMLCh xmlconstants::XMLNS_PREFIX[] = { chLatin_x, chLatin_m, chLatin_l, chLatin_n, chLatin_s, chNull }; const XMLCh xmlconstants::XML_PREFIX[] = { chLatin_x, chLatin_m, chLatin_l, chNull }; const XMLCh xmlconstants::XSD_NS[] = // http://www.w3.org/2001/XMLSchema { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash, chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash, chDigit_2, chDigit_0, chDigit_0, chDigit_1, chForwardSlash, chLatin_X, chLatin_M, chLatin_L, chLatin_S, chLatin_c, chLatin_h, chLatin_e, chLatin_m, chLatin_a, chNull }; const XMLCh xmlconstants::XSD_PREFIX[] = { chLatin_x, chLatin_s, chNull }; const XMLCh xmlconstants::XSI_NS[] = // http://www.w3.org/2001/XMLSchema-instance { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash, chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash, chDigit_2, chDigit_0, chDigit_0, chDigit_1, chForwardSlash, chLatin_X, chLatin_M, chLatin_L, chLatin_S, chLatin_c, chLatin_h, chLatin_e, chLatin_m, chLatin_a, chDash, chLatin_i, chLatin_n, chLatin_s, chLatin_t, chLatin_a, chLatin_n, chLatin_c, chLatin_e, chNull }; const XMLCh xmlconstants::XSI_PREFIX[] = { chLatin_x, chLatin_s, chLatin_i, chNull }; const XMLCh xmlconstants::XMLSIG_NS[] = // http://www.w3.org/2000/09/xmldsig# { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash, chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash, chDigit_2, chDigit_0, chDigit_0, chDigit_0, chForwardSlash, chDigit_0, chDigit_9, chForwardSlash, chLatin_x, chLatin_m, chLatin_l, chLatin_d, chLatin_s, chLatin_i, chLatin_g, chPound, chNull }; const XMLCh xmlconstants::XMLSIG_PREFIX[] = { chLatin_d, chLatin_s, chNull }; const XMLCh xmlconstants::XMLSIG11_NS[] = // http://www.w3.org/2009/xmldsig11# { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash, chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash, chDigit_2, chDigit_0, chDigit_0, chDigit_9, chForwardSlash, chLatin_x, chLatin_m, chLatin_l, chLatin_d, chLatin_s, chLatin_i, chLatin_g, chDigit_1, chDigit_1, chPound, chNull }; const XMLCh xmlconstants::XMLSIG11_PREFIX[] = { chLatin_d, chLatin_s, chDigit_1, chDigit_1, chNull }; const XMLCh xmlconstants::XMLENC_NS[] = // http://www.w3.org/2001/04/xmlenc# { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash, chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash, chDigit_2, chDigit_0, chDigit_0, chDigit_1, chForwardSlash, chDigit_0, chDigit_4, chForwardSlash, chLatin_x, chLatin_m, chLatin_l, chLatin_e, chLatin_n, chLatin_c, chPound, chNull }; const XMLCh xmlconstants::XMLENC_PREFIX[] = { chLatin_x, chLatin_e, chLatin_n, chLatin_c, chNull }; const XMLCh xmlconstants::XMLENC11_NS[] = // http://www.w3.org/2009/xmlenc11# { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash, chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash, chDigit_2, chDigit_0, chDigit_0, chDigit_9, chForwardSlash, chLatin_x, chLatin_m, chLatin_l, chLatin_e, chLatin_n, chLatin_c, chDigit_1, chDigit_1, chPound, chNull }; const XMLCh xmlconstants::XMLENC11_PREFIX[] = { chLatin_x, chLatin_e, chLatin_n, chLatin_c, chDigit_1, chDigit_1, chNull }; const XMLCh xmlconstants::SOAP11ENV_NS[] = // http://schemas.xmlsoap.org/soap/envelope/ { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash, chLatin_s, chLatin_c, chLatin_h, chLatin_e, chLatin_m, chLatin_a, chLatin_s, chPeriod, chLatin_x, chLatin_m, chLatin_l, chLatin_s, chLatin_o, chLatin_a, chLatin_p, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash, chLatin_s, chLatin_o, chLatin_a, chLatin_p, chForwardSlash, chLatin_e, chLatin_n, chLatin_v, chLatin_e, chLatin_l, chLatin_o, chLatin_p, chLatin_e, chForwardSlash, chNull }; const XMLCh xmlconstants::SOAP11ENV_PREFIX[] = UNICODE_LITERAL_1(S); const XMLCh xmlconstants::XMLTOOLING_NS[] = // http://www.opensaml.org/xmltooling { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash, chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_o, chLatin_p, chLatin_e, chLatin_n, chLatin_s, chLatin_a, chLatin_m, chLatin_l, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash, chLatin_x, chLatin_m, chLatin_l, chLatin_t, chLatin_o, chLatin_o, chLatin_l, chLatin_i, chLatin_n, chLatin_g, chNull }; const XMLCh xmlconstants::XML_TRUE[] = { chLatin_t, chLatin_r, chLatin_u, chLatin_e, chNull }; const XMLCh xmlconstants::XML_FALSE[] = { chLatin_f, chLatin_a, chLatin_l, chLatin_s, chLatin_e, chNull }; const XMLCh xmlconstants::XML_ONE[] = { chDigit_1, chNull }; const XMLCh xmlconstants::XML_ZERO[] = { chDigit_0, chNull }; xmltooling-1.5.3/xmltooling/util/XMLHelper.cpp000644 001751 001751 00000037501 12003305017 022554 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * XMLHelper.cpp * * A helper class for working with W3C DOM objects. */ #include "internal.h" #include "exceptions.h" #include "QName.h" #include "XMLObject.h" #include "util/XMLHelper.h" #include "util/XMLConstants.h" #include #include #include #include #include using namespace xmltooling; using namespace xercesc; using namespace boost::lambda; using namespace boost; using namespace std; static const XMLCh type[]={chLatin_t, chLatin_y, chLatin_p, chLatin_e, chNull }; bool XMLHelper::hasXSIType(const DOMElement* e) { return (e && e->hasAttributeNS(xmlconstants::XSI_NS, type)); } xmltooling::QName* XMLHelper::getXSIType(const DOMElement* e) { DOMAttr* attribute = e->getAttributeNodeNS(xmlconstants::XSI_NS, type); if (attribute) { const XMLCh* attributeValue = attribute->getTextContent(); if (attributeValue && *attributeValue) { int i; if ((i=XMLString::indexOf(attributeValue,chColon))>0) { XMLCh* prefix=new XMLCh[i+1]; XMLString::subString(prefix,attributeValue,0,i); prefix[i]=chNull; xmltooling::QName* ret=new xmltooling::QName(e->lookupNamespaceURI(prefix), attributeValue + i + 1, prefix); delete[] prefix; return ret; } else { return new xmltooling::QName(e->lookupNamespaceURI(nullptr), attributeValue); } } } return nullptr; } DOMAttr* XMLHelper::getIdAttribute(const DOMElement* domElement) { if(!domElement->hasAttributes()) { return nullptr; } DOMNamedNodeMap* attributes = domElement->getAttributes(); DOMAttr* attribute; for(XMLSize_t i = 0; i < attributes->getLength(); ++i) { attribute = static_cast(attributes->item(i)); if(attribute->isId()) { return attribute; } } return nullptr; } const XMLObject* XMLHelper::getXMLObjectById(const XMLObject& tree, const XMLCh* id) { if (XMLString::equals(id, tree.getXMLID())) return &tree; const XMLObject* ret; const list& children = tree.getOrderedChildren(); for (list::const_iterator i = children.begin(); i != children.end(); ++i) { if (*i) { ret = getXMLObjectById(*(*i), id); if (ret) return ret; } } return nullptr; } XMLObject* XMLHelper::getXMLObjectById(XMLObject& tree, const XMLCh* id) { if (XMLString::equals(id, tree.getXMLID())) return &tree; XMLObject* ret; const list& children = tree.getOrderedChildren(); for (list::const_iterator i = children.begin(); i != children.end(); ++i) { if (*i) { ret = getXMLObjectById(*(*i), id); if (ret) return ret; } } return nullptr; } void XMLHelper::getNonVisiblyUsedPrefixes(const XMLObject& tree, map& prefixes) { map child_prefixes; for(list::const_iterator i = tree.getOrderedChildren().begin(); i != tree.getOrderedChildren().end(); ++i) { if (*i) { getNonVisiblyUsedPrefixes(*(*i), child_prefixes); } } const set& nsset = tree.getNamespaces(); for (set::const_iterator ns = nsset.begin(); ns != nsset.end(); ++ns) { // Check for xmlns:xml. if (XMLString::equals(ns->getNamespacePrefix(), xmlconstants::XML_PREFIX) && XMLString::equals(ns->getNamespaceURI(), xmlconstants::XML_NS)) continue; switch (ns->usage()) { case Namespace::Indeterminate: break; case Namespace::VisiblyUsed: { // See if the prefix was noted as non-visible below. const XMLCh* p = ns->getNamespacePrefix() ? ns->getNamespacePrefix() : &chNull; map::iterator decl = child_prefixes.find(p); if (decl != child_prefixes.end()) { // It's declared below, see if it's the same namespace. If so, pull it from the set, // otherwise leave it in the set. if (decl->second == (ns->getNamespaceURI() ? ns->getNamespaceURI() : &chNull)) child_prefixes.erase(decl); } break; } case Namespace::NonVisiblyUsed: // It may already be in the map from another branch of the tree, but as long // as it's set to something so the parent knows about it, we're good. prefixes[ns->getNamespacePrefix() ? ns->getNamespacePrefix() : &chNull] = (ns->getNamespaceURI() ? ns->getNamespaceURI() : &chNull); break; } } prefixes.insert(child_prefixes.begin(), child_prefixes.end()); } xmltooling::QName* XMLHelper::getNodeQName(const DOMNode* domNode) { if (domNode) return new xmltooling::QName(domNode->getNamespaceURI(), domNode->getLocalName(), domNode->getPrefix()); return nullptr; } xmltooling::QName* XMLHelper::getAttributeValueAsQName(const DOMAttr* attribute) { return getNodeValueAsQName(attribute); } xmltooling::QName* XMLHelper::getNodeValueAsQName(const DOMNode* domNode) { if (!domNode) return nullptr; const XMLCh* value=domNode->getTextContent(); if (!value || !*value) return nullptr; int i; if ((i=XMLString::indexOf(value,chColon))>0) { XMLCh* prefix=new XMLCh[i+1]; XMLString::subString(prefix,value,0,i); prefix[i]=chNull; xmltooling::QName* ret=new xmltooling::QName(domNode->lookupNamespaceURI(prefix), value + i + 1, prefix); delete[] prefix; return ret; } return new xmltooling::QName(domNode->lookupNamespaceURI(nullptr), value); } bool XMLHelper::getNodeValueAsBool(const xercesc::DOMNode* domNode, bool def) { if (!domNode) return def; const XMLCh* value = domNode->getNodeValue(); if (!value || !*value) return def; if (*value == chLatin_t || *value == chDigit_1) return true; else if (*value == chLatin_f || *value == chDigit_0) return false; return def; } DOMElement* XMLHelper::appendChildElement(DOMElement* parentElement, DOMElement* childElement) { DOMDocument* parentDocument = parentElement->getOwnerDocument(); if (childElement->getOwnerDocument() != parentDocument) { childElement = static_cast(parentDocument->importNode(childElement, true)); } parentElement->appendChild(childElement); return childElement; } bool XMLHelper::isNodeNamed(const xercesc::DOMNode* n, const XMLCh* ns, const XMLCh* local) { return (n && XMLString::equals(local,n->getLocalName()) && XMLString::equals(ns,n->getNamespaceURI())); } const XMLCh* XMLHelper::getTextContent(const DOMElement* e) { DOMNode* child = e ? e->getFirstChild() : nullptr; while (child) { if (child->getNodeType() == DOMNode::TEXT_NODE) return child->getNodeValue(); child = child->getNextSibling(); } return nullptr; } DOMElement* XMLHelper::getFirstChildElement(const DOMNode* n, const XMLCh* localName) { DOMNode* child = n ? n->getFirstChild() : nullptr; while (child && child->getNodeType() != DOMNode::ELEMENT_NODE) child = child->getNextSibling(); if (child && localName) { if (!XMLString::equals(localName,child->getLocalName())) return getNextSiblingElement(child, localName); } return static_cast(child); } DOMElement* XMLHelper::getLastChildElement(const DOMNode* n, const XMLCh* localName) { DOMNode* child = n ? n->getLastChild() : nullptr; while (child && child->getNodeType() != DOMNode::ELEMENT_NODE) child = child->getPreviousSibling(); if (child && localName) { if (!XMLString::equals(localName,child->getLocalName())) return getPreviousSiblingElement(child, localName); } return static_cast(child); } DOMElement* XMLHelper::getFirstChildElement(const DOMNode* n, const XMLCh* ns, const XMLCh* localName) { DOMElement* e = getFirstChildElement(n, localName); while (e && !XMLString::equals(e->getNamespaceURI(),ns)) e = getNextSiblingElement(e, localName); return e; } DOMElement* XMLHelper::getLastChildElement(const DOMNode* n, const XMLCh* ns, const XMLCh* localName) { DOMElement* e = getLastChildElement(n, localName); while (e && !XMLString::equals(e->getNamespaceURI(),ns)) e = getPreviousSiblingElement(e, localName); return e; } DOMElement* XMLHelper::getNextSiblingElement(const DOMNode* n, const XMLCh* localName) { DOMNode* sib = n ? n->getNextSibling() : nullptr; while (sib && sib->getNodeType() != DOMNode::ELEMENT_NODE) sib = sib->getNextSibling(); if (sib && localName) { if (!XMLString::equals(localName,sib->getLocalName())) return getNextSiblingElement(sib, localName); } return static_cast(sib); } DOMElement* XMLHelper::getPreviousSiblingElement(const DOMNode* n, const XMLCh* localName) { DOMNode* sib = n ? n->getPreviousSibling() : nullptr; while (sib && sib->getNodeType() != DOMNode::ELEMENT_NODE) sib = sib->getPreviousSibling(); if (sib && localName) { if (!XMLString::equals(localName,sib->getLocalName())) return getPreviousSiblingElement(sib, localName); } return static_cast(sib); } DOMElement* XMLHelper::getNextSiblingElement(const DOMNode* n, const XMLCh* ns, const XMLCh* localName) { DOMElement* e = getNextSiblingElement(n, localName); while (e && !XMLString::equals(e->getNamespaceURI(),ns)) e = getNextSiblingElement(e, localName); return e; } DOMElement* XMLHelper::getPreviousSiblingElement(const DOMNode* n, const XMLCh* ns, const XMLCh* localName) { DOMElement* e = getPreviousSiblingElement(n, localName); while (e && !XMLString::equals(e->getNamespaceURI(),ns)) e = getPreviousSiblingElement(e, localName); return e; } string XMLHelper::getAttrString(const DOMElement* e, const char* defValue, const XMLCh* localName, const XMLCh* ns) { if (e) { auto_ptr_char val(e->getAttributeNS(ns, localName)); if (val.get() && *val.get()) return val.get(); } return defValue ? defValue : ""; } int XMLHelper::getAttrInt(const DOMElement* e, int defValue, const XMLCh* localName, const XMLCh* ns) { if (e) { const XMLCh* val = e->getAttributeNS(ns, localName); if (val && *val) { int i = XMLString::parseInt(val); if (i) return i; } } return defValue; } bool XMLHelper::getAttrBool(const DOMElement* e, bool defValue, const XMLCh* localName, const XMLCh* ns) { if (e) { const XMLCh* val = e->getAttributeNS(ns, localName); if (val) { if (*val == chLatin_t || *val == chDigit_1) return true; if (*val == chLatin_f || *val == chDigit_0) return false; } } return defValue; } void XMLHelper::serialize(const DOMNode* n, std::string& buf, bool pretty) { static const XMLCh impltype[] = { chLatin_L, chLatin_S, chNull }; static const XMLCh UTF8[]={ chLatin_U, chLatin_T, chLatin_F, chDash, chDigit_8, chNull }; MemBufFormatTarget target; DOMImplementation* impl=DOMImplementationRegistry::getDOMImplementation(impltype); #ifdef XMLTOOLING_XERCESC_COMPLIANT_DOMLS DOMLSSerializer* serializer = static_cast(impl)->createLSSerializer(); XercesJanitor janitor(serializer); if (pretty && serializer->getDomConfig()->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint, pretty)) serializer->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint, pretty); DOMLSOutput *theOutput = static_cast(impl)->createLSOutput(); XercesJanitor j_theOutput(theOutput); theOutput->setEncoding(UTF8); theOutput->setByteStream(&target); if (!serializer->write(n, theOutput)) throw XMLParserException("unable to serialize XML"); #else DOMWriter* serializer = static_cast(impl)->createDOMWriter(); XercesJanitor janitor(serializer); serializer->setEncoding(UTF8); if (pretty && serializer->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint, pretty)) serializer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, pretty); if (!serializer->writeNode(&target, *n)) throw XMLParserException("unable to serialize XML"); #endif buf.erase(); buf.append(reinterpret_cast(target.getRawBuffer()),target.getLen()); } namespace { class StreamFormatTarget : public XMLFormatTarget { public: StreamFormatTarget(std::ostream& out) : m_out(out) {} ~StreamFormatTarget() {} void writeChars(const XMLByte *const toWrite, const xsecsize_t count, XMLFormatter *const formatter) { m_out.write(reinterpret_cast(toWrite),count); } void flush() { m_out.flush(); } private: std::ostream& m_out; }; }; ostream& XMLHelper::serialize(const DOMNode* n, ostream& out, bool pretty) { static const XMLCh impltype[] = { chLatin_L, chLatin_S, chNull }; static const XMLCh UTF8[]={ chLatin_U, chLatin_T, chLatin_F, chDash, chDigit_8, chNull }; StreamFormatTarget target(out); DOMImplementation* impl=DOMImplementationRegistry::getDOMImplementation(impltype); #ifdef XMLTOOLING_XERCESC_COMPLIANT_DOMLS DOMLSSerializer* serializer = static_cast(impl)->createLSSerializer(); XercesJanitor janitor(serializer); if (pretty && serializer->getDomConfig()->canSetParameter(XMLUni::fgDOMWRTFormatPrettyPrint, pretty)) serializer->getDomConfig()->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint, pretty); DOMLSOutput *theOutput = static_cast(impl)->createLSOutput(); XercesJanitor j_theOutput(theOutput); theOutput->setEncoding(UTF8); theOutput->setByteStream(&target); if (!serializer->write(n, theOutput)) throw XMLParserException("unable to serialize XML"); #else DOMWriter* serializer=(static_cast(impl))->createDOMWriter(); XercesJanitor janitor(serializer); serializer->setEncoding(UTF8); if (pretty && serializer->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint, pretty)) serializer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, pretty); if (!serializer->writeNode(&target,*n)) throw XMLParserException("unable to serialize XML"); #endif return out; } ostream& xmltooling::operator<<(ostream& ostr, const DOMNode& node) { return XMLHelper::serialize(&node, ostr); } ostream& xmltooling::operator<<(ostream& ostr, const XMLObject& obj) { return ostr << *(obj.marshall()); } xmltooling-1.5.3/xmltooling/util/PThreads.cpp000644 001751 001751 00000021362 12003305017 022464 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * PThreads.cpp * * Thread and locking wrappers for POSIX platforms */ #include "internal.h" #include "logging.h" #include "util/Threads.h" #include #include #ifdef HAVE_PTHREAD # include # ifndef HAVE_PTHREAD_RWLOCK_INIT # include # endif #else # error "This implementation is for POSIX platforms." #endif using namespace xmltooling::logging; using namespace xmltooling; using namespace std; namespace xmltooling { class XMLTOOL_DLLLOCAL ThreadImpl : public Thread { pthread_t thread_id; public: ThreadImpl(void* (*start_routine)(void*), void* arg, size_t stacksize); virtual ~ThreadImpl() {} int detach() { return pthread_detach(thread_id); } int join(void** thread_return) { return pthread_join(thread_id, thread_return); } int kill(int signo) { return pthread_kill(thread_id, signo); } }; class XMLTOOL_DLLLOCAL MutexImpl : public Mutex { pthread_mutex_t mutex; friend class XMLTOOL_DLLLOCAL CondWaitImpl; public: MutexImpl(); virtual ~MutexImpl() { pthread_mutex_destroy(&mutex); } int lock() { return pthread_mutex_lock(&mutex); } int unlock() { return pthread_mutex_unlock(&mutex); } }; class XMLTOOL_DLLLOCAL CondWaitImpl : public CondWait { pthread_cond_t cond; public: CondWaitImpl(); virtual ~CondWaitImpl() { pthread_cond_destroy(&cond); } int wait(Mutex* mutex) { return wait(static_cast(mutex)); } int wait(MutexImpl* mutex) { return pthread_cond_wait(&cond, &(mutex->mutex)); } int timedwait(Mutex* mutex, int delay_seconds) { return timedwait(static_cast(mutex), delay_seconds); } int timedwait(MutexImpl* mutex, int delay_seconds) { struct timespec ts; memset(&ts, 0, sizeof(ts)); ts.tv_sec = time(nullptr) + delay_seconds; return pthread_cond_timedwait(&cond, &(mutex->mutex), &ts); } int signal() { return pthread_cond_signal(&cond); } int broadcast() { return pthread_cond_broadcast(&cond); } }; class XMLTOOL_DLLLOCAL RWLockImpl : public RWLock { #ifdef HAVE_PTHREAD_RWLOCK_INIT pthread_rwlock_t lock; public: RWLockImpl(); virtual ~RWLockImpl() { pthread_rwlock_destroy(&lock); } int rdlock() { return pthread_rwlock_rdlock(&lock); } int wrlock() { return pthread_rwlock_wrlock(&lock); } int unlock() { return pthread_rwlock_unlock(&lock); } #else rwlock_t lock; public: RWLockImpl(); virtual ~RWLockImpl() { rwlock_destroy (&lock); } int rdlock() { return rw_rdlock(&lock); } int wrlock() { return rw_wrlock(&lock); } int unlock() { return rw_unlock(&lock); } #endif }; class XMLTOOL_DLLLOCAL ThreadKeyImpl : public ThreadKey { pthread_key_t key; public: ThreadKeyImpl(void (*destroy_fcn)(void*)); virtual ~ThreadKeyImpl() { pthread_key_delete(key); } int setData(void* data) { return pthread_setspecific(key,data); } void* getData() const { return pthread_getspecific(key); } }; }; ThreadImpl::ThreadImpl(void* (*start_routine)(void*), void* arg, size_t stacksize) { int rc; if (stacksize > 0) { pthread_attr_t attrs; rc = pthread_attr_init(&attrs); if (rc) { Category::getInstance(XMLTOOLING_LOGCAT".Threads").error("pthread_attr_init error (%d)", rc); throw ThreadingException("Thread creation failed."); } rc = pthread_attr_setstacksize(&attrs, stacksize); if (rc) { Category::getInstance(XMLTOOLING_LOGCAT".Threads").error("pthread_attr_setstacksize error (%d)", rc); throw ThreadingException("Thread creation failed."); } rc = pthread_create(&thread_id, &attrs, start_routine, arg); } else { rc = pthread_create(&thread_id, nullptr, start_routine, arg); } if (rc) { #ifdef HAVE_STRERROR_R char buf[256]; strerror_r(rc,buf,sizeof(buf)); buf[255]=0; Category::getInstance(XMLTOOLING_LOGCAT".Threads").error("pthread_create error (%d): %s",rc,buf); #else Category::getInstance(XMLTOOLING_LOGCAT".Threads").error("pthread_create error (%d): %s",rc,strerror(rc)); #endif throw ThreadingException("Thread creation failed."); } } MutexImpl::MutexImpl() { int rc=pthread_mutex_init(&mutex, nullptr); if (rc) { #ifdef HAVE_STRERROR_R char buf[256]; strerror_r(rc,buf,sizeof(buf)); buf[255]=0; Category::getInstance(XMLTOOLING_LOGCAT".Threads").error("pthread_mutex_init error (%d): %s",rc,buf); #else Category::getInstance(XMLTOOLING_LOGCAT".Threads").error("pthread_mutex_init error (%d): %s",rc,strerror(rc)); #endif throw ThreadingException("Mutex creation failed."); } } CondWaitImpl::CondWaitImpl() { int rc=pthread_cond_init(&cond, nullptr); if (rc) { #ifdef HAVE_STRERROR_R char buf[256]; strerror_r(rc,buf,sizeof(buf)); buf[255]=0; Category::getInstance(XMLTOOLING_LOGCAT".Threads").error("pthread_cond_init error (%d): %s",rc,buf); #else Category::getInstance(XMLTOOLING_LOGCAT".Threads").error("pthread_cond_init error (%d): %s",rc,strerror(rc)); #endif throw ThreadingException("Condition variable creation failed."); } } RWLockImpl::RWLockImpl() { #ifdef HAVE_PTHREAD_RWLOCK_INIT int rc=pthread_rwlock_init(&lock, nullptr); #else int rc=rwlock_init(&lock, USYNC_THREAD, nullptr); #endif if (rc) { #ifdef HAVE_STRERROR_R char buf[256]; strerror_r(rc,buf,sizeof(buf)); buf[255]=0; Category::getInstance(XMLTOOLING_LOGCAT".Threads").error("pthread_rwlock_init error (%d): %s",rc,buf); #else Category::getInstance(XMLTOOLING_LOGCAT".Threads").error("pthread_rwlock_init error (%d): %s",rc,strerror(rc)); #endif throw ThreadingException("Shared lock creation failed."); } } ThreadKeyImpl::ThreadKeyImpl(void (*destroy_fcn)(void*)) { int rc=pthread_key_create(&key, destroy_fcn); if (rc) { #ifdef HAVE_STRERROR_R char buf[256]; strerror_r(rc,buf,sizeof(buf)); buf[255]=0; Category::getInstance(XMLTOOLING_LOGCAT".Threads").error("pthread_key_create error (%d): %s",rc,buf); #else Category::getInstance(XMLTOOLING_LOGCAT".Threads").error("pthread_key_create error (%d): %s",rc,strerror(rc)); #endif throw ThreadingException("Thread key creation failed."); } } Thread* Thread::create(void* (*start_routine)(void*), void* arg, size_t stacksize) { return new ThreadImpl(start_routine, arg, stacksize); } void Thread::exit(void* return_val) { pthread_exit(return_val); } void Thread::sleep(int seconds) { sleep(seconds); } void Thread::mask_all_signals(void) { sigset_t sigmask; sigfillset(&sigmask); Thread::mask_signals(SIG_BLOCK, &sigmask, nullptr); } int Thread::mask_signals(int how, const sigset_t *newmask, sigset_t *oldmask) { return pthread_sigmask(how,newmask,oldmask); } Mutex * Mutex::create() { return new MutexImpl(); } CondWait * CondWait::create() { return new CondWaitImpl(); } RWLock * RWLock::create() { return new RWLockImpl(); } ThreadKey* ThreadKey::create (void (*destroy_fcn)(void*)) { return new ThreadKeyImpl(destroy_fcn); } xmltooling-1.5.3/xmltooling/util/CurlURLInputStream.cpp000644 001751 001751 00000052470 12147443124 024455 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * xmltooling/util/CurlURLInputStream.cpp * * Asynchronous use of curl to fetch data from a URL. */ #include "internal.h" #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace xmltooling; using namespace xercesc; using namespace std; namespace { static const XMLCh _CURL[] = UNICODE_LITERAL_4(C,U,R,L); static const XMLCh _OpenSSL[] = UNICODE_LITERAL_7(O,p,e,n,S,S,L); static const XMLCh _option[] = UNICODE_LITERAL_6(o,p,t,i,o,n); static const XMLCh _provider[] = UNICODE_LITERAL_8(p,r,o,v,i,d,e,r); static const XMLCh TransportOption[] = UNICODE_LITERAL_15(T,r,a,n,s,p,o,r,t,O,p,t,i,o,n); static const XMLCh uri[] = UNICODE_LITERAL_3(u,r,i); static const XMLCh url[] = UNICODE_LITERAL_3(u,r,l); static const XMLCh verifyHost[] = UNICODE_LITERAL_10(v,e,r,i,f,y,H,o,s,t); // callback to invoke a caller-defined SSL callback CURLcode ssl_ctx_callback(CURL* curl, SSL_CTX* ssl_ctx, void* userptr) { CurlURLInputStream* str = reinterpret_cast(userptr); // Default flags manually disable SSLv2 so we're not dependent on libcurl to do it. // Also disable the ticket option where implemented, since this breaks a variety // of servers. Newer libcurl also does this for us. #ifdef SSL_OP_NO_TICKET SSL_CTX_set_options(ssl_ctx, str->getOpenSSLOps()|SSL_OP_NO_TICKET); #else SSL_CTX_set_options(ssl_ctx, str->getOpenSSLOps()); #endif return CURLE_OK; } size_t curl_header_hook(void* ptr, size_t size, size_t nmemb, void* stream) { // only handle single-byte data if (size != 1 || nmemb < 5 || !stream) return nmemb; string* cacheTag = reinterpret_cast(stream); const char* hdr = reinterpret_cast(ptr); if (strncmp(hdr, "ETag:", 5) == 0) { hdr += 5; size_t remaining = nmemb - 5; // skip leading spaces while (remaining > 0) { if (*hdr == ' ') { ++hdr; --remaining; continue; } break; } // append until whitespace cacheTag->erase(); while (remaining > 0) { if (!isspace(*hdr)) { (*cacheTag) += *hdr++; --remaining; continue; } break; } if (!cacheTag->empty()) *cacheTag = "If-None-Match: " + *cacheTag; } else if (cacheTag->empty() && strncmp(hdr, "Last-Modified:", 14) == 0) { hdr += 14; size_t remaining = nmemb - 14; // skip leading spaces while (remaining > 0) { if (*hdr == ' ') { ++hdr; --remaining; continue; } break; } // append until data's gone or we see a CR/LF while (remaining > 0) { if (*hdr != '\r' && *hdr != '\n') { (*cacheTag) += *hdr++; --remaining; continue; } break; } if (!cacheTag->empty()) *cacheTag = "If-Modified-Since: " + *cacheTag; } return nmemb; } } CurlURLInputStream::CurlURLInputStream(const char* url, string* cacheTag) : fLog(logging::Category::getInstance(XMLTOOLING_LOGCAT".libcurl.InputStream")) , fCacheTag(cacheTag) , fURL(url ? url : "") , fOpenSSLOps(SSL_OP_ALL|SSL_OP_NO_SSLv2) , fMulti(0) , fEasy(0) , fHeaders(0) , fTotalBytesRead(0) , fWritePtr(0) , fBytesRead(0) , fBytesToRead(0) , fDataAvailable(false) , fBuffer(0) , fBufferHeadPtr(0) , fBufferTailPtr(0) , fBufferSize(0) , fContentType(0) , fStatusCode(200) { if (fURL.empty()) throw IOException("No URL supplied to CurlURLInputStream constructor."); init(); } CurlURLInputStream::CurlURLInputStream(const XMLCh* url, string* cacheTag) : fLog(logging::Category::getInstance(XMLTOOLING_LOGCAT".libcurl.InputStream")) , fCacheTag(cacheTag) , fOpenSSLOps(SSL_OP_ALL|SSL_OP_NO_SSLv2) , fMulti(0) , fEasy(0) , fHeaders(0) , fTotalBytesRead(0) , fWritePtr(0) , fBytesRead(0) , fBytesToRead(0) , fDataAvailable(false) , fBuffer(0) , fBufferHeadPtr(0) , fBufferTailPtr(0) , fBufferSize(0) , fContentType(0) , fStatusCode(200) { if (url) { auto_ptr_char temp(url); fURL = temp.get(); } if (fURL.empty()) throw IOException("No URL supplied to CurlURLInputStream constructor."); init(); } CurlURLInputStream::CurlURLInputStream(const DOMElement* e, string* cacheTag) : fLog(logging::Category::getInstance(XMLTOOLING_LOGCAT".libcurl.InputStream")) , fCacheTag(cacheTag) , fOpenSSLOps(SSL_OP_ALL|SSL_OP_NO_SSLv2) , fMulti(0) , fEasy(0) , fHeaders(0) , fTotalBytesRead(0) , fWritePtr(0) , fBytesRead(0) , fBytesToRead(0) , fDataAvailable(false) , fBuffer(0) , fBufferHeadPtr(0) , fBufferTailPtr(0) , fBufferSize(0) , fContentType(0) , fStatusCode(200) { const XMLCh* attr = e->getAttributeNS(nullptr, url); if (!attr || !*attr) { attr = e->getAttributeNS(nullptr, uri); if (!attr || !*attr) throw IOException("No URL supplied via DOM to CurlURLInputStream constructor."); } auto_ptr_char temp(attr); fURL = temp.get(); init(e); } CurlURLInputStream::~CurlURLInputStream() { if (fEasy) { // Remove the easy handle from the multi stack curl_multi_remove_handle(fMulti, fEasy); // Cleanup the easy handle curl_easy_cleanup(fEasy); } if (fMulti) { // Cleanup the multi handle curl_multi_cleanup(fMulti); } if (fHeaders) { curl_slist_free_all(fHeaders); } XMLString::release(&fContentType); free(fBuffer); } void CurlURLInputStream::init(const DOMElement* e) { // Allocate the curl multi handle fMulti = curl_multi_init(); // Allocate the curl easy handle fEasy = curl_easy_init(); if (!fMulti || !fEasy) throw IOException("Failed to allocate libcurl handles."); curl_easy_setopt(fEasy, CURLOPT_URL, fURL.c_str()); // Set up a way to recieve the data curl_easy_setopt(fEasy, CURLOPT_WRITEDATA, this); // Pass this pointer to write function curl_easy_setopt(fEasy, CURLOPT_WRITEFUNCTION, staticWriteCallback); // Our static write function // Do redirects curl_easy_setopt(fEasy, CURLOPT_FOLLOWLOCATION, 1); curl_easy_setopt(fEasy, CURLOPT_MAXREDIRS, 6); // Default settings. curl_easy_setopt(fEasy, CURLOPT_CONNECTTIMEOUT, 10); curl_easy_setopt(fEasy, CURLOPT_TIMEOUT, 60); curl_easy_setopt(fEasy, CURLOPT_HTTPAUTH, 0); curl_easy_setopt(fEasy, CURLOPT_USERPWD, nullptr); curl_easy_setopt(fEasy, CURLOPT_SSL_VERIFYHOST, 2); curl_easy_setopt(fEasy, CURLOPT_SSL_VERIFYPEER, 0); curl_easy_setopt(fEasy, CURLOPT_CAINFO, nullptr); curl_easy_setopt(fEasy, CURLOPT_SSL_CIPHER_LIST, "ALL:!aNULL:!LOW:!EXPORT:!SSLv2"); curl_easy_setopt(fEasy, CURLOPT_NOPROGRESS, 1); curl_easy_setopt(fEasy, CURLOPT_NOSIGNAL, 1); curl_easy_setopt(fEasy, CURLOPT_FAILONERROR, 1); curl_easy_setopt(fEasy, CURLOPT_ENCODING, ""); // Install SSL callback. curl_easy_setopt(fEasy, CURLOPT_SSL_CTX_FUNCTION, ssl_ctx_callback); curl_easy_setopt(fEasy, CURLOPT_SSL_CTX_DATA, this); fError[0] = 0; curl_easy_setopt(fEasy, CURLOPT_ERRORBUFFER, fError); // Check for cache tag. if (fCacheTag) { // Outgoing tag. if (!fCacheTag->empty()) { fHeaders = curl_slist_append(fHeaders, fCacheTag->c_str()); } // Incoming tag. curl_easy_setopt(fEasy, CURLOPT_HEADERFUNCTION, curl_header_hook); curl_easy_setopt(fEasy, CURLOPT_HEADERDATA, fCacheTag); } // Add User-Agent as a header for now. TODO: Add private member to hold the // value for the standard UA option. string ua = string("User-Agent: ") + XMLToolingConfig::getConfig().user_agent + " libcurl/" + LIBCURL_VERSION + ' ' + OPENSSL_VERSION_TEXT; fHeaders = curl_slist_append(fHeaders, ua.c_str()); // Add User-Agent and cache headers. curl_easy_setopt(fEasy, CURLOPT_HTTPHEADER, fHeaders); if (e) { const XMLCh* flag = e->getAttributeNS(nullptr, verifyHost); if (flag && (*flag == chLatin_f || *flag == chDigit_0)) curl_easy_setopt(fEasy, CURLOPT_SSL_VERIFYHOST, 0); // Process TransportOption elements. bool success; DOMElement* child = XMLHelper::getLastChildElement(e, TransportOption); while (child) { if (child->hasChildNodes() && XMLString::equals(child->getAttributeNS(nullptr,_provider), _OpenSSL)) { auto_ptr_char option(child->getAttributeNS(nullptr,_option)); auto_ptr_char value(child->getFirstChild()->getNodeValue()); if (option.get() && value.get() && !strcmp(option.get(), "SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION") && (*value.get()=='1' || *value.get()=='t')) { // If the new option to enable buggy rengotiation is available, set it. // Otherwise, signal false if this is newer than 0.9.8k, because that // means it's 0.9.8l, which blocks renegotiation, and therefore will // not honor this request. Older versions are buggy, so behave as though // the flag was set anyway, so we signal true. #if defined(SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION) fOpenSSLOps |= SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION; success = true; #elif (OPENSSL_VERSION_NUMBER > 0x009080bfL) success = false; #else success = true; #endif } else { success = false; } if (!success) fLog.error("failed to set OpenSSL transport option (%s)", option.get()); } else if (child->hasChildNodes() && XMLString::equals(child->getAttributeNS(nullptr,_provider), _CURL)) { auto_ptr_char option(child->getAttributeNS(nullptr,_option)); auto_ptr_char value(child->getFirstChild()->getNodeValue()); if (option.get() && *option.get() && value.get() && *value.get()) { // For libcurl, the option is an enum and the value type depends on the option. CURLoption opt = static_cast(strtol(option.get(), nullptr, 10)); if (opt < CURLOPTTYPE_OBJECTPOINT) success = (curl_easy_setopt(fEasy, opt, strtol(value.get(), nullptr, 10)) == CURLE_OK); #ifdef CURLOPTTYPE_OFF_T else if (opt < CURLOPTTYPE_OFF_T) { fSavedOptions.push_back(value.get()); success = (curl_easy_setopt(fEasy, opt, fSavedOptions.back().c_str()) == CURLE_OK); } # ifdef HAVE_CURL_OFF_T else if (sizeof(curl_off_t) == sizeof(long)) success = (curl_easy_setopt(fEasy, opt, strtol(value.get(), nullptr, 10)) == CURLE_OK); # else else if (sizeof(off_t) == sizeof(long)) success = (curl_easy_setopt(fEasy, opt, strtol(value.get(), nullptr, 10)) == CURLE_OK); # endif else success = false; #else else { fSavedOptions.push_back(value.get()); success = (curl_easy_setopt(fEasy, opt, fSavedOptions.back().c_str()) == CURLE_OK); } #endif if (!success) fLog.error("failed to set CURL transport option (%s)", option.get()); } } child = XMLHelper::getPreviousSiblingElement(child, TransportOption); } } // Add easy handle to the multi stack curl_multi_add_handle(fMulti, fEasy); fLog.debug("libcurl trying to fetch %s", fURL.c_str()); // Start reading, to get the content type while(fBufferHeadPtr == fBuffer) { int runningHandles = 0; try { readMore(&runningHandles); } catch (XMLException&) { curl_multi_remove_handle(fMulti, fEasy); curl_easy_cleanup(fEasy); fEasy = nullptr; curl_multi_cleanup(fMulti); fMulti = nullptr; throw; } if(runningHandles == 0) break; } // Check for a response code. if (curl_easy_getinfo(fEasy, CURLINFO_RESPONSE_CODE, &fStatusCode) == CURLE_OK) { if (fStatusCode >= 300 ) { // Short-circuit usual processing by storing a special XML document in the buffer. ostringstream specialdoc; specialdoc << '<' << URLInputSource::asciiStatusCodeElementName << " xmlns=\"http://www.opensaml.org/xmltooling\">" << fStatusCode << "'; string specialxml = specialdoc.str(); fBufferTailPtr = fBuffer = reinterpret_cast(malloc(specialxml.length())); if (!fBuffer) { curl_multi_remove_handle(fMulti, fEasy); curl_easy_cleanup(fEasy); fEasy = nullptr; curl_multi_cleanup(fMulti); fMulti = nullptr; throw bad_alloc(); } memcpy(fBuffer, specialxml.c_str(), specialxml.length()); fBufferHeadPtr = fBuffer + specialxml.length(); } } else { fStatusCode = 200; // reset to 200 to ensure no special processing occurs } // Find the content type char* contentType8 = nullptr; if(curl_easy_getinfo(fEasy, CURLINFO_CONTENT_TYPE, &contentType8) == CURLE_OK && contentType8) fContentType = XMLString::transcode(contentType8); } size_t CurlURLInputStream::staticWriteCallback(char* buffer, size_t size, size_t nitems, void* outstream) { return ((CurlURLInputStream*)outstream)->writeCallback(buffer, size, nitems); } size_t CurlURLInputStream::writeCallback(char* buffer, size_t size, size_t nitems) { size_t cnt = size * nitems; size_t totalConsumed = 0; // Consume as many bytes as possible immediately into the buffer size_t consume = (cnt > fBytesToRead) ? fBytesToRead : cnt; memcpy(fWritePtr, buffer, consume); fWritePtr += consume; fBytesRead += consume; fTotalBytesRead += consume; fBytesToRead -= consume; fLog.debug("write callback consuming %u bytes", consume); // If bytes remain, rebuffer as many as possible into our holding buffer buffer += consume; totalConsumed += consume; cnt -= consume; if (cnt > 0) { size_t bufAvail = fBufferSize - (fBufferHeadPtr - fBuffer); if (bufAvail < cnt) { // Enlarge the buffer. TODO: limit max size XMLByte* newbuf = reinterpret_cast(realloc(fBuffer, fBufferSize + (cnt - bufAvail))); if (newbuf) { fBufferSize = fBufferSize + (cnt - bufAvail); fLog.debug("enlarged buffer to %u bytes", fBufferSize); fBufferHeadPtr = newbuf + (fBufferHeadPtr - fBuffer); fBuffer = fBufferTailPtr = newbuf; } } memcpy(fBufferHeadPtr, buffer, cnt); fBufferHeadPtr += cnt; buffer += cnt; totalConsumed += cnt; fLog.debug("write callback rebuffering %u bytes", cnt); } // Return the total amount we've consumed. If we don't consume all the bytes // then an error will be generated. Since our buffer size is equal to the // maximum size that curl will write, this should never happen unless there // is a logic error somewhere here. return totalConsumed; } bool CurlURLInputStream::readMore(int* runningHandles) { // Ask the curl to do some work CURLMcode curlResult = curl_multi_perform(fMulti, runningHandles); // Process messages from curl int msgsInQueue = 0; for (CURLMsg* msg = nullptr; (msg = curl_multi_info_read(fMulti, &msgsInQueue)) != nullptr; ) { fLog.debug("msg %d, %d from curl", msg->msg, msg->data.result); if (msg->msg != CURLMSG_DONE) return true; switch (msg->data.result) { case CURLE_OK: // We completed successfully. runningHandles should have dropped to zero, so we'll bail out below... break; case CURLE_UNSUPPORTED_PROTOCOL: ThrowXML(MalformedURLException, XMLExcepts::URL_UnsupportedProto); break; case CURLE_COULDNT_RESOLVE_HOST: case CURLE_COULDNT_RESOLVE_PROXY: ThrowXML1(NetAccessorException, XMLExcepts::NetAcc_TargetResolution, fURL.c_str()); break; case CURLE_COULDNT_CONNECT: ThrowXML1(NetAccessorException, XMLExcepts::NetAcc_ConnSocket, fURL.c_str()); break; case CURLE_OPERATION_TIMEDOUT: ThrowXML1(NetAccessorException, XMLExcepts::NetAcc_ConnSocket, fURL.c_str()); break; case CURLE_RECV_ERROR: ThrowXML1(NetAccessorException, XMLExcepts::NetAcc_ReadSocket, fURL.c_str()); break; default: fLog.error("error while fetching %s: (%d) %s", fURL.c_str(), msg->data.result, fError); if (msg->data.result == CURLE_SSL_CIPHER) { fLog.error("on Red Hat 6+, make sure libcurl used is built with OpenSSL"); } ThrowXML1(NetAccessorException, XMLExcepts::NetAcc_InternalError, fURL.c_str()); break; } } // If nothing is running any longer, bail out if(*runningHandles == 0) return false; // If there is no further data to read, and we haven't // read any yet on this invocation, call select to wait for data if (curlResult != CURLM_CALL_MULTI_PERFORM && fBytesRead == 0) { fd_set readSet; fd_set writeSet; fd_set exceptSet; int fdcnt=0; FD_ZERO(&readSet); FD_ZERO(&writeSet); FD_ZERO(&exceptSet); // Ask curl for the file descriptors to wait on curl_multi_fdset(fMulti, &readSet, &writeSet, &exceptSet, &fdcnt); // Wait on the file descriptors timeval tv; tv.tv_sec = 2; tv.tv_usec = 0; select(fdcnt+1, &readSet, &writeSet, &exceptSet, &tv); } return curlResult == CURLM_CALL_MULTI_PERFORM; } xsecsize_t CurlURLInputStream::readBytes(XMLByte* const toFill, const xsecsize_t maxToRead) { fBytesRead = 0; fBytesToRead = maxToRead; fWritePtr = toFill; for (bool tryAgain = true; fBytesToRead > 0 && (tryAgain || fBytesRead == 0); ) { // First, any buffered data we have available size_t bufCnt = fBufferHeadPtr - fBufferTailPtr; bufCnt = (bufCnt > fBytesToRead) ? fBytesToRead : bufCnt; if (bufCnt > 0) { memcpy(fWritePtr, fBufferTailPtr, bufCnt); fWritePtr += bufCnt; fBytesRead += bufCnt; fTotalBytesRead += bufCnt; fBytesToRead -= bufCnt; fBufferTailPtr += bufCnt; if (fBufferTailPtr == fBufferHeadPtr) fBufferHeadPtr = fBufferTailPtr = fBuffer; fLog.debug("consuming %d buffered bytes", bufCnt); tryAgain = true; continue; } // Check for a non-2xx status that means to ignore the curl response. if (fStatusCode >= 300) break; // Ask the curl to do some work int runningHandles = 0; tryAgain = readMore(&runningHandles); // If nothing is running any longer, bail out if (runningHandles == 0) break; } return fBytesRead; } xmltooling-1.5.3/xmltooling/util/ReplayCache.cpp000644 001751 001751 00000005437 12003305017 023137 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * ReplayCache.cpp * * Helper class on top of StorageService for detecting message replay. */ #include "internal.h" #include "logging.h" #include "security/SecurityHelper.h" #include "util/ReplayCache.h" using namespace xmltooling::logging; using namespace xmltooling; using namespace std; ReplayCache::ReplayCache(StorageService* storage) : m_owned(storage==nullptr), m_storage(storage ? storage : XMLToolingConfig::getConfig().StorageServiceManager.newPlugin(MEMORY_STORAGE_SERVICE, nullptr)), m_storageCaps(m_storage->getCapabilities()) { } ReplayCache::~ReplayCache() { if (m_owned) delete m_storage; } bool ReplayCache::check(const char* context, const char* s, time_t expires) { if (strlen(context) > m_storageCaps.getContextSize()) { // This is a design/coding failure. Category::getInstance(XMLTOOLING_LOGCAT".ReplayCache").error( "context (%s) too long for StorageService (limit %u)", context, m_storageCaps.getContextSize() ); return false; } else if (strlen(s) > m_storageCaps.getKeySize()) { // This is something to work around with a hash. #ifndef XMLTOOLING_NO_XMLSEC string h = SecurityHelper::doHash("SHA1", s, strlen(s)); // In storage already? if (m_storage->readString(context, h.c_str())) return false; m_storage->createString(context, h.c_str(), "x", expires); return true; #else Category::getInstance(XMLTOOLING_LOGCAT".ReplayCache").error( "key (%s) too long for StorageService (limit %u)", s, m_storageCaps.getKeySize() ); return false; #endif } // In storage already? if (m_storage->readString(context, s)) return false; m_storage->createString(context, s, "x", expires); return true; } bool ReplayCache::check(const char* context, const XMLCh* s, time_t expires) { auto_ptr_char temp(s); return check(context, temp.get(), expires); } xmltooling-1.5.3/xmltooling/util/StorageService.cpp000644 001751 001751 00000004233 12003305017 023675 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * StorageService.cpp * * Generic data storage interface. */ #include "internal.h" #include "util/StorageService.h" using namespace xmltooling; using namespace std; namespace { static const XMLTOOL_DLLLOCAL StorageService::Capabilities g_ssCaps(255, 255, 255); }; namespace xmltooling { XMLTOOL_DLLLOCAL PluginManager::Factory MemoryStorageServiceFactory; }; void XMLTOOL_API xmltooling::registerStorageServices() { XMLToolingConfig& conf=XMLToolingConfig::getConfig(); conf.StorageServiceManager.registerFactory(MEMORY_STORAGE_SERVICE, MemoryStorageServiceFactory); } StorageService::StorageService() { } StorageService::~StorageService() { } const StorageService::Capabilities& StorageService::getCapabilities() const { return g_ssCaps; } StorageService::Capabilities::Capabilities(unsigned int contextSize, unsigned int keySize, unsigned int stringSize) : m_contextSize(contextSize), m_keySize(keySize), m_stringSize(stringSize) { } StorageService::Capabilities::~Capabilities() { } unsigned int StorageService::Capabilities::getContextSize() const { return m_contextSize; } unsigned int StorageService::Capabilities::getKeySize() const { return m_keySize; } unsigned int StorageService::Capabilities::getStringSize() const { return m_stringSize; } xmltooling-1.5.3/xmltooling/util/Win32Threads.cpp000644 001751 001751 00000031244 12003305017 023167 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * Win32Threads.cpp * * Thread and locking wrappers for Win32 platforms. */ #include "internal.h" #include "logging.h" #include "util/Threads.h" #include #ifndef WIN32 # error "This implementation is for WIN32 platforms." #endif using namespace xmltooling::logging; using namespace xmltooling; using namespace std; // base error code for a routine to return on failure #define THREAD_ERROR_TIMEOUT (1) #define THREAD_ERROR_WAKE_OTHER (2) #define THREAD_ERROR (3) // windows returns non zero for success pthreads returns zero static int XMLTOOL_DLLLOCAL map_windows_error_status_to_pthreads(int rc=0) { if(rc!=0) // success? return 0; Category::getInstance(XMLTOOLING_LOGCAT".Threads").error("error from thread operation (%d)", GetLastError()); return THREAD_ERROR; } namespace xmltooling { // two levels of classes are needed here // in case InitializeCriticalSection // throws an exception we can keep from // calling the critical_section destructor // on unitilized data, or it could be done with a flag struct XMLTOOL_DLLLOCAL critical_section_data { CRITICAL_SECTION cs; critical_section_data(){ InitializeCriticalSection(&cs); } }; class XMLTOOL_DLLLOCAL critical_section { private: critical_section_data cse; public: critical_section(){} ~critical_section(){ DeleteCriticalSection (&cse.cs); } void enter(void) { EnterCriticalSection(&cse.cs); } void leave(void) { LeaveCriticalSection(&cse.cs); } }; // hold a critical section over the lifetime of this object // used to make a stack variable that unlocks automaticly // on return/throw class XMLTOOL_DLLLOCAL with_crit_section { private: critical_section& cs; public: with_crit_section(critical_section& acs):cs(acs){ cs.enter(); } ~with_crit_section(){ cs.leave(); } }; class XMLTOOL_DLLLOCAL ThreadImpl : public Thread { private: HANDLE thread_id; public: ThreadImpl(void* (*start_routine)(void*), void* arg, size_t stacksize) : thread_id(0) { thread_id=CreateThread( 0, // security attributes stacksize, // 0 just means the default size anyway (LPTHREAD_START_ROUTINE ) start_routine, arg, 0, // flags, default is don't create suspended which is what we want 0); if (thread_id==0) { map_windows_error_status_to_pthreads(); throw ThreadingException("Thread creation failed."); } } ~ThreadImpl() { (void)detach(); } int detach() { if (thread_id==0) return THREAD_ERROR; int rc=map_windows_error_status_to_pthreads(CloseHandle(thread_id)); thread_id=0; return rc; } int join(void** thread_return) { if (thread_id==0) return THREAD_ERROR; if (thread_return!=0) *thread_return=0; int rc=WaitForSingleObject(thread_id,INFINITE); switch(rc) { case WAIT_OBJECT_0: if (thread_return) map_windows_error_status_to_pthreads(GetExitCodeThread(thread_id,(unsigned long*)thread_return)); default: return THREAD_ERROR; } return 0; } int kill(int signo) { if (thread_id==0) return THREAD_ERROR; return map_windows_error_status_to_pthreads(TerminateThread(thread_id,signo)); } }; class XMLTOOL_DLLLOCAL MutexImpl : public Mutex { private: CRITICAL_SECTION mhandle; public: MutexImpl() { InitializeCriticalSection(&mhandle); } ~MutexImpl() { DeleteCriticalSection(&mhandle); } int lock() { EnterCriticalSection(&mhandle); return 0; } int unlock() { LeaveCriticalSection(&mhandle); return 0; } }; class XMLTOOL_DLLLOCAL CondWaitImpl : public CondWait { private: HANDLE cond; public: CondWaitImpl() : cond(CreateEvent(0,false,false,0)) { if(cond==0) { map_windows_error_status_to_pthreads(); throw ThreadingException("Event creation failed."); } }; ~CondWaitImpl() { if((cond!=0) && (!CloseHandle(cond))) map_windows_error_status_to_pthreads(); } int wait(Mutex* mutex) { return timedwait(mutex,INFINITE); } int signal() { if(!SetEvent(cond)) return map_windows_error_status_to_pthreads(); return 0; } int broadcast() { throw ThreadingException("Broadcast not implemented on Win32 platforms."); } // wait for myself to signal and this mutex or the timeout int timedwait(Mutex* mutex, int delay_seconds) { int rc=mutex->unlock(); if(rc!=0) return rc; int delay_ms=delay_seconds; if(delay_seconds!=INFINITE) delay_ms*=1000; rc=WaitForSingleObject(cond,delay_ms); int rc2=mutex->lock(); if(rc2!=0) return rc2; switch(rc) { case WAIT_ABANDONED: case WAIT_OBJECT_0: case WAIT_TIMEOUT: return 0; default: return map_windows_error_status_to_pthreads(); } return 0; } }; class XMLTOOL_DLLLOCAL RWLockImpl : public RWLock { private: // used to protect read or write to the data below critical_section cs; // event handle threads wait on when the lock they want is busy // normally set to signaled all the time, if some thread can't get what // they want they reset it and sleep. on releasing a lock set it to // signaled if someone may have wanted what you just released HANDLE wake_waiters; // number of threads holding a read lock int num_readers; // true iff there a writer has our lock bool have_writer; public: RWLockImpl() : wake_waiters(0), num_readers(0), have_writer(true) { with_crit_section acs(cs); wake_waiters=CreateEvent(0,true,true,0); have_writer=false; if (wake_waiters==0) { map_windows_error_status_to_pthreads(); throw ThreadingException("Event creation for shared lock failed."); } } ~RWLockImpl() { with_crit_section acs(cs); if ((wake_waiters!=0) && (!CloseHandle(wake_waiters))) map_windows_error_status_to_pthreads(); } int rdlock() { while(1) { // wait for the lock maybe being availible // we will find out for sure inside the critical section if (WaitForSingleObject(wake_waiters,INFINITE)!=WAIT_OBJECT_0) return map_windows_error_status_to_pthreads(); with_crit_section alock(cs); // invariant not locked for reading and writing if ((num_readers!=0) && (have_writer)) return THREAD_ERROR; // if no writer we can join any existing readers if (!have_writer) { num_readers++; return 0; } // have a writer, mark the synchronization object // so everyone waits, when the writer unlocks it will wake us if (!ResetEvent(wake_waiters)) return map_windows_error_status_to_pthreads(); } return THREAD_ERROR; } int wrlock() { while(1) { // wait for the lock maybe being availible // we will find out for sure inside the critical section if (WaitForSingleObject(wake_waiters,INFINITE)!=WAIT_OBJECT_0) return map_windows_error_status_to_pthreads(); with_crit_section bla(cs); // invariant not locked for reading and writing if ((num_readers!=0) && (have_writer)) return THREAD_ERROR; // if no writer and no readers we can become the writer if ((num_readers==0) && (!have_writer)) { have_writer=true; return 0; } // lock is busy, the unlocker will wake us if (!ResetEvent(wake_waiters)) return map_windows_error_status_to_pthreads(); } return THREAD_ERROR; } int unlock() { with_crit_section mumble(cs); // invariant not locked for reading and writing if ((num_readers!=0) && (have_writer)) return THREAD_ERROR; // error if nothing locked if ((num_readers==0) && (!have_writer)) return THREAD_ERROR; // if there was a writer it has to be us so unlock write lock have_writer=false; // if there where any reades there is one less now if(num_readers>0) num_readers--; // if no readers left wake up any readers/writers waiting // to have a go at it if (num_readers==0) if (!SetEvent(wake_waiters)) return map_windows_error_status_to_pthreads(); return 0; } }; typedef void (*destroy_hook_type)(void*); class XMLTOOL_DLLLOCAL ThreadKeyImpl : public ThreadKey { private: destroy_hook_type destroy_hook; DWORD key; static critical_section cs; static set m_keys; friend class ThreadKey; public: ThreadKeyImpl(void (*destroy_fcn)(void*)) : destroy_hook(destroy_fcn) { key=TlsAlloc(); if (destroy_fcn) { with_crit_section wcs(cs); m_keys.insert(this); } }; virtual ~ThreadKeyImpl() { if (destroy_hook) { destroy_hook(TlsGetValue(key)); with_crit_section wcs(cs); m_keys.erase(this); } TlsFree(key); } int setData(void* data) { TlsSetValue(key, data); return 0; } void* getData() const { return TlsGetValue(key); } void onDetach() const { if (destroy_hook) { destroy_hook(TlsGetValue(key)); TlsSetValue(key, nullptr); } } }; }; // // public "static" creation functions // Thread* Thread::create(void* (*start_routine)(void*), void* arg, size_t stacksize) { return new ThreadImpl(start_routine, arg, stacksize); } void Thread::exit(void* return_val) { ExitThread((DWORD)return_val); } void Thread::sleep(int seconds) { Sleep(seconds * 1000); } Mutex * Mutex::create() { return new MutexImpl(); } CondWait * CondWait::create() { return new CondWaitImpl(); } RWLock * RWLock::create() { return new RWLockImpl(); } critical_section ThreadKeyImpl::cs; set ThreadKeyImpl::m_keys; ThreadKey* ThreadKey::create (void (*destroy_fcn)(void*)) { return new ThreadKeyImpl(destroy_fcn); } void ThreadKey::onDetach() { with_crit_section wcs(ThreadKeyImpl::cs); for_each(ThreadKeyImpl::m_keys.begin(), ThreadKeyImpl::m_keys.end(), mem_fun(&ThreadKeyImpl::onDetach)); } xmltooling-1.5.3/xmltooling/soap/impl/000755 001751 001751 00000000000 12157725415 021212 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltooling/soap/SOAP.h000644 001751 001751 00000010441 12003305017 021142 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/soap/SOAP.h * * XMLObjects representing SOAP content */ #ifndef __xmltooling_soap_h__ #define __xmltooling_soap_h__ #include #include #include /** * Macro for declaring SOAP builders. * * @param cname name of class being built */ #define DECL_SOAP11OBJECTBUILDER(cname) \ DECL_XMLOBJECTBUILDER(XMLTOOL_API,cname,xmlconstants::SOAP11ENV_NS,xmlconstants::SOAP11ENV_PREFIX) /** * @namespace soap11 * Namespace for SOAP 1.1 schema objects */ namespace soap11 { DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,Faultstring,String,SOAP 1.1 faultstring element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,Faultactor,Actor,SOAP 1.1 faultactor element); BEGIN_XMLOBJECT(XMLTOOL_API,Faultcode,xmltooling::XMLObject,SOAP 1.1 faultcode element); /** Gets the QName content of the element. */ virtual const xmltooling::QName* getCode() const=0; /** Sets the QName content of the element. */ virtual void setCode(const xmltooling::QName* qname)=0; /** Client Fault code. **/ static xmltooling::QName CLIENT; /** Server Fault code. **/ static xmltooling::QName SERVER; /** MustUnderstand Fault code. **/ static xmltooling::QName MUSTUNDERSTAND; /** Version Mismatch Fault code. **/ static xmltooling::QName VERSIONMISMATCH; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,Detail,xmltooling::ElementProxy,SOAP 1.1 detail element); /** detail (type) local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,Fault,xmltooling::XMLObject,SOAP 1.1 Fault element); DECL_TYPED_CHILD(Faultcode); DECL_TYPED_CHILD(Faultstring); DECL_TYPED_CHILD(Faultactor); DECL_TYPED_CHILD(Detail); /** Fault (type) local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,Body,xmltooling::ElementProxy,SOAP 1.1 Body element); /** encodingStyle attribute name */ static const XMLCh ENCODINGSTYLE_ATTRIB_NAME[]; /** Body (type) local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,Header,xmltooling::ElementProxy,SOAP 1.1 Header element); /** Actor header block attribute name */ static const XMLCh ACTOR_ATTRIB_NAME[]; /** mustUnderstand header block attribute name */ static const XMLCh MUSTUNDERSTAND_ATTRIB_NAME[]; /** Header (type) local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,Envelope,xmltooling::AttributeExtensibleXMLObject,SOAP 1.1 Envelope element); DECL_TYPED_CHILD(Header); DECL_TYPED_CHILD(Body); /** Envelope (type) local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; DECL_SOAP11OBJECTBUILDER(Body); DECL_SOAP11OBJECTBUILDER(Envelope); DECL_SOAP11OBJECTBUILDER(Fault); DECL_SOAP11OBJECTBUILDER(Header); DECL_XMLOBJECTBUILDER(XMLTOOL_API,Detail,nullptr,nullptr); DECL_XMLOBJECTBUILDER(XMLTOOL_API,Faultactor,nullptr,nullptr); DECL_XMLOBJECTBUILDER(XMLTOOL_API,Faultcode,nullptr,nullptr); DECL_XMLOBJECTBUILDER(XMLTOOL_API,Faultstring,nullptr,nullptr); /** * Registers builders and validators for SOAP 1.1 classes into the runtime. */ void XMLTOOL_API registerSOAPClasses(); }; #endif /* __xmltooling_soap_h__ */ xmltooling-1.5.3/xmltooling/soap/SOAPClient.h000644 001751 001751 00000007766 12003305017 022321 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/soap/SOAPClient.h * * Implements SOAP 1.1 messaging over a transport. */ #ifndef __xmltooling_soap11client_h__ #define __xmltooling_soap11client_h__ #include namespace soap11 { class XMLTOOL_API Envelope; class XMLTOOL_API Fault; /** * Implements SOAP 1.1 messaging over a transport. * * In the abstract, this can be a one-way exchange, or use asynchronous * transports, but this is mostly theoretical at this point. */ class XMLTOOL_API SOAPClient { MAKE_NONCOPYABLE(SOAPClient); public: /** * Constructor * * @param validate true iff schema validation should be used */ SOAPClient(bool validate=false); virtual ~SOAPClient(); /** * Controls schema validation of incoming XML messages. * This is separate from other forms of programmatic validation of objects, * but can detect a much wider range of syntax errors. * * @param validate true iff the client should use a validating XML parser */ void setValidating(bool validate=true); /** * Sends the supplied envelope to the identified recipient/endpoint. * *

The client object will instantiate a transport layer object * appropriate for the endpoint URL provided and supply it to the * prepareTransport() method below. * *

To authenticate the server end, the transport layer object * exposes a method to load a TrustEngine and CredentialResolver * in a subclass-specific version of the prepareTransport() method. * * @param env SOAP envelope to send * @param addr addressing information */ virtual void send(const Envelope& env, const xmltooling::SOAPTransport::Address& addr); /** * Returns the response message, if any. As long as a response is * "expected" but not available, nullptr will be returned. If no response * will be forthcoming, an exception is raised. * *

The caller is responsible for freeing the returned envelope. */ virtual Envelope* receive(); /** * Resets the object for another call. */ virtual void reset(); protected: /** * Allows client to supply transport-layer settings prior to sending message. * * @param transport reference to transport layer */ virtual void prepareTransport(xmltooling::SOAPTransport& transport); /** * Handling of SOAP faults. * * @param fault SOAP Fault received by client * @return true iff the Fault should be treated as a fatal error */ virtual bool handleFault(const soap11::Fault& fault); /** Flag controlling schema validation. */ bool m_validate; /** Holds response until retrieved by caller. */ xmltooling::SOAPTransport* m_transport; }; }; #endif /* __xmltooling_soap11client_h__ */ xmltooling-1.5.3/xmltooling/soap/SOAPTransport.h000644 001751 001751 00000022074 12003305017 023064 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/soap/SOAPTransport.h * * Encapsulates a transport layer protocol for sending/receiving messages. */ #ifndef __xmltooling_soaptrans_h__ #define __xmltooling_soaptrans_h__ #include #include #include namespace xmltooling { class XMLTOOL_API Credential; class XMLTOOL_API CredentialCriteria; class XMLTOOL_API CredentialResolver; class XMLTOOL_API X509TrustEngine; /** * Encapsulates a transport layer protocol for sending/receiving messages. * * Most of the methods are const, meaning they don't affect the transport * layer until the data is sent. */ class XMLTOOL_API SOAPTransport { MAKE_NONCOPYABLE(SOAPTransport); protected: SOAPTransport(); public: virtual ~SOAPTransport(); /** * A simple structure to capture SOAP addressing information. */ struct XMLTOOL_API Address { /** * Constructor. * * @param from name of sender * @param to name of recipient * @param endpoint endpoint URL */ Address(const char* from, const char* to, const char* endpoint) : m_from(from), m_to(to), m_endpoint(endpoint) { } /** Name of sender. */ const char* m_from; /** Name of recipient. */ const char* m_to; /** Endpoint URL. */ const char* m_endpoint; }; /** * Indicates whether transport provides confidentiality. * * @return true iff transport layer provides confidentiality */ virtual bool isConfidential() const=0; /** * Sets the connection timeout. * * @param timeout time to wait for connection to server in seconds, or -1 for no timeout * @return true iff the transport supports connection timeouts */ virtual bool setConnectTimeout(long timeout)=0; /** * Sets the request timeout. * * @param timeout time to wait for a response in seconds, or -1 for no timeout * @return true iff the transport supports request/response timeouts */ virtual bool setTimeout(long timeout)=0; /** * Common types of transport authentication that may be supported. */ enum transport_auth_t { transport_auth_none = 0, transport_auth_basic = 1, transport_auth_digest = 2, transport_auth_ntlm = 3, transport_auth_gss = 4 }; /** * Sets a particular form of transport authentication and credentials. * * @param authType type of transport authentication to use * @param username username for transport authentication * @param password simple password/credential for transport authentication * @return true iff the transport supports the indicated form of authentication */ virtual bool setAuth(transport_auth_t authType, const char* username=nullptr, const char* password=nullptr)=0; /** * Determines whether TLS/SSL connections include a check of the server's certificate * against the expected hostname or address. Defaults to true, and has no effect for * insecure protocols. * * @param verify true iff the hostname should be verified against the server's certificate * @return true iff the transport supports hostname verification */ virtual bool setVerifyHost(bool verify)=0; #ifndef XMLTOOLING_NO_XMLSEC /** * Supplies transport credentials. * *

The lifetime of the credential must be longer than the lifetime of this object. * * @param credential a Credential instance, or nullptr * @return true iff the transport supports the use of the Credential */ virtual bool setCredential(const Credential* credential=nullptr)=0; /** * Provides an X509TrustEngine to the transport to authenticate the transport peer. * The lifetime of the engine must be longer than the lifetime of this object. * * @param trustEngine an X509TrustEngine instance, or nullptr * @param credResolver a CredentialResolver to supply the peer's trusted credentials, or nullptr * @param criteria optional criteria for selecting peer credentials * @param mandatory flag controls whether message is sent at all if the * transport isn't authenticated using the TrustEngine * @return true iff the transport supports the use of a TrustEngine */ virtual bool setTrustEngine( const X509TrustEngine* trustEngine=nullptr, const CredentialResolver* credResolver=nullptr, CredentialCriteria* criteria=nullptr, bool mandatory=true )=0; #endif /** * Installs (or clears) a pointer to an object used for cache management of the * content being accessed. The lifetime of the object must be longer than the lifetime * of this object. * * @param cacheTag optional pointer to string used for cache management */ virtual bool setCacheTag(std::string* cacheTag=nullptr); /** * Sets an implementation-specific transport provider option. * *

Requires knowledge of the underlying SOAPTransport implementation. * Without the proper knowledge and inputs, crashes may result. * * @param provider name of the SOAPTransport class the caller believes is in use * @param option implementation-specific string containing the option to set * @param value implementation- and option-specific string to use * @return true iff the transport supports the option and value supplied */ virtual bool setProviderOption(const char* provider, const char* option, const char* value); /** * Sends a stream of data over the transport. The function may return without * having received any data, depending on the nature of the transport. * *

If the stream is empty, a request may be issued with no body if the transport * supports that feature. * * @param in input stream to send */ virtual void send(std::istream& in)=0; /** * Sends an optional stream of data over the transport. The function may return without * having received any data, depending on the nature of the transport. * *

If the parameter is omitted, a request may be issued with no body if the transport * supports that feature. * * @param in input stream to send */ virtual void send(std::istream* in=nullptr); /** * Returns reference to response stream. The resulting stream must be * checked directly to determine whether data is available. * * @return reference to a stream containing the response, if any */ virtual std::istream& receive()=0; /** * Returns result of authenticating transport peer. * * @return true iff TrustEngine or other mechanism successfully authenticated the peer */ virtual bool isAuthenticated() const=0; /** * Returns the MIME type of the response, if any. * * @return MIME type of response, or an empty string */ virtual std::string getContentType() const=0; /** * Returns the status code of the response. * * @return transport status code, or 0 if unknown */ virtual long getStatusCode() const; }; /** * Registers SOAPTransport classes into the runtime. */ void XMLTOOL_API registerSOAPTransports(); /** * Notifies transport infrastructure to initialize. */ void XMLTOOL_API initSOAPTransports(); /** * Notifies transport infrastructure to shutdown. */ void XMLTOOL_API termSOAPTransports(); }; #endif /* __xmltooling_soaptrans_h__ */ xmltooling-1.5.3/xmltooling/soap/HTTPSOAPTransport.h000644 001751 001751 00000005315 12003305017 023563 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/soap/HTTPSOAPTransport.h * * Encapsulates HTTP SOAP transport layer. */ #ifndef __xmltooling_httpsoaptrans_h__ #define __xmltooling_httpsoaptrans_h__ #include #include #include namespace xmltooling { /** * Encapsulates HTTP SOAP transport layer. */ class XMLTOOL_API HTTPSOAPTransport : public virtual SOAPTransport { protected: HTTPSOAPTransport(); public: virtual ~HTTPSOAPTransport(); /** * Indicate whether content should be sent using HTTP 1.1 and * Chunked Transport-Encoding, or buffered and sent with a Content-Length. * * @param chunked true iff chunked encoding should be used * @return true iff the property is successfully set */ virtual bool useChunkedEncoding(bool chunked=true)=0; /** * Sets an outgoing HTTP request header. * * @param name name of header, without the colon separator * @param value header value to send * @return true iff the header is successfully set */ virtual bool setRequestHeader(const char* name, const char* value)=0; /** * Controls redirect behavior. * * @param follow true iff Location-based redirects should be honored * @param maxRedirs maximum number of redirects to permit */ virtual bool followRedirects(bool follow, unsigned int maxRedirs); /** * Returns the values of an HTTP response header. * * @param name name of header, without the colon separator * @return reference to array of header values */ virtual const std::vector& getResponseHeader(const char* name) const=0; }; }; #endif /* __xmltooling_httpsoaptrans_h__ */ xmltooling-1.5.3/xmltooling/soap/OpenSSLSOAPTransport.h000644 001751 001751 00000004405 12003305017 024266 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/soap/OpenSSLSOAPTransport.h * * Encapsulates OpenSSL-capable SOAP transport layer. */ #if !defined(__xmltooling_opensslsoaptrans_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_opensslsoaptrans_h__ #include #include namespace xmltooling { /** * Encapsulates OpenSSL-capable SOAP transport layer. */ class XMLTOOL_API OpenSSLSOAPTransport : public virtual SOAPTransport { protected: OpenSSLSOAPTransport(); public: virtual ~OpenSSLSOAPTransport(); /** OpenSSL context callback for manipulating credentials and validation behavior. */ typedef bool (*ssl_ctx_callback_fn)(OpenSSLSOAPTransport* transport, SSL_CTX* ssl_ctx, void* userptr); /** * Sets a callback function to invoke against the SSL_CTX before the handshake. * * @param fn callback function * @param userptr a caller-supplied value to pass to the callback function * @return true iff the callback was set */ virtual bool setSSLCallback(ssl_ctx_callback_fn fn, void* userptr=nullptr)=0; /** * Sets indicator that the transport peer has been authenticated. * * @param auth flag to set */ virtual void setAuthenticated(bool auth)=0; }; }; #endif /* __xmltooling_opensslsoaptrans_h__ */ xmltooling-1.5.3/xmltooling/soap/impl/SOAPClient.cpp000644 001751 001751 00000014034 12061244426 023611 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * SOAPClient.cpp * * Implements SOAP 1.1 messaging over a transport. */ #include "internal.h" #include "exceptions.h" #include "logging.h" #include "soap/HTTPSOAPTransport.h" #include "soap/OpenSSLSOAPTransport.h" #include "soap/SOAP.h" #include "soap/SOAPClient.h" #include "util/XMLHelper.h" #include "validation/ValidatorSuite.h" #include using namespace soap11; using namespace xmltooling::logging; using namespace xmltooling; using namespace xercesc; using namespace std; #if !defined(XMLTOOLING_NO_XMLSEC) && !defined(XMLTOOLING_LITE) namespace xmltooling { PluginManager::Factory CURLSOAPTransportFactory; }; #endif void xmltooling::registerSOAPTransports() { #if !defined(XMLTOOLING_NO_XMLSEC) && !defined(XMLTOOLING_LITE) XMLToolingConfig& conf=XMLToolingConfig::getConfig(); conf.SOAPTransportManager.registerFactory("http", CURLSOAPTransportFactory); conf.SOAPTransportManager.registerFactory("https", CURLSOAPTransportFactory); #endif } #ifdef XMLTOOLING_NO_XMLSEC void xmltooling::initSOAPTransports() { } void xmltooling::termSOAPTransports() { } #endif SOAPTransport::SOAPTransport() { } SOAPTransport::~SOAPTransport() { } bool SOAPTransport::setProviderOption(const char* provider, const char* option, const char* value) { return false; } bool SOAPTransport::setCacheTag(string* cacheTag) { return false; } void SOAPTransport::send(istream* in) { if (!in) throw IOException("SOAP transport does not support an empty request body."); return send(*in); } long SOAPTransport::getStatusCode() const { return 0; } HTTPSOAPTransport::HTTPSOAPTransport() { } HTTPSOAPTransport::~HTTPSOAPTransport() { } bool HTTPSOAPTransport::followRedirects(bool follow, unsigned int maxRedirs) { return false; } #ifndef XMLTOOLING_NO_XMLSEC OpenSSLSOAPTransport::OpenSSLSOAPTransport() { } OpenSSLSOAPTransport::~OpenSSLSOAPTransport() { } #endif SOAPClient::SOAPClient(bool validate) : m_validate(validate), m_transport(nullptr) { } SOAPClient::~SOAPClient() { delete m_transport; } void SOAPClient::setValidating(bool validate) { m_validate = validate; } void SOAPClient::reset() { delete m_transport; m_transport=nullptr; } void SOAPClient::send(const Envelope& env, const SOAPTransport::Address& addr) { // Prepare a transport object. const char* pch = addr.m_endpoint ? strchr(addr.m_endpoint,':') : nullptr; if (!pch) throw IOException("SOAP endpoint was not a URL."); string scheme(addr.m_endpoint, pch-addr.m_endpoint); m_transport = XMLToolingConfig::getConfig().SOAPTransportManager.newPlugin(scheme.c_str(), addr); prepareTransport(*m_transport); Category& log = Category::getInstance(XMLTOOLING_LOGCAT".SOAPClient"); if (log.isDebugEnabled()) log.debugStream() << "marshalled envelope:\n" << env << logging::eol; // Serialize envelope. stringstream s; s << env; // Send to peer. m_transport->send(s); } Envelope* SOAPClient::receive() { if (!m_transport) throw IOException("No call is active."); // If we can get the stream, then the call is still active. istream& out = m_transport->receive(); if (!out) return nullptr; // nothing yet // Check content type. string s = m_transport->getContentType(); if (s.find("text/xml") == string::npos) throw IOException("Incorrect content type ($1) for SOAP response.", params(1,s.c_str() ? s.c_str() : "none")); // Parse and bind the document into an XMLObject. DOMDocument* doc = (m_validate ? XMLToolingConfig::getConfig().getValidatingParser() : XMLToolingConfig::getConfig().getParser()).parse(out); XercesJanitor janitor(doc); Category& log = Category::getInstance(XMLTOOLING_LOGCAT".SOAPClient"); if (log.isDebugEnabled()) { string buf; XMLHelper::serialize(doc->getDocumentElement(), buf); log.debugStream() << "received XML:\n" << buf << logging::eol; } auto_ptr xmlObject(XMLObjectBuilder::buildOneFromElement(doc->getDocumentElement(), true)); janitor.release(); SchemaValidators.validate(xmlObject.get()); Envelope* env = dynamic_cast(xmlObject.get()); if (!env) throw IOException("Response was not a SOAP 1.1 Envelope."); Body* body = env->getBody(); if (body && body->hasChildren()) { //Check for a Fault. const Fault* fault = dynamic_cast(body->getUnknownXMLObjects().front()); if (fault && handleFault(*fault)) throw IOException("SOAP client detected a Fault."); } xmlObject.release(); return env; } void SOAPClient::prepareTransport(SOAPTransport& transport) { } bool SOAPClient::handleFault(const Fault& fault) { const xmltooling::QName* code = (fault.getFaultcode() ? fault.getFaultcode()->getCode() : nullptr); auto_ptr_char str((fault.getFaultstring() ? fault.getFaultstring()->getString() : nullptr)); Category::getInstance(XMLTOOLING_LOGCAT".SOAPClient").error( "SOAP client detected a Fault: (%s) (%s)", (code ? code->toString().c_str() : "no code"), (str.get() ? str.get() : "no message") ); return true; } xmltooling-1.5.3/xmltooling/soap/impl/SOAPImpl.cpp000644 001751 001751 00000033533 12003305016 023266 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * SOAPImpl.cpp * * Implementation classes for SOAP 1.1 schema. */ #include "internal.h" #include "AbstractAttributeExtensibleXMLObject.h" #include "AbstractComplexElement.h" #include "AbstractSimpleElement.h" #include "exceptions.h" #include "io/AbstractXMLObjectMarshaller.h" #include "io/AbstractXMLObjectUnmarshaller.h" #include "soap/SOAP.h" #include "util/XMLHelper.h" #include #include #include #include using namespace soap11; using namespace xmltooling; using namespace xercesc; using namespace std; using xmlconstants::SOAP11ENV_NS; using xmlconstants::SOAP11ENV_PREFIX; #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif namespace { DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,Faultstring); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,Faultactor); class XMLTOOL_DLLLOCAL FaultcodeImpl : public virtual Faultcode, public AbstractSimpleElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { mutable xmltooling::QName* m_qname; public: virtual ~FaultcodeImpl() { delete m_qname; } FaultcodeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_qname(nullptr) { } FaultcodeImpl(const FaultcodeImpl& src) : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src), m_qname(nullptr) { IMPL_CLONE_ATTRIB(Code); } const xmltooling::QName* getCode() const { if (!m_qname && getDOM() && getDOM()->getTextContent()) { m_qname = XMLHelper::getNodeValueAsQName(getDOM()); } return m_qname; } void setCode(const xmltooling::QName* qname) { m_qname=prepareForAssignment(m_qname,qname); if (m_qname) { auto_ptr_XMLCh temp(m_qname->toString().c_str()); setTextContent(temp.get()); } else { setTextContent(nullptr); } } IMPL_XMLOBJECT_CLONE(Faultcode); }; class XMLTOOL_DLLLOCAL DetailImpl : public virtual Detail, public AbstractAttributeExtensibleXMLObject, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { public: virtual ~DetailImpl() {} DetailImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { } DetailImpl(const DetailImpl& src) : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { IMPL_CLONE_XMLOBJECT_CHILDREN(UnknownXMLObject); } IMPL_XMLOBJECT_CLONE(Detail); IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject, m_children.end()); protected: void marshallAttributes(DOMElement* domElement) const { marshallExtensionAttributes(domElement); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { getUnknownXMLObjects().push_back(childXMLObject); } void processAttribute(const DOMAttr* attribute) { unmarshallExtensionAttribute(attribute); } }; class XMLTOOL_DLLLOCAL FaultImpl : public virtual Fault, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { void init() { m_Faultcode=nullptr; m_Faultstring=nullptr; m_Faultactor=nullptr; m_Detail=nullptr; m_children.push_back(nullptr); m_children.push_back(nullptr); m_children.push_back(nullptr); m_children.push_back(nullptr); m_pos_Faultcode=m_children.begin(); m_pos_Faultstring=m_pos_Faultcode; ++m_pos_Faultstring; m_pos_Faultactor=m_pos_Faultstring; ++m_pos_Faultactor; m_pos_Detail=m_pos_Faultactor; ++m_pos_Detail; } protected: FaultImpl() { init(); } public: virtual ~FaultImpl() {} FaultImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { init(); } FaultImpl(const FaultImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { init(); IMPL_CLONE_TYPED_CHILD(Faultcode); IMPL_CLONE_TYPED_CHILD(Faultstring); IMPL_CLONE_TYPED_CHILD(Faultactor); IMPL_CLONE_TYPED_CHILD(Detail); } IMPL_XMLOBJECT_CLONE(Fault); IMPL_TYPED_CHILD(Faultcode); IMPL_TYPED_CHILD(Faultstring); IMPL_TYPED_CHILD(Faultactor); IMPL_TYPED_CHILD(Detail); protected: void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_CHILD(Faultcode,nullptr,false); PROC_TYPED_CHILD(Faultstring,nullptr,false); PROC_TYPED_CHILD(Faultactor,nullptr,false); PROC_TYPED_CHILD(Detail,nullptr,false); AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } }; class XMLTOOL_DLLLOCAL BodyImpl : public virtual Body, public AbstractAttributeExtensibleXMLObject, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { public: virtual ~BodyImpl() { } BodyImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { } BodyImpl(const BodyImpl& src) : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { IMPL_CLONE_XMLOBJECT_CHILDREN(UnknownXMLObject); } IMPL_XMLOBJECT_CLONE(Body); IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject, m_children.end()); protected: void marshallAttributes(DOMElement* domElement) const { marshallExtensionAttributes(domElement); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { getUnknownXMLObjects().push_back(childXMLObject); } void processAttribute(const DOMAttr* attribute) { unmarshallExtensionAttribute(attribute); } }; class XMLTOOL_DLLLOCAL HeaderImpl : public virtual Header, public AbstractAttributeExtensibleXMLObject, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { public: virtual ~HeaderImpl() { } HeaderImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { } HeaderImpl(const HeaderImpl& src) : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { IMPL_CLONE_XMLOBJECT_CHILDREN(UnknownXMLObject); } IMPL_XMLOBJECT_CLONE(Header); IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject, m_children.end()); protected: void marshallAttributes(DOMElement* domElement) const { marshallExtensionAttributes(domElement); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { getUnknownXMLObjects().push_back(childXMLObject); } void processAttribute(const DOMAttr* attribute) { unmarshallExtensionAttribute(attribute); } }; class XMLTOOL_DLLLOCAL EnvelopeImpl : public virtual Envelope, public AbstractAttributeExtensibleXMLObject, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { void init() { m_Header=nullptr; m_Body=nullptr; m_children.push_back(nullptr); m_children.push_back(nullptr); m_pos_Header=m_children.begin(); m_pos_Body=m_pos_Header; ++m_pos_Body; } public: virtual ~EnvelopeImpl() {} EnvelopeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { init(); } EnvelopeImpl(const EnvelopeImpl& src) : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { init(); IMPL_CLONE_TYPED_CHILD(Header); IMPL_CLONE_TYPED_CHILD(Body); } IMPL_XMLOBJECT_CLONE(Envelope); IMPL_TYPED_CHILD(Header); IMPL_TYPED_CHILD(Body); protected: void marshallAttributes(DOMElement* domElement) const { marshallExtensionAttributes(domElement); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_CHILD(Header,SOAP11ENV_NS,false); PROC_TYPED_CHILD(Body,SOAP11ENV_NS,false); AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } void processAttribute(const DOMAttr* attribute) { unmarshallExtensionAttribute(attribute); } }; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif // Builder Implementations IMPL_XMLOBJECTBUILDER(Body); IMPL_XMLOBJECTBUILDER(Detail); IMPL_XMLOBJECTBUILDER(Envelope); IMPL_XMLOBJECTBUILDER(Fault); IMPL_XMLOBJECTBUILDER(Faultactor); IMPL_XMLOBJECTBUILDER(Faultcode); IMPL_XMLOBJECTBUILDER(Faultstring); IMPL_XMLOBJECTBUILDER(Header); // Unicode literals const XMLCh Body::LOCAL_NAME[] = UNICODE_LITERAL_4(B,o,d,y); const XMLCh Body::TYPE_NAME[] = UNICODE_LITERAL_4(B,o,d,y); const XMLCh Body::ENCODINGSTYLE_ATTRIB_NAME[] = UNICODE_LITERAL_13(e,n,c,o,d,i,n,g,S,t,y,l,e); const XMLCh Detail::LOCAL_NAME[] = UNICODE_LITERAL_6(d,e,t,a,i,l); const XMLCh Detail::TYPE_NAME[] = UNICODE_LITERAL_6(d,e,t,a,i,l); const XMLCh Envelope::LOCAL_NAME[] = UNICODE_LITERAL_8(E,n,v,e,l,o,p,e); const XMLCh Envelope::TYPE_NAME[] = UNICODE_LITERAL_8(E,n,v,e,l,o,p,e); const XMLCh Fault::LOCAL_NAME[] = UNICODE_LITERAL_5(F,a,u,l,t); const XMLCh Fault::TYPE_NAME[] = UNICODE_LITERAL_5(F,a,u,l,t); const XMLCh Faultactor::LOCAL_NAME[] = UNICODE_LITERAL_10(f,a,u,l,t,a,c,t,o,r); const XMLCh Faultcode::LOCAL_NAME[] = UNICODE_LITERAL_9(f,a,u,l,t,c,o,d,e); const XMLCh Faultstring::LOCAL_NAME[] = UNICODE_LITERAL_11(f,a,u,l,t,s,t,r,i,n,g); const XMLCh Header::LOCAL_NAME[] = UNICODE_LITERAL_6(H,e,a,d,e,r); const XMLCh Header::TYPE_NAME[] = UNICODE_LITERAL_6(H,e,a,d,e,r); const XMLCh Header::ACTOR_ATTRIB_NAME[] = UNICODE_LITERAL_5(a,c,t,o,r); const XMLCh Header::MUSTUNDERSTAND_ATTRIB_NAME[] = UNICODE_LITERAL_14(m,u,s,t,U,n,d,e,r,s,t,a,n,d); static const XMLCh _CLIENT[] = UNICODE_LITERAL_6(C,l,i,e,n,t); static const XMLCh _SERVER[] = UNICODE_LITERAL_6(S,e,r,v,e,r); static const XMLCh _MUSTUNDERSTAND[] = UNICODE_LITERAL_14(M,u,s,t,U,n,d,e,r,s,t,a,n,d); static const XMLCh _VERSIONMISMATCH[] = UNICODE_LITERAL_15(V,e,r,s,i,o,n,M,i,s,m,a,t,c,h); xmltooling::QName Faultcode::CLIENT(SOAP11ENV_NS,_CLIENT,SOAP11ENV_PREFIX); xmltooling::QName Faultcode::SERVER(SOAP11ENV_NS,_SERVER,SOAP11ENV_PREFIX); xmltooling::QName Faultcode::MUSTUNDERSTAND(SOAP11ENV_NS,_MUSTUNDERSTAND,SOAP11ENV_PREFIX); xmltooling::QName Faultcode::VERSIONMISMATCH(SOAP11ENV_NS,_VERSIONMISMATCH,SOAP11ENV_PREFIX); xmltooling-1.5.3/xmltooling/soap/impl/SOAPSchemaValidators.cpp000644 001751 001751 00000006177 12003305016 025622 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * SOAPSchemaValidators.cpp * * Schema validators for SOAP schema. */ #include "internal.h" #include "exceptions.h" #include "soap/SOAP.h" #include "validation/Validator.h" #include "validation/ValidatorSuite.h" using namespace soap11; using namespace xmltooling; using namespace std; using xmlconstants::SOAP11ENV_NS; namespace { XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,Faultstring); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,Faultactor); BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,Faultcode); XMLOBJECTVALIDATOR_REQUIRE(Faultcode,Code); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,Fault); XMLOBJECTVALIDATOR_REQUIRE(Fault,Faultcode); XMLOBJECTVALIDATOR_REQUIRE(Fault,Faultstring); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,Envelope); XMLOBJECTVALIDATOR_REQUIRE(Envelope,Body); END_XMLOBJECTVALIDATOR; }; #define REGISTER_ELEMENT(namespaceURI,cname) \ q=QName(namespaceURI,cname::LOCAL_NAME); \ XMLObjectBuilder::registerBuilder(q,new cname##Builder()); \ SchemaValidators.registerValidator(q,new cname##SchemaValidator()) #define REGISTER_TYPE(namespaceURI,cname) \ q=QName(namespaceURI,cname::TYPE_NAME); \ XMLObjectBuilder::registerBuilder(q,new cname##Builder()); \ SchemaValidators.registerValidator(q,new cname##SchemaValidator()) #define REGISTER_ELEMENT_NOVAL(namespaceURI,cname) \ q=QName(namespaceURI,cname::LOCAL_NAME); \ XMLObjectBuilder::registerBuilder(q,new cname##Builder()); #define REGISTER_TYPE_NOVAL(namespaceURI,cname) \ q=QName(namespaceURI,cname::TYPE_NAME); \ XMLObjectBuilder::registerBuilder(q,new cname##Builder()); void soap11::registerSOAPClasses() { QName q; REGISTER_ELEMENT_NOVAL(SOAP11ENV_NS,Body); REGISTER_ELEMENT_NOVAL(nullptr,Detail); REGISTER_ELEMENT(SOAP11ENV_NS,Envelope); REGISTER_ELEMENT(SOAP11ENV_NS,Fault); REGISTER_ELEMENT(nullptr,Faultactor); REGISTER_ELEMENT(nullptr,Faultcode); REGISTER_ELEMENT(nullptr,Faultstring); REGISTER_ELEMENT_NOVAL(SOAP11ENV_NS,Header); REGISTER_TYPE_NOVAL(SOAP11ENV_NS,Body); REGISTER_TYPE_NOVAL(SOAP11ENV_NS,Detail); REGISTER_TYPE(SOAP11ENV_NS,Envelope); REGISTER_TYPE(SOAP11ENV_NS,Fault); REGISTER_TYPE_NOVAL(SOAP11ENV_NS,Header); } xmltooling-1.5.3/xmltooling/soap/impl/CURLSOAPTransport.cpp000644 001751 001751 00000064422 12147443124 025064 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * CURLSOAPTransport.cpp * * libcurl-based SOAPTransport implementation. */ #include "internal.h" #include "exceptions.h" #include "logging.h" #include "security/CredentialCriteria.h" #include "security/OpenSSLTrustEngine.h" #include "security/OpenSSLCredential.h" #include "soap/HTTPSOAPTransport.h" #include "soap/OpenSSLSOAPTransport.h" #include "util/NDC.h" #include "util/Threads.h" #include #include #include using namespace xmltooling::logging; using namespace xmltooling; using namespace std; namespace xmltooling { // Manages cache of socket connections via CURL handles. class XMLTOOL_DLLLOCAL CURLPool { public: CURLPool() : m_size(0), m_lock(Mutex::create()), m_log(Category::getInstance(XMLTOOLING_LOGCAT".SOAPTransport.CURL")) {} ~CURLPool(); CURL* get(const SOAPTransport::Address& addr); void put(const char* from, const char* to, const char* endpoint, CURL* handle); private: typedef map > poolmap_t; poolmap_t m_bindingMap; list< vector* > m_pools; long m_size; Mutex* m_lock; Category& m_log; }; static XMLTOOL_DLLLOCAL CURLPool* g_CURLPool = nullptr; class XMLTOOL_DLLLOCAL CURLSOAPTransport : public HTTPSOAPTransport, public OpenSSLSOAPTransport { public: CURLSOAPTransport(const Address& addr) : m_sender(addr.m_from ? addr.m_from : ""), m_peerName(addr.m_to ? addr.m_to : ""), m_endpoint(addr.m_endpoint), m_handle(nullptr), m_keepHandle(false), m_headers(nullptr), #ifndef XMLTOOLING_NO_XMLSEC m_cred(nullptr), m_trustEngine(nullptr), m_peerResolver(nullptr), m_mandatory(false), #endif m_openssl_ops(SSL_OP_ALL|SSL_OP_NO_SSLv2), m_ssl_callback(nullptr), m_ssl_userptr(nullptr), m_chunked(true), m_authenticated(false), m_cacheTag(nullptr) { m_handle = g_CURLPool->get(addr); curl_easy_setopt(m_handle,CURLOPT_URL,addr.m_endpoint); curl_easy_setopt(m_handle,CURLOPT_CONNECTTIMEOUT,15); curl_easy_setopt(m_handle,CURLOPT_TIMEOUT,30); curl_easy_setopt(m_handle,CURLOPT_HTTPAUTH,0); curl_easy_setopt(m_handle,CURLOPT_USERPWD,nullptr); curl_easy_setopt(m_handle,CURLOPT_SSL_VERIFYHOST,2); curl_easy_setopt(m_handle,CURLOPT_HEADERDATA,this); m_headers=curl_slist_append(m_headers,"Content-Type: text/xml"); } virtual ~CURLSOAPTransport() { curl_slist_free_all(m_headers); if (m_keepHandle) { curl_easy_setopt(m_handle, CURLOPT_USERAGENT, nullptr); curl_easy_setopt(m_handle, CURLOPT_ERRORBUFFER, nullptr); curl_easy_setopt(m_handle, CURLOPT_PRIVATE, m_authenticated ? "secure" : nullptr); // Save off security "state". g_CURLPool->put(m_sender.c_str(), m_peerName.c_str(), m_endpoint.c_str(), m_handle); } else { curl_easy_cleanup(m_handle); } } bool isConfidential() const { return m_endpoint.find("https")==0; } bool setConnectTimeout(long timeout) { return (curl_easy_setopt(m_handle,CURLOPT_CONNECTTIMEOUT,timeout)==CURLE_OK); } bool setTimeout(long timeout) { return (curl_easy_setopt(m_handle,CURLOPT_TIMEOUT,timeout)==CURLE_OK); } bool setAuth(transport_auth_t authType, const char* username=nullptr, const char* password=nullptr); bool setVerifyHost(bool verify) { return (curl_easy_setopt(m_handle,CURLOPT_SSL_VERIFYHOST,verify ? 2 : 0)==CURLE_OK); } #ifndef XMLTOOLING_NO_XMLSEC bool setCredential(const Credential* cred=nullptr) { const OpenSSLCredential* down = dynamic_cast(cred); if (!down) { m_cred = nullptr; return (cred==nullptr); } m_cred = down; return true; } bool setTrustEngine( const X509TrustEngine* trustEngine=nullptr, const CredentialResolver* peerResolver=nullptr, CredentialCriteria* criteria=nullptr, bool mandatory=true ) { const OpenSSLTrustEngine* down = dynamic_cast(trustEngine); if (!down) { m_trustEngine = nullptr; m_peerResolver = nullptr; m_criteria = nullptr; return (trustEngine==nullptr); } m_trustEngine = down; m_peerResolver = peerResolver; m_criteria = criteria; m_mandatory = mandatory; return true; } #endif bool useChunkedEncoding(bool chunked=true) { m_chunked = chunked; return true; } bool followRedirects(bool follow, unsigned int maxRedirs) { return ( curl_easy_setopt(m_handle, CURLOPT_FOLLOWLOCATION, (follow ? 1 : 0)) == CURLE_OK && curl_easy_setopt(m_handle, CURLOPT_MAXREDIRS, (follow ? maxRedirs : 0)) == CURLE_OK ); } bool setCacheTag(string* cacheTag) { m_cacheTag = cacheTag; return true; } bool setProviderOption(const char* provider, const char* option, const char* value); void send(istream& in) { send(&in); } void send(istream* in=nullptr); istream& receive() { return m_stream; } bool isAuthenticated() const { return m_authenticated; } void setAuthenticated(bool auth) { m_authenticated = auth; } string getContentType() const; long getStatusCode() const; bool setRequestHeader(const char* name, const char* val) { string temp(name); temp=temp + ": " + val; m_headers=curl_slist_append(m_headers,temp.c_str()); return true; } const vector& getResponseHeader(const char* val) const; bool setSSLCallback(ssl_ctx_callback_fn fn, void* userptr=nullptr) { m_ssl_callback=fn; m_ssl_userptr=userptr; return true; } private: // per-call state string m_sender,m_peerName,m_endpoint,m_simplecreds; CURL* m_handle; bool m_keepHandle; stringstream m_stream; struct curl_slist* m_headers; string m_useragent; map > m_response_headers; vector m_saved_options; #ifndef XMLTOOLING_NO_XMLSEC const OpenSSLCredential* m_cred; const OpenSSLTrustEngine* m_trustEngine; const CredentialResolver* m_peerResolver; CredentialCriteria* m_criteria; bool m_mandatory; #endif int m_openssl_ops; ssl_ctx_callback_fn m_ssl_callback; void* m_ssl_userptr; bool m_chunked; bool m_authenticated; string* m_cacheTag; friend size_t XMLTOOL_DLLLOCAL curl_header_hook(void* ptr, size_t size, size_t nmemb, void* stream); friend CURLcode XMLTOOL_DLLLOCAL xml_ssl_ctx_callback(CURL* curl, SSL_CTX* ssl_ctx, void* userptr); friend int XMLTOOL_DLLLOCAL verify_callback(X509_STORE_CTX* x509_ctx, void* arg); }; // libcurl callback functions size_t XMLTOOL_DLLLOCAL curl_header_hook(void* ptr, size_t size, size_t nmemb, void* stream); size_t XMLTOOL_DLLLOCAL curl_write_hook(void* ptr, size_t size, size_t nmemb, void* stream); size_t XMLTOOL_DLLLOCAL curl_read_hook( void *ptr, size_t size, size_t nmemb, void *stream); int XMLTOOL_DLLLOCAL curl_debug_hook(CURL* handle, curl_infotype type, char* data, size_t len, void* ptr); CURLcode XMLTOOL_DLLLOCAL xml_ssl_ctx_callback(CURL* curl, SSL_CTX* ssl_ctx, void* userptr); #ifndef XMLTOOLING_NO_XMLSEC int XMLTOOL_DLLLOCAL verify_callback(X509_STORE_CTX* x509_ctx, void* arg); #endif SOAPTransport* CURLSOAPTransportFactory(const SOAPTransport::Address& addr) { return new CURLSOAPTransport(addr); } }; void xmltooling::initSOAPTransports() { g_CURLPool=new CURLPool(); } void xmltooling::termSOAPTransports() { delete g_CURLPool; g_CURLPool = nullptr; } CURLPool::~CURLPool() { for (poolmap_t::iterator i=m_bindingMap.begin(); i!=m_bindingMap.end(); i++) { for (vector::iterator j=i->second.begin(); j!=i->second.end(); j++) curl_easy_cleanup(*j); } delete m_lock; } CURL* CURLPool::get(const SOAPTransport::Address& addr) { #ifdef _DEBUG xmltooling::NDC("get"); #endif m_log.debug("getting connection handle to %s", addr.m_endpoint); string key(addr.m_endpoint); if (addr.m_from) key = key + '|' + addr.m_from; if (addr.m_to) key = key + '|' + addr.m_to; m_lock->lock(); poolmap_t::iterator i=m_bindingMap.find(key); if (i!=m_bindingMap.end()) { // Move this pool to the front of the list. m_pools.remove(&(i->second)); m_pools.push_front(&(i->second)); // If a free connection exists, return it. if (!(i->second.empty())) { CURL* handle=i->second.back(); i->second.pop_back(); m_size--; m_lock->unlock(); m_log.debug("returning existing connection handle from pool"); return handle; } } m_lock->unlock(); m_log.debug("nothing free in pool, returning new connection handle"); // Create a new connection and set non-varying options. CURL* handle=curl_easy_init(); if (!handle) return nullptr; curl_easy_setopt(handle,CURLOPT_NOPROGRESS,1); curl_easy_setopt(handle,CURLOPT_NOSIGNAL,1); curl_easy_setopt(handle,CURLOPT_FAILONERROR,1); // This may (but probably won't) help with < 7.20 bug in DNS caching. curl_easy_setopt(handle,CURLOPT_DNS_CACHE_TIMEOUT,120); curl_easy_setopt(handle,CURLOPT_SSL_CIPHER_LIST,"ALL:!aNULL:!LOW:!EXPORT:!SSLv2"); // Verification of the peer is via TrustEngine only. curl_easy_setopt(handle,CURLOPT_SSL_VERIFYPEER,0); curl_easy_setopt(handle,CURLOPT_CAINFO,nullptr); curl_easy_setopt(handle,CURLOPT_HEADERFUNCTION,&curl_header_hook); curl_easy_setopt(handle,CURLOPT_WRITEFUNCTION,&curl_write_hook); curl_easy_setopt(handle,CURLOPT_DEBUGFUNCTION,&curl_debug_hook); return handle; } void CURLPool::put(const char* from, const char* to, const char* endpoint, CURL* handle) { string key(endpoint); if (from) key = key + '|' + from; if (to) key = key + '|' + to; m_lock->lock(); poolmap_t::iterator i=m_bindingMap.find(key); if (i==m_bindingMap.end()) m_pools.push_front(&(m_bindingMap.insert(poolmap_t::value_type(key,vector(1,handle))).first->second)); else i->second.push_back(handle); CURL* killit=nullptr; if (++m_size > 256) { // Kick a handle out from the back of the bus. while (true) { vector* corpse=m_pools.back(); if (!corpse->empty()) { killit=corpse->back(); corpse->pop_back(); m_size--; break; } // Move an empty pool up to the front so we don't keep hitting it. m_pools.pop_back(); m_pools.push_front(corpse); } } m_lock->unlock(); if (killit) { curl_easy_cleanup(killit); #ifdef _DEBUG xmltooling::NDC("put"); #endif m_log.info("conn_pool_max limit reached, dropping an old connection"); } } bool CURLSOAPTransport::setAuth(transport_auth_t authType, const char* username, const char* password) { if (authType==transport_auth_none) { if (curl_easy_setopt(m_handle,CURLOPT_HTTPAUTH,0)!=CURLE_OK) return false; return (curl_easy_setopt(m_handle,CURLOPT_USERPWD,nullptr)==CURLE_OK); } long flag=0; switch (authType) { case transport_auth_basic: flag = CURLAUTH_BASIC; break; case transport_auth_digest: flag = CURLAUTH_DIGEST; break; case transport_auth_ntlm: flag = CURLAUTH_NTLM; break; case transport_auth_gss: flag = CURLAUTH_GSSNEGOTIATE; break; default: return false; } if (curl_easy_setopt(m_handle,CURLOPT_HTTPAUTH,flag)!=CURLE_OK) return false; m_simplecreds = string(username ? username : "") + ':' + (password ? password : ""); return (curl_easy_setopt(m_handle,CURLOPT_USERPWD,m_simplecreds.c_str())==CURLE_OK); } bool CURLSOAPTransport::setProviderOption(const char* provider, const char* option, const char* value) { if (!provider || !option || !value) { return false; } else if (!strcmp(provider, "OpenSSL")) { if (!strcmp(option, "SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION") && (*value=='1' || *value=='t')) { // If the new option to enable buggy rengotiation is available, set it. // Otherwise, signal false if this is newer than 0.9.8k, because that // means it's 0.9.8l, which blocks renegotiation, and therefore will // not honor this request. Older versions are buggy, so behave as though // the flag was set anyway, so we signal true. #if defined(SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION) m_openssl_ops |= SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION; return true; #elif (OPENSSL_VERSION_NUMBER > 0x009080bfL) return false; #else return true; #endif } return false; } else if (strcmp(provider, "CURL")) { return false; } // For libcurl, the option is an enum and the value type depends on the option. CURLoption opt = static_cast(strtol(option, nullptr, 10)); if (opt < CURLOPTTYPE_OBJECTPOINT) return (curl_easy_setopt(m_handle, opt, strtol(value, nullptr, 10)) == CURLE_OK); #ifdef CURLOPTTYPE_OFF_T else if (opt < CURLOPTTYPE_OFF_T) { if (value) m_saved_options.push_back(value); return (curl_easy_setopt(m_handle, opt, value ? m_saved_options.back().c_str() : nullptr) == CURLE_OK); } # ifdef HAVE_CURL_OFF_T else if (sizeof(curl_off_t) == sizeof(long)) return (curl_easy_setopt(m_handle, opt, strtol(value, nullptr, 10)) == CURLE_OK); # else else if (sizeof(off_t) == sizeof(long)) return (curl_easy_setopt(m_handle, opt, strtol(value, nullptr, 10)) == CURLE_OK); # endif return false; #else else { if (value) m_saved_options.push_back(value); return (curl_easy_setopt(m_handle, opt, value ? m_saved_options.back().c_str() : nullptr) == CURLE_OK); } #endif } const vector& CURLSOAPTransport::getResponseHeader(const char* name) const { static vector emptyVector; map >::const_iterator i=m_response_headers.find(name); if (i!=m_response_headers.end()) return i->second; for (map >::const_iterator j=m_response_headers.begin(); j!=m_response_headers.end(); j++) { #ifdef HAVE_STRCASECMP if (!strcasecmp(j->first.c_str(), name)) #else if (!stricmp(j->first.c_str(), name)) #endif return j->second; } return emptyVector; } string CURLSOAPTransport::getContentType() const { char* content_type=nullptr; curl_easy_getinfo(m_handle,CURLINFO_CONTENT_TYPE,&content_type); return content_type ? content_type : ""; } long CURLSOAPTransport::getStatusCode() const { long code=200; if (curl_easy_getinfo(m_handle, CURLINFO_RESPONSE_CODE, &code) != CURLE_OK) code = 200; return code; } void CURLSOAPTransport::send(istream* in) { #ifdef _DEBUG xmltooling::NDC ndc("send"); #endif Category& log=Category::getInstance(XMLTOOLING_LOGCAT".SOAPTransport.CURL"); Category& log_curl=Category::getInstance(XMLTOOLING_LOGCAT".libcurl"); // For this implementation, it's sufficient to check for https as a sign of transport security. if (m_mandatory && !isConfidential()) throw IOException("Blocking unprotected HTTP request, transport authentication by server required."); string msg; // By this time, the handle has been prepared with the URL to use and the // caller should have executed any set functions to manipulate it. // Setup standard per-call curl properties. curl_easy_setopt(m_handle,CURLOPT_DEBUGDATA,&log_curl); curl_easy_setopt(m_handle,CURLOPT_FILE,&m_stream); if (m_chunked && in) { curl_easy_setopt(m_handle,CURLOPT_POST,1); m_headers=curl_slist_append(m_headers,"Transfer-Encoding: chunked"); curl_easy_setopt(m_handle,CURLOPT_READFUNCTION,&curl_read_hook); curl_easy_setopt(m_handle,CURLOPT_READDATA,in); } else if (in) { char buf[1024]; while (*in) { in->read(buf,1024); msg.append(buf,in->gcount()); } curl_easy_setopt(m_handle,CURLOPT_POST,1); curl_easy_setopt(m_handle,CURLOPT_READFUNCTION,nullptr); curl_easy_setopt(m_handle,CURLOPT_POSTFIELDS,msg.c_str()); curl_easy_setopt(m_handle,CURLOPT_POSTFIELDSIZE,msg.length()); } else { curl_easy_setopt(m_handle,CURLOPT_HTTPGET,1); curl_easy_setopt(m_handle,CURLOPT_FOLLOWLOCATION,1); curl_easy_setopt(m_handle,CURLOPT_MAXREDIRS,6); } char curl_errorbuf[CURL_ERROR_SIZE]; curl_errorbuf[0]=0; curl_easy_setopt(m_handle,CURLOPT_ERRORBUFFER,curl_errorbuf); if (log_curl.isDebugEnabled()) curl_easy_setopt(m_handle,CURLOPT_VERBOSE,1); // Check for cache tag. if (m_cacheTag && !m_cacheTag->empty()) { string hdr("If-None-Match: "); hdr += *m_cacheTag; m_headers = curl_slist_append(m_headers, hdr.c_str()); } m_useragent = XMLToolingConfig::getConfig().user_agent; if (!m_useragent.empty()) { curl_version_info_data* curlver = curl_version_info(CURLVERSION_NOW); m_useragent += " libcurl/"; if (curlver) m_useragent = m_useragent + curlver->version + ' ' + curlver->ssl_version; else m_useragent = m_useragent + LIBCURL_VERSION + ' ' + OPENSSL_VERSION_TEXT; curl_easy_setopt(m_handle, CURLOPT_USERAGENT, m_useragent.c_str()); } // Set request headers. curl_easy_setopt(m_handle,CURLOPT_HTTPHEADER,m_headers); #ifndef XMLTOOLING_NO_XMLSEC if (m_ssl_callback || m_cred || m_trustEngine) { #else if (m_ssl_callback) { #endif curl_easy_setopt(m_handle,CURLOPT_SSL_CTX_FUNCTION,xml_ssl_ctx_callback); curl_easy_setopt(m_handle,CURLOPT_SSL_CTX_DATA,this); // Restore security "state". Necessary because the callback only runs // when handshakes occur. Even new TCP connections won't execute it. char* priv=nullptr; curl_easy_getinfo(m_handle,CURLINFO_PRIVATE,&priv); if (priv) m_authenticated=true; } else { curl_easy_setopt(m_handle,CURLOPT_SSL_CTX_FUNCTION,nullptr); curl_easy_setopt(m_handle,CURLOPT_SSL_CTX_DATA,nullptr); } // Make the call. log.debug("sending SOAP message to %s", m_endpoint.c_str()); CURLcode code = curl_easy_perform(m_handle); if (code != CURLE_OK) { if (code == CURLE_SSL_CIPHER) { log.error("on Red Hat 6+, make sure libcurl used is built with OpenSSL"); } throw IOException( string("CURLSOAPTransport failed while contacting SOAP endpoint (") + m_endpoint + "): " + (curl_errorbuf[0] ? curl_errorbuf : "no further information available")); } // This won't prevent every possible failed connection from being kept, but it's something. m_keepHandle = true; // Check for outgoing cache tag. if (m_cacheTag) { const vector& tags = getResponseHeader("ETag"); if (!tags.empty()) *m_cacheTag = tags.front(); } } // callback to buffer headers from server size_t xmltooling::curl_header_hook(void* ptr, size_t size, size_t nmemb, void* stream) { // only handle single-byte data if (size!=1) return 0; CURLSOAPTransport* ctx = reinterpret_cast(stream); char* buf = (char*)malloc(nmemb + 1); if (buf) { memset(buf,0,nmemb + 1); memcpy(buf,ptr,nmemb); char* sep=(char*)strchr(buf,':'); if (sep) { *(sep++)=0; while (*sep==' ') *(sep++)=0; char* white=buf+nmemb-1; while (isspace(*white)) *(white--)=0; ctx->m_response_headers[buf].push_back(sep); } free(buf); return nmemb; } return 0; } // callback to send data to server size_t xmltooling::curl_read_hook(void* ptr, size_t size, size_t nmemb, void* stream) { // stream is actually an istream pointer istream* buf=reinterpret_cast(stream); buf->read(reinterpret_cast(ptr),size*nmemb); return buf->gcount(); } // callback to buffer data from server size_t xmltooling::curl_write_hook(void* ptr, size_t size, size_t nmemb, void* stream) { size_t len = size*nmemb; reinterpret_cast(stream)->write(reinterpret_cast(ptr),len); return len; } // callback for curl debug data int xmltooling::curl_debug_hook(CURL* handle, curl_infotype type, char* data, size_t len, void* ptr) { // *ptr is actually a logging object if (!ptr) return 0; CategoryStream log=reinterpret_cast(ptr)->debugStream(); for (unsigned char* ch=(unsigned char*)data; len && (isprint(*ch) || isspace(*ch)); len--) log << *ch++; return 0; } #ifndef XMLTOOLING_NO_XMLSEC int xmltooling::verify_callback(X509_STORE_CTX* x509_ctx, void* arg) { Category& log=Category::getInstance(XMLTOOLING_LOGCAT".SOAPTransport.CURL"); log.debug("invoking custom X.509 verify callback"); #if (OPENSSL_VERSION_NUMBER >= 0x00907000L) CURLSOAPTransport* ctx = reinterpret_cast(arg); #else // Yes, this sucks. I'd use TLS, but there's no really obvious spot to put the thread key // and global variables suck too. We can't access the X509_STORE_CTX depth directly because // OpenSSL only copies it into the context if it's >=0, and the unsigned pointer may be // negative in the SSL structure's int member. CURLSOAPTransport* ctx = reinterpret_cast( SSL_get_verify_depth( reinterpret_cast(X509_STORE_CTX_get_ex_data(x509_ctx,SSL_get_ex_data_X509_STORE_CTX_idx())) ) ); #endif bool success=false; if (ctx->m_criteria) { ctx->m_criteria->setUsage(Credential::TLS_CREDENTIAL); // Bypass name check (handled for us by curl). ctx->m_criteria->setPeerName(nullptr); success = ctx->m_trustEngine->validate(x509_ctx->cert,x509_ctx->untrusted,*(ctx->m_peerResolver),ctx->m_criteria); } else { // Bypass name check (handled for us by curl). CredentialCriteria cc; cc.setUsage(Credential::TLS_CREDENTIAL); success = ctx->m_trustEngine->validate(x509_ctx->cert,x509_ctx->untrusted,*(ctx->m_peerResolver),&cc); } if (!success) { log.error("supplied TrustEngine failed to validate SSL/TLS server certificate"); if (x509_ctx->cert) { BIO* b = BIO_new(BIO_s_mem()); X509_print(b, x509_ctx->cert); BUF_MEM* bptr = nullptr; BIO_get_mem_ptr(b, &bptr); if (bptr && bptr->length > 0) { string s(bptr->data, bptr->length); if (ctx->m_mandatory) log.error(s); else log.debug(s); } BIO_free(b); } x509_ctx->error = X509_V_ERR_APPLICATION_VERIFICATION; // generic error, check log for plugin specifics ctx->setAuthenticated(false); return ctx->m_mandatory ? 0 : 1; } // Signal success. Hopefully it doesn't matter what's actually in the structure now. ctx->setAuthenticated(true); return 1; } #endif // callback to invoke a caller-defined SSL callback CURLcode xmltooling::xml_ssl_ctx_callback(CURL* curl, SSL_CTX* ssl_ctx, void* userptr) { CURLSOAPTransport* conf = reinterpret_cast(userptr); // Default flags manually disable SSLv2 so we're not dependent on libcurl to do it. // Also disable the ticket option where implemented, since this breaks a variety // of servers. Newer libcurl also does this for us. #ifdef SSL_OP_NO_TICKET SSL_CTX_set_options(ssl_ctx, conf->m_openssl_ops|SSL_OP_NO_TICKET); #else SSL_CTX_set_options(ssl_ctx, conf->m_openssl_ops); #endif #ifndef XMLTOOLING_NO_XMLSEC if (conf->m_cred) conf->m_cred->attach(ssl_ctx); if (conf->m_trustEngine) { SSL_CTX_set_verify(ssl_ctx,SSL_VERIFY_PEER,nullptr); #if (OPENSSL_VERSION_NUMBER >= 0x00907000L) // With 0.9.7, we can pass a callback argument directly. SSL_CTX_set_cert_verify_callback(ssl_ctx,verify_callback,userptr); #else // With 0.9.6, there's no argument, so we're going to use a really embarrassing hack and // stuff the argument in the depth property where it will get copied to the context object // that's handed to the callback. SSL_CTX_set_cert_verify_callback(ssl_ctx,reinterpret_cast(verify_callback),nullptr); SSL_CTX_set_verify_depth(ssl_ctx,reinterpret_cast(userptr)); #endif } #endif if (conf->m_ssl_callback && !conf->m_ssl_callback(conf, ssl_ctx, conf->m_ssl_userptr)) return CURLE_SSL_CERTPROBLEM; return CURLE_OK; } xmltooling-1.5.3/xmltooling/signature/impl/000755 001751 001751 00000000000 12157725415 022251 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltooling/signature/ContentReference.h000644 001751 001751 00000003315 12003305016 024671 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/signature/ContentReference.h * * Interface for creating signature references. */ #if !defined(__xmltooling_sigref_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_sigref_h__ #include class DSIGSignature; namespace xmlsignature { /** * Interface for creating signature references based on application requirements. */ class XMLTOOL_API ContentReference { MAKE_NONCOPYABLE(ContentReference); public: virtual ~ContentReference(); /** * Given a native signature, asks the object to create the reference(s). * * @param sig native signature interface */ virtual void createReferences(DSIGSignature* sig)=0; protected: /** Default constructor. */ ContentReference(); }; }; #endif /* __xmltooling_sigref_h__ */ xmltooling-1.5.3/xmltooling/signature/KeyInfo.h000644 001751 001751 00000030174 12003305016 023007 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/signature/KeyInfo.h * * XMLObjects representing XML Digital Signature, version 20020212, KeyInfo element * and related content. */ #if !defined(__xmltooling_keyinfo_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_keyinfo_h__ #include #include #include /** * Macro for declaring signature builders. * * @param cname name of class being built */ #define DECL_XMLSIGOBJECTBUILDER(cname) \ DECL_XMLOBJECTBUILDER(XMLTOOL_API,cname,xmlconstants::XMLSIG_NS,xmlconstants::XMLSIG_PREFIX) /** * Macro for declaring signature builders. * * @param cname name of class being built */ #define DECL_XMLSIG11OBJECTBUILDER(cname) \ DECL_XMLOBJECTBUILDER(XMLTOOL_API,cname,xmlconstants::XMLSIG11_NS,xmlconstants::XMLSIG11_PREFIX) namespace xmlsignature { DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,KeyName,Name,XML Digital Signature version 20020212 KeyName element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,MgmtData,Data,XML Digital Signature version 20020212 MgmtData element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,Modulus,Value,XML Digital Signature version 20020212 Modulus element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,Exponent,Value,XML Digital Signature version 20020212 Exponent element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,Seed,Value,XML Digital Signature version 20020212 Seed element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,PgenCounter,Value,XML Digital Signature version 20020212 PgenCounter element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,P,Value,XML Digital Signature version 20020212 P element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,Q,Value,XML Digital Signature version 20020212 Q element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,G,Value,XML Digital Signature version 20020212 G element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,Y,Value,XML Digital Signature version 20020212 Y element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,J,Value,XML Digital Signature version 20020212 J element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,XPath,Expression,XML Digital Signature version 20020212 XPath element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,X509IssuerName,Name,XML Digital Signature version 20020212 X509IssuerName element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,X509SerialNumber,SerialNumber,XML Digital Signature version 20020212 X509SerialNumber element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,X509SKI,Value,XML Digital Signature version 20020212 X509SKI element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,X509SubjectName,Name,XML Digital Signature version 20020212 X509SubjectName element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,X509Certificate,Value,XML Digital Signature version 20020212 X509Certificate element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,X509CRL,Value,XML Digital Signature version 20020212 X509CRL element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,SPKISexp,Value,XML Digital Signature version 20020212 SPKISexp element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,PGPKeyID,ID,XML Digital Signature version 20020212 PGPKeyID element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,PGPKeyPacket,Packet,XML Digital Signature version 20020212 PGPKeyPacket element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,OCSPResponse,Response,XML Digital Signature version 1.1 OCSPResponse element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,PublicKey,Value,XML Digital Signature version 1.1 PublicKey element); BEGIN_XMLOBJECT(XMLTOOL_API,DSAKeyValue,xmltooling::XMLObject,XML Digital Signature version 20020212 DSAKeyValue element); DECL_TYPED_CHILD(P); DECL_TYPED_CHILD(Q); DECL_TYPED_CHILD(G); DECL_TYPED_CHILD(Y); DECL_TYPED_CHILD(J); DECL_TYPED_CHILD(Seed); DECL_TYPED_CHILD(PgenCounter); /** DSAKeyValueType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,RSAKeyValue,xmltooling::XMLObject,XML Digital Signature version 20020212 RSAKeyValue element); DECL_TYPED_CHILD(Modulus); DECL_TYPED_CHILD(Exponent); /** RSAKeyValueType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,NamedCurve,xmltooling::XMLObject,XML Digital Signature version 1.1 NamedCurve element); DECL_STRING_ATTRIB(URI,URI); /** NamedCurveType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,ECKeyValue,xmltooling::XMLObject,XML Digital Signature version 1.1 ECKeyValue element); DECL_STRING_ATTRIB(Id,ID); DECL_XMLOBJECT_CHILD(ECParameters); DECL_TYPED_CHILD(NamedCurve); DECL_TYPED_CHILD(PublicKey); /** ECKeyValueType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,KeyValue,xmltooling::XMLObject,XML Digital Signature version 20020212 KeyValue element); DECL_TYPED_CHILD(DSAKeyValue); DECL_TYPED_CHILD(RSAKeyValue); DECL_TYPED_CHILD(ECKeyValue); DECL_XMLOBJECT_CHILD(UnknownXMLObject); /** KeyValueType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,Transform,xmltooling::ElementExtensibleXMLObject,XML Digital Signature version 20020212 Transform element); DECL_STRING_ATTRIB(Algorithm,ALGORITHM); DECL_TYPED_CHILDREN(XPath); /** TransformType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,Transforms,xmltooling::XMLObject,XML Digital Signature version 20020212 Transforms element); DECL_TYPED_CHILDREN(Transform); /** TransformsType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,RetrievalMethod,xmltooling::XMLObject,XML Digital Signature version 20020212 RetrievalMethod element); DECL_STRING_ATTRIB(URI,URI); DECL_STRING_ATTRIB(Type,TYPE); DECL_TYPED_CHILD(Transforms); /** RetrievalMethodType local name */ static const XMLCh TYPE_NAME[]; /** DSAKeyValue RetrievalMethod Type */ static const XMLCh TYPE_DSAKEYVALUE[]; /** RSAKeyValue RetrievalMethod Type */ static const XMLCh TYPE_RSAKEYVALUE[]; /** X509Data RetrievalMethod Type */ static const XMLCh TYPE_X509DATA[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,X509IssuerSerial,xmltooling::XMLObject,XML Digital Signature version 20020212 X509IssuerSerial element); DECL_TYPED_CHILD(X509IssuerName); DECL_TYPED_CHILD(X509SerialNumber); /** X509IssuerSerialType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,X509Digest,xmltooling::XMLObject,XML Digital Signature version 1.1 X509Digest element); DECL_STRING_ATTRIB(Algorithm,ALGORITHM); DECL_SIMPLE_CONTENT(Value); /** X509DigestType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,X509Data,xmltooling::ElementExtensibleXMLObject,XML Digital Signature version 20020212 X509Data element); DECL_TYPED_CHILDREN(X509IssuerSerial); DECL_TYPED_CHILDREN(X509SKI); DECL_TYPED_CHILDREN(X509SubjectName); DECL_TYPED_CHILDREN(X509Certificate); DECL_TYPED_CHILDREN(X509CRL); DECL_TYPED_CHILDREN(X509Digest); DECL_TYPED_CHILDREN(OCSPResponse); /** X509DataType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,SPKIData,xmltooling::XMLObject,XML Digital Signature version 20020212 SPKIData element); /** SPKIDataType local name */ static const XMLCh TYPE_NAME[]; /** Returns modifiable collection of SPKIsexp/XMLObject pairs. */ virtual VectorOfPairs(SPKISexp,xmltooling::XMLObject) getSPKISexps()=0; /** Returns reference to immutable collection of SPKIsexp/XMLObject pairs. */ virtual const std::vector< std::pair >& getSPKISexps() const=0; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,PGPData,xmltooling::ElementExtensibleXMLObject,XML Digital Signature version 20020212 PGPData element); DECL_TYPED_CHILD(PGPKeyID); DECL_TYPED_CHILD(PGPKeyPacket); /** PGPDataType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,DEREncodedKeyValue,xmltooling::XMLObject,XML Digital Signature version 1.1 DEREncodedKeyValue element); DECL_STRING_ATTRIB(Id,ID); DECL_SIMPLE_CONTENT(Value); /** DEREncodedKeyValueType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,KeyInfoReference,xmltooling::XMLObject,XML Digital Signature version 1.1 KeyInfoReference element); DECL_STRING_ATTRIB(Id,ID); DECL_STRING_ATTRIB(URI,URI); /** KeyInfoReferenceType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,KeyInfo,xmltooling::ElementExtensibleXMLObject,XML Digital Signature version 20020212 KeyInfo element); DECL_STRING_ATTRIB(Id,ID); DECL_TYPED_CHILDREN(X509Data); DECL_TYPED_CHILDREN(KeyName); DECL_TYPED_CHILDREN(KeyValue); DECL_TYPED_CHILDREN(DEREncodedKeyValue); DECL_TYPED_CHILDREN(RetrievalMethod); DECL_TYPED_CHILDREN(MgmtData); DECL_TYPED_CHILDREN(PGPData); DECL_TYPED_CHILDREN(SPKIData); DECL_TYPED_CHILDREN(KeyInfoReference); /** KeyInfoType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; DECL_XMLSIGOBJECTBUILDER(PGPData); DECL_XMLSIGOBJECTBUILDER(PGPKeyID); DECL_XMLSIGOBJECTBUILDER(PGPKeyPacket); DECL_XMLSIGOBJECTBUILDER(SPKIData); DECL_XMLSIGOBJECTBUILDER(SPKISexp); DECL_XMLSIGOBJECTBUILDER(X509IssuerSerial); DECL_XMLSIGOBJECTBUILDER(X509IssuerName); DECL_XMLSIGOBJECTBUILDER(X509SerialNumber); DECL_XMLSIGOBJECTBUILDER(X509SKI); DECL_XMLSIGOBJECTBUILDER(X509SubjectName); DECL_XMLSIGOBJECTBUILDER(X509Certificate); DECL_XMLSIGOBJECTBUILDER(X509CRL); DECL_XMLSIGOBJECTBUILDER(X509Data); DECL_XMLSIGOBJECTBUILDER(XPath); DECL_XMLSIGOBJECTBUILDER(Transform); DECL_XMLSIGOBJECTBUILDER(Transforms); DECL_XMLSIGOBJECTBUILDER(RetrievalMethod); DECL_XMLSIGOBJECTBUILDER(KeyName); DECL_XMLSIGOBJECTBUILDER(MgmtData); DECL_XMLSIGOBJECTBUILDER(Modulus); DECL_XMLSIGOBJECTBUILDER(Exponent); DECL_XMLSIGOBJECTBUILDER(Seed); DECL_XMLSIGOBJECTBUILDER(PgenCounter); DECL_XMLSIGOBJECTBUILDER(P); DECL_XMLSIGOBJECTBUILDER(Q); DECL_XMLSIGOBJECTBUILDER(G); DECL_XMLSIGOBJECTBUILDER(Y); DECL_XMLSIGOBJECTBUILDER(J); DECL_XMLSIGOBJECTBUILDER(DSAKeyValue); DECL_XMLSIGOBJECTBUILDER(RSAKeyValue); DECL_XMLSIGOBJECTBUILDER(KeyValue); DECL_XMLSIGOBJECTBUILDER(KeyInfo); DECL_XMLSIG11OBJECTBUILDER(DEREncodedKeyValue); DECL_XMLSIG11OBJECTBUILDER(ECKeyValue); DECL_XMLSIG11OBJECTBUILDER(KeyInfoReference); DECL_XMLSIG11OBJECTBUILDER(NamedCurve); DECL_XMLSIG11OBJECTBUILDER(OCSPResponse); DECL_XMLSIG11OBJECTBUILDER(PublicKey); DECL_XMLSIG11OBJECTBUILDER(X509Digest); /** * Registers builders and validators for KeyInfo classes into the runtime. */ void XMLTOOL_API registerKeyInfoClasses(); }; #endif /* __xmltooling_keyinfo_h__ */ xmltooling-1.5.3/xmltooling/signature/Signature.h000644 001751 001751 00000020112 12003305016 023373 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/signature/Signature.h * * XMLObject representing XML Digital Signature, version 20020212, Signature element. */ #if !defined(__xmltooling_sig_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_sig_h__ #include #include class DSIGSignature; class XSECCryptoKey; /** * @namespace xmlsignature * Public namespace of XML Signature classes */ namespace xmlsignature { class XMLTOOL_API ContentReference; class XMLTOOL_API KeyInfo; /** * XMLObject representing XML Digital Signature, version 20020212, Signature element. * The default signature settings include Exclusive c14n w/o comments, SHA-1 digests, * and RSA-SHA1 signing. */ class XMLTOOL_API Signature : public virtual xmltooling::XMLObject { public: virtual ~Signature(); /** Element local name */ static const XMLCh LOCAL_NAME[]; /** * Gets the canonicalization method for the ds:SignedInfo element. * * @return the canonicalization method */ virtual const XMLCh* getCanonicalizationMethod() const=0; /** * Gets the signing algorithm for the signature. * * @return the signature algorithm, or nullptr if indeterminate */ virtual const XMLCh* getSignatureAlgorithm() const=0; /** * Sets the canonicalization method for the ds:SignedInfo element. * * @param c14n the canonicalization method */ virtual void setCanonicalizationMethod(const XMLCh* c14n)=0; /** * Sets the signing algorithm for the signature. * * @param sm the signature algorithm */ virtual void setSignatureAlgorithm(const XMLCh* sm)=0; /** * Sets the signing key used to create the signature. * * @param signingKey the secret/private key used to create the signature */ virtual void setSigningKey(XSECCryptoKey* signingKey)=0; /** * Sets a KeyInfo object to embed in the Signature. * * @param keyInfo pointer to a KeyInfo object, or nullptr */ virtual void setKeyInfo(KeyInfo* keyInfo)=0; /** * Gets the KeyInfo object associated with the Signature. * This is NOT provided for access to the * data associated with an unmarshalled signature. It is * used only in the creation of signatures. Access to data * for validation purposes is provided through the native * DSIGSignature object. * * @return pointer to a KeyInfo object, or nullptr */ virtual KeyInfo* getKeyInfo() const=0; /** * Sets the ContentReference object to the Signature to be applied * when the signature is created. * * @param reference the reference to attach, or nullptr */ virtual void setContentReference(ContentReference* reference)=0; /** * Gets the ContentReference object associated with the Signature. * This is NOT provided for access to the * data associated with an unmarshalled signature. It is * used only in the creation of signatures. Access to data * for validation purposes is provided through the native * DSIGSignature object. * * @return pointer to a ContentReference object, or nullptr */ virtual ContentReference* getContentReference() const=0; /** * Gets the native Apache signature object, if present. * * @return the native Apache signature interface */ virtual DSIGSignature* getXMLSignature() const=0; /** * Compute and append the signature based on the assigned * ContentReference, KeyInfo, and signing key. * * @param credential optional source of signing key and KeyInfo */ virtual void sign(const xmltooling::Credential* credential=nullptr)=0; /** * Type-safe clone operation. * * @return copy of object */ virtual Signature* cloneSignature() const=0; /** * Sign the input data and return a base64-encoded signature. The signature value * MUST NOT contain any embedded linefeeds. * *

Allows specialized applications to create raw signatures over any input using * the same cryptography layer as XML Signatures use. * * @param key key to sign with, will NOT be freed * @param sigAlgorithm XML signature algorithm identifier * @param in input data * @param in_len size of input data in bytes * @param out output buffer * @param out_len size of output buffer in bytes * @return size in bytes of base64-encoded signature */ static unsigned int createRawSignature( XSECCryptoKey* key, const XMLCh* sigAlgorithm, const char* in, unsigned int in_len, char* out, unsigned int out_len ); /** * Verifies a base-64 encoded signature over the input data. * *

Allows specialized applications to verify raw signatures over any input using * the same cryptography layer as XML Signatures use. * * @param key key to verify with, will NOT be freed * @param sigAlgorithm XML signature algorithm identifier * @param signature base64-encoded signature value * @param in input data * @param in_len size of input data in bytes * @return true iff signature verifies */ static bool verifyRawSignature( XSECCryptoKey* key, const XMLCh* sigAlgorithm, const char* signature, const char* in, unsigned int in_len ); protected: /** Default constructor. */ Signature(); }; /** * Builder for Signature objects. */ class XMLTOOL_API SignatureBuilder : public xmltooling::ConcreteXMLObjectBuilder { public: #ifdef HAVE_COVARIANT_RETURNS virtual Signature* buildObject( #else virtual xmltooling::XMLObject* buildObject( #endif const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=nullptr, const xmltooling::QName* schemaType=nullptr ) const; /** * Default builder * * @return empty Signature object */ #ifdef HAVE_COVARIANT_RETURNS virtual Signature* buildObject() const; #else virtual xmltooling::XMLObject* buildObject() const; #endif /** Singleton builder. */ static Signature* buildSignature(); }; DECL_XMLTOOLING_EXCEPTION(SignatureException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmlsignature,xmltooling::XMLSecurityException,Exceptions in signature processing); }; #endif /* __xmltooling_sig_h__ */ xmltooling-1.5.3/xmltooling/signature/SignatureValidator.h000644 001751 001751 00000005244 12003305016 025252 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/signature/SignatureValidator.h * * Validator for signatures based on an externally-supplied key. */ #if !defined(__xmltooling_sigval_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_sigval_h__ #include class XSECCryptoKey; namespace xmltooling { class XMLTOOL_API Credential; }; namespace xmlsignature { class XMLTOOL_API Signature; /** * Validator for signatures based on a Credential */ class XMLTOOL_API SignatureValidator : public xmltooling::Validator { public: /** * Constructor using a key * * @param key the key to use */ SignatureValidator(XSECCryptoKey* key=nullptr); /** * Constructor using a Credential * * @param credential the credential to use */ SignatureValidator(const xmltooling::Credential* credential); virtual ~SignatureValidator(); void validate(const xmltooling::XMLObject* xmlObject) const; /** * Type-safe validator. * * @param signature object to validate */ virtual void validate(const Signature* signature) const; /** * Replace the current key, if any, with a new one. * * @param key the key to attach */ void setKey(XSECCryptoKey* key); /** * Replace the current Credential, if any, with a new one. * * @param credential the Credential to attach */ void setCredential(const xmltooling::Credential* credential); protected: /** Verification key. */ XSECCryptoKey* m_key; /** Verification credential. */ const xmltooling::Credential* m_credential; }; }; #endif /* __xmltooling_sigval_h__ */ xmltooling-1.5.3/xmltooling/signature/impl/KeyInfoImpl.cpp000644 001751 001751 00000131011 12057276362 025141 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * KeyInfoImpl.cpp * * Implementation classes for KeyInfo schema. */ #include "internal.h" #include "AbstractComplexElement.h" #include "AbstractSimpleElement.h" #include "exceptions.h" #include "io/AbstractXMLObjectMarshaller.h" #include "io/AbstractXMLObjectUnmarshaller.h" #include "signature/KeyInfo.h" #include "util/XMLHelper.h" #include #include #include #include #include using namespace xmlsignature; using namespace xmltooling; using namespace xercesc; using namespace std; using xmlconstants::XMLSIG_NS; using xmlconstants::XMLSIG11_NS; #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif namespace xmlsignature { class XMLTOOL_DLLLOCAL DSAKeyValueImpl : public virtual DSAKeyValue, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { void init() { m_P=nullptr; m_Q=nullptr; m_G=nullptr; m_Y=nullptr; m_J=nullptr; m_Seed=nullptr; m_PgenCounter=nullptr; m_children.push_back(nullptr); m_children.push_back(nullptr); m_children.push_back(nullptr); m_children.push_back(nullptr); m_children.push_back(nullptr); m_children.push_back(nullptr); m_children.push_back(nullptr); m_pos_P=m_children.begin(); m_pos_Q=m_pos_P; ++m_pos_Q; m_pos_G=m_pos_Q; ++m_pos_G; m_pos_Y=m_pos_G; ++m_pos_Y; m_pos_J=m_pos_Y; ++m_pos_J; m_pos_Seed=m_pos_J; ++m_pos_Seed; m_pos_PgenCounter=m_pos_Seed; ++m_pos_PgenCounter; } public: virtual ~DSAKeyValueImpl() {} DSAKeyValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { init(); } DSAKeyValueImpl(const DSAKeyValueImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { init(); IMPL_CLONE_TYPED_CHILD(P); IMPL_CLONE_TYPED_CHILD(Q); IMPL_CLONE_TYPED_CHILD(G); IMPL_CLONE_TYPED_CHILD(Y); IMPL_CLONE_TYPED_CHILD(J); IMPL_CLONE_TYPED_CHILD(Seed); IMPL_CLONE_TYPED_CHILD(PgenCounter); } IMPL_XMLOBJECT_CLONE(DSAKeyValue); IMPL_TYPED_CHILD(P); IMPL_TYPED_CHILD(Q); IMPL_TYPED_CHILD(G); IMPL_TYPED_CHILD(Y); IMPL_TYPED_CHILD(J); IMPL_TYPED_CHILD(Seed); IMPL_TYPED_CHILD(PgenCounter); protected: void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_CHILD(P,XMLSIG_NS,false); PROC_TYPED_CHILD(Q,XMLSIG_NS,false); PROC_TYPED_CHILD(G,XMLSIG_NS,false); PROC_TYPED_CHILD(Y,XMLSIG_NS,false); PROC_TYPED_CHILD(J,XMLSIG_NS,false); PROC_TYPED_CHILD(Seed,XMLSIG_NS,false); PROC_TYPED_CHILD(PgenCounter,XMLSIG_NS,false); AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } }; class XMLTOOL_DLLLOCAL RSAKeyValueImpl : public virtual RSAKeyValue, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { void init() { m_Modulus=nullptr; m_Exponent=nullptr; m_children.push_back(nullptr); m_children.push_back(nullptr); m_pos_Modulus=m_children.begin(); m_pos_Exponent=m_pos_Modulus; ++m_pos_Exponent; } public: virtual ~RSAKeyValueImpl() {} RSAKeyValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { init(); } RSAKeyValueImpl(const RSAKeyValueImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { init(); IMPL_CLONE_TYPED_CHILD(Modulus); IMPL_CLONE_TYPED_CHILD(Exponent); } IMPL_XMLOBJECT_CLONE(RSAKeyValue); IMPL_TYPED_CHILD(Modulus); IMPL_TYPED_CHILD(Exponent); protected: void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_CHILD(Modulus,XMLSIG_NS,false); PROC_TYPED_CHILD(Exponent,XMLSIG_NS,false); AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } }; class XMLTOOL_DLLLOCAL NamedCurveImpl : public virtual NamedCurve, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { public: virtual ~NamedCurveImpl() { XMLString::release(&m_URI); } NamedCurveImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_URI(nullptr) { } NamedCurveImpl(const NamedCurveImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src), m_URI(nullptr) { IMPL_CLONE_ATTRIB(URI); } IMPL_XMLOBJECT_CLONE(NamedCurve); IMPL_STRING_ATTRIB(URI); protected: void marshallAttributes(DOMElement* domElement) const { MARSHALL_STRING_ATTRIB(URI,URI,nullptr); } void processAttribute(const DOMAttr* attribute) { PROC_STRING_ATTRIB(URI,URI,nullptr); AbstractXMLObjectUnmarshaller::processAttribute(attribute); } }; class XMLTOOL_DLLLOCAL ECKeyValueImpl : public virtual ECKeyValue, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { void init() { m_Id=nullptr; m_ECParameters=nullptr; m_NamedCurve=nullptr; m_PublicKey=nullptr; m_children.push_back(nullptr); m_children.push_back(nullptr); m_children.push_back(nullptr); m_pos_ECParameters=m_children.begin(); m_pos_NamedCurve=m_pos_ECParameters; ++m_pos_NamedCurve; m_pos_PublicKey=m_pos_NamedCurve; ++m_pos_PublicKey; } public: virtual ~ECKeyValueImpl() { XMLString::release(&m_Id); } ECKeyValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { init(); } ECKeyValueImpl(const ECKeyValueImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { init(); IMPL_CLONE_ATTRIB(Id); IMPL_CLONE_XMLOBJECT_CHILD(ECParameters); IMPL_CLONE_TYPED_CHILD(NamedCurve); IMPL_CLONE_TYPED_CHILD(PublicKey); } IMPL_XMLOBJECT_CLONE(ECKeyValue); IMPL_ID_ATTRIB_EX(Id,ID,nullptr); IMPL_XMLOBJECT_CHILD(ECParameters); IMPL_TYPED_CHILD(NamedCurve); IMPL_TYPED_CHILD(PublicKey); protected: void marshallAttributes(DOMElement* domElement) const { MARSHALL_ID_ATTRIB(Id,ID,nullptr); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_CHILD(NamedCurve,XMLSIG11_NS,false); PROC_TYPED_CHILD(PublicKey,XMLSIG11_NS,false); // Not really "unknown", but currently unwrapped. static const XMLCh _ECParameters[] = UNICODE_LITERAL_12(E,C,P,a,r,a,m,e,t,e,r,s); if (XMLString::equals(root->getLocalName(), _ECParameters) && XMLString::equals(root->getNamespaceURI(), XMLSIG11_NS)) { setECParameters(childXMLObject); return; } AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } void processAttribute(const DOMAttr* attribute) { PROC_ID_ATTRIB(Id,ID,nullptr); AbstractXMLObjectUnmarshaller::processAttribute(attribute); } }; class XMLTOOL_DLLLOCAL KeyValueImpl : public virtual KeyValue, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { void init() { m_DSAKeyValue=nullptr; m_RSAKeyValue=nullptr; m_ECKeyValue=nullptr; m_UnknownXMLObject=nullptr; m_children.push_back(nullptr); m_children.push_back(nullptr); m_children.push_back(nullptr); m_children.push_back(nullptr); m_pos_DSAKeyValue=m_children.begin(); m_pos_RSAKeyValue=m_pos_DSAKeyValue; ++m_pos_RSAKeyValue; m_pos_ECKeyValue=m_pos_RSAKeyValue; ++m_pos_ECKeyValue; m_pos_UnknownXMLObject=m_pos_ECKeyValue; ++m_pos_UnknownXMLObject; } public: virtual ~KeyValueImpl() {} KeyValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { init(); } KeyValueImpl(const KeyValueImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { init(); IMPL_CLONE_TYPED_CHILD(DSAKeyValue); IMPL_CLONE_TYPED_CHILD(RSAKeyValue); IMPL_CLONE_TYPED_CHILD(ECKeyValue); IMPL_CLONE_XMLOBJECT_CHILD(UnknownXMLObject); } IMPL_XMLOBJECT_CLONE(KeyValue); IMPL_TYPED_CHILD(DSAKeyValue); IMPL_TYPED_CHILD(RSAKeyValue); IMPL_TYPED_CHILD(ECKeyValue); IMPL_XMLOBJECT_CHILD(UnknownXMLObject); protected: void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_CHILD(DSAKeyValue,XMLSIG_NS,false); PROC_TYPED_CHILD(RSAKeyValue,XMLSIG_NS,false); PROC_TYPED_CHILD(ECKeyValue,XMLSIG11_NS,false); // Unknown child. const XMLCh* nsURI=root->getNamespaceURI(); if (!XMLString::equals(nsURI,XMLSIG_NS) && nsURI && *nsURI) { setUnknownXMLObject(childXMLObject); return; } AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } }; class XMLTOOL_DLLLOCAL DEREncodedKeyValueImpl : public virtual DEREncodedKeyValue, public AbstractSimpleElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { public: virtual ~DEREncodedKeyValueImpl() { XMLString::release(&m_Id); } DEREncodedKeyValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Id(nullptr) { } DEREncodedKeyValueImpl(const DEREncodedKeyValueImpl& src) : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src), m_Id(nullptr) { IMPL_CLONE_ATTRIB(Id); } IMPL_XMLOBJECT_CLONE(DEREncodedKeyValue); IMPL_ID_ATTRIB_EX(Id,ID,nullptr); protected: void marshallAttributes(DOMElement* domElement) const { MARSHALL_ID_ATTRIB(Id,ID,nullptr); } void processAttribute(const DOMAttr* attribute) { PROC_ID_ATTRIB(Id,ID,nullptr); AbstractXMLObjectUnmarshaller::processAttribute(attribute); } }; class XMLTOOL_DLLLOCAL TransformImpl : public virtual Transform, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { public: virtual ~TransformImpl() { XMLString::release(&m_Algorithm); } TransformImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Algorithm(nullptr) { } TransformImpl(const TransformImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src), m_Algorithm(nullptr) { IMPL_CLONE_ATTRIB(Algorithm); IMPL_CLONE_CHILDBAG_BEGIN; IMPL_CLONE_TYPED_CHILD_IN_BAG(XPath); IMPL_CLONE_XMLOBJECT_CHILD_IN_BAG(UnknownXMLObject); IMPL_CLONE_CHILDBAG_END; } IMPL_XMLOBJECT_CLONE(Transform); IMPL_STRING_ATTRIB(Algorithm); IMPL_TYPED_CHILDREN(XPath,m_children.end()); IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end()); protected: void marshallAttributes(DOMElement* domElement) const { MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_CHILDREN(XPath,XMLSIG_NS,false); // Unknown child. const XMLCh* nsURI=root->getNamespaceURI(); if (!XMLString::equals(nsURI,XMLSIG_NS) && nsURI && *nsURI) { getUnknownXMLObjects().push_back(childXMLObject); return; } AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } void processAttribute(const DOMAttr* attribute) { PROC_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr); AbstractXMLObjectUnmarshaller::processAttribute(attribute); } }; class XMLTOOL_DLLLOCAL TransformsImpl : public virtual Transforms, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { public: virtual ~TransformsImpl() {} TransformsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { } TransformsImpl(const TransformsImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { IMPL_CLONE_TYPED_CHILDREN(Transform); } IMPL_XMLOBJECT_CLONE(Transforms); IMPL_TYPED_CHILDREN(Transform,m_children.end()); protected: void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_CHILDREN(Transform,XMLSIG_NS,false); AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } }; class XMLTOOL_DLLLOCAL RetrievalMethodImpl : public virtual RetrievalMethod, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { void init() { m_URI=m_Type=nullptr; m_Transforms=nullptr; m_children.push_back(nullptr); m_pos_Transforms=m_children.begin(); } public: virtual ~RetrievalMethodImpl() { XMLString::release(&m_URI); XMLString::release(&m_Type); } RetrievalMethodImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { init(); } RetrievalMethodImpl(const RetrievalMethodImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { init(); IMPL_CLONE_ATTRIB(URI); IMPL_CLONE_ATTRIB(Type); IMPL_CLONE_TYPED_CHILD(Transforms); } IMPL_XMLOBJECT_CLONE(RetrievalMethod); IMPL_STRING_ATTRIB(URI); IMPL_STRING_ATTRIB(Type); IMPL_TYPED_CHILD(Transforms); protected: void marshallAttributes(DOMElement* domElement) const { MARSHALL_STRING_ATTRIB(URI,URI,nullptr); MARSHALL_STRING_ATTRIB(Type,TYPE,nullptr); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_CHILD(Transforms,XMLSIG_NS,false); AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } void processAttribute(const DOMAttr* attribute) { PROC_STRING_ATTRIB(URI,URI,nullptr); PROC_STRING_ATTRIB(Type,TYPE,nullptr); AbstractXMLObjectUnmarshaller::processAttribute(attribute); } }; class XMLTOOL_DLLLOCAL X509IssuerSerialImpl : public virtual X509IssuerSerial, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { void init() { m_X509IssuerName=nullptr; m_X509SerialNumber=nullptr; m_children.push_back(nullptr); m_children.push_back(nullptr); m_pos_X509IssuerName=m_children.begin(); m_pos_X509SerialNumber=m_pos_X509IssuerName; ++m_pos_X509SerialNumber; } public: virtual ~X509IssuerSerialImpl() {} X509IssuerSerialImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { init(); } X509IssuerSerialImpl(const X509IssuerSerialImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { init(); IMPL_CLONE_TYPED_CHILD(X509IssuerName); IMPL_CLONE_TYPED_CHILD(X509SerialNumber); } IMPL_XMLOBJECT_CLONE(X509IssuerSerial); IMPL_TYPED_CHILD(X509IssuerName); IMPL_TYPED_CHILD(X509SerialNumber); protected: void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_CHILD(X509IssuerName,XMLSIG_NS,false); PROC_TYPED_CHILD(X509SerialNumber,XMLSIG_NS,false); AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } }; class XMLTOOL_DLLLOCAL X509DigestImpl : public virtual X509Digest, public AbstractSimpleElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { public: virtual ~X509DigestImpl() { XMLString::release(&m_Algorithm); } X509DigestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Algorithm(nullptr) { } X509DigestImpl(const X509DigestImpl& src) : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src), m_Algorithm(nullptr) { IMPL_CLONE_ATTRIB(Algorithm); } IMPL_XMLOBJECT_CLONE(X509Digest); IMPL_STRING_ATTRIB(Algorithm); protected: void marshallAttributes(DOMElement* domElement) const { MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr); } void processAttribute(const DOMAttr* attribute) { PROC_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr); AbstractXMLObjectUnmarshaller::processAttribute(attribute); } }; class XMLTOOL_DLLLOCAL X509DataImpl : public virtual X509Data, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { public: virtual ~X509DataImpl() {} X509DataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { } X509DataImpl(const X509DataImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { IMPL_CLONE_CHILDBAG_BEGIN; IMPL_CLONE_TYPED_CHILD_IN_BAG(X509Certificate); IMPL_CLONE_TYPED_CHILD_IN_BAG(X509CRL); IMPL_CLONE_TYPED_CHILD_IN_BAG(X509SubjectName); IMPL_CLONE_TYPED_CHILD_IN_BAG(X509IssuerSerial); IMPL_CLONE_TYPED_CHILD_IN_BAG(X509SKI); IMPL_CLONE_TYPED_CHILD_IN_BAG(X509Digest); IMPL_CLONE_TYPED_CHILD_IN_BAG(OCSPResponse); IMPL_CLONE_XMLOBJECT_CHILD_IN_BAG(UnknownXMLObject); IMPL_CLONE_CHILDBAG_END; } IMPL_XMLOBJECT_CLONE(X509Data); IMPL_TYPED_CHILDREN(X509IssuerSerial,m_children.end()); IMPL_TYPED_CHILDREN(X509SKI,m_children.end()); IMPL_TYPED_CHILDREN(X509SubjectName,m_children.end()); IMPL_TYPED_CHILDREN(X509Certificate,m_children.end()); IMPL_TYPED_CHILDREN(X509CRL,m_children.end()); IMPL_TYPED_CHILDREN(X509Digest,m_children.end()); IMPL_TYPED_CHILDREN(OCSPResponse,m_children.end()); IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end()); protected: void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_CHILDREN(X509IssuerSerial,XMLSIG_NS,false); PROC_TYPED_CHILDREN(X509SKI,XMLSIG_NS,false); PROC_TYPED_CHILDREN(X509SubjectName,XMLSIG_NS,false); PROC_TYPED_CHILDREN(X509Certificate,XMLSIG_NS,false); PROC_TYPED_CHILDREN(X509CRL,XMLSIG_NS,false); PROC_TYPED_CHILDREN(X509Digest,XMLSIG11_NS,false); PROC_TYPED_CHILDREN(OCSPResponse,XMLSIG11_NS,false); // Unknown child. const XMLCh* nsURI=root->getNamespaceURI(); if (!XMLString::equals(nsURI,XMLSIG_NS) && nsURI && *nsURI) { getUnknownXMLObjects().push_back(childXMLObject); return; } AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } }; class XMLTOOL_DLLLOCAL SPKIDataImpl : public virtual SPKIData, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { vector< pair > m_SPKISexps; public: virtual ~SPKIDataImpl() {} SPKIDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { } SPKIDataImpl(const SPKIDataImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { for (vector< pair >::const_iterator i = src.m_SPKISexps.begin(); i != src.m_SPKISexps.end(); ++i) { if (i->first) { getSPKISexps().push_back(make_pair(i->first->cloneSPKISexp(),(i->second ? i->second->clone() : (XMLObject*)nullptr))); } } } IMPL_XMLOBJECT_CLONE(SPKIData); public: VectorOfPairs(SPKISexp,XMLObject) getSPKISexps() { return VectorOfPairs(SPKISexp,XMLObject)(this, m_SPKISexps, &m_children, m_children.end()); } const vector< pair >& getSPKISexps() const { return m_SPKISexps; } protected: void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { if (XMLHelper::isNodeNamed(root,XMLSIG_NS,SPKISexp::LOCAL_NAME)) { SPKISexp* typesafe=dynamic_cast(childXMLObject); if (typesafe) { getSPKISexps().push_back(make_pair(typesafe,(XMLObject*)nullptr)); return; } } // Unknown child (has to be paired with the last SPKISexp processed. const XMLCh* nsURI=root->getNamespaceURI(); if (!XMLString::equals(nsURI,XMLSIG_NS) && nsURI && *nsURI) { // Update second half of pair in vector, and in master list. if (!m_SPKISexps.empty() && m_SPKISexps.back().second==nullptr) { m_SPKISexps.back().second=childXMLObject; m_children.back()=childXMLObject; return; } else throw UnmarshallingException("Extension element must follow ds:SPKISexp element."); } AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } }; class XMLTOOL_DLLLOCAL PGPDataImpl : public virtual PGPData, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { void init() { m_PGPKeyID=nullptr; m_PGPKeyPacket=nullptr; m_children.push_back(nullptr); m_children.push_back(nullptr); m_pos_PGPKeyID=m_children.begin(); m_pos_PGPKeyPacket=m_pos_PGPKeyID; ++m_pos_PGPKeyPacket; } public: virtual ~PGPDataImpl() {} PGPDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { init(); } PGPDataImpl(const PGPDataImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { init(); IMPL_CLONE_TYPED_CHILD(PGPKeyID); IMPL_CLONE_TYPED_CHILD(PGPKeyPacket); IMPL_CLONE_XMLOBJECT_CHILDREN(UnknownXMLObject); } IMPL_XMLOBJECT_CLONE(PGPData); IMPL_TYPED_CHILD(PGPKeyID); IMPL_TYPED_CHILD(PGPKeyPacket); IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end()); protected: void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_CHILD(PGPKeyID,XMLSIG_NS,false); PROC_TYPED_CHILD(PGPKeyPacket,XMLSIG_NS,false); // Unknown child. const XMLCh* nsURI=root->getNamespaceURI(); if (!XMLString::equals(nsURI,XMLSIG_NS) && nsURI && *nsURI) { getUnknownXMLObjects().push_back(childXMLObject); return; } AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } }; class XMLTOOL_DLLLOCAL KeyInfoReferenceImpl : public virtual KeyInfoReference, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { void init() { m_Id=m_URI=nullptr; } public: virtual ~KeyInfoReferenceImpl() { XMLString::release(&m_Id); XMLString::release(&m_URI); } KeyInfoReferenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { init(); } KeyInfoReferenceImpl(const KeyInfoReferenceImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { init(); IMPL_CLONE_ATTRIB(Id); IMPL_CLONE_ATTRIB(URI); } IMPL_XMLOBJECT_CLONE(KeyInfoReference); IMPL_ID_ATTRIB_EX(Id,ID,nullptr); IMPL_STRING_ATTRIB(URI); protected: void marshallAttributes(DOMElement* domElement) const { MARSHALL_ID_ATTRIB(Id,ID,nullptr); MARSHALL_STRING_ATTRIB(URI,URI,nullptr); } void processAttribute(const DOMAttr* attribute) { PROC_ID_ATTRIB(Id,ID,nullptr); PROC_STRING_ATTRIB(URI,URI,nullptr); AbstractXMLObjectUnmarshaller::processAttribute(attribute); } }; class XMLTOOL_DLLLOCAL KeyInfoImpl : public virtual KeyInfo, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { public: virtual ~KeyInfoImpl() { XMLString::release(&m_Id); } KeyInfoImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Id(nullptr) { } KeyInfoImpl(const KeyInfoImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src), m_Id(nullptr) { IMPL_CLONE_ATTRIB(Id); IMPL_CLONE_CHILDBAG_BEGIN; IMPL_CLONE_TYPED_CHILD_IN_BAG(X509Data); IMPL_CLONE_TYPED_CHILD_IN_BAG(KeyName); IMPL_CLONE_TYPED_CHILD_IN_BAG(KeyValue); IMPL_CLONE_TYPED_CHILD_IN_BAG(DEREncodedKeyValue); IMPL_CLONE_TYPED_CHILD_IN_BAG(RetrievalMethod); IMPL_CLONE_TYPED_CHILD_IN_BAG(MgmtData); IMPL_CLONE_TYPED_CHILD_IN_BAG(SPKIData); IMPL_CLONE_TYPED_CHILD_IN_BAG(PGPData); IMPL_CLONE_TYPED_CHILD_IN_BAG(KeyInfoReference); IMPL_CLONE_XMLOBJECT_CHILD_IN_BAG(UnknownXMLObject); IMPL_CLONE_CHILDBAG_END; } IMPL_XMLOBJECT_CLONE(KeyInfo); IMPL_ID_ATTRIB_EX(Id,ID,nullptr); IMPL_TYPED_CHILDREN(KeyName,m_children.end()); IMPL_TYPED_CHILDREN(KeyValue,m_children.end()); IMPL_TYPED_CHILDREN(DEREncodedKeyValue,m_children.end()); IMPL_TYPED_CHILDREN(RetrievalMethod,m_children.end()); IMPL_TYPED_CHILDREN(X509Data,m_children.end()); IMPL_TYPED_CHILDREN(MgmtData,m_children.end()); IMPL_TYPED_CHILDREN(SPKIData,m_children.end()); IMPL_TYPED_CHILDREN(PGPData,m_children.end()); IMPL_TYPED_CHILDREN(KeyInfoReference,m_children.end()); IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end()); protected: void marshallAttributes(DOMElement* domElement) const { MARSHALL_ID_ATTRIB(Id,ID,nullptr); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_CHILDREN(X509Data,XMLSIG_NS,false); PROC_TYPED_CHILDREN(KeyName,XMLSIG_NS,false); PROC_TYPED_CHILDREN(KeyValue,XMLSIG_NS,false); PROC_TYPED_CHILDREN(DEREncodedKeyValue,XMLSIG11_NS,false); PROC_TYPED_CHILDREN(RetrievalMethod,XMLSIG_NS,false); PROC_TYPED_CHILDREN(MgmtData,XMLSIG_NS,false); PROC_TYPED_CHILDREN(SPKIData,XMLSIG_NS,false); PROC_TYPED_CHILDREN(PGPData,XMLSIG_NS,false); PROC_TYPED_CHILDREN(KeyInfoReference,XMLSIG11_NS,false); // Unknown child. const XMLCh* nsURI=root->getNamespaceURI(); if (!XMLString::equals(nsURI,XMLSIG_NS) && nsURI && *nsURI) { getUnknownXMLObjects().push_back(childXMLObject); return; } AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } void processAttribute(const DOMAttr* attribute) { PROC_ID_ATTRIB(Id,ID,nullptr); AbstractXMLObjectUnmarshaller::processAttribute(attribute); } }; DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,KeyName); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,MgmtData); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,Modulus); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,Exponent); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,Seed); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,PgenCounter); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,P); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,Q); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,G); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,Y); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,J); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,XPath); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,X509IssuerName); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,X509SerialNumber); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,X509SKI); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,X509SubjectName); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,X509Certificate); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,X509CRL); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,SPKISexp); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,PGPKeyID); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,PGPKeyPacket); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,OCSPResponse); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,PublicKey); }; #if defined (_MSC_VER) #pragma warning( pop ) #endif // Builder Implementations IMPL_XMLOBJECTBUILDER(X509IssuerSerial); IMPL_XMLOBJECTBUILDER(X509IssuerName); IMPL_XMLOBJECTBUILDER(X509SerialNumber); IMPL_XMLOBJECTBUILDER(X509SKI); IMPL_XMLOBJECTBUILDER(X509SubjectName); IMPL_XMLOBJECTBUILDER(X509Certificate); IMPL_XMLOBJECTBUILDER(X509CRL); IMPL_XMLOBJECTBUILDER(X509Data); IMPL_XMLOBJECTBUILDER(XPath); IMPL_XMLOBJECTBUILDER(Transform); IMPL_XMLOBJECTBUILDER(Transforms); IMPL_XMLOBJECTBUILDER(RetrievalMethod); IMPL_XMLOBJECTBUILDER(KeyName); IMPL_XMLOBJECTBUILDER(MgmtData); IMPL_XMLOBJECTBUILDER(Modulus); IMPL_XMLOBJECTBUILDER(Exponent); IMPL_XMLOBJECTBUILDER(Seed); IMPL_XMLOBJECTBUILDER(PgenCounter); IMPL_XMLOBJECTBUILDER(P); IMPL_XMLOBJECTBUILDER(Q); IMPL_XMLOBJECTBUILDER(G); IMPL_XMLOBJECTBUILDER(Y); IMPL_XMLOBJECTBUILDER(J); IMPL_XMLOBJECTBUILDER(DSAKeyValue); IMPL_XMLOBJECTBUILDER(RSAKeyValue); IMPL_XMLOBJECTBUILDER(KeyValue); IMPL_XMLOBJECTBUILDER(KeyInfo); IMPL_XMLOBJECTBUILDER(SPKISexp); IMPL_XMLOBJECTBUILDER(SPKIData); IMPL_XMLOBJECTBUILDER(PGPKeyID); IMPL_XMLOBJECTBUILDER(PGPKeyPacket); IMPL_XMLOBJECTBUILDER(PGPData); IMPL_XMLOBJECTBUILDER(DEREncodedKeyValue); IMPL_XMLOBJECTBUILDER(ECKeyValue); IMPL_XMLOBJECTBUILDER(KeyInfoReference); IMPL_XMLOBJECTBUILDER(NamedCurve); IMPL_XMLOBJECTBUILDER(OCSPResponse); IMPL_XMLOBJECTBUILDER(PublicKey); IMPL_XMLOBJECTBUILDER(X509Digest); // Unicode literals const XMLCh KeyInfo::LOCAL_NAME[] = UNICODE_LITERAL_7(K,e,y,I,n,f,o); const XMLCh KeyInfo::TYPE_NAME[] = UNICODE_LITERAL_11(K,e,y,I,n,f,o,T,y,p,e); const XMLCh KeyInfo::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,d); const XMLCh KeyValue::LOCAL_NAME[] = UNICODE_LITERAL_8(K,e,y,V,a,l,u,e); const XMLCh KeyValue::TYPE_NAME[] = UNICODE_LITERAL_12(K,e,y,V,a,l,u,e,T,y,p,e); const XMLCh DSAKeyValue::LOCAL_NAME[] = UNICODE_LITERAL_11(D,S,A,K,e,y,V,a,l,u,e); const XMLCh DSAKeyValue::TYPE_NAME[] = UNICODE_LITERAL_15(D,S,A,K,e,y,V,a,l,u,e,T,y,p,e); const XMLCh RSAKeyValue::LOCAL_NAME[] = UNICODE_LITERAL_11(R,S,A,K,e,y,V,a,l,u,e); const XMLCh RSAKeyValue::TYPE_NAME[] = UNICODE_LITERAL_15(R,S,A,K,e,y,V,a,l,u,e,T,y,p,e); const XMLCh MgmtData::LOCAL_NAME[] = UNICODE_LITERAL_8(M,g,m,t,D,a,t,a); const XMLCh KeyName::LOCAL_NAME[] = UNICODE_LITERAL_7(K,e,y,N,a,m,e); const XMLCh Modulus::LOCAL_NAME[] = UNICODE_LITERAL_7(M,o,d,u,l,u,s); const XMLCh Exponent::LOCAL_NAME[] = UNICODE_LITERAL_8(E,x,p,o,n,e,n,t); const XMLCh Seed::LOCAL_NAME[] = UNICODE_LITERAL_4(S,e,e,d); const XMLCh PgenCounter::LOCAL_NAME[] = UNICODE_LITERAL_11(P,g,e,n,C,o,u,n,t,e,r); const XMLCh P::LOCAL_NAME[] = UNICODE_LITERAL_1(P); const XMLCh Q::LOCAL_NAME[] = UNICODE_LITERAL_1(Q); const XMLCh G::LOCAL_NAME[] = UNICODE_LITERAL_1(G); const XMLCh Y::LOCAL_NAME[] = UNICODE_LITERAL_1(Y); const XMLCh J::LOCAL_NAME[] = UNICODE_LITERAL_1(J); const XMLCh XPath::LOCAL_NAME[] = UNICODE_LITERAL_5(X,P,a,t,h); const XMLCh Transform::LOCAL_NAME[] = UNICODE_LITERAL_9(T,r,a,n,s,f,o,r,m); const XMLCh Transform::TYPE_NAME[] = UNICODE_LITERAL_13(T,r,a,n,s,f,o,r,m,T,y,p,e); const XMLCh Transform::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m); const XMLCh Transforms::LOCAL_NAME[] = UNICODE_LITERAL_10(T,r,a,n,s,f,o,r,m,s); const XMLCh Transforms::TYPE_NAME[] = UNICODE_LITERAL_14(T,r,a,n,s,f,o,r,m,s,T,y,p,e); const XMLCh RetrievalMethod::LOCAL_NAME[] = UNICODE_LITERAL_15(R,e,t,r,i,e,v,a,l,M,e,t,h,o,d); const XMLCh RetrievalMethod::TYPE_NAME[] = UNICODE_LITERAL_19(R,e,t,r,i,e,v,a,l,M,e,t,h,o,d,T,y,p,e); const XMLCh RetrievalMethod::URI_ATTRIB_NAME[] = UNICODE_LITERAL_3(U,R,I); const XMLCh RetrievalMethod::TYPE_ATTRIB_NAME[] = UNICODE_LITERAL_4(T,y,p,e); const XMLCh SPKISexp::LOCAL_NAME[] = UNICODE_LITERAL_8(S,P,K,I,S,e,x,p); const XMLCh SPKIData::LOCAL_NAME[] = UNICODE_LITERAL_8(S,P,K,I,D,a,t,a); const XMLCh SPKIData::TYPE_NAME[] = UNICODE_LITERAL_12(S,P,K,I,D,a,t,a,T,y,p,e); const XMLCh PGPKeyID::LOCAL_NAME[] = UNICODE_LITERAL_8(P,G,P,K,e,y,I,D); const XMLCh PGPKeyPacket::LOCAL_NAME[] = UNICODE_LITERAL_12(P,G,P,K,e,y,P,a,c,k,e,t); const XMLCh PGPData::LOCAL_NAME[] = UNICODE_LITERAL_7(P,G,P,D,a,t,a); const XMLCh PGPData::TYPE_NAME[] = UNICODE_LITERAL_11(P,G,P,D,a,t,a,T,y,p,e); const XMLCh DEREncodedKeyValue::LOCAL_NAME[] = UNICODE_LITERAL_18(D,E,R,E,n,c,o,d,e,d,K,e,y,V,a,l,u,e); const XMLCh DEREncodedKeyValue::TYPE_NAME[] = UNICODE_LITERAL_22(D,E,R,E,n,c,o,d,e,d,K,e,y,V,a,l,u,e,T,y,p,e); const XMLCh DEREncodedKeyValue::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,d); const XMLCh ECKeyValue::LOCAL_NAME[] = UNICODE_LITERAL_10(E,C,K,e,y,V,a,l,u,e); const XMLCh ECKeyValue::TYPE_NAME[] = UNICODE_LITERAL_14(E,C,K,e,y,V,a,l,u,e,T,y,p,e); const XMLCh ECKeyValue::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,d); const XMLCh KeyInfoReference::LOCAL_NAME[] = UNICODE_LITERAL_16(K,e,y,I,n,f,o,R,e,f,e,r,e,n,c,e); const XMLCh KeyInfoReference::TYPE_NAME[] = UNICODE_LITERAL_20(K,e,y,I,n,f,o,R,e,f,e,r,e,n,c,e,T,y,p,e); const XMLCh KeyInfoReference::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,d); const XMLCh KeyInfoReference::URI_ATTRIB_NAME[] = UNICODE_LITERAL_3(U,R,I); const XMLCh NamedCurve::LOCAL_NAME[] = UNICODE_LITERAL_10(N,a,m,e,d,C,u,r,v,e); const XMLCh NamedCurve::TYPE_NAME[] = UNICODE_LITERAL_14(N,a,m,e,d,C,u,r,v,e,T,y,p,e); const XMLCh NamedCurve::URI_ATTRIB_NAME[] = UNICODE_LITERAL_3(U,R,I); const XMLCh OCSPResponse::LOCAL_NAME[] = UNICODE_LITERAL_12(O,C,S,P,R,e,s,p,o,n,s,e); const XMLCh PublicKey::LOCAL_NAME[] = UNICODE_LITERAL_9(P,u,b,l,i,c,K,e,y); const XMLCh X509Digest::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m); #define XCH(ch) chLatin_##ch #define XNUM(d) chDigit_##d const XMLCh X509Data::LOCAL_NAME[] = { XCH(X), XNUM(5), XNUM(0), XNUM(9), XCH(D), XCH(a), XCH(t), XCH(a), chNull }; const XMLCh X509Data::TYPE_NAME[] = { XCH(X), XNUM(5), XNUM(0), XNUM(9), XCH(D), XCH(a), XCH(t), XCH(a), XCH(T), XCH(y), XCH(p), XCH(e), chNull }; const XMLCh X509IssuerSerial::LOCAL_NAME[] = { XCH(X), XNUM(5), XNUM(0), XNUM(9), XCH(I), XCH(s), XCH(s), XCH(u), XCH(e), XCH(r), XCH(S), XCH(e), XCH(r), XCH(i), XCH(a), XCH(l), chNull }; const XMLCh X509IssuerSerial::TYPE_NAME[] = { XCH(X), XNUM(5), XNUM(0), XNUM(9), XCH(I), XCH(s), XCH(s), XCH(u), XCH(e), XCH(r), XCH(S), XCH(e), XCH(r), XCH(i), XCH(a), XCH(l), XCH(T), XCH(y), XCH(p), XCH(e), chNull }; const XMLCh X509IssuerName::LOCAL_NAME[] = { XCH(X), XNUM(5), XNUM(0), XNUM(9), XCH(I), XCH(s), XCH(s), XCH(u), XCH(e), XCH(r), XCH(N), XCH(a), XCH(m), XCH(e), chNull }; const XMLCh X509SerialNumber::LOCAL_NAME[] = { XCH(X), XNUM(5), XNUM(0), XNUM(9), XCH(S), XCH(e), XCH(r), XCH(i), XCH(a), XCH(l), XCH(N), XCH(u), XCH(m), XCH(b), XCH(e), XCH(r), chNull }; const XMLCh X509SKI::LOCAL_NAME[] = { XCH(X), XNUM(5), XNUM(0), XNUM(9), XCH(S), XCH(K), XCH(I), chNull }; const XMLCh X509SubjectName::LOCAL_NAME[] = { XCH(X), XNUM(5), XNUM(0), XNUM(9), XCH(S), XCH(u), XCH(b), XCH(j), XCH(e), XCH(c), XCH(t), XCH(N), XCH(a), XCH(m), XCH(e), chNull }; const XMLCh X509Certificate::LOCAL_NAME[] = { XCH(X), XNUM(5), XNUM(0), XNUM(9), XCH(C), XCH(e), XCH(r), XCH(t), XCH(i), XCH(f), XCH(i), XCH(c), XCH(a), XCH(t), XCH(e), chNull }; const XMLCh X509CRL::LOCAL_NAME[] = { XCH(X), XNUM(5), XNUM(0), XNUM(9), XCH(C), XCH(R), XCH(L), chNull }; const XMLCh X509Digest::LOCAL_NAME[] = { XCH(X), XNUM(5), XNUM(0), XNUM(9), XCH(D), XCH(i), XCH(g), XCH(e), XCH(s), XCH(t), chNull }; const XMLCh X509Digest::TYPE_NAME[] = { XCH(X), XNUM(5), XNUM(0), XNUM(9), XCH(D), XCH(i), XCH(g), XCH(e), XCH(s), XCH(t), XCH(T), XCH(y), XCH(p), XCH(e), chNull }; const XMLCh RetrievalMethod::TYPE_DSAKEYVALUE[] = { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash, chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash, chDigit_2, chDigit_0, chDigit_0, chDigit_0, chForwardSlash, chDigit_0, chDigit_9, chForwardSlash, chLatin_x, chLatin_m, chLatin_l, chLatin_d, chLatin_s, chLatin_i, chLatin_g, chPound, chLatin_D, chLatin_S, chLatin_A, chLatin_K, chLatin_e, chLatin_y, chLatin_V, chLatin_a, chLatin_l, chLatin_u, chLatin_e, chNull }; const XMLCh RetrievalMethod::TYPE_RSAKEYVALUE[] = { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash, chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash, chDigit_2, chDigit_0, chDigit_0, chDigit_0, chForwardSlash, chDigit_0, chDigit_9, chForwardSlash, chLatin_x, chLatin_m, chLatin_l, chLatin_d, chLatin_s, chLatin_i, chLatin_g, chPound, chLatin_R, chLatin_S, chLatin_A, chLatin_K, chLatin_e, chLatin_y, chLatin_V, chLatin_a, chLatin_l, chLatin_u, chLatin_e, chNull }; const XMLCh RetrievalMethod::TYPE_X509DATA[] = { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash, chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash, chDigit_2, chDigit_0, chDigit_0, chDigit_0, chForwardSlash, chDigit_0, chDigit_9, chForwardSlash, chLatin_x, chLatin_m, chLatin_l, chLatin_d, chLatin_s, chLatin_i, chLatin_g, chPound, chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_D, chLatin_a, chLatin_t, chLatin_a, chNull }; xmltooling-1.5.3/xmltooling/signature/impl/KeyInfoSchemaValidators.cpp000644 001751 001751 00000022736 12003305016 027462 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * KeyInfoSchemaValidators.cpp * * Schema validators for KeyInfo schema. */ #include "internal.h" #include "exceptions.h" #include "signature/KeyInfo.h" #include "validation/Validator.h" #include "validation/ValidatorSuite.h" using namespace xmlsignature; using namespace xmltooling; using namespace std; using xmlconstants::XMLSIG_NS; using xmlconstants::XMLSIG11_NS; #define XMLOBJECTVALIDATOR_ONLYONEOF4(cname,proper1,proper2,proper3,proper4) \ int c##proper1##proper2##proper3##proper4=0; \ if (ptr->get##proper1()!=nullptr) \ c##proper1##proper2##proper3##proper4++; \ if (ptr->get##proper2()!=nullptr) \ c##proper1##proper2##proper3##proper4++; \ if (ptr->get##proper3()!=nullptr) \ c##proper1##proper2##proper3##proper4++; \ if (ptr->get##proper4()!=nullptr) \ c##proper1##proper2##proper3##proper4++; \ if (c##proper1##proper2##proper3##proper4 != 1) \ throw xmltooling::ValidationException(#cname" must have only one of "#proper1", "#proper2", "#proper3", or "#proper4".") namespace xmlsignature { XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,KeyName); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,MgmtData); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,Modulus); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,Exponent); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,Seed); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,PgenCounter); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,P); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,Q); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,G); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,Y); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,J); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,XPath); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,X509IssuerName); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,X509SerialNumber); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,X509SKI); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,X509SubjectName); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,X509Certificate); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,X509CRL); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,SPKISexp); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,PGPKeyID); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,PGPKeyPacket); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,DEREncodedKeyValue); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,OCSPResponse); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,PublicKey); BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,RSAKeyValue); XMLOBJECTVALIDATOR_REQUIRE(RSAKeyValue,Modulus); XMLOBJECTVALIDATOR_REQUIRE(RSAKeyValue,Exponent); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,DSAKeyValue); XMLOBJECTVALIDATOR_REQUIRE(DSAKeyValue,Y); XMLOBJECTVALIDATOR_NONEORBOTH(DSKeyValue,P,Q); XMLOBJECTVALIDATOR_NONEORBOTH(DSKeyValue,Seed,PgenCounter); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,KeyValue); XMLOBJECTVALIDATOR_ONLYONEOF4(KeyValue,DSAKeyValue,RSAKeyValue,ECKeyValue,UnknownXMLObject); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,Transform); XMLOBJECTVALIDATOR_REQUIRE(Transform,Algorithm); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,Transforms); XMLOBJECTVALIDATOR_NONEMPTY(Transforms,Transform); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,RetrievalMethod); XMLOBJECTVALIDATOR_REQUIRE(RetrievalMethod,URI); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,X509IssuerSerial); XMLOBJECTVALIDATOR_REQUIRE(X509IssuerSerial,X509IssuerName); XMLOBJECTVALIDATOR_REQUIRE(X509IssuerSerial,X509SerialNumber); END_XMLOBJECTVALIDATOR; class XMLTOOL_DLLLOCAL checkWildcardNS { public: void operator()(const XMLObject* xmlObject) const { const XMLCh* ns=xmlObject->getElementQName().getNamespaceURI(); if (XMLString::equals(ns,XMLSIG_NS) || !ns || !*ns) { throw ValidationException( "Object contains an illegal extension child element ($1).", params(1,xmlObject->getElementQName().toString().c_str()) ); } } }; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,X509Data); if (!ptr->hasChildren()) throw ValidationException("X509Data must have at least one child element."); const vector& anys=ptr->getUnknownXMLObjects(); for_each(anys.begin(),anys.end(),checkWildcardNS()); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,SPKIData); XMLOBJECTVALIDATOR_NONEMPTY(SPKIData,SPKISexp); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,PGPData); XMLOBJECTVALIDATOR_ONEOF(PGPData,PGPKeyID,PGPKeyPacket); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,KeyInfo); if (!ptr->hasChildren()) throw ValidationException("KeyInfo must have at least one child element."); const vector& anys=ptr->getUnknownXMLObjects(); for_each(anys.begin(),anys.end(),checkWildcardNS()); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,KeyInfoReference); XMLOBJECTVALIDATOR_REQUIRE(KeyInfoReference,URI); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,NamedCurve); XMLOBJECTVALIDATOR_REQUIRE(NamedCurve,URI); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,ECKeyValue); XMLOBJECTVALIDATOR_ONEOF(ECKeyValue,ECParameters,NamedCurve); XMLOBJECTVALIDATOR_REQUIRE(ECKeyValue,PublicKey); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,X509Digest); XMLOBJECTVALIDATOR_REQUIRE(X509Digest,Algorithm); END_XMLOBJECTVALIDATOR; }; #define REGISTER_ELEMENT(namespaceURI,cname) \ q=QName(namespaceURI,cname::LOCAL_NAME); \ XMLObjectBuilder::registerBuilder(q,new cname##Builder()); \ SchemaValidators.registerValidator(q,new cname##SchemaValidator()) #define REGISTER_TYPE(namespaceURI,cname) \ q=QName(namespaceURI,cname::TYPE_NAME); \ XMLObjectBuilder::registerBuilder(q,new cname##Builder()); \ SchemaValidators.registerValidator(q,new cname##SchemaValidator()) void xmlsignature::registerKeyInfoClasses() { QName q; REGISTER_ELEMENT(XMLSIG_NS,KeyInfo); REGISTER_ELEMENT(XMLSIG_NS,KeyName); REGISTER_ELEMENT(XMLSIG_NS,KeyValue); REGISTER_ELEMENT(XMLSIG_NS,MgmtData); REGISTER_ELEMENT(XMLSIG_NS,DSAKeyValue); REGISTER_ELEMENT(XMLSIG_NS,RSAKeyValue); REGISTER_ELEMENT(XMLSIG_NS,Exponent); REGISTER_ELEMENT(XMLSIG_NS,Modulus); REGISTER_ELEMENT(XMLSIG_NS,P); REGISTER_ELEMENT(XMLSIG_NS,Q); REGISTER_ELEMENT(XMLSIG_NS,G); REGISTER_ELEMENT(XMLSIG_NS,Y); REGISTER_ELEMENT(XMLSIG_NS,J); REGISTER_ELEMENT(XMLSIG_NS,Seed); REGISTER_ELEMENT(XMLSIG_NS,PgenCounter); REGISTER_ELEMENT(XMLSIG_NS,XPath); REGISTER_ELEMENT(XMLSIG_NS,Transform); REGISTER_ELEMENT(XMLSIG_NS,Transforms); REGISTER_ELEMENT(XMLSIG_NS,RetrievalMethod); REGISTER_ELEMENT(XMLSIG_NS,X509IssuerSerial); REGISTER_ELEMENT(XMLSIG_NS,X509IssuerName); REGISTER_ELEMENT(XMLSIG_NS,X509SerialNumber); REGISTER_ELEMENT(XMLSIG_NS,X509SKI); REGISTER_ELEMENT(XMLSIG_NS,X509SubjectName); REGISTER_ELEMENT(XMLSIG_NS,X509Certificate); REGISTER_ELEMENT(XMLSIG_NS,X509CRL); REGISTER_ELEMENT(XMLSIG_NS,X509Data); REGISTER_ELEMENT(XMLSIG_NS,SPKISexp); REGISTER_ELEMENT(XMLSIG_NS,SPKIData); REGISTER_ELEMENT(XMLSIG_NS,PGPKeyID); REGISTER_ELEMENT(XMLSIG_NS,PGPKeyPacket); REGISTER_ELEMENT(XMLSIG_NS,PGPData); REGISTER_TYPE(XMLSIG_NS,KeyInfo); REGISTER_TYPE(XMLSIG_NS,KeyValue); REGISTER_TYPE(XMLSIG_NS,DSAKeyValue); REGISTER_TYPE(XMLSIG_NS,RSAKeyValue); REGISTER_TYPE(XMLSIG_NS,Transform); REGISTER_TYPE(XMLSIG_NS,Transforms); REGISTER_TYPE(XMLSIG_NS,RetrievalMethod); REGISTER_TYPE(XMLSIG_NS,X509IssuerSerial); REGISTER_TYPE(XMLSIG_NS,X509Data); REGISTER_TYPE(XMLSIG_NS,SPKIData); REGISTER_TYPE(XMLSIG_NS,PGPData); REGISTER_ELEMENT(XMLSIG11_NS,DEREncodedKeyValue); REGISTER_ELEMENT(XMLSIG11_NS,ECKeyValue); REGISTER_ELEMENT(XMLSIG11_NS,KeyInfoReference); REGISTER_ELEMENT(XMLSIG11_NS,NamedCurve); REGISTER_ELEMENT(XMLSIG11_NS,OCSPResponse); REGISTER_ELEMENT(XMLSIG11_NS,PublicKey); REGISTER_ELEMENT(XMLSIG11_NS,X509Digest); REGISTER_TYPE(XMLSIG11_NS,DEREncodedKeyValue); REGISTER_TYPE(XMLSIG11_NS,ECKeyValue); REGISTER_TYPE(XMLSIG11_NS,KeyInfoReference); REGISTER_TYPE(XMLSIG11_NS,NamedCurve); REGISTER_TYPE(XMLSIG11_NS,X509Digest); } xmltooling-1.5.3/xmltooling/signature/impl/SignatureValidator.cpp000644 001751 001751 00000005754 12003305016 026554 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * SignatureValidator.cpp * * Validator for signatures based on an externally-supplied key */ #include "internal.h" #include "security/Credential.h" #include "signature/Signature.h" #include "signature/SignatureValidator.h" #include #include using namespace xmlsignature; using namespace xmltooling; using namespace std; SignatureValidator::SignatureValidator(XSECCryptoKey* key) : m_key(key), m_credential(nullptr) { } SignatureValidator::SignatureValidator(const Credential* credential) : m_key(nullptr), m_credential(credential) { } SignatureValidator::~SignatureValidator() { } void SignatureValidator::setKey(XSECCryptoKey* key) { m_key = key; m_credential = nullptr; } void SignatureValidator::setCredential(const Credential* credential) { m_key = nullptr; m_credential = credential; } void SignatureValidator::validate(const XMLObject* xmlObject) const { const Signature* sigObj=dynamic_cast(xmlObject); if (!sigObj) throw ValidationException("Validator only applies to Signature objects."); validate(sigObj); } void SignatureValidator::validate(const Signature* sigObj) const { DSIGSignature* sig=sigObj->getXMLSignature(); if (!sig) throw ValidationException("Signature does not exist yet."); else if (!m_key && !m_credential) throw ValidationException("No Credential or key set on Validator."); XSECCryptoKey* key = m_key ? m_key : (m_credential ? m_credential->getPublicKey() : nullptr); if (!key) throw ValidationException("Credential did not contain a verification key."); try { sig->setSigningKey(key->clone()); if (!sig->verify()) throw ValidationException("Digital signature does not validate with the supplied key."); } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); throw ValidationException(string("Caught an XMLSecurity exception verifying signature: ") + temp.get()); } catch(XSECCryptoException& e) { throw ValidationException(string("Caught an XMLSecurity exception verifying signature: ") + e.getMsg()); } } xmltooling-1.5.3/xmltooling/signature/impl/XMLSecSignatureImpl.cpp000644 001751 001751 00000052717 12003305016 026545 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * XMLSecSignatureImpl.cpp * * Signature class for XMLSec-based signature-handling. */ #include "internal.h" #include "exceptions.h" #include "logging.h" #include "impl/UnknownElement.h" #include "security/Credential.h" #include "signature/ContentReference.h" #include "signature/KeyInfo.h" #include "signature/Signature.h" #include "util/NDC.h" #include "util/XMLConstants.h" #include "util/XMLHelper.h" #include #include #include #include #include #include #include #include #include #include #include #include using namespace xmlsignature; using namespace xmltooling::logging; using namespace xmltooling; using namespace xercesc; using namespace std; using xmlconstants::XMLSIG_NS; using xmlconstants::XMLSIG_PREFIX; namespace xmlsignature { #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif class XMLTOOL_DLLLOCAL XMLSecSignatureImpl : public UnknownElementImpl, public virtual Signature { public: XMLSecSignatureImpl() : AbstractXMLObject(XMLSIG_NS, Signature::LOCAL_NAME, XMLSIG_PREFIX), UnknownElementImpl(XMLSIG_NS, Signature::LOCAL_NAME, XMLSIG_PREFIX), m_signature(nullptr), m_c14n(nullptr), m_sm(nullptr), m_key(nullptr), m_keyInfo(nullptr), m_reference(nullptr) {} virtual ~XMLSecSignatureImpl(); void releaseDOM() const; void releaseChildrenDOM(bool propagateRelease=true) const { if (m_keyInfo) { m_keyInfo->releaseDOM(); if (propagateRelease) m_keyInfo->releaseChildrenDOM(); } } XMLObject* clone() const; Signature* cloneSignature() const; DOMElement* marshall(DOMDocument* document=nullptr, const vector* sigs=nullptr, const Credential* credential=nullptr) const; DOMElement* marshall(DOMElement* parentElement, const vector* sigs=nullptr, const Credential* credential=nullptr) const; XMLObject* unmarshall(DOMElement* element, bool bindDocument=false); // Getters const XMLCh* getCanonicalizationMethod() const { if (m_signature) return canonicalizationMethod2UNICODEURI(m_signature->getCanonicalizationMethod()); return m_c14n ? m_c14n : DSIGConstants::s_unicodeStrURIEXC_C14N_NOC; } const XMLCh* getSignatureAlgorithm() const { if (!m_sm && m_signature) { #ifdef XMLTOOLING_XMLSEC_SIGALGORITHM m_sm = XMLString::replicate(m_signature->getAlgorithmURI()); #else safeBuffer sURI; if (signatureHashMethod2URI(sURI, m_signature->getSignatureMethod(), m_signature->getHashMethod())) m_sm = XMLString::replicate(sURI.sbStrToXMLCh()); #endif } return m_sm; } KeyInfo* getKeyInfo() const { return m_keyInfo; } ContentReference* getContentReference() const { return m_reference; } DSIGSignature* getXMLSignature() const { return m_signature; } // Setters void setCanonicalizationMethod(const XMLCh* c14n) { m_c14n = prepareForAssignment(m_c14n,c14n); } void setSignatureAlgorithm(const XMLCh* sm) { m_sm = prepareForAssignment(m_sm,sm); } void setSigningKey(XSECCryptoKey* signingKey) { delete m_key; m_key=signingKey; } void setKeyInfo(KeyInfo* keyInfo) { prepareForAssignment(m_keyInfo, keyInfo); m_keyInfo=keyInfo; } void setContentReference(ContentReference* reference) { delete m_reference; m_reference=reference; } void sign(const Credential* credential=nullptr); private: mutable DSIGSignature* m_signature; XMLCh* m_c14n; mutable XMLCh* m_sm; XSECCryptoKey* m_key; mutable KeyInfo* m_keyInfo; ContentReference* m_reference; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif }; ContentReference::ContentReference() { } ContentReference::~ContentReference() { } Signature::Signature() { } Signature::~Signature() { } XMLSecSignatureImpl::~XMLSecSignatureImpl() { // Release the associated signature. if (m_signature) XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->releaseSignature(m_signature); XMLString::release(&m_c14n); XMLString::release(&m_sm); delete m_key; delete m_keyInfo; delete m_reference; } void XMLSecSignatureImpl::releaseDOM() const { if (getDOM()) { // This should save off the DOM UnknownElementImpl::releaseDOM(); // Release the associated signature. if (m_signature) { XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->releaseSignature(m_signature); m_signature=nullptr; } } } XMLObject* XMLSecSignatureImpl::clone() const { return cloneSignature(); } Signature* XMLSecSignatureImpl::cloneSignature() const { XMLSecSignatureImpl* ret=new XMLSecSignatureImpl(); ret->m_c14n=XMLString::replicate(m_c14n); ret->m_sm=XMLString::replicate(m_sm); if (m_key) ret->m_key=m_key->clone(); if (m_keyInfo) ret->m_keyInfo=m_keyInfo->cloneKeyInfo(); // If there's no XML locally, serialize this object into the new one, otherwise just copy it over. if (m_xml.empty()) serialize(ret->m_xml); else ret->m_xml=m_xml; return ret; } void XMLSecSignatureImpl::sign(const Credential* credential) { Category& log=Category::getInstance(XMLTOOLING_LOGCAT".Signature"); log.debug("applying signature"); if (!m_signature) throw SignatureException("Only a marshalled Signature object can be signed."); else if (!m_reference) throw SignatureException("No ContentReference object set for signature creation."); XSECCryptoKey* key = credential ? credential->getPrivateKey() : m_key; if (!key) throw SignatureException("No signing key available for signature creation."); try { log.debug("creating signature reference(s)"); DSIGReferenceList* refs = m_signature->getReferenceList(); while (refs && refs->getSize()) delete refs->removeReference(0); m_reference->createReferences(m_signature); log.debug("computing signature"); m_signature->setSigningKey(key->clone()); m_signature->sign(); } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); throw SignatureException(string("Caught an XMLSecurity exception while signing: ") + temp.get()); } catch(XSECCryptoException& e) { throw SignatureException(string("Caught an XMLSecurity exception while signing: ") + e.getMsg()); } } DOMElement* XMLSecSignatureImpl::marshall(DOMDocument* document, const vector* sigs, const Credential* credential) const { #ifdef _DEBUG xmltooling::NDC ndc("marshall"); #endif Category& log=Category::getInstance(XMLTOOLING_LOGCAT".XMLObject.Signature"); log.debug("marshalling ds:Signature"); DOMElement* cachedDOM=getDOM(); if (cachedDOM) { if (!document || document==cachedDOM->getOwnerDocument()) { log.debug("Signature has a usable cached DOM, reusing it"); if (document) setDocumentElement(cachedDOM->getOwnerDocument(),cachedDOM); releaseParentDOM(true); return cachedDOM; } // We have a DOM but it doesn't match the document we were given. This both sucks and blows. // Without an adoptNode option to maintain the child pointers, we have to either import the // DOM while somehow reassigning all the nested references (which amounts to a complete // *unmarshall* operation), or we just release the existing DOM and hope that we can get // it back. This depends on all objects being able to preserve their DOM at all costs. releaseChildrenDOM(true); releaseDOM(); } // If we get here, we didn't have a usable DOM. bool bindDocument=false; if (m_xml.empty()) { // Fresh signature, so we just create an empty one. log.debug("creating empty Signature element"); if (!document) { document=DOMImplementationRegistry::getDOMImplementation(nullptr)->createDocument(); bindDocument=true; } DSIGSignature* temp=XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->newSignature(); temp->setDSIGNSPrefix(XMLSIG_PREFIX); const XMLCh* alg = getSignatureAlgorithm(); if (!alg) alg = DSIGConstants::s_unicodeStrURIRSA_SHA1; cachedDOM=temp->createBlankSignature(document, getCanonicalizationMethod(), alg); m_signature = temp; } else { // We need to reparse the XML we saved off into a new DOM. MemBufInputSource src(reinterpret_cast(m_xml.c_str()),m_xml.length(),"XMLSecSignatureImpl"); Wrapper4InputSource dsrc(&src,false); log.debug("parsing Signature XML back into DOM tree"); DOMDocument* internalDoc=XMLToolingConfig::getConfig().getParser().parse(dsrc); if (document) { // The caller insists on using his own document, so we now have to import the thing // into it. Then we're just dumping the one we built. log.debug("reimporting new DOM into caller-supplied document"); try { cachedDOM=static_cast(document->importNode(internalDoc->getDocumentElement(), true)); } catch (XMLException& ex) { internalDoc->release(); auto_ptr_char temp(ex.getMessage()); throw XMLParserException( string("Error importing DOM into caller-supplied document: ") + (temp.get() ? temp.get() : "no message") ); } internalDoc->release(); } else { // We just bind the document we built to the object as the result. cachedDOM=static_cast(internalDoc->getDocumentElement()); document=internalDoc; bindDocument=true; } // Now reload the signature from the DOM. try { m_signature=XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->newSignatureFromDOM( document, cachedDOM ); m_signature->load(); } catch(XSECException& e) { if (bindDocument) document->release(); auto_ptr_char temp(e.getMsg()); throw MarshallingException(string("Caught an XMLSecurity exception while loading signature: ") + temp.get()); } catch(XSECCryptoException& e) { if (bindDocument) document->release(); throw MarshallingException(string("Caught an XMLSecurity exception while loading signature: ") + e.getMsg()); } } // Marshall KeyInfo data. if (credential) { delete m_keyInfo; m_keyInfo = nullptr; m_keyInfo = credential->getKeyInfo(); } if (m_keyInfo && (!m_signature->getKeyInfoList() || m_signature->getKeyInfoList()->isEmpty())) { m_keyInfo->marshall(cachedDOM); } // Recache the DOM and clear the serialized copy. setDocumentElement(document, cachedDOM); log.debug("caching DOM for Signature (document is %sbound)", bindDocument ? "" : "not "); setDOM(cachedDOM, bindDocument); releaseParentDOM(true); m_xml.erase(); return cachedDOM; } DOMElement* XMLSecSignatureImpl::marshall(DOMElement* parentElement, const vector* sigs, const Credential* credential) const { #ifdef _DEBUG xmltooling::NDC ndc("marshall"); #endif Category& log=Category::getInstance(XMLTOOLING_LOGCAT".XMLObject.Signature"); log.debug("marshalling ds:Signature"); DOMElement* cachedDOM=getDOM(); if (cachedDOM) { if (parentElement->getOwnerDocument()==cachedDOM->getOwnerDocument()) { log.debug("Signature has a usable cached DOM, reusing it"); if (parentElement!=cachedDOM->getParentNode()) { parentElement->appendChild(cachedDOM); releaseParentDOM(true); } return cachedDOM; } // We have a DOM but it doesn't match the document we were given. This both sucks and blows. // Without an adoptNode option to maintain the child pointers, we have to either import the // DOM while somehow reassigning all the nested references (which amounts to a complete // *unmarshall* operation), or we just release the existing DOM and hope that we can get // it back. This depends on all objects being able to preserve their DOM at all costs. releaseChildrenDOM(true); releaseDOM(); } // If we get here, we didn't have a usable DOM. if (m_xml.empty()) { // Fresh signature, so we just create an empty one. log.debug("creating empty Signature element"); DSIGSignature* temp=XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->newSignature(); temp->setDSIGNSPrefix(XMLSIG_PREFIX); const XMLCh* alg = getSignatureAlgorithm(); if (!alg) alg = DSIGConstants::s_unicodeStrURIRSA_SHA1; cachedDOM=temp->createBlankSignature(parentElement->getOwnerDocument(), getCanonicalizationMethod(), alg); m_signature = temp; } else { MemBufInputSource src(reinterpret_cast(m_xml.c_str()),m_xml.length(),"XMLSecSignatureImpl"); Wrapper4InputSource dsrc(&src,false); log.debug("parsing XML back into DOM tree"); DOMDocument* internalDoc=XMLToolingConfig::getConfig().getParser().parse(dsrc); log.debug("reimporting new DOM into caller-supplied document"); try { cachedDOM=static_cast(parentElement->getOwnerDocument()->importNode(internalDoc->getDocumentElement(),true)); } catch (XMLException& ex) { internalDoc->release(); auto_ptr_char temp(ex.getMessage()); throw XMLParserException( string("Error importing DOM into caller-supplied document: ") + (temp.get() ? temp.get() : "no message") ); } internalDoc->release(); // Now reload the signature from the DOM. try { m_signature=XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->newSignatureFromDOM( parentElement->getOwnerDocument(), cachedDOM ); m_signature->load(); } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); throw MarshallingException(string("Caught an XMLSecurity exception while loading signature: ") + temp.get()); } catch(XSECCryptoException& e) { throw MarshallingException(string("Caught an XMLSecurity exception while loading signature: ") + e.getMsg()); } } // Marshall KeyInfo data. if (credential) { delete m_keyInfo; m_keyInfo = nullptr; m_keyInfo = credential->getKeyInfo(); } if (m_keyInfo && (!m_signature->getKeyInfoList() || m_signature->getKeyInfoList()->isEmpty())) { m_keyInfo->marshall(cachedDOM); } // Recache the DOM and clear the serialized copy. parentElement->appendChild(cachedDOM); log.debug("caching DOM for Signature"); setDOM(cachedDOM, false); releaseParentDOM(true); m_xml.erase(); return cachedDOM; } XMLObject* XMLSecSignatureImpl::unmarshall(DOMElement* element, bool bindDocument) { Category::getInstance(XMLTOOLING_LOGCAT".XMLObject.Signature").debug("unmarshalling ds:Signature"); try { m_signature=XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->newSignatureFromDOM( element->getOwnerDocument(), element ); m_signature->load(); } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); throw UnmarshallingException(string("Caught an XMLSecurity exception while loading signature: ") + temp.get()); } catch(XSECCryptoException& e) { throw UnmarshallingException(string("Caught an XMLSecurity exception while loading signature: ") + e.getMsg()); } setDOM(element, bindDocument); return this; } #ifdef HAVE_COVARIANT_RETURNS Signature* #else XMLObject* #endif SignatureBuilder::buildObject( const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType ) const { if (!XMLString::equals(nsURI,XMLSIG_NS) || !XMLString::equals(localName,Signature::LOCAL_NAME)) throw XMLObjectException("XMLSecSignatureBuilder requires standard Signature element name."); return buildObject(); } #ifdef HAVE_COVARIANT_RETURNS Signature* #else XMLObject* #endif SignatureBuilder::buildObject() const { return new XMLSecSignatureImpl(); } Signature* SignatureBuilder::buildSignature() { const SignatureBuilder* b = dynamic_cast( XMLObjectBuilder::getBuilder(xmltooling::QName(xmlconstants::XMLSIG_NS,Signature::LOCAL_NAME)) ); if (b) { #ifdef HAVE_COVARIANT_RETURNS return b->buildObject(); #else return dynamic_cast(b->buildObject()); #endif } throw XMLObjectException("Unable to obtain typed builder for Signature."); } const XMLCh Signature::LOCAL_NAME[] = UNICODE_LITERAL_9(S,i,g,n,a,t,u,r,e); // Raw signature methods. unsigned int Signature::createRawSignature( XSECCryptoKey* key, const XMLCh* sigAlgorithm, const char* in, unsigned int in_len, char* out, unsigned int out_len ) { try { XSECAlgorithmHandler* handler = XSECPlatformUtils::g_algorithmMapper->mapURIToHandler(sigAlgorithm); if (!handler) { auto_ptr_char alg(sigAlgorithm); throw SignatureException("Unsupported signature algorithm ($1).", params(1,alg.get())); } // Move input into a safeBuffer to source the transform chain. safeBuffer sb,sbout; sb.sbStrncpyIn(in,in_len); TXFMSB* sbt = new TXFMSB(nullptr); sbt->setInput(sb, in_len); TXFMChain tx(sbt); // Sign the chain. unsigned int siglen = handler->signToSafeBuffer(&tx, sigAlgorithm, key, out_len-1, sbout); if (siglen >= out_len) throw SignatureException("Signature size exceeded output buffer size."); // Push all non-whitespace into buffer. unsigned int ret_len = 0; const char* source = sbout.rawCharBuffer(); while (siglen--) { if (isspace(*source)) ++source; else { *out++ = *source++; ++ret_len; } } *out = 0; return ret_len; } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); throw SignatureException(string("Caught an XMLSecurity exception while creating raw signature: ") + temp.get()); } catch(XSECCryptoException& e) { throw SignatureException(string("Caught an XMLSecurity exception while creating raw signature: ") + e.getMsg()); } } bool Signature::verifyRawSignature( XSECCryptoKey* key, const XMLCh* sigAlgorithm, const char* signature, const char* in, unsigned int in_len ) { try { XSECAlgorithmHandler* handler = XSECPlatformUtils::g_algorithmMapper->mapURIToHandler(sigAlgorithm); if (!handler) { auto_ptr_char alg(sigAlgorithm); throw SignatureException("Unsupported signature algorithm ($1).", params(1,alg.get())); } // Move input into a safeBuffer to source the transform chain. safeBuffer sb; sb.sbStrncpyIn(in,in_len); TXFMSB* sbt = new TXFMSB(nullptr); sbt->setInput(sb, in_len); TXFMChain tx(sbt); // Verify the chain. return handler->verifyBase64Signature(&tx, sigAlgorithm, signature, 0, key); } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); throw SignatureException(string("Caught an XMLSecurity exception while verifying raw signature: ") + temp.get()); } catch(XSECCryptoException& e) { throw SignatureException(string("Caught an XMLSecurity exception while verifying raw signature: ") + e.getMsg()); } } xmltooling-1.5.3/xmltooling/security/impl/000755 001751 001751 00000000000 12157725415 022117 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltooling/security/AbstractPKIXTrustEngine.h000644 001751 001751 00000020063 12003305017 025735 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/AbstractPKIXTrustEngine.h * * A trust engine that uses X.509 trust anchors and CRLs associated with a peer * to perform PKIX validation of signatures and credentials. */ #if !defined(__xmltooling_pkixtrust_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_pkixtrust_h__ #include #include #include #include #include namespace xmltooling { class XMLTOOL_API OpenSSLPathValidator; class XMLTOOL_API XSECCryptoX509CRL; /** * A trust engine that uses X.509 trust anchors and CRLs associated with a peer * to perform PKIX validation of signatures and credentials. */ class XMLTOOL_API AbstractPKIXTrustEngine : public SignatureTrustEngine, public OpenSSLTrustEngine { protected: /** * Constructor. * * If a DOM is supplied, the following XML content is supported: * *

    *
  • checkRevocation attribute (off, entityOnly, fullChain) *
  • policyMappingInhibit attribute (boolean) *
  • anyPolicyInhibit attribute (boolean) *
  • &t;PathValidator> element (zero or more) *
  • <TrustedName> element (zero or more) *
  • <PolicyOID> element (zero or more) *
* * @param e DOM to supply configuration for provider */ AbstractPKIXTrustEngine(const xercesc::DOMElement* e=nullptr); /** Plugins used to perform path validation. */ boost::ptr_vector m_pathValidators; /** Controls revocation checking, currently limited to CRLs and supports "off", "entityOnly", "fullChain". */ std::string m_checkRevocation; /** Deprecated option, equivalent to checkRevocation="fullChain". */ bool m_fullCRLChain; /** Disable policy mapping when applying PKIX policy checking. */ bool m_policyMappingInhibit; /** Disallow the anyPolicy OID (2.5.29.32.0) when applying PKIX policy checking. */ bool m_anyPolicyInhibit; /** A list of acceptable policy OIDs (explicit policy checking). */ std::set m_policyOIDs; /** A list of trusted names (subject DNs / CN attributes / subjectAltName entries). */ std::set m_trustedNames; /** * Checks that either the name of the peer with the given credentials or the names * of the credentials match the subject or subject alternate names of the certificate. * Alternatively explicit trusted names can be supplied statically via configuration. * * @param certEE the credential for the entity to validate * @param credResolver source of trusted credentials * @param criteria criteria for selecting credentials, including the peer name * * @return true the name check succeeds, false if not */ bool checkEntityNames(X509* certEE, const CredentialResolver& credResolver, const CredentialCriteria& criteria) const; public: virtual ~AbstractPKIXTrustEngine(); bool validate( xmlsignature::Signature& sig, const CredentialResolver& credResolver, CredentialCriteria* criteria=nullptr ) const; bool validate( const XMLCh* sigAlgorithm, const char* sig, xmlsignature::KeyInfo* keyInfo, const char* in, unsigned int in_len, const CredentialResolver& credResolver, CredentialCriteria* criteria=nullptr ) const; bool validate( XSECCryptoX509* certEE, const std::vector& certChain, const CredentialResolver& credResolver, CredentialCriteria* criteria=nullptr ) const; bool validate( X509* certEE, STACK_OF(X509)* certChain, const CredentialResolver& credResolver, CredentialCriteria* criteria=nullptr ) const; /** * Stateful interface that supplies PKIX validation data to the trust engine. * Applications can adapt this TrustEngine to their environment by returning * implementations of this interface from the getPKIXValidationInfoIterator * method. */ class XMLTOOL_API PKIXValidationInfoIterator { MAKE_NONCOPYABLE(PKIXValidationInfoIterator); protected: PKIXValidationInfoIterator(); public: virtual ~PKIXValidationInfoIterator(); /** * Advances to the next set of information, if any. * * @return true iff another set of information is available */ virtual bool next()=0; /** * Returns the allowable trust chain verification depth for the * validation data in the current position. * * @return allowable trust chain verification depth */ virtual int getVerificationDepth() const=0; /** * Returns the set of trust anchors for the validation data in the * current position. Keeping the certificates beyond the lifetime * of the iterator or after advancing to the next position requires * copying them. * * @return set of trust anchors */ virtual const std::vector& getTrustAnchors() const=0; /** * Returns the set of CRLs for the validation data in the * current position. Keeping the CRLs beyond the lifetime * of the iterator or after advancing to the next position requires * copying them. * * @return set of CRLs */ virtual const std::vector& getCRLs() const=0; }; /** * Provides access to the information necessary, for the given credential source, for * PKIX validation of credentials. Each set of validation information returned * will be tried, in turn, until one succeeds or no more remain. * The caller must free the returned interface when finished with it. * * @param pkixSource the peer for which validation rules are required * @param criteria criteria for selecting validation rules * @return interface for obtaining validation data */ virtual PKIXValidationInfoIterator* getPKIXValidationInfoIterator( const CredentialResolver& pkixSource, CredentialCriteria* criteria=nullptr ) const=0; private: bool validateWithCRLs( X509* certEE, STACK_OF(X509)* certChain, const CredentialResolver& credResolver, CredentialCriteria* criteria=nullptr, const std::vector* inlineCRLs=nullptr ) const; friend class XMLTOOL_DLLLOCAL PKIXParams; }; }; #endif /* __xmltooling_pkixtrust_h__ */ xmltooling-1.5.3/xmltooling/security/BasicX509Credential.h000644 001751 001751 00000010426 12003305017 024712 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/BasicX509Credential.h * * Wraps an X.509-based Credential by storing key/cert objects inside. */ #if !defined(__xmltooling_basicx509cred_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_basicx509cred_h__ #include #include #include #include namespace xmlsignature { class XMLTOOL_API KeyInfo; }; namespace xmltooling { /** * Wraps an X.509-based Credential by storing key/cert objects inside. */ class XMLTOOL_API BasicX509Credential : public virtual X509Credential { protected: /** * Constructor. * * @param ownCerts true iff any certificates subsequently stored should be freed by destructor */ BasicX509Credential(bool ownCerts); /** * Constructor. * * @param key key pair or secret key * @param certs array of X.509 certificates, the first entry being the entity certificate * @param crl optional CRL */ BasicX509Credential(XSECCryptoKey* key, const std::vector& certs, XSECCryptoX509CRL* crl=nullptr); /** * Constructor. * * @param key key pair or secret key * @param certs array of X.509 certificates, the first entry being the entity certificate * @param crls array of X.509 CRLs */ BasicX509Credential(XSECCryptoKey* key, const std::vector& certs, const std::vector& crls); /** The private/secret key/keypair. */ XSECCryptoKey* m_key; /** Key names (derived from credential, KeyInfo, or both). */ std::set m_keyNames; /** Subject DN. */ std::string m_subjectName; /** Issuer DN. */ std::string m_issuerName; /** Serial number. */ std::string m_serial; /** The X.509 certificate chain. */ std::vector m_xseccerts; /** Indicates whether to destroy certificates. */ bool m_ownCerts; /** The X.509 CRLs. */ std::vector m_crls; /** The KeyInfo object representing the information. */ xmlsignature::KeyInfo* m_keyInfo; /** The KeyInfo object representing the information in compact form. */ xmlsignature::KeyInfo* m_compactKeyInfo; /** * Initializes (or reinitializes) a ds:KeyInfo to represent the Credential. * * @param types the kinds of KeyInfo content to include */ void initKeyInfo(unsigned int types=0); public: virtual ~BasicX509Credential(); // Virtual function overrides. unsigned int getUsage() const; const char* getAlgorithm() const; unsigned int getKeySize() const; XSECCryptoKey* getPrivateKey() const; XSECCryptoKey* getPublicKey() const; const std::set& getKeyNames() const; xmlsignature::KeyInfo* getKeyInfo(bool compact=false) const; const std::vector& getEntityCertificateChain() const; XSECCryptoX509CRL* getCRL() const; const std::vector& getCRLs() const; const char* getSubjectName() const; const char* getIssuerName() const; const char* getSerialNumber() const; void extract(); }; }; #endif /* __xmltooling_basicx509cred_h__ */ xmltooling-1.5.3/xmltooling/security/ChainingTrustEngine.h000644 001751 001751 00000007414 12003305017 025223 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/ChainingTrustEngine.h * * OpenSSLTrustEngine that uses multiple engines in sequence. */ #if !defined(__xmltooling_chaintrust_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_chaintrust_h__ #include #include #include namespace xmltooling { /** * OpenSSLTrustEngine that uses multiple engines in sequence. */ class XMLTOOL_API ChainingTrustEngine : public SignatureTrustEngine, public OpenSSLTrustEngine { public: /** * Constructor. * * If a DOM is supplied, the following XML content is supported: * *
    *
  • <TrustEngine> elements with a type attribute *
* * XML namespaces are ignored in the processing of this content. * * @param e DOM to supply configuration for provider */ ChainingTrustEngine(const xercesc::DOMElement* e=nullptr); /** * Destructor will delete any embedded engines. */ virtual ~ChainingTrustEngine(); /** * Adds a trust engine for future calls. * * @param newEngine trust engine to add */ void addTrustEngine(TrustEngine* newEngine); /** * Removes a trust engine. The caller must delete the engine if necessary. * * @param oldEngine trust engine to remove * @return the old engine */ TrustEngine* removeTrustEngine(TrustEngine* oldEngine); bool validate( xmlsignature::Signature& sig, const CredentialResolver& credResolver, CredentialCriteria* criteria=nullptr ) const; bool validate( const XMLCh* sigAlgorithm, const char* sig, xmlsignature::KeyInfo* keyInfo, const char* in, unsigned int in_len, const CredentialResolver& credResolver, CredentialCriteria* criteria=nullptr ) const; bool validate( XSECCryptoX509* certEE, const std::vector& certChain, const CredentialResolver& credResolver, CredentialCriteria* criteria=nullptr ) const; bool validate( X509* certEE, STACK_OF(X509)* certChain, const CredentialResolver& credResolver, CredentialCriteria* criteria=nullptr ) const; private: boost::ptr_vector m_engines; boost::ptr_vector m_sigEngines; boost::ptr_vector m_x509Engines; boost::ptr_vector m_osslEngines; }; }; #endif /* __xmltooling_chaintrust_h__ */ xmltooling-1.5.3/xmltooling/security/Credential.h000644 001751 001751 00000010642 12003305017 023362 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/Credential.h * * Wraps keys and related functionality. */ #if !defined(__xmltooling_cred_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_cred_h__ #include #include #include class XSECCryptoKey; namespace xmlsignature { class XMLTOOL_API KeyInfo; }; namespace xmltooling { class XMLTOOL_API CredentialCriteria; class XMLTOOL_API CredentialContext; /** * Wraps keys and related functionality. * *

Shared credential implementations should implement reference counting * and honor any locking parameters to ensure appropriate synchronization. */ class XMLTOOL_API Credential { MAKE_NONCOPYABLE(Credential); protected: Credential(); public: virtual ~Credential(); /** * Bitmask constants for limiting resolution process inside a CredentialResolver. */ enum ResolveTypes { RESOLVE_KEYS = 1, RESOLVE_NAMES = 2 }; /** * Bitmask of use cases for credentials. */ enum UsageTypes { UNSPECIFIED_CREDENTIAL = 0, SIGNING_CREDENTIAL = 1, TLS_CREDENTIAL = 2, ENCRYPTION_CREDENTIAL = 4 }; /** * Bitmask of supported KeyInfo content to generate. */ enum KeyInfoTypes { KEYINFO_KEY_VALUE = 1, KEYINFO_KEY_NAME = 2 }; /** * Get credential usage types. * * @return the usage bitmask */ virtual unsigned int getUsage() const=0; /** * Returns an algorithm identifier for the Credential. * * @return the Credential algorithm, or nullptr if indeterminate */ virtual const char* getAlgorithm() const=0; /** * Returns the size of the key in bits. * * @return the key size, or 0 if indeterminate */ virtual unsigned int getKeySize() const=0; /** * Returns a secret or private key to use for signing or decryption operations. * * @return a secret or private key */ virtual XSECCryptoKey* getPrivateKey() const=0; /** * Returns a secret or public key to use for verification or encryption operations. * * @return a secret or public key */ virtual XSECCryptoKey* getPublicKey() const=0; /** * Returns names representing the Credential. * *

Names should be unique in the context of the comparisons against CredentialCriteria * that deployments expect to see. * * @return a sorted set of names */ virtual const std::set& getKeyNames() const=0; /** * Returns a ds:KeyInfo object representing the Credential for use in * communicating with other entities. * * @param compact true iff the communication medium is such that only compact forms should be included * @return a KeyInfo object, which must be freed by the caller */ virtual xmlsignature::KeyInfo* getKeyInfo(bool compact=false) const=0; /** * Get the credential context information, which provides additional information * specific to the context in which the credential was resolved. * * @return resolution context of the credential */ virtual const CredentialContext* getCredentalContext() const; }; }; #endif /* __xmltooling_cred_h__ */ xmltooling-1.5.3/xmltooling/security/CredentialContext.h000644 001751 001751 00000003166 12003305017 024732 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/CredentialContext.h * * Marker interface for implementations which hold information specific to a * particular context within which a CredentialResolver resolves a Credential. */ #if !defined(__xmltooling_credctx_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_credctx_h__ #include namespace xmltooling { /** * Marker interface for implementations which hold information specific to a * particular context within which a CredentialResolver resolves a Credential. */ class XMLTOOL_API CredentialContext { MAKE_NONCOPYABLE(CredentialContext); protected: CredentialContext(); public: virtual ~CredentialContext(); }; }; #endif /* __xmltooling_credctx_h__ */ xmltooling-1.5.3/xmltooling/security/CredentialCriteria.h000644 001751 001751 00000015576 12003305017 025060 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/CredentialCriteria.h * * Class for specifying criteria by which a CredentialResolver should resolve credentials. */ #if !defined(__xmltooling_credcrit_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_credcrit_h__ #include #include class DSIGKeyInfoList; class XSECCryptoKey; namespace xmlsignature { class XMLTOOL_API KeyInfo; class XMLTOOL_API Signature; }; namespace xmltooling { class XMLTOOL_API Credential; #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4251 ) #endif /** * Class for specifying criteria by which a CredentialResolver should resolve credentials. */ class XMLTOOL_API CredentialCriteria { MAKE_NONCOPYABLE(CredentialCriteria); public: /** Default constructor. */ CredentialCriteria(); virtual ~CredentialCriteria(); /** * Determines whether the supplied Credential matches this CredentialCriteria. * * @param credential the Credential to evaluate * @return true iff the Credential is consistent with this criteria */ virtual bool matches(const Credential& credential) const; /** * Get key usage criteria. * * @return the usage mask */ unsigned int getUsage() const; /** * Set key usage criteria. * * @param usage the usage mask to set */ void setUsage(unsigned int usage); /** * Get the peer name criteria. * * @return the peer name */ const char* getPeerName() const; /** * Set the peer name criteria. * * @param peerName peer name to set */ void setPeerName(const char* peerName); /** * Get the key algorithm criteria. * * @return the key algorithm */ const char* getKeyAlgorithm() const; /** * Set the key algorithm criteria. * * @param keyAlgorithm the key algorithm to set */ void setKeyAlgorithm(const char* keyAlgorithm); /** * Get the key size criteria. *

If a a maximum size is also set, this is treated as a minimum. * * @return the key size, or 0 */ unsigned int getKeySize() const; /** * Set the key size criteria. *

If a a maximum size is also set, this is treated as a minimum. * * @param keySize key size to set */ void setKeySize(unsigned int keySize); /** * Get the maximum key size criteria. * * @return the maximum key size, or 0 */ unsigned int getMaxKeySize() const; /** * Set the maximum key size criteria. * * @param keySize maximum key size to set */ void setMaxKeySize(unsigned int keySize); /** * Set the key algorithm and size criteria based on an XML algorithm specifier. * * @param algorithm XML algorithm specifier */ void setXMLAlgorithm(const XMLCh* algorithm); /** * Gets key name criteria. * * @return an immutable set of key names */ const std::set& getKeyNames() const; /** * Gets key name criteria. * * @return a mutable set of key names */ std::set& getKeyNames(); /** * Returns the public key criteria. * * @return a public key */ virtual XSECCryptoKey* getPublicKey() const; /** * Sets the public key criteria. * *

The lifetime of the key MUST extend * for the lifetime of this object. * * @param key a public key */ void setPublicKey(XSECCryptoKey* key); /** * Bitmask constants controlling the kinds of criteria set automatically * based on a KeyInfo object. */ enum keyinfo_extraction_t { KEYINFO_EXTRACTION_KEY = 1, KEYINFO_EXTRACTION_KEYNAMES = 2 }; /** * Gets the KeyInfo criteria. * * @return the KeyInfo criteria */ const xmlsignature::KeyInfo* getKeyInfo() const; /** * Sets the KeyInfo criteria. * * @param keyInfo the KeyInfo criteria * @param extraction bitmask of criteria to auto-extract from KeyInfo */ virtual void setKeyInfo(const xmlsignature::KeyInfo* keyInfo, int extraction=0); /** * Gets the native KeyInfo criteria. * * @return the native KeyInfo criteria */ DSIGKeyInfoList* getNativeKeyInfo() const; /** * Sets the KeyInfo criteria. * * @param keyInfo the KeyInfo criteria * @param extraction bitmask of criteria to auto-extract from KeyInfo */ virtual void setNativeKeyInfo(DSIGKeyInfoList* keyInfo, int extraction=0); /** * Sets the KeyInfo criteria from an XML Signature. * * @param sig the Signature containing KeyInfo criteria * @param extraction bitmask of criteria to auto-extract from KeyInfo */ void setSignature(const xmlsignature::Signature& sig, int extraction=0); /** * Resets object to a default state. */ virtual void reset(); private: unsigned int m_keyUsage; unsigned int m_keySize,m_maxKeySize; std::string m_peerName,m_keyAlgorithm; std::set m_keyNames; XSECCryptoKey* m_key; const xmlsignature::KeyInfo* m_keyInfo; DSIGKeyInfoList* m_nativeKeyInfo; Credential* m_credential; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif }; #endif /* __xmltooling_credcrit_h__ */ xmltooling-1.5.3/xmltooling/security/CredentialResolver.h000644 001751 001751 00000005576 12003305017 025116 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/CredentialResolver.h * * An API for resolving keys and certificates based on application criteria. */ #if !defined(__xmltooling_credres_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_credres_h__ #include namespace xmltooling { class XMLTOOL_API Credential; class XMLTOOL_API CredentialCriteria; /** * An API for resolving keys and certificates based on application criteria. */ class XMLTOOL_API CredentialResolver : public virtual Lockable { MAKE_NONCOPYABLE(CredentialResolver); protected: CredentialResolver(); public: virtual ~CredentialResolver(); /** * Returns a single Credential according to the supplied criteria. * * @param criteria an optional CredentialCriteria object * @return a Credential, or nullptr if none could be found */ virtual const Credential* resolve(const CredentialCriteria* criteria=nullptr) const=0; /** * Returns all matching Credentials according to the supplied criteria. * * @param results array to store matching Credentials * @param criteria an optional CredentialCriteria object * @return number of credentials found */ virtual std::vector::size_type resolve( std::vector& results, const CredentialCriteria* criteria=nullptr ) const=0; }; /** * Registers CredentialResolver classes into the runtime. */ void XMLTOOL_API registerCredentialResolvers(); /** CredentialResolver based on local files with no criteria support. */ #define FILESYSTEM_CREDENTIAL_RESOLVER "File" /** CredentialResolver that returns nothing, for use with some APIs. */ #define DUMMY_CREDENTIAL_RESOLVER "Dummy" /** CredentialResolver based on chaining together other resolvers. */ #define CHAINING_CREDENTIAL_RESOLVER "Chaining" }; #endif /* __xmltooling_credres_h__ */ xmltooling-1.5.3/xmltooling/security/KeyInfoCredentialContext.h000644 001751 001751 00000004464 12003305017 026221 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/KeyInfoCredentialContext.h * * Context for credentials resolved out of a KeyInfo. */ #if !defined(__xmltooling_keyinfocredctx_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_keyinfocredctx_h__ #include class DSIGKeyInfoList; namespace xmlsignature { class XMLTOOL_API KeyInfo; } namespace xmltooling { /** * Context for credentials resolved out of a KeyInfo. */ class XMLTOOL_API KeyInfoCredentialContext : public CredentialContext { public: /** * Constructor * * @param keyInfo surrounding KeyInfo context object */ KeyInfoCredentialContext(const xmlsignature::KeyInfo* keyInfo=nullptr); /** * Constructor * * @param keyInfo surrounding native KeyInfo context object */ KeyInfoCredentialContext(DSIGKeyInfoList* keyInfo); virtual ~KeyInfoCredentialContext(); /** * Gets the KeyInfo context. * * @return the KeyInfo context */ const xmlsignature::KeyInfo* getKeyInfo() const; /** * Gets the native KeyInfo context. * * @return the native KeyInfo context */ DSIGKeyInfoList* getNativeKeyInfo() const; private: const xmlsignature::KeyInfo* m_keyInfo; DSIGKeyInfoList* m_nativeKeyInfo; }; }; #endif /* __xmltooling_keyinfocredctx_h__ */ xmltooling-1.5.3/xmltooling/security/KeyInfoResolver.h000644 001751 001751 00000011027 12003305017 024374 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/KeyInfoResolver.h * * Resolves credentials from KeyInfo information. */ #if !defined(__xmltooling_keyres_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_keyres_h__ #include class DSIGKeyInfoList; namespace xmlsignature { class XMLTOOL_API KeyInfo; class XMLTOOL_API Signature; }; namespace xmltooling { class XMLTOOL_API Credential; class XMLTOOL_API CredentialCriteria; class XMLTOOL_API KeyInfoCredentialContext; /** * Resolves credentials from KeyInfo information. * *

Credential-specific bitmasks can be provided to control what to resolve. * *

Implementations should only establish KeyNames on the basis of explicit names * within the KeyInfo object, never by extracting names out of physical credentials * found within it. */ class XMLTOOL_API KeyInfoResolver { MAKE_NONCOPYABLE(KeyInfoResolver); protected: KeyInfoResolver(); public: virtual ~KeyInfoResolver(); /** * Returns a credential based on the supplied KeyInfo information. * The caller must release the credential when done with it. * * @param keyInfo the key information * @param types types of credentials to resolve, or 0 for any/all * @return the resolved credential, or nullptr */ virtual Credential* resolve(const xmlsignature::KeyInfo* keyInfo, int types=0) const=0; /** * Returns a credential based on the supplied KeyInfo information. * The caller must release the credential when done with it. * * @param keyInfo the key information * @param types types of credentials to resolve, or 0 for any/all * @return the resolved credential, or nullptr */ virtual Credential* resolve(DSIGKeyInfoList* keyInfo, int types=0) const=0; /** * Returns a credential based on the KeyInfo information in the supplied * context. The caller must release the credential when done with it. * *

The context object will be owned by the Credential and freed with it. * * @param context context containing the key information * @param types types of credentials to resolve, or 0 for any/all * @return the resolved credential, or nullptr */ virtual Credential* resolve(KeyInfoCredentialContext* context, int types=0) const=0; /** * Returns a credential based on the supplied KeyInfo information. * The caller must release the credential when done with it. * * @param sig signature containing the key information * @param types types of credentials to resolve, or 0 for any/all * @return the resolved credential, or nullptr */ Credential* resolve(const xmlsignature::Signature* sig, int types=0) const; /** * Returns a credential based on the KeyInfo information in the supplied * criteria. The caller must release the credential when done with it. * * @param criteria criteria containing the key information * @param types types of credentials to resolve, or 0 for any/all * @return the resolved credential, or nullptr */ Credential* resolve(const CredentialCriteria& criteria, int types=0) const; }; /** * Registers KeyInfoResolver classes into the runtime. */ void XMLTOOL_API registerKeyInfoResolvers(); /** KeyInfoResolver based on extracting by value directly out of a KeyInfo */ #define INLINE_KEYINFO_RESOLVER "Inline" }; #endif /* __xmltooling_keyres_h__ */ xmltooling-1.5.3/xmltooling/security/OpenSSLCredential.h000644 001751 001751 00000003267 12003305017 024573 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/OpenSSLCredential.h * * OpenSSL-specific credential */ #if !defined(__xmltooling_opensslcred_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_opensslcred_h__ #include #include namespace xmltooling { /** * An OpenSSL-specific credential */ class XMLTOOL_API OpenSSLCredential : public virtual X509Credential { protected: OpenSSLCredential(); public: virtual ~OpenSSLCredential(); /** * Attaches credential to an OpenSSL SSL context object. * The credential MUST be disposable after attachment. * * @param ctx an SSL context */ virtual void attach(SSL_CTX* ctx) const=0; }; }; #endif /* __xmltooling_opensslcred_h__ */ xmltooling-1.5.3/xmltooling/security/OpenSSLPathValidator.h000644 001751 001751 00000004146 12003305017 025260 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/OpenSSLPathValidator.h * * Extended PathValidator interface that adds validation * using OpenSSL data types directly for efficiency. */ #if !defined(__xmltooling_opensslpathval_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_opensslpathval_h__ #include #include namespace xmltooling { /** * Extended PathValidator interface that adds validation * using OpenSSL data types directly for efficiency. */ class XMLTOOL_API OpenSSLPathValidator : public PathValidator { MAKE_NONCOPYABLE(OpenSSLPathValidator); protected: OpenSSLPathValidator(); public: virtual ~OpenSSLPathValidator(); /** * Validates an end-entity certificate. * * @param certEE end-entity certificate * @param certChain the complete untrusted certificate chain * @param params plugin-specific parameters to the validation process * @return true iff validaton succeeds */ virtual bool validate( X509* certEE, STACK_OF(X509)* certChain, const PathValidatorParams& params ) const=0; }; }; #endif /* __xmltooling_opensslpathval_h__ */ xmltooling-1.5.3/xmltooling/security/PathValidator.h000644 001751 001751 00000005214 12003305017 024051 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/PathValidator.h * * Plugin interface to certificate path validation. */ #if !defined(__xmltooling_pathval_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_pathval_h__ #include class XSECCryptoX509; namespace xmltooling { /** * Plugin interface to certificate path validation, independent of context. *

This interface assumes that the end-entity certificate is "correctly" * bound to a party, and solely addresses the validity of that certificate. */ class XMLTOOL_API PathValidator { MAKE_NONCOPYABLE(PathValidator); protected: PathValidator(); public: virtual ~PathValidator(); /** * Marker interface for plugin-specific parameters into the validation * process. */ class XMLTOOL_API PathValidatorParams { MAKE_NONCOPYABLE(PathValidatorParams); protected: PathValidatorParams(); public: virtual ~PathValidatorParams(); }; /** * Validates an end-entity certificate. * * @param certEE end-entity certificate * @param certChain the complete untrusted certificate chain * @param params plugin-specific parameters to the validation process * @return true iff validaton succeeds */ virtual bool validate( XSECCryptoX509* certEE, const std::vector& certChain, const PathValidatorParams& params ) const=0; }; /** * Registers PathValidator classes into the runtime. */ void XMLTOOL_API registerPathValidators(); /** PathValidator based on PKIX. */ #define PKIX_PATHVALIDATOR "PKIX" }; #endif /* __xmltooling_pathval_h__ */ xmltooling-1.5.3/xmltooling/security/PKIXPathValidatorParams.h000644 001751 001751 00000006132 12003305017 025711 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/PKIXPathValidatorParams.h * * PKIX-specific parameters to a PathValidator. */ #if !defined(__xmltooling_pkixvalparam_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_pkixvalparam_h__ #include #include #include namespace xmltooling { class XMLTOOL_API XSECCryptoX509CRL; /** * PKIX-specific parameters to a PathValidator. */ class XMLTOOL_API PKIXPathValidatorParams : public PathValidator::PathValidatorParams { protected: PKIXPathValidatorParams(); public: virtual ~PKIXPathValidatorParams(); /** * Returns the allowable trust chain verification depth. * * @return allowable trust chain verification depth */ virtual int getVerificationDepth() const=0; /** * Checks whether the any policy OID should be processed * if it is included in a certificate. * * @return true iff the any policy OID should *not* be processed */ virtual bool isAnyPolicyInhibited() const=0; /** * Checks if policy mapping is inhibited. * * @return true iff policy mapping should not be allowed */ virtual bool isPolicyMappingInhibited() const=0; /** * Returns a set of policy OIDs. * * @return set of policy OIDs */ virtual const std::set& getPolicies() const=0; /** * Returns a set of trust anchors. * * @return set of trust anchors */ virtual const std::vector& getTrustAnchors() const=0; enum revocation_t { REVOCATION_OFF = 0, REVOCATION_ENTITYONLY = 1, REVOCATION_FULLCHAIN = 2 }; /** * Returns the type of revocation checking to perform. * * @return revocation checking option */ virtual revocation_t getRevocationChecking() const=0; /** * Returns a set of CRLs. * * @return set of CRLs */ virtual const std::vector& getCRLs() const=0; }; }; #endif /* __xmltooling_pkixvalparam_h__ */ xmltooling-1.5.3/xmltooling/security/SecurityHelper.h000644 001751 001751 00000024264 12003305017 024264 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/SecurityHelper.h * * A helper class for working with keys, certificates, etc. */ #if !defined(__xmltooling_sechelper_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_sechelper_h__ #include #include #include class XSECCryptoKey; class XSECCryptoX509; namespace xmltooling { class XMLTOOL_API Credential; class XMLTOOL_API SOAPTransport; class XMLTOOL_API XSECCryptoX509CRL; /** * A helper class for working with keys, certificates, etc. */ class XMLTOOL_API SecurityHelper { public: /** * Access a file to try and guess the encoding format used. * * @param pathname path to file * @return constant identifying encoding format */ static const char* guessEncodingFormat(const char* pathname); /** * Loads a private key from a local file. * * @param pathname path to file containing key * @param format optional constant identifying key encoding format * @param password optional password to decrypt key * @return a populated key object */ static XSECCryptoKey* loadKeyFromFile(const char* pathname, const char* format=nullptr, const char* password=nullptr); /** * Loads certificate(s) from a local file. * * @param certs array to populate with certificate(s) * @param pathname path to file containing certificate(s) * @param format optional constant identifying certificate encoding format * @param password optional password to decrypt certificate(s) * @return size of the resulting array */ static std::vector::size_type loadCertificatesFromFile( std::vector& certs, const char* pathname, const char* format=nullptr, const char* password=nullptr ); /** * Loads CRL(s) from a local file. * * @param crls array to populate with CRL(s) * @param pathname path to file containing CRL(s) * @param format optional constant identifying CRL encoding format * @return size of the resulting array */ static std::vector::size_type loadCRLsFromFile( std::vector& crls, const char* pathname, const char* format=nullptr ); /** * Loads a private key from a URL. * * @param transport object to use to acquire key * @param backing backing file for key (written to or read from if download fails) * @param format optional constant identifying key encoding format * @param password optional password to decrypt key * @return a populated key object */ static XSECCryptoKey* loadKeyFromURL(SOAPTransport& transport, const char* backing, const char* format=nullptr, const char* password=nullptr); /** * Loads certificate(s) from a URL. * * @param certs array to populate with certificate(s) * @param transport object to use to acquire certificate(s) * @param backing backing file for certificate(s) (written to or read from if download fails) * @param format optional constant identifying certificate encoding format * @param password optional password to decrypt certificate(s) * @return size of the resulting array */ static std::vector::size_type loadCertificatesFromURL( std::vector& certs, SOAPTransport& transport, const char* backing, const char* format=nullptr, const char* password=nullptr ); /** * Loads CRL(s) from a URL. * * @param crls array to populate with CRL(s) * @param transport object to use to acquire CRL(s) * @param backing backing file for CRL(s) (written to or read from if download fails) * @param format optional constant identifying CRL encoding format * @return size of the resulting array */ static std::vector::size_type loadCRLsFromURL( std::vector& crls, SOAPTransport& transport, const char* backing, const char* format=nullptr ); /** * Compares two keys for equality. * * @param key1 first key to compare * @param key2 second key to compare * @return true iff the keys match */ static bool matches(const XSECCryptoKey& key1, const XSECCryptoKey& key2); /** * Performs a hash operation over the supplied data. * * @param hashAlg name of hash algorithm, syntax specific to crypto provider * @param buf input data to hash * @param buflen length of input data * @param toHex if true, hex-encodes the resulting raw bytes * @return result of hash operation, or an empty string */ static std::string doHash(const char* hashAlg, const char* buf, unsigned long buflen, bool toHex=true); /** * Returns the base64-encoded DER encoding of a public key in SubjectPublicKeyInfo format. *

If a hash algorithm is provided, the data is digested before being base64-encoded. * * @param cred the credential containing the key to encode * @param hash optional name of hash algorithm, syntax specific to crypto provider * @param nowrap if true, any linefeeds will be stripped from the result * @return the base64 encoded key value */ static std::string getDEREncoding(const Credential& cred, const char* hash, bool nowrap=true); /** * Returns the base64-encoded DER encoding of a public key in SubjectPublicKeyInfo format. *

If a hash algorithm is provided, the data is digested before being base64-encoded. * * @param key the key to encode * @param hash optional name of hash algorithm, syntax specific to crypto provider * @param nowrap if true, any linefeeds will be stripped from the result * @return the base64 encoded key value */ static std::string getDEREncoding(const XSECCryptoKey& key, const char* hash, bool nowrap=true); /** * Returns the base64-encoded DER encoding of a certifiate's public key in SubjectPublicKeyInfo format. *

If a hash algorithm is provided, the data is digested before being base64-encoded. * * @param cert the certificate's key to encode * @param hash optional name of hash algorithm, syntax specific to crypto provider * @param nowrap if true, any linefeeds will be stripped from the result * @return the base64 encoded key value */ static std::string getDEREncoding(const XSECCryptoX509& cert, const char* hash, bool nowrap=true); /** * @deprecated * Returns the base64-encoded DER encoding of a public key in SubjectPublicKeyInfo format. * * @param cred the credential containing the key to encode * @param hash if true, the DER encoded data is hashed with SHA-1 before base64 encoding * @param nowrap if true, any linefeeds will be stripped from the result * @return the base64 encoded key value */ static std::string getDEREncoding(const Credential& cred, bool hash=false, bool nowrap=true); /** * @deprecated * Returns the base64-encoded DER encoding of a public key in SubjectPublicKeyInfo format. * * @param key the key to encode * @param hash if true, the DER encoded data is hashed with SHA-1 before base64 encoding * @param nowrap if true, any linefeeds will be stripped from the result * @return the base64 encoded key value */ static std::string getDEREncoding(const XSECCryptoKey& key, bool hash=false, bool nowrap=true); /** * @deprecated * Returns the base64-encoded DER encoding of a certificate's public key in SubjectPublicKeyInfo format. * * @param cert the certificate's key to encode * @param hash if true, the DER encoded data is hashed with SHA-1 before base64 encoding * @param nowrap if true, any linefeeds will be stripped from the result * @return the base64 encoded key value */ static std::string getDEREncoding(const XSECCryptoX509& cert, bool hash=false, bool nowrap=true); /** * Decodes a DER-encoded public key. * * @param buf DER encoded data * @param buflen length of data in bytes * @param base64 true iff DER is base64-encoded * @return the decoded public key, or nullptr */ static XSECCryptoKey* fromDEREncoding(const char* buf, unsigned long buflen, bool base64=true); /** * Decodes a base64-encoded and DER-encoded public key. * * @param buf base64 and DER encoded data * @return the decoded public key, or nullptr */ static XSECCryptoKey* fromDEREncoding(const XMLCh* buf); }; }; #endif /* __xmltooling_sechelper_h__ */ xmltooling-1.5.3/xmltooling/security/SignatureTrustEngine.h000644 001751 001751 00000011664 12003305017 025446 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/SignatureTrustEngine.h * * TrustEngine interface that adds validation of digital signatures. */ #if !defined(__xmltooling_sigtrust_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_sigtrust_h__ #include namespace xmlsignature { class XMLTOOL_API KeyInfo; class XMLTOOL_API Signature; }; namespace xmltooling { class XMLTOOL_API CredentialCriteria; class XMLTOOL_API CredentialResolver; /** * TrustEngine interface that adds validation of digital signatures. */ class XMLTOOL_API SignatureTrustEngine : public virtual TrustEngine { protected: /** * Constructor. * * @param e DOM to supply configuration for provider */ SignatureTrustEngine(const xercesc::DOMElement* e=nullptr); public: virtual ~SignatureTrustEngine(); /** * Determines whether an XML signature is correct and valid with respect to * the source of credentials supplied. * *

It is the responsibility of the application to ensure that the credentials * supplied are in fact associated with the peer who created the signature. * *

If criteria with a peer name are supplied, the "name" of the Credential that verifies * the signature may also be checked to ensure that it identifies the intended peer. * The peer name itself or implementation-specific rules based on the content of the * peer credentials may be applied. Implementations may omit this check if they * deem it unnecessary. * * @param sig reference to a signature object to validate * @param credResolver a locked resolver to supply trusted peer credentials to the TrustEngine * @param criteria criteria for selecting peer credentials * @return true iff the signature validates */ virtual bool validate( xmlsignature::Signature& sig, const CredentialResolver& credResolver, CredentialCriteria* criteria=nullptr ) const=0; /** * Determines whether a raw signature is correct and valid with respect to * the source of credentials supplied. * *

It is the responsibility of the application to ensure that the Credentials * supplied are in fact associated with the peer who created the signature. * *

If criteria with a peer name are supplied, the "name" of the Credential that verifies * the signature may also be checked to ensure that it identifies the intended peer. * The peer name itself or implementation-specific rules based on the content of the * peer credentials may be applied. Implementations may omit this check if they * deem it unnecessary. * *

Note that the keyInfo parameter is not part of the implicitly trusted * set of information supplied via the CredentialResolver, but rather advisory * data that may have accompanied the signature itself. * * @param sigAlgorithm XML Signature identifier for the algorithm used * @param sig null-terminated base64-encoded signature value * @param keyInfo KeyInfo object accompanying the signature, if any * @param in the input data over which the signature was created * @param in_len size of input data in bytes * @param credResolver a locked resolver to supply trusted peer credentials to the TrustEngine * @param criteria criteria for selecting peer credentials * @return true iff the signature validates */ virtual bool validate( const XMLCh* sigAlgorithm, const char* sig, xmlsignature::KeyInfo* keyInfo, const char* in, unsigned int in_len, const CredentialResolver& credResolver, CredentialCriteria* criteria=nullptr ) const=0; }; }; #endif /* __xmltooling_sigtrust_h__ */ xmltooling-1.5.3/xmltooling/security/TrustEngine.h000644 001751 001751 00000005706 12003305017 023564 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/TrustEngine.h * * Evaluates the trustworthiness and validity of security information against * implementation-specific requirements. */ #if !defined(__xmltooling_trust_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_trust_h__ #include #include namespace xmltooling { class XMLTOOL_API KeyInfoResolver; /** * Evaluates the trustworthiness and validity of security information against * implementation-specific requirements. */ class XMLTOOL_API TrustEngine { MAKE_NONCOPYABLE(TrustEngine); protected: /** * Constructor. * * If a DOM is supplied, the following XML content is supported: * *

    *
  • <KeyInfoResolver> elements with a type attribute *
* * XML namespaces are ignored in the processing of this content. * * @param e DOM to supply configuration for provider */ TrustEngine(const xercesc::DOMElement* e=nullptr); /** Custom KeyInfoResolver instance. */ KeyInfoResolver* m_keyInfoResolver; public: virtual ~TrustEngine(); /** * Supplies a KeyInfoResolver instance. *

This method must be externally synchronized with any code that uses the object. * Any previously set object is destroyed. * * @param keyInfoResolver new KeyInfoResolver instance to use */ void setKeyInfoResolver(KeyInfoResolver* keyInfoResolver); }; /** * Registers TrustEngine classes into the runtime. */ void XMLTOOL_API registerTrustEngines(); /** TrustEngine based on explicit knowledge of peer key information. */ #define EXPLICIT_KEY_TRUSTENGINE "ExplicitKey" /** TrustEngine based on PKIX evaluation against a static set of trust anchors. */ #define STATIC_PKIX_TRUSTENGINE "StaticPKIX" /** TrustEngine that tries multiple engines in sequence. */ #define CHAINING_TRUSTENGINE "Chaining" }; #endif /* __xmltooling_trust_h__ */ xmltooling-1.5.3/xmltooling/security/X509Credential.h000644 001751 001751 00000006751 12003305017 023756 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/X509Credential.h * * Wraps an X.509-based Credential. */ #if !defined(__xmltooling_x509cred_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_x509cred_h__ #include class XSECCryptoX509; namespace xmltooling { class XMLTOOL_API XSECCryptoX509CRL; /** * Wraps an X.509-based Credential. */ class XMLTOOL_API X509Credential : public virtual Credential { protected: X509Credential(); public: virtual ~X509Credential(); /** * Bitmask constants for limiting resolution process inside a CredentialResolver. */ enum ResolveTypes { RESOLVE_CERTS = 4, RESOLVE_CRLS = 8 }; /** * Bitmask of supported KeyInfo content to generate. */ enum KeyInfoTypes { KEYINFO_X509_CERTIFICATE = 4, KEYINFO_X509_SUBJECTNAME = 8, KEYINFO_X509_ISSUERSERIAL = 16, KEYINFO_X509_DIGEST = 32 }; /** * Gets an immutable collection of certificates in the entity's trust chain. The entity certificate is contained * within this list. No specific ordering of the certificates is guaranteed. * * @return a certificate chain */ virtual const std::vector& getEntityCertificateChain() const=0; /** * @deprecated * * Gets a CRL associated with the credential. * * @return CRL associated with the credential */ virtual XSECCryptoX509CRL* getCRL() const=0; /** * Gets an immutable collection of all CRLs associated with the credential. * * @return CRLs associated with the credential */ virtual const std::vector& getCRLs() const=0; /** * Gets the subject name of the first certificate in the chain. * * @return the Subject DN */ virtual const char* getSubjectName() const=0; /** * Gets the issuer name of the first certificate in the chain. * * @return the Issuer DN */ virtual const char* getIssuerName() const=0; /** * Gets the serial number of the first certificate in the chain. * * @return the serial number */ virtual const char* getSerialNumber() const=0; /** * Extracts properties like issuer and subject from the first certificate in the chain. */ virtual void extract()=0; }; }; #endif /* __xmltooling_x509cred_h__ */ xmltooling-1.5.3/xmltooling/security/X509TrustEngine.h000644 001751 001751 00000006022 12003305017 024142 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/X509TrustEngine.h * * TrustEngine interface that adds validation of X.509 credentials. */ #if !defined(__xmltooling_x509trust_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_x509trust_h__ #include #include class XSECCryptoX509; namespace xmltooling { class XMLTOOL_API CredentialCriteria; class XMLTOOL_API CredentialResolver; /** * TrustEngine interface that adds validation of X.509 credentials. */ class XMLTOOL_API X509TrustEngine : public virtual TrustEngine { protected: /** * Constructor. * * @param e DOM to supply configuration for provider */ X509TrustEngine(const xercesc::DOMElement* e=nullptr); public: virtual ~X509TrustEngine(); /** * Determines whether an X.509 credential is valid with respect to the * source of credentials supplied. * *

It is the responsibility of the application to ensure that the credentials * supplied are in fact associated with the peer who presented the credential. * *

If criteria with a peer name are supplied, the "name" of the EE certificate * may also be checked to ensure that it identifies the intended peer. * The peer name itself or implementation-specific rules based on the content of the * peer credentials may be applied. Implementations may omit this check if they * deem it unnecessary. * * @param certEE end-entity certificate to validate * @param certChain the complete set of certificates presented for validation (includes certEE) * @param credResolver a locked resolver to supply trusted peer credentials to the TrustEngine * @param criteria criteria for selecting peer credentials */ virtual bool validate( XSECCryptoX509* certEE, const std::vector& certChain, const CredentialResolver& credResolver, CredentialCriteria* criteria=nullptr ) const=0; }; }; #endif /* __xmltooling_x509trust_h__ */ xmltooling-1.5.3/xmltooling/security/OpenSSLTrustEngine.h000644 001751 001751 00000006101 12003305017 024756 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/OpenSSLTrustEngine.h * * Extended TrustEngine interface that adds validation of X.509 credentials * using OpenSSL data types directly for efficiency. */ #if !defined(__xmltooling_openssltrust_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_openssltrust_h__ #include #include namespace xmltooling { /** * Extended TrustEngine interface that adds validation of X.509 credentials * using OpenSSL data types directly for efficiency. */ class XMLTOOL_API OpenSSLTrustEngine : public X509TrustEngine { protected: /** * Constructor. * * @param e DOM to supply configuration for provider */ OpenSSLTrustEngine(const xercesc::DOMElement* e=nullptr); public: virtual ~OpenSSLTrustEngine(); using X509TrustEngine::validate; /** * Determines whether an X.509 credential is valid with respect to the * source of credentials supplied. * *

It is the responsibility of the application to ensure that the credentials * supplied are in fact associated with the peer who presented the credential. * *

If criteria with a peer name are supplied, the "name" of the EE certificate * may also be checked to ensure that it identifies the intended peer. * The peer name itself or implementation-specific rules based on the content of the * peer credentials may be applied. Implementations may omit this check if they * deem it unnecessary. * * @param certEE end-entity certificate to validate * @param certChain the complete set of certificates presented for validation (includes certEE) * @param credResolver a locked resolver to supply trusted peer credentials to the TrustEngine * @param criteria criteria for selecting peer credentials */ virtual bool validate( X509* certEE, STACK_OF(X509)* certChain, const CredentialResolver& credResolver, CredentialCriteria* criteria=nullptr ) const=0; }; }; #endif /* __xmltooling_openssltrust_h__ */ xmltooling-1.5.3/xmltooling/security/XSECCryptoX509CRL.h000644 001751 001751 00000005343 12003305017 024204 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/XSECCryptoX509CRL.h * * Wrapper for X.509 CRL objects, similar to existing XSEC wrappers. */ #if !defined(__xmltooling_x509crl_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_x509crl_h__ #include #include #include namespace xmltooling { /** * Interface class for X.509 CRLs * The library uses classes derived from this to process X.509 CRLs. */ class XMLTOOL_API XSECCryptoX509CRL { MAKE_NONCOPYABLE(XSECCryptoX509CRL); protected: XSECCryptoX509CRL(); public: virtual ~XSECCryptoX509CRL(); /** * Returns a string that identifies the crypto owner of this library. * * @return the crypto provider name */ virtual const XMLCh* getProviderName() const=0; /** * Returns a duplicate of the original object. * * @return the duplicate */ virtual XSECCryptoX509CRL* clone() const=0; /** * Load a Base64-encoded CRL into the object. * * @param buf buffer containing the base64-encoded CRL * @param len number of bytes of data in the CRL buffer (0 if the string is null terminated) */ virtual void loadX509CRLBase64Bin(const char* buf, unsigned int len)=0; /** * Load a PEM encoded CRL into the object. * * @param buf buffer containing the PEM encoded CRL * @param len number of bytes of data in the CRL buffer (0 if the string is null terminated) */ void loadX509CRLPEM(const char* buf, unsigned int len=0); /** * Get a Base64 DER encoded copy of the CRL * * @return A safeBuffer containing the DER encoded certificate */ virtual safeBuffer& getDEREncodingSB(void)=0; }; }; #endif /* __xmltooling_x509crl_h__ */ xmltooling-1.5.3/xmltooling/security/OpenSSLCryptoX509CRL.h000644 001751 001751 00000004100 12003305017 024713 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/security/OpenSSLCryptoX509CRL.h * * OpenSSL-based class for handling X.509 CRLs. */ #if !defined(__xmltooling_opensslx509crl_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_opensslx509crl_h__ #include #include #include namespace xmltooling { /** * OpenSSL-based class for handling X.509 CRLs */ class XMLTOOL_API OpenSSLCryptoX509CRL : public XSECCryptoX509CRL { public: /** Default constructor. */ OpenSSLCryptoX509CRL(); virtual ~OpenSSLCryptoX509CRL(); const XMLCh* getProviderName() const; void loadX509CRLBase64Bin(const char* buf, unsigned int len); safeBuffer& getDEREncodingSB(); /** * Constructor * * @param x a native CRL object */ OpenSSLCryptoX509CRL(X509_CRL* x); /** * Returns native CRL object. * * @return native CRL object, or nullptr */ X509_CRL* getOpenSSLX509CRL(); XSECCryptoX509CRL* clone() const; private: X509_CRL* mp_X509CRL; safeBuffer m_DERX509CRL; }; }; #endif /* __xmltooling_opensslx509crl_h__ */ xmltooling-1.5.3/xmltooling/security/impl/AbstractPKIXTrustEngine.cpp000644 001751 001751 00000055135 12003305017 027241 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * AbstractPKIXTrustEngine.cpp * * A trust engine that uses X.509 trust anchors and CRLs associated with a KeyInfoSource * to perform PKIX validation of signatures and certificates. */ #include "internal.h" #include "logging.h" #include "security/AbstractPKIXTrustEngine.h" #include "signature/KeyInfo.h" #include "signature/Signature.h" #include "security/CredentialCriteria.h" #include "security/CredentialResolver.h" #include "security/KeyInfoResolver.h" #include "security/OpenSSLCryptoX509CRL.h" #include "security/OpenSSLPathValidator.h" #include "security/PKIXPathValidatorParams.h" #include "security/SecurityHelper.h" #include "security/X509Credential.h" #include "signature/SignatureValidator.h" #include "util/NDC.h" #include "util/PathResolver.h" #include #include #include using namespace xmlsignature; using namespace xmltooling::logging; using namespace xmltooling; using namespace std; using boost::ptr_vector; namespace xmltooling { // Adapter between TrustEngine and PathValidator class XMLTOOL_DLLLOCAL PKIXParams : public PKIXPathValidatorParams { const AbstractPKIXTrustEngine& m_trust; const AbstractPKIXTrustEngine::PKIXValidationInfoIterator& m_pkixInfo; vector m_crls; public: PKIXParams( const AbstractPKIXTrustEngine& t, const AbstractPKIXTrustEngine::PKIXValidationInfoIterator& pkixInfo, const vector* inlineCRLs ) : m_trust(t), m_pkixInfo(pkixInfo) { if (inlineCRLs && !inlineCRLs->empty()) { m_crls = *inlineCRLs; m_crls.insert(m_crls.end(), pkixInfo.getCRLs().begin(), pkixInfo.getCRLs().end()); } } virtual ~PKIXParams() {} int getVerificationDepth() const { return m_pkixInfo.getVerificationDepth(); } bool isAnyPolicyInhibited() const { return m_trust.m_anyPolicyInhibit; } bool isPolicyMappingInhibited() const { return m_trust.m_policyMappingInhibit; } const set& getPolicies() const { return m_trust.m_policyOIDs; } const vector& getTrustAnchors() const { return m_pkixInfo.getTrustAnchors(); } PKIXPathValidatorParams::revocation_t getRevocationChecking() const { if (m_trust.m_checkRevocation.empty() || m_trust.m_checkRevocation == "off") return PKIXPathValidatorParams::REVOCATION_OFF; else if (m_trust.m_checkRevocation == "entityOnly") return PKIXPathValidatorParams::REVOCATION_ENTITYONLY; else if (m_trust.m_checkRevocation == "fullChain") return PKIXPathValidatorParams::REVOCATION_FULLCHAIN; return PKIXPathValidatorParams::REVOCATION_OFF; } const vector& getCRLs() const { return m_crls.empty() ? m_pkixInfo.getCRLs() : m_crls; } }; static XMLCh fullCRLChain[] = UNICODE_LITERAL_12(f,u,l,l,C,R,L,C,h,a,i,n); static XMLCh checkRevocation[] = UNICODE_LITERAL_15(c,h,e,c,k,R,e,v,o,c,a,t,i,o,n); static XMLCh policyMappingInhibit[] = UNICODE_LITERAL_20(p,o,l,i,c,y,M,a,p,p,i,n,g,I,n,h,i,b,i,t); static XMLCh anyPolicyInhibit[] = UNICODE_LITERAL_16(a,n,y,P,o,l,i,c,y,I,n,h,i,b,i,t); static XMLCh _PathValidator[] = UNICODE_LITERAL_13(P,a,t,h,V,a,l,i,d,a,t,o,r); static XMLCh PolicyOID[] = UNICODE_LITERAL_9(P,o,l,i,c,y,O,I,D); static XMLCh TrustedName[] = UNICODE_LITERAL_11(T,r,u,s,t,e,d,N,a,m,e); static XMLCh type[] = UNICODE_LITERAL_4(t,y,p,e); }; AbstractPKIXTrustEngine::PKIXValidationInfoIterator::PKIXValidationInfoIterator() { } AbstractPKIXTrustEngine::PKIXValidationInfoIterator::~PKIXValidationInfoIterator() { } AbstractPKIXTrustEngine::AbstractPKIXTrustEngine(const xercesc::DOMElement* e) : TrustEngine(e), m_checkRevocation(XMLHelper::getAttrString(e, nullptr, checkRevocation)), m_fullCRLChain(XMLHelper::getAttrBool(e, false, fullCRLChain)), m_policyMappingInhibit(XMLHelper::getAttrBool(e, false, policyMappingInhibit)), m_anyPolicyInhibit(XMLHelper::getAttrBool(e, false, anyPolicyInhibit)) { if (m_fullCRLChain) { Category::getInstance(XMLTOOLING_LOGCAT".TrustEngine.PKIX").warn( "fullCRLChain option is deprecated, setting checkRevocation to \"fullChain\"" ); m_checkRevocation = "fullChain"; } else if (m_checkRevocation == "fullChain") { m_fullCRLChain = true; // in case anything's using this } xercesc::DOMElement* c = XMLHelper::getFirstChildElement(e); while (c) { if (c->hasChildNodes()) { auto_ptr_char v(c->getTextContent()); if (v.get() && *v.get()) { if (XMLString::equals(c->getLocalName(), PolicyOID)) m_policyOIDs.insert(v.get()); else if (XMLString::equals(c->getLocalName(), TrustedName)) m_trustedNames.insert(v.get()); } } else if (XMLString::equals(c->getLocalName(), _PathValidator)) { try { string t = XMLHelper::getAttrString(c, nullptr, type); if (!t.empty()) { Category::getInstance(XMLTOOLING_LOGCAT".TrustEngine.PKIX").info( "building PathValidator of type %s", t.c_str() ); PathValidator* pv = XMLToolingConfig::getConfig().PathValidatorManager.newPlugin(t.c_str(), c); OpenSSLPathValidator* ospv = dynamic_cast(pv); if (!ospv) { delete pv; throw XMLSecurityException("PathValidator doesn't support OpenSSL interface."); } m_pathValidators.push_back(ospv); } } catch (exception& ex) { Category::getInstance(XMLTOOLING_LOGCAT".TrustEngine.PKIX").error( "error building PathValidator: %s", ex.what() ); } } c = XMLHelper::getNextSiblingElement(c); } if (m_pathValidators.empty()) { m_pathValidators.push_back( dynamic_cast( XMLToolingConfig::getConfig().PathValidatorManager.newPlugin(PKIX_PATHVALIDATOR, e) ) ); } } AbstractPKIXTrustEngine::~AbstractPKIXTrustEngine() { } bool AbstractPKIXTrustEngine::checkEntityNames( X509* certEE, const CredentialResolver& credResolver, const CredentialCriteria& criteria ) const { Category& log=Category::getInstance(XMLTOOLING_LOGCAT".TrustEngine.PKIX"); // We resolve to a set of trusted credentials. vector creds; credResolver.resolve(creds,&criteria); // Build a list of acceptable names. set trustednames = m_trustedNames; if (log.isDebugEnabled()) { for (set::const_iterator n=m_trustedNames.begin(); n!=m_trustedNames.end(); n++) { log.debug("adding to list of trusted names (%s)", n->c_str()); } } if (criteria.getPeerName()) { trustednames.insert(criteria.getPeerName()); log.debug("adding to list of trusted names (%s)", criteria.getPeerName()); } for (vector::const_iterator cred = creds.begin(); cred!=creds.end(); ++cred) { trustednames.insert((*cred)->getKeyNames().begin(), (*cred)->getKeyNames().end()); if (log.isDebugEnabled()) { for (set::const_iterator n=(*cred)->getKeyNames().begin(); n!=(*cred)->getKeyNames().end(); n++) { log.debug("adding to list of trusted names (%s)", n->c_str()); } } } X509_NAME* subject=X509_get_subject_name(certEE); if (subject) { // One way is a direct match to the subject DN. // Seems that the way to do the compare is to write the X509_NAME into a BIO. BIO* b = BIO_new(BIO_s_mem()); BIO* b2 = BIO_new(BIO_s_mem()); // The flags give us LDAP order instead of X.500, with a comma separator. X509_NAME_print_ex(b,subject,0,XN_FLAG_RFC2253); BIO_flush(b); // The flags give us LDAP order instead of X.500, with a comma plus space separator. X509_NAME_print_ex(b2,subject,0,XN_FLAG_RFC2253 + XN_FLAG_SEP_CPLUS_SPC - XN_FLAG_SEP_COMMA_PLUS); BIO_flush(b2); BUF_MEM* bptr=nullptr; BUF_MEM* bptr2=nullptr; BIO_get_mem_ptr(b, &bptr); BIO_get_mem_ptr(b2, &bptr2); if (bptr && bptr->length > 0 && log.isDebugEnabled()) { string subjectstr(bptr->data, bptr->length); log.debug("certificate subject: %s", subjectstr.c_str()); } // Check each keyname. for (set::const_iterator n=trustednames.begin(); bptr && bptr2 && n!=trustednames.end(); n++) { #ifdef HAVE_STRCASECMP if ((n->length() == bptr->length && !strncasecmp(n->c_str(), bptr->data, bptr->length)) || (n->length() == bptr2->length && !strncasecmp(n->c_str(), bptr2->data, bptr2->length))) { #else if ((n->length() == bptr->length && !strnicmp(n->c_str(), bptr->data, bptr->length)) || (n->length() == bptr2->length && !strnicmp(n->c_str(), bptr2->data, bptr2->length))) { #endif log.debug("matched full subject DN to a key name (%s)", n->c_str()); BIO_free(b); BIO_free(b2); return true; } } BIO_free(b); BIO_free(b2); log.debug("unable to match DN, trying TLS subjectAltName match"); STACK_OF(GENERAL_NAME)* altnames=(STACK_OF(GENERAL_NAME)*)X509_get_ext_d2i(certEE, NID_subject_alt_name, nullptr, nullptr); if (altnames) { int numalts = sk_GENERAL_NAME_num(altnames); for (int an=0; antype==GEN_DNS || check->type==GEN_URI) { const char* altptr = (char*)ASN1_STRING_data(check->d.ia5); const int altlen = ASN1_STRING_length(check->d.ia5); for (set::const_iterator n=trustednames.begin(); n!=trustednames.end(); n++) { #ifdef HAVE_STRCASECMP if ((check->type==GEN_DNS && n->length()==altlen && !strncasecmp(altptr,n->c_str(),altlen)) #else if ((check->type==GEN_DNS && n->length()==altlen && !strnicmp(altptr,n->c_str(),altlen)) #endif || (check->type==GEN_URI && n->length()==altlen && !strncmp(altptr,n->c_str(),altlen))) { log.debug("matched DNS/URI subjectAltName to a key name (%s)", n->c_str()); GENERAL_NAMES_free(altnames); return true; } } } } } GENERAL_NAMES_free(altnames); log.debug("unable to match subjectAltName, trying TLS CN match"); // Fetch the last CN RDN. char* peer_CN = nullptr; int j,i = -1; while ((j=X509_NAME_get_index_by_NID(subject, NID_commonName, i)) >= 0) i = j; if (i >= 0) { ASN1_STRING* tmp = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subject, i)); // Copied in from libcurl. /* In OpenSSL 0.9.7d and earlier, ASN1_STRING_to_UTF8 fails if the input is already UTF-8 encoded. We check for this case and copy the raw string manually to avoid the problem. */ if(tmp && ASN1_STRING_type(tmp) == V_ASN1_UTF8STRING) { j = ASN1_STRING_length(tmp); if(j >= 0) { peer_CN = (char*)OPENSSL_malloc(j + 1); memcpy(peer_CN, ASN1_STRING_data(tmp), j); peer_CN[j] = '\0'; } } else /* not a UTF8 name */ { j = ASN1_STRING_to_UTF8(reinterpret_cast(&peer_CN), tmp); } for (set::const_iterator n=trustednames.begin(); n!=trustednames.end(); n++) { #ifdef HAVE_STRCASECMP if (n->length() == j && !strncasecmp(peer_CN, n->c_str(), j)) { #else if (n->length() == j && !strnicmp(peer_CN, n->c_str(), j)) { #endif log.debug("matched subject CN to a key name (%s)", n->c_str()); if(peer_CN) OPENSSL_free(peer_CN); return true; } } if(peer_CN) OPENSSL_free(peer_CN); } else { log.warn("no common name in certificate subject"); } } else { log.error("certificate has no subject?!"); } return false; } bool AbstractPKIXTrustEngine::validateWithCRLs( X509* certEE, STACK_OF(X509)* certChain, const CredentialResolver& credResolver, CredentialCriteria* criteria, const vector* inlineCRLs ) const { #ifdef _DEBUG NDC ndc("validateWithCRLs"); #endif Category& log=Category::getInstance(XMLTOOLING_LOGCAT".TrustEngine.PKIX"); if (!certEE) { log.error("X.509 credential was NULL, unable to perform validation"); return false; } if (criteria && criteria->getPeerName() && *(criteria->getPeerName())) { log.debug("checking that the certificate name is acceptable"); if (criteria && criteria->getUsage()==Credential::UNSPECIFIED_CREDENTIAL) criteria->setUsage(Credential::SIGNING_CREDENTIAL); if (!checkEntityNames(certEE,credResolver,*criteria)) { log.error("certificate name was not acceptable"); return false; } } else if (!m_trustedNames.empty()) { log.debug("checking that the certificate name is acceptable"); CredentialCriteria cc; cc.setUsage(Credential::SIGNING_CREDENTIAL); if (!checkEntityNames(certEE,credResolver,cc)) { log.error("certificate name was not acceptable"); return false; } } log.debug("performing certificate path validation..."); auto_ptr pkix(getPKIXValidationInfoIterator(credResolver, criteria)); while (pkix->next()) { PKIXParams params(*this, *pkix.get(), inlineCRLs); for (ptr_vector::const_iterator v = m_pathValidators.begin(); v != m_pathValidators.end(); ++v) { if (v->validate(certEE, certChain, params)) { return true; } } } log.debug("failed to validate certificate chain using supplied PKIX information"); return false; } bool AbstractPKIXTrustEngine::validate( X509* certEE, STACK_OF(X509)* certChain, const CredentialResolver& credResolver, CredentialCriteria* criteria ) const { return validateWithCRLs(certEE,certChain,credResolver,criteria); } bool AbstractPKIXTrustEngine::validate( XSECCryptoX509* certEE, const vector& certChain, const CredentialResolver& credResolver, CredentialCriteria* criteria ) const { #ifdef _DEBUG NDC ndc("validate"); #endif if (!certEE) { Category::getInstance(XMLTOOLING_LOGCAT".TrustEngine.PKIX").error("X.509 credential was NULL, unable to perform validation"); return false; } else if (certEE->getProviderName()!=DSIGConstants::s_unicodeStrPROVOpenSSL) { Category::getInstance(XMLTOOLING_LOGCAT".TrustEngine.PKIX").error("only the OpenSSL XSEC provider is supported"); return false; } STACK_OF(X509)* untrusted=sk_X509_new_null(); for (vector::const_iterator i=certChain.begin(); i!=certChain.end(); ++i) sk_X509_push(untrusted,static_cast(*i)->getOpenSSLX509()); bool ret = validate(static_cast(certEE)->getOpenSSLX509(), untrusted, credResolver, criteria); sk_X509_free(untrusted); return ret; } bool AbstractPKIXTrustEngine::validate( Signature& sig, const CredentialResolver& credResolver, CredentialCriteria* criteria ) const { #ifdef _DEBUG NDC ndc("validate"); #endif Category& log=Category::getInstance(XMLTOOLING_LOGCAT".TrustEngine.PKIX"); const KeyInfoResolver* inlineResolver = m_keyInfoResolver; if (!inlineResolver) inlineResolver = XMLToolingConfig::getConfig().getKeyInfoResolver(); if (!inlineResolver) { log.error("unable to perform PKIX validation, no KeyInfoResolver available"); return false; } // Pull the certificate chain out of the signature. X509Credential* x509cred; auto_ptr cred(inlineResolver->resolve(&sig,X509Credential::RESOLVE_CERTS|X509Credential::RESOLVE_CRLS)); if (!cred.get() || !(x509cred=dynamic_cast(cred.get()))) { log.error("unable to perform PKIX validation, signature does not contain any certificates"); return false; } const vector& certs = x509cred->getEntityCertificateChain(); if (certs.empty()) { log.error("unable to perform PKIX validation, signature does not contain any certificates"); return false; } log.debug("validating signature using certificate from within the signature"); // Find and save off a pointer to the certificate that unlocks the object. // Most of the time, this will be the first one anyway. XSECCryptoX509* certEE=nullptr; SignatureValidator keyValidator; for (vector::const_iterator i=certs.begin(); !certEE && i!=certs.end(); ++i) { try { auto_ptr key((*i)->clonePublicKey()); keyValidator.setKey(key.get()); keyValidator.validate(&sig); log.debug("signature verified with key inside signature, attempting certificate validation..."); certEE=(*i); } catch (ValidationException& ex) { log.debug(ex.what()); } } if (!certEE) { log.debug("failed to verify signature with embedded certificates"); return false; } else if (certEE->getProviderName()!=DSIGConstants::s_unicodeStrPROVOpenSSL) { log.error("only the OpenSSL XSEC provider is supported"); return false; } STACK_OF(X509)* untrusted=sk_X509_new_null(); for (vector::const_iterator i=certs.begin(); i!=certs.end(); ++i) sk_X509_push(untrusted,static_cast(*i)->getOpenSSLX509()); const vector& crls = x509cred->getCRLs(); bool ret = validateWithCRLs(static_cast(certEE)->getOpenSSLX509(), untrusted, credResolver, criteria, &crls); sk_X509_free(untrusted); return ret; } bool AbstractPKIXTrustEngine::validate( const XMLCh* sigAlgorithm, const char* sig, KeyInfo* keyInfo, const char* in, unsigned int in_len, const CredentialResolver& credResolver, CredentialCriteria* criteria ) const { #ifdef _DEBUG NDC ndc("validate"); #endif Category& log=Category::getInstance(XMLTOOLING_LOGCAT".TrustEngine.PKIX"); if (!keyInfo) { log.error("unable to perform PKIX validation, KeyInfo not present"); return false; } const KeyInfoResolver* inlineResolver = m_keyInfoResolver; if (!inlineResolver) inlineResolver = XMLToolingConfig::getConfig().getKeyInfoResolver(); if (!inlineResolver) { log.error("unable to perform PKIX validation, no KeyInfoResolver available"); return false; } // Pull the certificate chain out of the signature. X509Credential* x509cred; auto_ptr cred(inlineResolver->resolve(keyInfo,X509Credential::RESOLVE_CERTS)); if (!cred.get() || !(x509cred=dynamic_cast(cred.get()))) { log.error("unable to perform PKIX validation, KeyInfo does not contain any certificates"); return false; } const vector& certs = x509cred->getEntityCertificateChain(); if (certs.empty()) { log.error("unable to perform PKIX validation, KeyInfo does not contain any certificates"); return false; } log.debug("validating signature using certificate from within KeyInfo"); // Find and save off a pointer to the certificate that unlocks the object. // Most of the time, this will be the first one anyway. XSECCryptoX509* certEE=nullptr; for (vector::const_iterator i=certs.begin(); !certEE && i!=certs.end(); ++i) { try { auto_ptr key((*i)->clonePublicKey()); if (Signature::verifyRawSignature(key.get(), sigAlgorithm, sig, in, in_len)) { log.debug("signature verified with key inside signature, attempting certificate validation..."); certEE=(*i); } } catch (SignatureException& ex) { log.debug(ex.what()); } } if (!certEE) { log.debug("failed to verify signature with embedded certificates"); return false; } else if (certEE->getProviderName()!=DSIGConstants::s_unicodeStrPROVOpenSSL) { log.error("only the OpenSSL XSEC provider is supported"); return false; } STACK_OF(X509)* untrusted=sk_X509_new_null(); for (vector::const_iterator i=certs.begin(); i!=certs.end(); ++i) sk_X509_push(untrusted,static_cast(*i)->getOpenSSLX509()); const vector& crls = x509cred->getCRLs(); bool ret = validateWithCRLs(static_cast(certEE)->getOpenSSLX509(), untrusted, credResolver, criteria, &crls); sk_X509_free(untrusted); return ret; } xmltooling-1.5.3/xmltooling/security/impl/BasicX509Credential.cpp000644 001751 001751 00000036310 12057276362 026231 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * BasicX509Credential.cpp * * Wraps an X.509-based Credential by storing key/cert objects inside. */ #include "internal.h" #include "security/BasicX509Credential.h" #include "security/KeyInfoCredentialContext.h" #include "security/OpenSSLCredential.h" #include "security/SecurityHelper.h" #include "security/XSECCryptoX509CRL.h" #include "signature/KeyInfo.h" #include #include #include #include using namespace xmlsignature; using namespace xmltooling; using namespace xercesc; using namespace std; Credential::Credential() { } Credential::~Credential() { } const CredentialContext* Credential::getCredentalContext() const { return nullptr; } X509Credential::X509Credential() { } X509Credential::~X509Credential() { } OpenSSLCredential::OpenSSLCredential() { } OpenSSLCredential::~OpenSSLCredential() { } CredentialContext::CredentialContext() { } CredentialContext::~CredentialContext() { } KeyInfoCredentialContext::KeyInfoCredentialContext(const KeyInfo* keyInfo) : m_keyInfo(keyInfo), m_nativeKeyInfo(nullptr) { } KeyInfoCredentialContext::KeyInfoCredentialContext(DSIGKeyInfoList* keyInfo) : m_keyInfo(nullptr), m_nativeKeyInfo(keyInfo) { } KeyInfoCredentialContext::~KeyInfoCredentialContext() { } const KeyInfo* KeyInfoCredentialContext::getKeyInfo() const { return m_keyInfo; } DSIGKeyInfoList* KeyInfoCredentialContext::getNativeKeyInfo() const { return m_nativeKeyInfo; } BasicX509Credential::BasicX509Credential(bool ownCerts) : m_key(nullptr), m_ownCerts(ownCerts), m_keyInfo(nullptr), m_compactKeyInfo(nullptr) { } BasicX509Credential::BasicX509Credential(XSECCryptoKey* key, const vector& certs, XSECCryptoX509CRL* crl) : m_key(key), m_xseccerts(certs), m_ownCerts(true), m_keyInfo(nullptr), m_compactKeyInfo(nullptr) { if (crl) m_crls.push_back(crl); } BasicX509Credential::BasicX509Credential(XSECCryptoKey* key, const vector& certs, const vector& crls) : m_key(key), m_xseccerts(certs), m_ownCerts(true), m_crls(crls), m_keyInfo(nullptr), m_compactKeyInfo(nullptr) { } BasicX509Credential::~BasicX509Credential() { delete m_key; if (m_ownCerts) for_each(m_xseccerts.begin(), m_xseccerts.end(), xmltooling::cleanup()); for_each(m_crls.begin(), m_crls.end(), xmltooling::cleanup()); delete m_keyInfo; delete m_compactKeyInfo; } void BasicX509Credential::initKeyInfo(unsigned int types) { delete m_keyInfo; m_keyInfo = nullptr; delete m_compactKeyInfo; m_compactKeyInfo = nullptr; // Default will disable X509IssuerSerial due to schema validation issues. if (types == 0) types = KEYINFO_KEY_VALUE | KEYINFO_KEY_NAME | KEYINFO_X509_CERTIFICATE | KEYINFO_X509_SUBJECTNAME | KEYINFO_X509_DIGEST; if (types & KEYINFO_KEY_NAME) { const set& names = getKeyNames(); if (!names.empty()) { m_compactKeyInfo = KeyInfoBuilder::buildKeyInfo(); VectorOf(KeyName) knames = m_compactKeyInfo->getKeyNames(); for (set::const_iterator n = names.begin(); n!=names.end(); ++n) { if (*n == m_subjectName) continue; auto_ptr_XMLCh wide(n->c_str()); KeyName* kname = KeyNameBuilder::buildKeyName(); kname->setName(wide.get()); knames.push_back(kname); } } } if (types & KEYINFO_X509_SUBJECTNAME || types & KEYINFO_X509_ISSUERSERIAL) { if (!m_subjectName.empty() || (!m_issuerName.empty() && !m_serial.empty())) { if (!m_compactKeyInfo) m_compactKeyInfo = KeyInfoBuilder::buildKeyInfo(); X509Data* x509Data=X509DataBuilder::buildX509Data(); m_compactKeyInfo->getX509Datas().push_back(x509Data); if (types & KEYINFO_X509_SUBJECTNAME && !m_subjectName.empty()) { X509SubjectName* sn = X509SubjectNameBuilder::buildX509SubjectName(); auto_ptr_XMLCh wide(m_subjectName.c_str()); sn->setName(wide.get()); x509Data->getX509SubjectNames().push_back(sn); } if (types & KEYINFO_X509_ISSUERSERIAL && !m_issuerName.empty() && !m_serial.empty()) { X509IssuerSerial* is = X509IssuerSerialBuilder::buildX509IssuerSerial(); X509IssuerName* in = X509IssuerNameBuilder::buildX509IssuerName(); auto_ptr_XMLCh wide(m_issuerName.c_str()); in->setName(wide.get()); is->setX509IssuerName(in); X509SerialNumber* ser = X509SerialNumberBuilder::buildX509SerialNumber(); auto_ptr_XMLCh wide2(m_serial.c_str()); ser->setSerialNumber(wide2.get()); is->setX509SerialNumber(ser); x509Data->getX509IssuerSerials().push_back(is); } } } if (types & KEYINFO_X509_CERTIFICATE && !m_xseccerts.empty()) { m_keyInfo = m_compactKeyInfo ? m_compactKeyInfo->cloneKeyInfo() : KeyInfoBuilder::buildKeyInfo(); if (m_keyInfo->getX509Datas().empty()) m_keyInfo->getX509Datas().push_back(X509DataBuilder::buildX509Data()); for (vector::const_iterator x = m_xseccerts.begin(); x!=m_xseccerts.end(); ++x) { safeBuffer& buf=(*x)->getDEREncodingSB(); X509Certificate* x509=X509CertificateBuilder::buildX509Certificate(); x509->setValue(buf.sbStrToXMLCh()); m_keyInfo->getX509Datas().front()->getX509Certificates().push_back(x509); } } if (types & KEYINFO_X509_DIGEST && !m_xseccerts.empty()) { if (!m_compactKeyInfo) m_compactKeyInfo = KeyInfoBuilder::buildKeyInfo(); if (m_compactKeyInfo->getX509Datas().empty()) m_compactKeyInfo->getX509Datas().push_back(X509DataBuilder::buildX509Data()); safeBuffer& buf=m_xseccerts.front()->getDEREncodingSB(); xsecsize_t x; XMLByte* decoded = Base64::decode(reinterpret_cast(buf.rawCharBuffer()), &x); if (decoded) { string xdig = SecurityHelper::doHash("SHA1", reinterpret_cast(decoded), x, false); #ifdef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE XMLString::release(&decoded); #else XMLString::release((char**)&decoded); #endif XMLByte* encoded = Base64::encode(reinterpret_cast(xdig.c_str()), xdig.length(), &x); if (encoded) { auto_ptr_XMLCh widenit(reinterpret_cast(encoded)); #ifdef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE XMLString::release(&encoded); #else XMLString::release((char**)&encoded); #endif X509Digest* x509dig = X509DigestBuilder::buildX509Digest(); x509dig->setValue(widenit.get()); x509dig->setAlgorithm(DSIGConstants::s_unicodeStrURISHA1); m_compactKeyInfo->getX509Datas().front()->getX509Digests().push_back(x509dig); } } } } unsigned int BasicX509Credential::getUsage() const { return UNSPECIFIED_CREDENTIAL; } const char* BasicX509Credential::getAlgorithm() const { if (m_key) { switch (m_key->getKeyType()) { case XSECCryptoKey::KEY_RSA_PRIVATE: case XSECCryptoKey::KEY_RSA_PUBLIC: case XSECCryptoKey::KEY_RSA_PAIR: return "RSA"; case XSECCryptoKey::KEY_DSA_PRIVATE: case XSECCryptoKey::KEY_DSA_PUBLIC: case XSECCryptoKey::KEY_DSA_PAIR: return "DSA"; #ifdef XMLTOOLING_XMLSEC_ECC case XSECCryptoKey::KEY_EC_PRIVATE: case XSECCryptoKey::KEY_EC_PUBLIC: case XSECCryptoKey::KEY_EC_PAIR: return "EC"; #endif case XSECCryptoKey::KEY_HMAC: return "HMAC"; case XSECCryptoKey::KEY_SYMMETRIC: { switch (static_cast(m_key)->getSymmetricKeyType()) { case XSECCryptoSymmetricKey::KEY_3DES_192: return "DESede"; case XSECCryptoSymmetricKey::KEY_AES_128: return "AES"; case XSECCryptoSymmetricKey::KEY_AES_192: return "AES"; case XSECCryptoSymmetricKey::KEY_AES_256: return "AES"; } } } } return nullptr; } unsigned int BasicX509Credential::getKeySize() const { if (m_key) { switch (m_key->getKeyType()) { case XSECCryptoKey::KEY_RSA_PRIVATE: case XSECCryptoKey::KEY_RSA_PUBLIC: case XSECCryptoKey::KEY_RSA_PAIR: { XSECCryptoKeyRSA* rkey = static_cast(m_key); return 8 * rkey->getLength(); } case XSECCryptoKey::KEY_SYMMETRIC: { switch (static_cast(m_key)->getSymmetricKeyType()) { case XSECCryptoSymmetricKey::KEY_3DES_192: return 192; case XSECCryptoSymmetricKey::KEY_AES_128: return 128; case XSECCryptoSymmetricKey::KEY_AES_192: return 192; case XSECCryptoSymmetricKey::KEY_AES_256: return 256; } } } } return 0; } XSECCryptoKey* BasicX509Credential::getPrivateKey() const { if (m_key) { XSECCryptoKey::KeyType type = m_key->getKeyType(); if (type != XSECCryptoKey::KEY_RSA_PUBLIC && type != XSECCryptoKey::KEY_DSA_PUBLIC #ifdef XMLTOOLING_XMLSEC_ECC && type != XSECCryptoKey::KEY_EC_PUBLIC #endif ) return m_key; } return nullptr; } XSECCryptoKey* BasicX509Credential::getPublicKey() const { if (m_key) { XSECCryptoKey::KeyType type = m_key->getKeyType(); if (type != XSECCryptoKey::KEY_RSA_PRIVATE && type != XSECCryptoKey::KEY_DSA_PRIVATE #ifdef XMLTOOLING_XMLSEC_ECC && type != XSECCryptoKey::KEY_EC_PRIVATE #endif ) return m_key; } return nullptr; } const set& BasicX509Credential::getKeyNames() const { return m_keyNames; } KeyInfo* BasicX509Credential::getKeyInfo(bool compact) const { if (compact || !m_keyInfo) return m_compactKeyInfo ? m_compactKeyInfo->cloneKeyInfo() : nullptr; return m_keyInfo->cloneKeyInfo(); } const vector& BasicX509Credential::getEntityCertificateChain() const { return m_xseccerts; } XSECCryptoX509CRL* BasicX509Credential::getCRL() const { return m_crls.empty() ? nullptr : m_crls.front(); } const vector& BasicX509Credential::getCRLs() const { return m_crls; } const char* BasicX509Credential::getSubjectName() const { return m_subjectName.c_str(); } const char* BasicX509Credential::getIssuerName() const { return m_issuerName.c_str(); } const char* BasicX509Credential::getSerialNumber() const { return m_serial.c_str(); } void BasicX509Credential::extract() { XSECCryptoX509* x509 = m_xseccerts.empty() ? nullptr : m_xseccerts.front(); if (!x509 || x509->getProviderName()!=DSIGConstants::s_unicodeStrPROVOpenSSL) return; X509* cert = static_cast(x509)->getOpenSSLX509(); if (!cert) return; X509_NAME* issuer=X509_get_issuer_name(cert); if (issuer) { BIO* b = BIO_new(BIO_s_mem()); X509_NAME_print_ex(b,issuer,0,XN_FLAG_RFC2253); BIO_flush(b); BUF_MEM* bptr=nullptr; BIO_get_mem_ptr(b, &bptr); m_issuerName.erase(); m_issuerName.append(bptr->data, bptr->length); BIO_free(b); } ASN1_INTEGER* serialASN = X509_get_serialNumber(cert); BIGNUM* serialBN = ASN1_INTEGER_to_BN(serialASN, nullptr); if (serialBN) { char* serial = BN_bn2dec(serialBN); if (serial) { m_serial = serial; OPENSSL_free(serial); } BN_free(serialBN); } X509_NAME* subject=X509_get_subject_name(cert); if (subject) { BIO* b = BIO_new(BIO_s_mem()); X509_NAME_print_ex(b,subject,0,XN_FLAG_RFC2253); BIO_flush(b); BUF_MEM* bptr=nullptr; BIO_get_mem_ptr(b, &bptr); m_subjectName.erase(); m_subjectName.append(bptr->data, bptr->length); m_keyNames.insert(m_subjectName); BIO_free(b); // Fetch the last CN RDN. char* peer_CN = nullptr; int j,i = -1; while ((j=X509_NAME_get_index_by_NID(subject, NID_commonName, i)) >= 0) i = j; if (i >= 0) { ASN1_STRING* tmp = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subject, i)); // Copied in from libcurl. /* In OpenSSL 0.9.7d and earlier, ASN1_STRING_to_UTF8 fails if the input is already UTF-8 encoded. We check for this case and copy the raw string manually to avoid the problem. */ if(tmp && ASN1_STRING_type(tmp) == V_ASN1_UTF8STRING) { j = ASN1_STRING_length(tmp); if(j >= 0) { peer_CN = (char*)OPENSSL_malloc(j + 1); memcpy(peer_CN, ASN1_STRING_data(tmp), j); peer_CN[j] = '\0'; } } else /* not a UTF8 name */ { j = ASN1_STRING_to_UTF8(reinterpret_cast(&peer_CN), tmp); } if (j > 0) m_keyNames.insert(string(peer_CN, j)); if(peer_CN) OPENSSL_free(peer_CN); } STACK_OF(GENERAL_NAME)* altnames=(STACK_OF(GENERAL_NAME)*)X509_get_ext_d2i(cert, NID_subject_alt_name, nullptr, nullptr); if (altnames) { int numalts = sk_GENERAL_NAME_num(altnames); for (int an=0; antype==GEN_DNS || check->type==GEN_URI) { const char* altptr = (char*)ASN1_STRING_data(check->d.ia5); const int altlen = ASN1_STRING_length(check->d.ia5); if (altlen > 0) m_keyNames.insert(string(altptr, altlen)); } } } GENERAL_NAMES_free(altnames); } } xmltooling-1.5.3/xmltooling/security/impl/ChainingCredentialResolver.cpp000644 001751 001751 00000010307 12003305017 030037 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * ChainingCredentialResolver.cpp * * CredentialResolver with chaining capability. */ #include "internal.h" #include "logging.h" #include "XMLToolingConfig.h" #include "security/CredentialResolver.h" #include "util/NDC.h" #include "util/XMLHelper.h" #include #include #include #include #include using namespace xmltooling::logging; using namespace xmltooling; using namespace boost; using namespace std; using xercesc::DOMElement; namespace xmltooling { class XMLTOOL_DLLLOCAL ChainingCredentialResolver : public CredentialResolver { public: ChainingCredentialResolver(const DOMElement* e); virtual ~ChainingCredentialResolver() {} Lockable* lock() { for_each(m_resolvers.begin(), m_resolvers.end(), mem_fun_ref(&Lockable::lock)); return this; } void unlock() { for_each(m_resolvers.begin(), m_resolvers.end(), mem_fun_ref(&Lockable::unlock)); } const Credential* resolve(const CredentialCriteria* criteria=nullptr) const { const Credential* cred = nullptr; for (ptr_vector::const_iterator cr = m_resolvers.begin(); !cred && cr!=m_resolvers.end(); ++cr) cred = cr->resolve(criteria); return cred; } virtual vector::size_type resolve( vector& results, const CredentialCriteria* criteria=nullptr ) const { // Member function pointer to method to call. static vector::size_type (CredentialResolver::* fn) (vector& results, const CredentialCriteria* criteria) const = &CredentialResolver::resolve; // ref() converts pass by copy to pass by reference for output parameter for_each(m_resolvers.begin(), m_resolvers.end(), boost::bind(fn, _1, boost::ref(results), criteria)); return results.size(); } private: ptr_vector m_resolvers; }; CredentialResolver* XMLTOOL_DLLLOCAL ChainingCredentialResolverFactory(const DOMElement* const & e) { return new ChainingCredentialResolver(e); } static const XMLCh _CredentialResolver[] = UNICODE_LITERAL_18(C,r,e,d,e,n,t,i,a,l,R,e,s,o,l,v,e,r); static const XMLCh type[] = UNICODE_LITERAL_4(t,y,p,e); }; ChainingCredentialResolver::ChainingCredentialResolver(const DOMElement* e) { XMLToolingConfig& conf = XMLToolingConfig::getConfig(); Category& log=Category::getInstance(XMLTOOLING_LOGCAT".CredentialResolver."CHAINING_CREDENTIAL_RESOLVER); // Load up the chain of resolvers. e = e ? XMLHelper::getFirstChildElement(e, _CredentialResolver) : nullptr; while (e) { string t = XMLHelper::getAttrString(e, nullptr, type); if (!t.empty()) { log.info("building CredentialResolver of type %s", t.c_str()); try { m_resolvers.push_back(conf.CredentialResolverManager.newPlugin(t.c_str(), e)); } catch (exception& ex) { log.error("caught exception processing embedded CredentialResolver element: %s", ex.what()); } } e = XMLHelper::getNextSiblingElement(e, _CredentialResolver); } } xmltooling-1.5.3/xmltooling/security/impl/ChainingTrustEngine.cpp000644 001751 001751 00000015060 12003305017 026513 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * ChainingTrustEngine.cpp * * OpenSSLTrustEngine that uses multiple engines in sequence. */ #include "internal.h" #include "exceptions.h" #include "logging.h" #include "security/ChainingTrustEngine.h" #include "security/CredentialCriteria.h" #include "util/XMLHelper.h" #include #include #include using namespace xmlsignature; using namespace xmltooling::logging; using namespace xmltooling; using namespace boost::lambda; using namespace boost; using namespace std; using xercesc::DOMElement; namespace xmltooling { TrustEngine* XMLTOOL_DLLLOCAL ChainingTrustEngineFactory(const DOMElement* const & e) { return new ChainingTrustEngine(e); } }; static const XMLCh _TrustEngine[] = UNICODE_LITERAL_11(T,r,u,s,t,E,n,g,i,n,e); static const XMLCh _type[] = UNICODE_LITERAL_4(t,y,p,e); ChainingTrustEngine::ChainingTrustEngine(const DOMElement* e) : TrustEngine(e) { Category& log=Category::getInstance(XMLTOOLING_LOGCAT".TrustEngine."CHAINING_TRUSTENGINE); e = e ? XMLHelper::getFirstChildElement(e, _TrustEngine) : nullptr; while (e) { try { string t = XMLHelper::getAttrString(e, nullptr, _type); if (!t.empty()) { log.info("building TrustEngine of type %s", t.c_str()); addTrustEngine(XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(t.c_str(), e)); } } catch (exception& ex) { log.error("error building TrustEngine: %s", ex.what()); } e = XMLHelper::getNextSiblingElement(e, _TrustEngine); } } ChainingTrustEngine::~ChainingTrustEngine() { } void ChainingTrustEngine::addTrustEngine(TrustEngine* newEngine) { m_engines.push_back(newEngine); SignatureTrustEngine* sig = dynamic_cast(newEngine); if (sig) m_sigEngines.push_back(sig); X509TrustEngine* x509 = dynamic_cast(newEngine); if (x509) m_x509Engines.push_back(x509); OpenSSLTrustEngine* ossl = dynamic_cast(newEngine); if (ossl) m_osslEngines.push_back(ossl); } TrustEngine* ChainingTrustEngine::removeTrustEngine(TrustEngine* oldEngine) { ptr_vector::iterator i = find_if(m_engines.begin(), m_engines.end(), (&_1 == oldEngine)); if (i != m_engines.end()) { SignatureTrustEngine* sig = dynamic_cast(oldEngine); if (sig) { ptr_vector::iterator s = find_if(m_sigEngines.begin(), m_sigEngines.end(), (&_1 == sig)); if (s != m_sigEngines.end()) m_sigEngines.erase(s); } X509TrustEngine* x509 = dynamic_cast(oldEngine); if (x509) { ptr_vector::iterator x = find_if(m_x509Engines.begin(), m_x509Engines.end(), (&_1 == x509)); if (x != m_x509Engines.end()) m_x509Engines.erase(x); } OpenSSLTrustEngine* ossl = dynamic_cast(oldEngine); if (ossl) { ptr_vector::iterator o = find_if(m_osslEngines.begin(), m_osslEngines.end(), (&_1 == ossl)); if (o != m_osslEngines.end()) m_osslEngines.erase(o); } return (m_engines.release(i)).release(); } return nullptr; } bool ChainingTrustEngine::validate(Signature& sig, const CredentialResolver& credResolver, CredentialCriteria* criteria) const { unsigned int usage = criteria ? criteria->getUsage() : 0; for (ptr_vector::const_iterator i=m_sigEngines.begin(); i!=m_sigEngines.end(); ++i) { if (i->validate(sig,credResolver,criteria)) return true; if (criteria) { criteria->reset(); criteria->setUsage(usage); } } return false; } bool ChainingTrustEngine::validate( const XMLCh* sigAlgorithm, const char* sig, KeyInfo* keyInfo, const char* in, unsigned int in_len, const CredentialResolver& credResolver, CredentialCriteria* criteria ) const { unsigned int usage = criteria ? criteria->getUsage() : 0; for (ptr_vector::const_iterator i=m_sigEngines.begin(); i!=m_sigEngines.end(); ++i) { if (i->validate(sigAlgorithm, sig, keyInfo, in, in_len, credResolver, criteria)) return true; if (criteria) { criteria->reset(); criteria->setUsage(usage); } } return false; } bool ChainingTrustEngine::validate( XSECCryptoX509* certEE, const vector& certChain, const CredentialResolver& credResolver, CredentialCriteria* criteria ) const { unsigned int usage = criteria ? criteria->getUsage() : 0; for (ptr_vector::const_iterator i=m_x509Engines.begin(); i!=m_x509Engines.end(); ++i) { if (i->validate(certEE,certChain,credResolver,criteria)) return true; if (criteria) { criteria->reset(); criteria->setUsage(usage); } } return false; } bool ChainingTrustEngine::validate( X509* certEE, STACK_OF(X509)* certChain, const CredentialResolver& credResolver, CredentialCriteria* criteria ) const { unsigned int usage = criteria ? criteria->getUsage() : 0; for (ptr_vector::const_iterator i=m_osslEngines.begin(); i!=m_osslEngines.end(); ++i) { if (i->validate(certEE,certChain,credResolver,criteria)) return true; if (criteria) { criteria->reset(); criteria->setUsage(usage); } } return false; } xmltooling-1.5.3/xmltooling/security/impl/CredentialCriteria.cpp000644 001751 001751 00000021204 12003305017 026335 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * CredentialCriteria.cpp * * Class for specifying criteria by which a CredentialResolver should resolve credentials. */ #include "internal.h" #include "logging.h" #include "XMLToolingConfig.h" #include "security/X509Credential.h" #include "security/CredentialCriteria.h" #include "security/KeyInfoResolver.h" #include "security/SecurityHelper.h" #include "signature/Signature.h" #include #include #include #include #include using xmlsignature::KeyInfo; using xmlsignature::Signature; using namespace xmltooling::logging; using namespace xmltooling; using namespace std; CredentialCriteria::CredentialCriteria() : m_keyUsage(Credential::UNSPECIFIED_CREDENTIAL), m_keySize(0), m_maxKeySize(0), m_key(nullptr), m_keyInfo(nullptr), m_nativeKeyInfo(nullptr), m_credential(nullptr) { } CredentialCriteria::~CredentialCriteria() { delete m_credential; } unsigned int CredentialCriteria::getUsage() const { return m_keyUsage; } void CredentialCriteria::setUsage(unsigned int usage) { m_keyUsage = usage; } const char* CredentialCriteria::getPeerName() const { return m_peerName.empty() ? nullptr : m_peerName.c_str(); } void CredentialCriteria::setPeerName(const char* peerName) { m_peerName.erase(); if (peerName) m_peerName = peerName; } const char* CredentialCriteria::getKeyAlgorithm() const { return m_keyAlgorithm.empty() ? nullptr : m_keyAlgorithm.c_str(); } void CredentialCriteria::setKeyAlgorithm(const char* keyAlgorithm) { m_keyAlgorithm.erase(); if (keyAlgorithm) m_keyAlgorithm = keyAlgorithm; } unsigned int CredentialCriteria::getKeySize() const { return m_keySize; } void CredentialCriteria::setKeySize(unsigned int keySize) { m_keySize = keySize; } unsigned int CredentialCriteria::getMaxKeySize() const { return m_maxKeySize; } void CredentialCriteria::setMaxKeySize(unsigned int keySize) { m_maxKeySize = keySize; } void CredentialCriteria::setXMLAlgorithm(const XMLCh* algorithm) { if (algorithm) { pair mapped = XMLToolingConfig::getConfig().mapXMLAlgorithmToKeyAlgorithm(algorithm); setKeyAlgorithm(mapped.first); setKeySize(mapped.second); } else { setKeyAlgorithm(nullptr); setKeySize(0); } } const set& CredentialCriteria::getKeyNames() const { return m_keyNames; } set& CredentialCriteria::getKeyNames() { return m_keyNames; } XSECCryptoKey* CredentialCriteria::getPublicKey() const { return m_key; } void CredentialCriteria::setPublicKey(XSECCryptoKey* key) { m_key = key; } const KeyInfo* CredentialCriteria::getKeyInfo() const { return m_keyInfo; } void CredentialCriteria::setKeyInfo(const KeyInfo* keyInfo, int extraction) { delete m_credential; m_credential = nullptr; m_keyInfo = keyInfo; if (!keyInfo || !extraction) return; int types = (extraction & KEYINFO_EXTRACTION_KEY) ? Credential::RESOLVE_KEYS : 0; types |= (extraction & KEYINFO_EXTRACTION_KEYNAMES) ? X509Credential::RESOLVE_CERTS : 0; m_credential = XMLToolingConfig::getConfig().getKeyInfoResolver()->resolve(keyInfo,types); // Ensure any key names have been sucked out for later if desired. if (extraction & KEYINFO_EXTRACTION_KEYNAMES) { X509Credential* xcred = dynamic_cast(m_credential); if (xcred) xcred->extract(); } } DSIGKeyInfoList* CredentialCriteria::getNativeKeyInfo() const { return m_nativeKeyInfo; } void CredentialCriteria::setNativeKeyInfo(DSIGKeyInfoList* keyInfo, int extraction) { delete m_credential; m_credential = nullptr; m_nativeKeyInfo = keyInfo; if (!keyInfo || !extraction) return; int types = (extraction & KEYINFO_EXTRACTION_KEY) ? Credential::RESOLVE_KEYS : 0; types |= (extraction & KEYINFO_EXTRACTION_KEYNAMES) ? X509Credential::RESOLVE_CERTS : 0; m_credential = XMLToolingConfig::getConfig().getKeyInfoResolver()->resolve(keyInfo,types); // Ensure any key names have been sucked out for later if desired. if (extraction & KEYINFO_EXTRACTION_KEYNAMES) { X509Credential* xcred = dynamic_cast(m_credential); if (xcred) xcred->extract(); } } void CredentialCriteria::setSignature(const Signature& sig, int extraction) { setXMLAlgorithm(sig.getSignatureAlgorithm()); KeyInfo* k = sig.getKeyInfo(); if (k) return setKeyInfo(k, extraction); DSIGSignature* dsig = sig.getXMLSignature(); if (dsig) setNativeKeyInfo(dsig->getKeyInfoList(), extraction); } void CredentialCriteria::reset() { setUsage(Credential::UNSPECIFIED_CREDENTIAL); setKeySize(0); setMaxKeySize(0); setKeyAlgorithm(nullptr); getKeyNames().clear(); setKeyInfo(nullptr); setNativeKeyInfo(nullptr); } bool CredentialCriteria::matches(const Credential& credential) const { Category& log = Category::getInstance(XMLTOOLING_LOGCAT".CredentialCriteria"); // Usage check, if specified and we have one, compare masks. if (getUsage() != Credential::UNSPECIFIED_CREDENTIAL) { if (credential.getUsage() != Credential::UNSPECIFIED_CREDENTIAL) if ((getUsage() & credential.getUsage()) == 0) { if (log.isDebugEnabled()) log.debug("usage didn't match (%u != %u)", getUsage(), credential.getUsage()); return false; } } // Algorithm check, if specified and we have one. const char* alg = getKeyAlgorithm(); if (alg && *alg) { const char* alg2 = credential.getAlgorithm(); if (alg2 && *alg2) { if (strcmp(alg,alg2)) { if (log.isDebugEnabled()) log.debug("key algorithm didn't match ('%s' != '%s')", getKeyAlgorithm(), credential.getAlgorithm()); return false; } } } // KeySize check, if specified and we have one. unsigned int ksize = credential.getKeySize(); if (ksize > 0) { if (m_keySize > 0 && m_maxKeySize == 0) { if (ksize != m_keySize) { log.debug("key size (%u) didn't match (%u)", ksize, m_keySize); return false; } } else if (m_keySize > 0 && ksize < m_keySize) { log.debug("key size (%u) smaller than minimum (%u)", ksize, m_keySize); return false; } else if (m_maxKeySize > 0 && ksize > m_maxKeySize) { log.debug("key size (%u) larger than maximum (%u)", ksize, m_maxKeySize); return false; } } // See if we can test key names. set critnames = getKeyNames(); if (m_credential) critnames.insert(m_credential->getKeyNames().begin(), m_credential->getKeyNames().end()); const set& crednames = credential.getKeyNames(); if (!critnames.empty() && !crednames.empty()) { bool found = false; for (set::const_iterator n = critnames.begin(); n!=critnames.end(); ++n) { if (crednames.count(*n)>0) { found = true; break; } } if (!found) { log.debug("credential name(s) didn't overlap"); return false; } } // See if we have to match a specific key. const XSECCryptoKey* key1 = getPublicKey(); if (!key1 && m_credential) key1 = m_credential->getPublicKey(); if (!key1) return true; // no key to compare against, so we're done const XSECCryptoKey* key2 = credential.getPublicKey(); if (!key2) return true; // no key here, so we can't test it if (SecurityHelper::matches(*key1, *key2)) return true; log.debug("keys didn't match"); return false; } xmltooling-1.5.3/xmltooling/security/impl/CredentialResolver.cpp000644 001751 001751 00000004010 12003305017 026370 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * CredentialResolver.cpp * * An API for resolving keys and certificates based on application criteria. */ #include "internal.h" #include "security/CredentialResolver.h" using namespace xmltooling; namespace xmltooling { XMLTOOL_DLLLOCAL PluginManager::Factory FilesystemCredentialResolverFactory; XMLTOOL_DLLLOCAL PluginManager::Factory DummyCredentialResolverFactory; XMLTOOL_DLLLOCAL PluginManager::Factory ChainingCredentialResolverFactory; }; void XMLTOOL_API xmltooling::registerCredentialResolvers() { XMLToolingConfig& conf=XMLToolingConfig::getConfig(); conf.CredentialResolverManager.registerFactory(FILESYSTEM_CREDENTIAL_RESOLVER, FilesystemCredentialResolverFactory); conf.CredentialResolverManager.registerFactory(DUMMY_CREDENTIAL_RESOLVER, DummyCredentialResolverFactory); conf.CredentialResolverManager.registerFactory(CHAINING_CREDENTIAL_RESOLVER, ChainingCredentialResolverFactory); } CredentialResolver::CredentialResolver() { } CredentialResolver::~CredentialResolver() { } xmltooling-1.5.3/xmltooling/security/impl/DummyCredentialResolver.cpp000644 001751 001751 00000003564 12003305017 027421 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * DummyCredentialResolver.cpp * * CredentialResolver that returns nothing. */ #include "internal.h" #include "XMLToolingConfig.h" #include "security/CredentialResolver.h" #include "util/NDC.h" using namespace xmltooling; using namespace std; using xercesc::DOMElement; namespace xmltooling { class XMLTOOL_DLLLOCAL DummyCredentialResolver : public CredentialResolver { public: DummyCredentialResolver(const DOMElement*) {} virtual ~DummyCredentialResolver() {} Lockable* lock() {return this;} void unlock() {} const Credential* resolve(const CredentialCriteria* criteria=nullptr) const { return nullptr; } vector::size_type resolve( vector& results, const CredentialCriteria* criteria=nullptr ) const { return 0; } }; CredentialResolver* XMLTOOL_DLLLOCAL DummyCredentialResolverFactory(const DOMElement* const & e) { return new DummyCredentialResolver(e); } }; xmltooling-1.5.3/xmltooling/security/impl/ExplicitKeyTrustEngine.cpp000644 001751 001751 00000024701 12003305017 027227 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * ExplicitKeyTrustEngine.cpp * * TrustEngine based on explicit knowledge of peer key information. */ #include "internal.h" #include "logging.h" #include "security/Credential.h" #include "security/CredentialCriteria.h" #include "security/CredentialResolver.h" #include "security/OpenSSLTrustEngine.h" #include "security/SignatureTrustEngine.h" #include "signature/Signature.h" #include "signature/SignatureValidator.h" #include "util/NDC.h" #include #include #include #include using namespace xmlsignature; using namespace xmltooling::logging; using namespace xmltooling; using namespace std; using xercesc::DOMElement; namespace xmltooling { class XMLTOOL_DLLLOCAL ExplicitKeyTrustEngine : public SignatureTrustEngine, public OpenSSLTrustEngine { public: ExplicitKeyTrustEngine(const DOMElement* e) : TrustEngine(e) {} virtual ~ExplicitKeyTrustEngine() {} virtual bool validate( Signature& sig, const CredentialResolver& credResolver, CredentialCriteria* criteria=nullptr ) const; virtual bool validate( const XMLCh* sigAlgorithm, const char* sig, KeyInfo* keyInfo, const char* in, unsigned int in_len, const CredentialResolver& credResolver, CredentialCriteria* criteria=nullptr ) const; virtual bool validate( XSECCryptoX509* certEE, const vector& certChain, const CredentialResolver& credResolver, CredentialCriteria* criteria=nullptr ) const; virtual bool validate( X509* certEE, STACK_OF(X509)* certChain, const CredentialResolver& credResolver, CredentialCriteria* criteria=nullptr ) const; }; TrustEngine* XMLTOOL_DLLLOCAL ExplicitKeyTrustEngineFactory(const DOMElement* const & e) { return new ExplicitKeyTrustEngine(e); } }; bool ExplicitKeyTrustEngine::validate( Signature& sig, const CredentialResolver& credResolver, CredentialCriteria* criteria ) const { #ifdef _DEBUG NDC ndc("validate"); #endif Category& log=Category::getInstance(XMLTOOLING_LOGCAT".TrustEngine."EXPLICIT_KEY_TRUSTENGINE); vector credentials; if (criteria) { criteria->setUsage(Credential::SIGNING_CREDENTIAL); criteria->setSignature(sig, CredentialCriteria::KEYINFO_EXTRACTION_KEY); credResolver.resolve(credentials,criteria); } else { CredentialCriteria cc; cc.setUsage(Credential::SIGNING_CREDENTIAL); cc.setSignature(sig, CredentialCriteria::KEYINFO_EXTRACTION_KEY); credResolver.resolve(credentials,&cc); } if (credentials.empty()) { log.debug("unable to validate signature, no credentials available from peer"); return false; } log.debug("attempting to validate signature with the peer's credentials"); SignatureValidator sigValidator; for (vector::const_iterator c=credentials.begin(); c!=credentials.end(); ++c) { sigValidator.setCredential(*c); try { sigValidator.validate(&sig); log.debug("signature validated with credential"); return true; } catch (ValidationException& e) { log.debug("public key did not validate signature: %s", e.what()); } } log.debug("no peer credentials validated the signature"); return false; } bool ExplicitKeyTrustEngine::validate( const XMLCh* sigAlgorithm, const char* sig, KeyInfo* keyInfo, const char* in, unsigned int in_len, const CredentialResolver& credResolver, CredentialCriteria* criteria ) const { #ifdef _DEBUG NDC ndc("validate"); #endif Category& log=Category::getInstance(XMLTOOLING_LOGCAT".TrustEngine."EXPLICIT_KEY_TRUSTENGINE); vector credentials; if (criteria) { criteria->setUsage(Credential::SIGNING_CREDENTIAL); criteria->setKeyInfo(keyInfo, CredentialCriteria::KEYINFO_EXTRACTION_KEY); criteria->setXMLAlgorithm(sigAlgorithm); credResolver.resolve(credentials,criteria); } else { CredentialCriteria cc; cc.setUsage(Credential::SIGNING_CREDENTIAL); cc.setKeyInfo(keyInfo, CredentialCriteria::KEYINFO_EXTRACTION_KEY); cc.setXMLAlgorithm(sigAlgorithm); credResolver.resolve(credentials,&cc); } if (credentials.empty()) { log.debug("unable to validate signature, no credentials available from peer"); return false; } log.debug("attempting to validate signature with the peer's credentials"); for (vector::const_iterator c=credentials.begin(); c!=credentials.end(); ++c) { if ((*c)->getPublicKey()) { try { if (Signature::verifyRawSignature((*c)->getPublicKey(), sigAlgorithm, sig, in, in_len)) { log.debug("signature validated with public key"); return true; } } catch (SignatureException& e) { if (log.isDebugEnabled()) { log.debug("public key did not validate signature: %s", e.what()); } } } } log.debug("no peer credentials validated the signature"); return false; } bool ExplicitKeyTrustEngine::validate( XSECCryptoX509* certEE, const vector& certChain, const CredentialResolver& credResolver, CredentialCriteria* criteria ) const { #ifdef _DEBUG NDC ndc("validate"); #endif if (!certEE) { Category::getInstance(XMLTOOLING_LOGCAT".TrustEngine."EXPLICIT_KEY_TRUSTENGINE).error("unable to validate, end-entity certificate was null"); return false; } else if (certEE->getProviderName()!=DSIGConstants::s_unicodeStrPROVOpenSSL) { Category::getInstance(XMLTOOLING_LOGCAT".TrustEngine."EXPLICIT_KEY_TRUSTENGINE).error("only the OpenSSL XSEC provider is supported"); return false; } return validate(static_cast(certEE)->getOpenSSLX509(), nullptr, credResolver, criteria); } bool ExplicitKeyTrustEngine::validate( X509* certEE, STACK_OF(X509)* certChain, const CredentialResolver& credResolver, CredentialCriteria* criteria ) const { #ifdef _DEBUG NDC ndc("validate"); #endif Category& log=Category::getInstance(XMLTOOLING_LOGCAT".TrustEngine."EXPLICIT_KEY_TRUSTENGINE); if (!certEE) { log.error("unable to validate, end-entity certificate was null"); return false; } vector credentials; if (criteria) { if (criteria->getUsage()==Credential::UNSPECIFIED_CREDENTIAL) criteria->setUsage(Credential::SIGNING_CREDENTIAL); credResolver.resolve(credentials,criteria); } else { CredentialCriteria cc; cc.setUsage(Credential::SIGNING_CREDENTIAL); credResolver.resolve(credentials,&cc); } if (credentials.empty()) { log.debug("unable to validate certificate, no credentials available from peer"); return false; } // The "explicit" trust implementation relies solely on keys living within the // peer resolver to verify the EE certificate. log.debug("attempting to match credentials from peer with end-entity certificate"); for (vector::const_iterator c=credentials.begin(); c!=credentials.end(); ++c) { XSECCryptoKey* key = (*c)->getPublicKey(); if (key) { if (key->getProviderName()!=DSIGConstants::s_unicodeStrPROVOpenSSL) { log.error("only the OpenSSL XSEC provider is supported"); continue; } switch (key->getKeyType()) { case XSECCryptoKey::KEY_RSA_PUBLIC: { RSA* rsa = static_cast(key)->getOpenSSLRSA(); EVP_PKEY* evp = X509_PUBKEY_get(X509_get_X509_PUBKEY(certEE)); if (rsa && evp && evp->type == EVP_PKEY_RSA && BN_cmp(rsa->n,evp->pkey.rsa->n) == 0 && BN_cmp(rsa->e,evp->pkey.rsa->e) == 0) { if (evp) EVP_PKEY_free(evp); log.debug("end-entity certificate matches peer RSA key information"); return true; } if (evp) EVP_PKEY_free(evp); break; } case XSECCryptoKey::KEY_DSA_PUBLIC: { DSA* dsa = static_cast(key)->getOpenSSLDSA(); EVP_PKEY* evp = X509_PUBKEY_get(X509_get_X509_PUBKEY(certEE)); if (dsa && evp && evp->type == EVP_PKEY_DSA && BN_cmp(dsa->pub_key,evp->pkey.dsa->pub_key) == 0) { if (evp) EVP_PKEY_free(evp); log.debug("end-entity certificate matches peer DSA key information"); return true; } if (evp) EVP_PKEY_free(evp); break; } default: log.warn("unknown peer key type, skipping..."); } } } log.debug("no keys within this peer's key information matched the given end-entity certificate"); return false; } xmltooling-1.5.3/xmltooling/security/impl/FilesystemCredentialResolver.cpp000644 001751 001751 00000075617 12146253675 030506 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * FilesystemCredentialResolver.cpp * * Supplies credentials from local files. */ #include "internal.h" #include "logging.h" #include "io/HTTPResponse.h" #include "security/BasicX509Credential.h" #include "security/CredentialCriteria.h" #include "security/CredentialResolver.h" #include "security/KeyInfoResolver.h" #include "security/OpenSSLCredential.h" #include "security/SecurityHelper.h" #include "security/XSECCryptoX509CRL.h" #include "util/NDC.h" #include "util/PathResolver.h" #include "util/Threads.h" #include "util/XMLHelper.h" #include #include #include #include #include #include #include using namespace xmlsignature; using namespace xmltooling::logging; using namespace xmltooling; using namespace std; using xercesc::DOMElement; using xercesc::chLatin_f; using xercesc::chDigit_0; namespace xmltooling { // The ManagedResource classes handle memory management, loading of the files // and staleness detection. A copy of the active objects is always stored in // these instances. class XMLTOOL_DLLLOCAL ManagedResource { protected: ManagedResource() : local(true), reloadChanges(true), filestamp(0), reloadInterval(0) {} ~ManagedResource() {} SOAPTransport* getTransport() { SOAPTransport::Address addr("FilesystemCredentialResolver", source.c_str(), source.c_str()); string scheme(addr.m_endpoint, strchr(addr.m_endpoint,':') - addr.m_endpoint); SOAPTransport* ret = XMLToolingConfig::getConfig().SOAPTransportManager.newPlugin(scheme.c_str(), addr); if (ret) ret->setCacheTag(&cacheTag); return ret; } public: bool stale(Category& log, RWLock* lock=nullptr) { if (local) { #ifdef WIN32 struct _stat stat_buf; if (_stat(source.c_str(), &stat_buf) != 0) return false; #else struct stat stat_buf; if (stat(source.c_str(), &stat_buf) != 0) return false; #endif if (filestamp >= stat_buf.st_mtime) return false; // If necessary, elevate lock and recheck. if (lock) { log.debug("timestamp of local resource changed, elevating to a write lock"); lock->unlock(); lock->wrlock(); if (filestamp >= stat_buf.st_mtime) { // Somebody else handled it, just downgrade. log.debug("update of local resource handled by another thread, downgrading lock"); lock->unlock(); lock->rdlock(); return false; } } // Update the timestamp regardless. No point in repeatedly trying. filestamp = stat_buf.st_mtime; log.info("change detected, reloading local resource..."); } else { time_t now = time(nullptr); // Time to reload? if (now - filestamp < reloadInterval) return false; // If necessary, elevate lock and recheck. if (lock) { log.debug("reload interval for remote resource elapsed, elevating to a write lock"); lock->unlock(); lock->wrlock(); if (now - filestamp < reloadInterval) { // Somebody else handled it, just downgrade. log.debug("update of remote resource handled by another thread, downgrading lock"); lock->unlock(); lock->rdlock(); return false; } } filestamp = now; log.info("reloading remote resource..."); } return true; } bool local,reloadChanges; string format,source,backing,cacheTag; time_t filestamp,reloadInterval; }; class XMLTOOL_DLLLOCAL ManagedKey : public ManagedResource { public: ManagedKey() : key(nullptr) {} ~ManagedKey() { delete key; } void load(Category& log, const char* password) { if (source.empty()) return; XSECCryptoKey* nkey=nullptr; if (local) { nkey = SecurityHelper::loadKeyFromFile(source.c_str(), format.c_str(), password); } else { auto_ptr t(getTransport()); log.info("loading private key from URL (%s)", source.c_str()); nkey = SecurityHelper::loadKeyFromURL(*t.get(), backing.c_str(), format.c_str(), password); } delete key; key = nkey; if (format.empty()) format = SecurityHelper::guessEncodingFormat(local ? source.c_str() : backing.c_str()); } XSECCryptoKey* key; }; class XMLTOOL_DLLLOCAL ManagedCert : public ManagedResource { public: ManagedCert() {} ~ManagedCert() { for_each(certs.begin(), certs.end(), xmltooling::cleanup()); } void load(Category& log, const char* password) { if (source.empty()) return; vector ncerts; if (local) { SecurityHelper::loadCertificatesFromFile(ncerts, source.c_str(), format.c_str(), password); } else { auto_ptr t(getTransport()); log.info("loading certificate(s) from URL (%s)", source.c_str()); SecurityHelper::loadCertificatesFromURL(ncerts, *t.get(), backing.c_str(), format.c_str(), password); } for_each(certs.begin(), certs.end(), xmltooling::cleanup()); certs = ncerts; if (format.empty()) format = SecurityHelper::guessEncodingFormat(local ? source.c_str() : backing.c_str()); } vector certs; }; class XMLTOOL_DLLLOCAL ManagedCRL : public ManagedResource { public: ManagedCRL() {} ~ManagedCRL() { for_each(crls.begin(), crls.end(), xmltooling::cleanup()); } void load(Category& log) { if (source.empty()) return; vector ncrls; if (local) { SecurityHelper::loadCRLsFromFile(ncrls, source.c_str(), format.c_str()); } else { auto_ptr t(getTransport()); log.info("loading CRL(s) from URL (%s)", source.c_str()); SecurityHelper::loadCRLsFromURL(ncrls, *t.get(), backing.c_str(), format.c_str()); } for_each(crls.begin(), crls.end(), xmltooling::cleanup()); crls = ncrls; if (format.empty()) format = SecurityHelper::guessEncodingFormat(local ? source.c_str() : backing.c_str()); } vector crls; }; class XMLTOOL_DLLLOCAL FilesystemCredential; class XMLTOOL_DLLLOCAL FilesystemCredentialResolver : public CredentialResolver { public: FilesystemCredentialResolver(const DOMElement* e); virtual ~FilesystemCredentialResolver(); Lockable* lock(); void unlock() { m_lock->unlock(); } const Credential* resolve(const CredentialCriteria* criteria=nullptr) const; virtual vector::size_type resolve( vector& results, const CredentialCriteria* criteria=nullptr ) const; private: Credential* getCredential(); RWLock* m_lock; Credential* m_credential; string m_keypass,m_certpass; unsigned int m_keyinfomask,m_usage; bool m_extractNames; vector m_keynames; ManagedKey m_key; vector m_certs; vector m_crls; friend class XMLTOOL_DLLLOCAL FilesystemCredential; }; #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 ) #endif class XMLTOOL_DLLLOCAL FilesystemCredential : public OpenSSLCredential, public BasicX509Credential { public: FilesystemCredential( FilesystemCredentialResolver* resolver, XSECCryptoKey* key, const vector& xseccerts, const vector& crls ) : BasicX509Credential(key ? key : (xseccerts.empty() ? nullptr : xseccerts.front()->clonePublicKey()), xseccerts, crls), m_resolver(resolver) { if (m_resolver->m_extractNames) extract(); m_keyNames.insert(m_resolver->m_keynames.begin(), m_resolver->m_keynames.end()); } virtual ~FilesystemCredential() { } unsigned int getUsage() const { return m_resolver->m_usage; } void initKeyInfo(unsigned int types=0) { BasicX509Credential::initKeyInfo(types); } void attach(SSL_CTX* ctx) const; private: FilesystemCredentialResolver* m_resolver; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif CredentialResolver* XMLTOOL_DLLLOCAL FilesystemCredentialResolverFactory(const DOMElement* const & e) { return new FilesystemCredentialResolver(e); } static const XMLCh backingFilePath[] = UNICODE_LITERAL_15(b,a,c,k,i,n,g,F,i,l,e,P,a,t,h); static const XMLCh _CredentialResolver[] = UNICODE_LITERAL_18(C,r,e,d,e,n,t,i,a,l,R,e,s,o,l,v,e,r); static const XMLCh CAPath[] = UNICODE_LITERAL_6(C,A,P,a,t,h); static const XMLCh Certificate[] = UNICODE_LITERAL_11(C,e,r,t,i,f,i,c,a,t,e); static const XMLCh _certificate[] = UNICODE_LITERAL_11(c,e,r,t,i,f,i,c,a,t,e); static const XMLCh CRL[] = UNICODE_LITERAL_3(C,R,L); static const XMLCh extractNames[] = UNICODE_LITERAL_12(e,x,t,r,a,c,t,N,a,m,e,s); static const XMLCh _format[] = UNICODE_LITERAL_6(f,o,r,m,a,t); static const XMLCh Key[] = UNICODE_LITERAL_3(K,e,y); static const XMLCh _key[] = UNICODE_LITERAL_3(k,e,y); static const XMLCh keyInfoMask[] = UNICODE_LITERAL_11(k,e,y,I,n,f,o,M,a,s,k); static const XMLCh keyName[] = UNICODE_LITERAL_7(k,e,y,N,a,m,e); static const XMLCh Name[] = UNICODE_LITERAL_4(N,a,m,e); static const XMLCh password[] = UNICODE_LITERAL_8(p,a,s,s,w,o,r,d); static const XMLCh Path[] = UNICODE_LITERAL_4(P,a,t,h); static const XMLCh _reloadChanges[] = UNICODE_LITERAL_13(r,e,l,o,a,d,C,h,a,n,g,e,s); static const XMLCh _reloadInterval[] = UNICODE_LITERAL_14(r,e,l,o,a,d,I,n,t,e,r,v,a,l); static const XMLCh _URL[] = UNICODE_LITERAL_3(U,R,L); static const XMLCh _use[] = UNICODE_LITERAL_3(u,s,e); }; FilesystemCredentialResolver::FilesystemCredentialResolver(const DOMElement* e) : m_lock(nullptr), m_credential(nullptr), m_keyinfomask(XMLHelper::getAttrInt(e, 0, keyInfoMask)), m_usage(Credential::UNSPECIFIED_CREDENTIAL), m_extractNames(true) { #ifdef _DEBUG NDC ndc("FilesystemCredentialResolver"); #endif Category& log=Category::getInstance(XMLTOOLING_LOGCAT".CredentialResolver."FILESYSTEM_CREDENTIAL_RESOLVER); if (e && (e->hasAttributeNS(nullptr,_certificate) || e->hasAttributeNS(nullptr,_key))) { // Dummy up a simple file resolver config using these attributes. DOMElement* dummy = e->getOwnerDocument()->createElementNS(nullptr,_CredentialResolver); DOMElement* child; DOMElement* path; if (e->hasAttributeNS(nullptr,_key)) { child = e->getOwnerDocument()->createElementNS(nullptr,Key); dummy->appendChild(child); path = e->getOwnerDocument()->createElementNS(nullptr,Path); child->appendChild(path); path->appendChild(e->getOwnerDocument()->createTextNode(e->getAttributeNS(nullptr,_key))); if (e->hasAttributeNS(nullptr,password)) child->setAttributeNS(nullptr,password,e->getAttributeNS(nullptr,password)); if (e->hasAttributeNS(nullptr,keyName)) { path = e->getOwnerDocument()->createElementNS(nullptr,Name); child->appendChild(path); path->appendChild(e->getOwnerDocument()->createTextNode(e->getAttributeNS(nullptr,keyName))); } } if (e->hasAttributeNS(nullptr,_certificate)) { child = e->getOwnerDocument()->createElementNS(nullptr,Certificate); dummy->appendChild(child); path = e->getOwnerDocument()->createElementNS(nullptr,Path); child->appendChild(path); path->appendChild(e->getOwnerDocument()->createTextNode(e->getAttributeNS(nullptr,_certificate))); if (e->hasAttributeNS(nullptr, extractNames)) child->setAttributeNS(nullptr, extractNames, e->getAttributeNS(nullptr, extractNames)); } if (e->hasAttributeNS(nullptr, _use)) { dummy->setAttributeNS(nullptr, _use, e->getAttributeNS(nullptr, _use)); } e = dummy; // reset "root" to the dummy config element } const XMLCh* prop; const DOMElement* root = e; // Save off usage bits. string usage = XMLHelper::getAttrString(root, nullptr, _use); if (usage == "signing") m_usage = Credential::SIGNING_CREDENTIAL | Credential::TLS_CREDENTIAL; else if (usage == "TLS") m_usage = Credential::TLS_CREDENTIAL; else if (usage == "encryption") m_usage = Credential::ENCRYPTION_CREDENTIAL; // Move to Key. const DOMElement* keynode = XMLHelper::getFirstChildElement(root,Key); if (keynode) { m_key.format = XMLHelper::getAttrString(keynode, nullptr, _format); m_keypass = XMLHelper::getAttrString(keynode, nullptr, password); if ((e=XMLHelper::getFirstChildElement(keynode,Path)) && e->hasChildNodes()) { prop = e->getFirstChild()->getNodeValue(); auto_ptr_char kpath(prop); m_key.source = kpath.get(); XMLToolingConfig::getConfig().getPathResolver()->resolve(m_key.source, PathResolver::XMLTOOLING_CFG_FILE); m_key.local = true; m_key.reloadChanges = XMLHelper::getAttrBool(e, true, _reloadChanges); } else if ((e=XMLHelper::getFirstChildElement(keynode,_URL)) && e->hasChildNodes()) { prop = e->getFirstChild()->getNodeValue(); auto_ptr_char kpath(prop); m_key.source = kpath.get(); m_key.local = false; m_key.backing = XMLHelper::getAttrString(e, nullptr, backingFilePath); if (m_key.backing.empty()) throw XMLSecurityException("FilesystemCredentialResolver can't access key, backingFilePath missing from URL element."); XMLToolingConfig::getConfig().getPathResolver()->resolve(m_key.backing, PathResolver::XMLTOOLING_CACHE_FILE); m_key.reloadInterval = XMLHelper::getAttrInt(e, 0, _reloadInterval); } else { log.error("Path/URL element missing inside Key element"); throw XMLSecurityException("FilesystemCredentialResolver can't access key, no Path or URL element specified."); } e = XMLHelper::getFirstChildElement(keynode, Name); while (e) { if (e->hasChildNodes()) { auto_ptr_char n(e->getFirstChild()->getNodeValue()); if (n.get() && *n.get()) m_keynames.push_back(n.get()); } e = XMLHelper::getNextSiblingElement(e, Name); } } // Check for CRL. const DOMElement* crlnode = XMLHelper::getFirstChildElement(root, CRL); if (crlnode) { string crlformat = XMLHelper::getAttrString(crlnode, nullptr, _format); e = XMLHelper::getFirstChildElement(crlnode, Path); while (e) { if (e->hasChildNodes()) { m_crls.push_back(ManagedCRL()); ManagedResource& crl = m_crls.back(); crl.format = crlformat; prop = e->getFirstChild()->getNodeValue(); auto_ptr_char crlpath(prop); crl.source = crlpath.get(); XMLToolingConfig::getConfig().getPathResolver()->resolve(crl.source, PathResolver::XMLTOOLING_CFG_FILE); crl.local = true; crl.reloadChanges = XMLHelper::getAttrBool(e, true, _reloadChanges); } e = XMLHelper::getNextSiblingElement(e, Path); } e = XMLHelper::getFirstChildElement(crlnode, _URL); while (e) { if (e->hasChildNodes()) { m_crls.push_back(ManagedCRL()); ManagedResource& crl = m_crls.back(); crl.format = crlformat; prop = e->getFirstChild()->getNodeValue(); auto_ptr_char crlpath(prop); crl.source = crlpath.get(); crl.local = false; crl.backing = XMLHelper::getAttrString(e, nullptr, backingFilePath); if (crl.backing.empty()) throw XMLSecurityException("FilesystemCredentialResolver can't access CRL, backingFilePath missing from URL element."); XMLToolingConfig::getConfig().getPathResolver()->resolve(crl.backing, PathResolver::XMLTOOLING_CACHE_FILE); crl.reloadInterval = XMLHelper::getAttrInt(e, 0, _reloadInterval); } e = XMLHelper::getNextSiblingElement(e, _URL); } if (m_crls.empty()) { log.error("Path/URL element missing inside CRL element"); throw XMLSecurityException("FilesystemCredentialResolver can't access CRL, no Path or URL element specified."); } } // Check for Certificate DOMElement* certnode = XMLHelper::getFirstChildElement(root,Certificate); if (certnode) { m_certpass = XMLHelper::getAttrString(certnode, nullptr, password); string certformat = XMLHelper::getAttrString(certnode, nullptr, _format); m_extractNames = XMLHelper::getAttrBool(certnode, true, extractNames); e = XMLHelper::getFirstChildElement(certnode); while (e) { if (e->hasChildNodes() && (XMLString::equals(e->getLocalName(), Path) || XMLString::equals(e->getLocalName(), CAPath))) { m_certs.push_back(ManagedCert()); ManagedResource& cert = m_certs.back(); cert.format = certformat; prop = e->getFirstChild()->getNodeValue(); auto_ptr_char certpath(prop); cert.source = certpath.get(); XMLToolingConfig::getConfig().getPathResolver()->resolve(cert.source, PathResolver::XMLTOOLING_CFG_FILE); cert.local = true; cert.reloadChanges = XMLHelper::getAttrBool(e, true, _reloadChanges); } else if (e->hasChildNodes() && XMLString::equals(e->getLocalName(), _URL)) { m_certs.push_back(ManagedCert()); ManagedResource& cert = m_certs.back(); cert.format = certformat; prop = e->getFirstChild()->getNodeValue(); auto_ptr_char certpath(prop); cert.source = certpath.get(); cert.local = false; cert.backing = XMLHelper::getAttrString(e, nullptr, backingFilePath); if (cert.backing.empty()) throw XMLSecurityException("FilesystemCredentialResolver can't access certificate, backingFilePath missing from URL element."); XMLToolingConfig::getConfig().getPathResolver()->resolve(cert.backing, PathResolver::XMLTOOLING_CACHE_FILE); cert.reloadInterval = XMLHelper::getAttrInt(e, 0, _reloadInterval); } e = XMLHelper::getNextSiblingElement(e); } if (m_certs.empty()) { log.error("Path/URL element missing inside Certificate element"); throw XMLSecurityException("FilesystemCredentialResolver can't access certificate, no Path or URL element specified."); } } // Do an initial load of all the objects. If anything blows up here, whatever's // been loaded should be freed during teardown of the embedded objects. time_t now = time(nullptr); m_key.filestamp = now; m_key.load(log, m_keypass.c_str()); for (vector::iterator i = m_certs.begin(); i != m_certs.end(); ++i) { i->load(log, (i==m_certs.begin()) ? m_certpass.c_str() : nullptr); i->filestamp = now; } for (vector::iterator j = m_crls.begin(); j != m_crls.end(); ++j) { j->load(log); j->filestamp = now; } // Load it all into a credential object and then create the lock. auto_ptr credential(getCredential()); m_lock = RWLock::create(); m_credential = credential.release(); if (m_credential->getPrivateKey() == nullptr) { log.info("no private key resolved, usable for verification/trust only"); } } FilesystemCredentialResolver::~FilesystemCredentialResolver() { delete m_credential; delete m_lock; } Credential* FilesystemCredentialResolver::getCredential() { // First, verify that the key and certificate match. if (m_key.key && !m_certs.empty()) { auto_ptr temp(m_certs.front().certs.front()->clonePublicKey()); if (!SecurityHelper::matches(*m_key.key, *temp.get())) throw XMLSecurityException("FilesystemCredentialResolver given mismatched key/certificate, check for consistency."); } // We (unfortunately) need to duplicate all the objects and put them in one set of arrays // in order to create the credential wrapper. FilesystemCredential* credential=nullptr; auto_ptr xseckey(m_key.key ? m_key.key->clone() : nullptr); vector xseccerts; vector xseccrls; try { for (vector::iterator i = m_certs.begin(); i != m_certs.end(); ++i) { for (vector::const_iterator y = i->certs.begin(); y != i->certs.end(); ++y) xseccerts.push_back(new OpenSSLCryptoX509(static_cast(*y)->getOpenSSLX509())); } for (vector::iterator j = m_crls.begin(); j != m_crls.end(); ++j) { for (vector::const_iterator z = j->crls.begin(); z != j->crls.end(); ++z) xseccrls.push_back((*z)->clone()); } credential = new FilesystemCredential(this, xseckey.get(), xseccerts, xseccrls); xseckey.release(); } catch (exception&) { for_each(xseccerts.begin(), xseccerts.end(), xmltooling::cleanup()); for_each(xseccrls.begin(), xseccrls.end(), xmltooling::cleanup()); throw; } // At this point the copies are owned by the credential. try { credential->initKeyInfo(m_keyinfomask); } catch (exception&) { delete credential; throw; } return credential; } Lockable* FilesystemCredentialResolver::lock() { #ifdef _DEBUG NDC ndc("lock"); #endif Category& log=Category::getInstance(XMLTOOLING_LOGCAT".CredentialResolver."FILESYSTEM_CREDENTIAL_RESOLVER); m_lock->rdlock(); // Check each managed resource while holding a read lock for staleness. // If it comes back false, the lock is left as is, and the resource was stable. // If it comes back true, the lock was elevated to a write lock, and the resource // needs to be reloaded, and the credential replaced. // Once a stale check comes back true, further checks leave the lock alone. bool writelock = false, updated = false; if (m_key.stale(log, m_lock)) { writelock = true; try { m_key.load(log, m_keypass.c_str()); updated = true; } catch (long& ex) { if (ex == HTTPResponse::XMLTOOLING_HTTP_STATUS_NOTMODIFIED) { log.info("remote key (%s) unchanged from cached version", m_key.source.c_str()); } else { // Shouldn't happen, we should only get codes intended to be gracefully handled. log.crit("maintaining existing key, remote fetch returned atypical status code (%d)", ex); } } catch (exception& ex) { log.crit("maintaining existing key: %s", ex.what()); } } for (vector::iterator i = m_certs.begin(); i != m_certs.end(); ++i) { if (i->stale(log, writelock ? nullptr : m_lock)) { writelock = true; try { i->load(log, (i==m_certs.begin()) ? m_certpass.c_str() : nullptr); updated = true; } catch (long& ex) { if (ex == HTTPResponse::XMLTOOLING_HTTP_STATUS_NOTMODIFIED) { log.info("remote certificate(s) (%s) unchanged from cached version", i->source.c_str()); } else { // Shouldn't happen, we should only get codes intended to be gracefully handled. log.crit("maintaining existing certificate(s), remote fetch returned atypical status code (%d)", ex); } } catch (exception& ex) { log.crit("maintaining existing certificate(s): %s", ex.what()); } } } for (vector::iterator j = m_crls.begin(); j != m_crls.end(); ++j) { if (j->stale(log, writelock ? nullptr : m_lock)) { writelock = true; try { j->load(log); updated = true; } catch (long& ex) { if (ex == HTTPResponse::XMLTOOLING_HTTP_STATUS_NOTMODIFIED) { log.info("remote CRL(s) (%s) unchanged from cached version", j->source.c_str()); } else { // Shouldn't happen, we should only get codes intended to be gracefully handled. log.crit("maintaining existing CRL(s), remote fetch returned atypical status code (%d)", ex); } } catch (exception& ex) { log.crit("maintaining existing CRL(s): %s", ex.what()); } } } if (updated) { try { auto_ptr credential(getCredential()); delete m_credential; m_credential = credential.release(); } catch (exception& ex) { log.crit("maintaining existing credentials, error reloading: %s", ex.what()); } } if (writelock) { m_lock->unlock(); m_lock->rdlock(); } return this; } const Credential* FilesystemCredentialResolver::resolve(const CredentialCriteria* criteria) const { return (criteria ? (criteria->matches(*m_credential) ? m_credential : nullptr) : m_credential); } vector::size_type FilesystemCredentialResolver::resolve( vector& results, const CredentialCriteria* criteria ) const { if (!criteria || criteria->matches(*m_credential)) { results.push_back(m_credential); return 1; } return 0; } // OpenSSL password callback... static int passwd_callback(char* buf, int len, int verify, void* passwd) { if(!verify) { if(passwd && len > strlen(reinterpret_cast(passwd))) { strcpy(buf,reinterpret_cast(passwd)); return strlen(buf); } } return 0; } void FilesystemCredential::attach(SSL_CTX* ctx) const { #ifdef _DEBUG NDC ndc("attach"); #endif int ret=0; const char* path = m_resolver->m_key.local ? m_resolver->m_key.source.c_str() : m_resolver->m_key.backing.c_str(); if (!path || !*path) throw XMLSecurityException("No key available, unable to attach private key to SSL context."); if (!m_resolver->m_keypass.empty()) { SSL_CTX_set_default_passwd_cb(ctx, passwd_callback); SSL_CTX_set_default_passwd_cb_userdata(ctx, const_cast(m_resolver->m_keypass.c_str())); } if (m_resolver->m_key.format == "PEM") { ret=SSL_CTX_use_PrivateKey_file(ctx, path, SSL_FILETYPE_PEM); } else if (m_resolver->m_key.format == "DER") { ret=SSL_CTX_use_RSAPrivateKey_file(ctx, path, SSL_FILETYPE_ASN1); } else if (m_resolver->m_key.format == "PKCS12") { BIO* in=BIO_new(BIO_s_file_internal()); if (in && BIO_read_filename(in,path)>0) { PKCS12* p12 = d2i_PKCS12_bio(in, nullptr); if (p12) { EVP_PKEY* pkey=nullptr; X509* x=nullptr; PKCS12_parse(p12, const_cast(m_resolver->m_keypass.c_str()), &pkey, &x, nullptr); PKCS12_free(p12); if (x) X509_free(x); if (pkey) { ret=SSL_CTX_use_PrivateKey(ctx, pkey); EVP_PKEY_free(pkey); } } } if (in) BIO_free(in); } if (ret!=1) { log_openssl(); throw XMLSecurityException("Unable to attach private key to SSL context."); } // Attach certs. for (vector::const_iterator i=m_xseccerts.begin(); i!=m_xseccerts.end(); i++) { if (i==m_xseccerts.begin()) { if (SSL_CTX_use_certificate(ctx, static_cast(*i)->getOpenSSLX509()) != 1) { log_openssl(); throw XMLSecurityException("Unable to attach client certificate to SSL context."); } } else { // When we add certs, they don't get ref counted, so we need to duplicate them. X509* dup = X509_dup(static_cast(*i)->getOpenSSLX509()); if (SSL_CTX_add_extra_chain_cert(ctx, dup) != 1) { X509_free(dup); log_openssl(); throw XMLSecurityException("Unable to attach CA certificate to SSL context."); } } } } xmltooling-1.5.3/xmltooling/security/impl/InlineKeyResolver.cpp000644 001751 001751 00000063240 12057276362 026242 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * InlineKeyResolver.cpp * * Resolves key information directly from recognized KeyInfo structures. */ #include "internal.h" #include "logging.h" #include "security/BasicX509Credential.h" #include "security/KeyInfoCredentialContext.h" #include "security/KeyInfoResolver.h" #include "security/SecurityHelper.h" #include "security/XSECCryptoX509CRL.h" #include "signature/KeyInfo.h" #include "signature/Signature.h" #include "util/NDC.h" #include "util/Threads.h" #include "util/XMLConstants.h" #include "validation/ValidatorSuite.h" #include #include #include #include #include #include #include #ifdef XMLTOOLING_XMLSEC_ECC # include #endif #include #include using namespace xmlsignature; using namespace xmltooling::logging; using namespace xmltooling; using namespace xercesc; using namespace boost; using namespace std; namespace xmltooling { class XMLTOOL_DLLLOCAL InlineCredential : public BasicX509Credential { public: InlineCredential(const KeyInfo* keyInfo=nullptr) : BasicX509Credential(keyInfo!=nullptr), m_credctx(new KeyInfoCredentialContext(keyInfo)) {} InlineCredential(DSIGKeyInfoList* keyInfo) : BasicX509Credential(false), m_credctx(new KeyInfoCredentialContext(keyInfo)) {} InlineCredential(KeyInfoCredentialContext* context) : BasicX509Credential(context->getKeyInfo()!=nullptr) {} virtual ~InlineCredential() {} XSECCryptoKey* getPrivateKey() const { return nullptr; } KeyInfo* getKeyInfo(bool compact=false) const { KeyInfo* ret = m_credctx->getKeyInfo() ? m_credctx->getKeyInfo()->cloneKeyInfo() : nullptr; if (ret) { ret->setId(nullptr); ret->getRetrievalMethods().clear(); ret->getKeyInfoReferences().clear(); if (compact) { ret->getKeyValues().clear(); ret->getDEREncodedKeyValues().clear(); ret->getSPKIDatas().clear(); ret->getPGPDatas().clear(); ret->getUnknownXMLObjects().clear(); VectorOf(X509Data) x509Datas=ret->getX509Datas(); for (VectorOf(X509Data)::size_type pos = 0; pos < x509Datas.size();) { x509Datas[pos]->getX509Certificates().clear(); x509Datas[pos]->getX509CRLs().clear(); x509Datas[pos]->getOCSPResponses().clear(); x509Datas[pos]->getUnknownXMLObjects().clear(); if (x509Datas[pos]->hasChildren()) ++pos; else x509Datas.erase(x509Datas.begin() + pos); } } } if (!ret->hasChildren()) { delete ret; ret = nullptr; } return ret; } const CredentialContext* getCredentalContext() const { return m_credctx.get(); } void setCredentialContext(KeyInfoCredentialContext* context) { m_credctx.reset(context); } void resolve(const KeyInfo* keyInfo, int types=0, bool followRefs=false); void resolve(DSIGKeyInfoList* keyInfo, int types=0, bool followRefs=false); bool isEmpty() const { return (!m_key && m_xseccerts.empty() && m_crls.empty() && m_keyNames.empty() && m_serial.empty() && m_issuerName.empty()); } private: bool resolveCerts(const KeyInfo* keyInfo, bool followRefs=false); bool resolveKey(const KeyInfo* keyInfo, bool followRefs=false); bool resolveCRLs(const KeyInfo* keyInfo, bool followRefs=false); auto_ptr m_credctx; }; static const XMLCh keyInfoReferences[] = UNICODE_LITERAL_17(k,e,y,I,n,f,o,R,e,f,e,r,e,n,c,e,s); class XMLTOOL_DLLLOCAL InlineKeyResolver : public KeyInfoResolver { public: InlineKeyResolver(const DOMElement* e) : m_followRefs(XMLHelper::getAttrBool(e, false, keyInfoReferences)) { } virtual ~InlineKeyResolver() {} Credential* resolve(const KeyInfo* keyInfo, int types=0) const { if (!keyInfo) return nullptr; if (types == 0) types = Credential::RESOLVE_KEYS|X509Credential::RESOLVE_CERTS|X509Credential::RESOLVE_CRLS; auto_ptr credential(new InlineCredential(keyInfo)); credential->resolve(keyInfo, types, m_followRefs); return credential->isEmpty() ? nullptr : credential.release(); } Credential* resolve(DSIGKeyInfoList* keyInfo, int types=0) const { if (!keyInfo) return nullptr; if (types == 0) types = Credential::RESOLVE_KEYS|X509Credential::RESOLVE_CERTS|X509Credential::RESOLVE_CRLS; auto_ptr credential(new InlineCredential(keyInfo)); credential->resolve(keyInfo, types, m_followRefs); return credential->isEmpty() ? nullptr : credential.release(); } Credential* resolve(KeyInfoCredentialContext* context, int types=0) const { if (!context) return nullptr; if (types == 0) types = Credential::RESOLVE_KEYS|X509Credential::RESOLVE_CERTS|X509Credential::RESOLVE_CRLS; auto_ptr credential(new InlineCredential(context)); if (context->getKeyInfo()) credential->resolve(context->getKeyInfo(), types, m_followRefs); else if (context->getNativeKeyInfo()) credential->resolve(context->getNativeKeyInfo(), types, m_followRefs); if (credential->isEmpty()) return nullptr; credential->setCredentialContext(context); // transfers ownership to credential return credential.release(); } private: bool m_followRefs; }; KeyInfoResolver* XMLTOOL_DLLLOCAL InlineKeyInfoResolverFactory(const DOMElement* const & e) { return new InlineKeyResolver(e); } }; void InlineCredential::resolve(const KeyInfo* keyInfo, int types, bool followRefs) { #ifdef _DEBUG NDC ndc("resolve"); #endif if (types & X509Credential::RESOLVE_CERTS) resolveCerts(keyInfo, followRefs); if (types & Credential::RESOLVE_KEYS) { if (types & X509Credential::RESOLVE_CERTS) { // If we have a cert, just use it. if (!m_xseccerts.empty()) m_key = m_xseccerts.front()->clonePublicKey(); else resolveKey(keyInfo, followRefs); } // Otherwise try directly for a key and then go for certs if none is found. else if (!resolveKey(keyInfo, followRefs) && resolveCerts(keyInfo, followRefs)) { m_key = m_xseccerts.front()->clonePublicKey(); } } if (types & X509Credential::RESOLVE_CRLS) resolveCRLs(keyInfo, followRefs); const XMLCh* n; char* kn; const vector& knames=keyInfo->getKeyNames(); for (indirect_iterator::const_iterator> kn_i = make_indirect_iterator(knames.begin()); kn_i != make_indirect_iterator(knames.end()); ++kn_i) { n = kn_i->getName(); if (n && *n) { kn = toUTF8(n); m_keyNames.insert(kn); delete[] kn; } } const vector datas=keyInfo->getX509Datas(); for (vector::const_iterator x_i=datas.begin(); x_i!=datas.end(); ++x_i) { const vector snames = const_cast(*x_i)->getX509SubjectNames(); for (vector::const_iterator sn_i = snames.begin(); sn_i!=snames.end(); ++sn_i) { n = (*sn_i)->getName(); if (n && *n) { kn=toUTF8(n); m_keyNames.insert(kn); m_subjectName = kn; delete[] kn; } } const vector inames = const_cast(*x_i)->getX509IssuerSerials(); if (!inames.empty()) { const X509IssuerName* iname = inames.front()->getX509IssuerName(); if (iname) { kn = toUTF8(iname->getName()); if (kn) m_issuerName = kn; delete[] kn; } const X509SerialNumber* ser = inames.front()->getX509SerialNumber(); if (ser) { auto_ptr_char sn(ser->getSerialNumber()); m_serial = sn.get(); } } } } bool InlineCredential::resolveKey(const KeyInfo* keyInfo, bool followRefs) { Category& log = Category::getInstance(XMLTOOLING_LOGCAT".KeyInfoResolver."INLINE_KEYINFO_RESOLVER); // Check for ds:KeyValue const vector& keyValues = keyInfo->getKeyValues(); for (indirect_iterator::const_iterator> i = make_indirect_iterator(keyValues.begin()); i != make_indirect_iterator(keyValues.end()); ++i) { try { SchemaValidators.validate(*(i.base())); // see if it's a "valid" key RSAKeyValue* rsakv = i->getRSAKeyValue(); if (rsakv) { log.debug("resolving ds:RSAKeyValue"); auto_ptr_char mod(rsakv->getModulus()->getValue()); auto_ptr_char exp(rsakv->getExponent()->getValue()); auto_ptr rsa(XSECPlatformUtils::g_cryptoProvider->keyRSA()); rsa->loadPublicModulusBase64BigNums(mod.get(), strlen(mod.get())); rsa->loadPublicExponentBase64BigNums(exp.get(), strlen(exp.get())); m_key = rsa.release(); return true; } DSAKeyValue* dsakv = i->getDSAKeyValue(); if (dsakv) { log.debug("resolving ds:DSAKeyValue"); auto_ptr dsa(XSECPlatformUtils::g_cryptoProvider->keyDSA()); auto_ptr_char y(dsakv->getY()->getValue()); dsa->loadYBase64BigNums(y.get(), strlen(y.get())); if (dsakv->getP()) { auto_ptr_char p(dsakv->getP()->getValue()); dsa->loadPBase64BigNums(p.get(), strlen(p.get())); } if (dsakv->getQ()) { auto_ptr_char q(dsakv->getQ()->getValue()); dsa->loadQBase64BigNums(q.get(), strlen(q.get())); } if (dsakv->getG()) { auto_ptr_char g(dsakv->getG()->getValue()); dsa->loadGBase64BigNums(g.get(), strlen(g.get())); } m_key = dsa.release(); return true; } #ifdef XMLTOOLING_XMLSEC_ECC ECKeyValue* eckv = i->getECKeyValue(); if (eckv && eckv->getNamedCurve() && eckv->getPublicKey()) { log.warn("resolving ds11:ECKeyValue"); auto_ptr ec(XSECPlatformUtils::g_cryptoProvider->keyEC()); auto_ptr_char uri(eckv->getNamedCurve()->getURI()); auto_ptr_char val(eckv->getPublicKey()->getValue()); if (uri.get() && val.get()) { ec->loadPublicKeyBase64(uri.get(), val.get(), XMLString::stringLen(val.get())); m_key = ec.release(); return true; } } #endif } catch (ValidationException& ex) { log.warn("skipping invalid ds:KeyValue (%s)", ex.what()); } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); log.error("caught XML-Security exception loading key: %s", temp.get()); } catch(XSECCryptoException& e) { log.error("caught XML-Security exception loading key: %s", e.getMsg()); } } // Check for ds11:DEREncodedKeyValue const vector& derValues = keyInfo->getDEREncodedKeyValues(); for (indirect_iterator::const_iterator> j = make_indirect_iterator(derValues.begin()); j != make_indirect_iterator(derValues.end()); ++j) { log.debug("resolving ds11:DEREncodedKeyValue"); m_key = SecurityHelper::fromDEREncoding(j->getValue()); if (m_key) return true; log.warn("failed to resolve ds11:DEREncodedKeyValue"); } if (followRefs) { // Check for KeyInfoReference. const XMLCh* fragID=nullptr; const XMLObject* treeRoot=nullptr; const vector& refs = keyInfo->getKeyInfoReferences(); for (indirect_iterator::const_iterator> ref = make_indirect_iterator(refs.begin()); ref != make_indirect_iterator(refs.end()); ++ref) { fragID = ref->getURI(); if (!fragID || *fragID != chPound || !*(fragID+1)) { log.warn("skipping ds11:KeyInfoReference with an empty or non-local reference"); continue; } if (!treeRoot) { treeRoot = keyInfo; while (treeRoot->getParent()) treeRoot = treeRoot->getParent(); } keyInfo = dynamic_cast(XMLHelper::getXMLObjectById(*treeRoot, fragID+1)); if (!keyInfo) { log.warn("skipping ds11:KeyInfoReference, local reference did not resolve to a ds:KeyInfo"); continue; } if (resolveKey(keyInfo, false)) return true; } } return false; } bool InlineCredential::resolveCerts(const KeyInfo* keyInfo, bool followRefs) { Category& log = Category::getInstance(XMLTOOLING_LOGCAT".KeyInfoResolver."INLINE_KEYINFO_RESOLVER); // Check for ds:X509Data const vector& x509Datas=keyInfo->getX509Datas(); for (vector::const_iterator j = x509Datas.begin(); m_xseccerts.empty() && j != x509Datas.end(); ++j) { const vector x509Certs=const_cast(*j)->getX509Certificates(); for (indirect_iterator::const_iterator> k = make_indirect_iterator(x509Certs.begin()); k != make_indirect_iterator(x509Certs.end()); ++k) { try { auto_ptr_char x(k->getValue()); if (!x.get()) { log.warn("skipping empty ds:X509Certificate"); } else { log.debug("resolving ds:X509Certificate"); auto_ptr x509(XSECPlatformUtils::g_cryptoProvider->X509()); x509->loadX509Base64Bin(x.get(), strlen(x.get())); m_xseccerts.push_back(x509.release()); } } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); log.error("caught XML-Security exception loading certificate: %s", temp.get()); } catch(XSECCryptoException& e) { log.error("caught XML-Security exception loading certificate: %s", e.getMsg()); } } } if (followRefs && m_xseccerts.empty()) { // Check for KeyInfoReference. const XMLCh* fragID=NULL; const XMLObject* treeRoot=NULL; const vector& refs = keyInfo->getKeyInfoReferences(); for (indirect_iterator::const_iterator> ref = make_indirect_iterator(refs.begin()); ref != make_indirect_iterator(refs.end()); ++ref) { fragID = ref->getURI(); if (!fragID || *fragID != chPound || !*(fragID+1)) { log.warn("skipping ds11:KeyInfoReference with an empty or non-local reference"); continue; } if (!treeRoot) { treeRoot = keyInfo; while (treeRoot->getParent()) treeRoot = treeRoot->getParent(); } keyInfo = dynamic_cast(XMLHelper::getXMLObjectById(*treeRoot, fragID+1)); if (!keyInfo) { log.warn("skipping ds11:KeyInfoReference, local reference did not resolve to a ds:KeyInfo"); continue; } if (resolveCerts(keyInfo, false)) return true; } return false; } log.debug("resolved %d certificate(s)", m_xseccerts.size()); return !m_xseccerts.empty(); } bool InlineCredential::resolveCRLs(const KeyInfo* keyInfo, bool followRefs) { Category& log = Category::getInstance(XMLTOOLING_LOGCAT".KeyInfoResolver."INLINE_KEYINFO_RESOLVER); // Check for ds:X509Data const vector& x509Datas=keyInfo->getX509Datas(); for (vector::const_iterator j=x509Datas.begin(); j!=x509Datas.end(); ++j) { const vector x509CRLs=const_cast(*j)->getX509CRLs(); for (indirect_iterator::const_iterator> k = make_indirect_iterator(x509CRLs.begin()); k != make_indirect_iterator(x509CRLs.end()); ++k) { try { auto_ptr_char x(k->getValue()); if (!x.get()) { log.warn("skipping empty ds:X509CRL"); } else { log.debug("resolving ds:X509CRL"); auto_ptr crl(XMLToolingConfig::getConfig().X509CRL()); crl->loadX509CRLBase64Bin(x.get(), strlen(x.get())); m_crls.push_back(crl.release()); } } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); log.error("caught XML-Security exception loading CRL: %s", temp.get()); } catch(XSECCryptoException& e) { log.error("caught XML-Security exception loading CRL: %s", e.getMsg()); } } } if (followRefs && m_crls.empty()) { // Check for KeyInfoReference. const XMLCh* fragID=NULL; const XMLObject* treeRoot=NULL; const vector& refs = keyInfo->getKeyInfoReferences(); for (indirect_iterator::const_iterator> ref = make_indirect_iterator(refs.begin()); ref != make_indirect_iterator(refs.end()); ++ref) { fragID = ref->getURI(); if (!fragID || *fragID != chPound || !*(fragID+1)) { log.warn("skipping ds11:KeyInfoReference with an empty or non-local reference"); continue; } if (!treeRoot) { treeRoot = keyInfo; while (treeRoot->getParent()) treeRoot = treeRoot->getParent(); } keyInfo = dynamic_cast(XMLHelper::getXMLObjectById(*treeRoot, fragID+1)); if (!keyInfo) { log.warn("skipping ds11:KeyInfoReference, local reference did not resolve to a ds:KeyInfo"); continue; } if (resolveCRLs(keyInfo, false)) return true; } return false; } log.debug("resolved %d CRL(s)", m_crls.size()); return !m_crls.empty(); } void InlineCredential::resolve(DSIGKeyInfoList* keyInfo, int types, bool followRefs) { #ifdef _DEBUG NDC ndc("resolve"); #endif if (types & Credential::RESOLVE_KEYS) { // Default resolver handles RSA/DSAKeyValue and X509Certificate elements. try { XSECKeyInfoResolverDefault def; m_key = def.resolveKey(keyInfo); } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); Category::getInstance(XMLTOOLING_LOGCAT".KeyResolver."INLINE_KEYINFO_RESOLVER).error("caught XML-Security exception loading certificate: %s", temp.get()); } catch(XSECCryptoException& e) { Category::getInstance(XMLTOOLING_LOGCAT".KeyResolver."INLINE_KEYINFO_RESOLVER).error("caught XML-Security exception loading certificate: %s", e.getMsg()); } } DSIGKeyInfoList::size_type sz = keyInfo->getSize(); if (types & X509Credential::RESOLVE_CERTS) { for (DSIGKeyInfoList::size_type i=0; iitem(i)->getKeyInfoType()==DSIGKeyInfo::KEYINFO_X509) { DSIGKeyInfoX509* x509 = static_cast(keyInfo->item(i)); int count = x509->getCertificateListSize(); if (count) { for (int j=0; jgetCertificateCryptoItem(j)); break; } } } } if (types & X509Credential::RESOLVE_CRLS) { for (DSIGKeyInfoList::size_type i=0; iitem(i)->getKeyInfoType()==DSIGKeyInfo::KEYINFO_X509) { #ifdef XMLTOOLING_XMLSEC_MULTIPLECRL DSIGKeyInfoX509* x509 = static_cast(keyInfo->item(i)); int count = x509->getX509CRLListSize(); for (int j=0; jgetX509CRLItem(j)); if (buf.get()) { try { auto_ptr crlobj(XMLToolingConfig::getConfig().X509CRL()); crlobj->loadX509CRLBase64Bin(buf.get(), strlen(buf.get())); m_crls.push_back(crlobj.release()); } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); Category::getInstance(XMLTOOLING_LOGCAT".KeyResolver."INLINE_KEYINFO_RESOLVER).error("caught XML-Security exception loading CRL: %s", temp.get()); } catch(XSECCryptoException& e) { Category::getInstance(XMLTOOLING_LOGCAT".KeyResolver."INLINE_KEYINFO_RESOLVER).error("caught XML-Security exception loading CRL: %s", e.getMsg()); } } } #else // The current xmlsec API is limited to one CRL per KeyInfo. // For now, I'm going to process the DOM directly. DOMNode* x509Node = keyInfo->item(i)->getKeyInfoDOMNode(); DOMElement* crlElement = x509Node ? XMLHelper::getFirstChildElement(x509Node, xmlconstants::XMLSIG_NS, X509CRL::LOCAL_NAME) : nullptr; while (crlElement) { if (crlElement->hasChildNodes()) { auto_ptr_char buf(crlElement->getFirstChild()->getNodeValue()); if (buf.get()) { try { auto_ptr crlobj(XMLToolingConfig::getConfig().X509CRL()); crlobj->loadX509CRLBase64Bin(buf.get(), strlen(buf.get())); m_crls.push_back(crlobj.release()); } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); Category::getInstance(XMLTOOLING_LOGCAT".KeyResolver."INLINE_KEYINFO_RESOLVER).error("caught XML-Security exception loading CRL: %s", temp.get()); } catch(XSECCryptoException& e) { Category::getInstance(XMLTOOLING_LOGCAT".KeyResolver."INLINE_KEYINFO_RESOLVER).error("caught XML-Security exception loading CRL: %s", e.getMsg()); } } } crlElement = XMLHelper::getNextSiblingElement(crlElement, xmlconstants::XMLSIG_NS, X509CRL::LOCAL_NAME); } #endif } } } char* kn; const XMLCh* n; for (size_t s=0; sgetSize(); s++) { DSIGKeyInfo* dki = keyInfo->item(s); n=dki->getKeyName(); if (n && *n) { kn=toUTF8(n); m_keyNames.insert(kn); if (dki->getKeyInfoType() == DSIGKeyInfo::KEYINFO_X509) m_subjectName = kn; delete[] kn; } if (dki->getKeyInfoType() == DSIGKeyInfo::KEYINFO_X509) { DSIGKeyInfoX509* kix = static_cast(dki); n = kix->getX509IssuerName(); if (n && *n) { kn=toUTF8(n); m_issuerName = kn; delete[] kn; } n = kix->getX509IssuerSerialNumber(); if (n && *n) { auto_ptr_char sn(n); m_serial = sn.get(); } } } } xmltooling-1.5.3/xmltooling/security/impl/KeyInfoResolver.cpp000644 001751 001751 00000004304 12003305017 025670 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * KeyInfoResolver.cpp * * Resolves credentials from KeyInfo information. */ #include "internal.h" #include "security/CredentialCriteria.h" #include "security/KeyInfoResolver.h" #include "signature/Signature.h" using namespace xmlsignature; using namespace xmltooling; using namespace std; namespace xmltooling { XMLTOOL_DLLLOCAL PluginManager::Factory InlineKeyInfoResolverFactory; }; void XMLTOOL_API xmltooling::registerKeyInfoResolvers() { XMLToolingConfig& conf=XMLToolingConfig::getConfig(); conf.KeyInfoResolverManager.registerFactory(INLINE_KEYINFO_RESOLVER, InlineKeyInfoResolverFactory); } KeyInfoResolver::KeyInfoResolver() { } KeyInfoResolver::~KeyInfoResolver() { } Credential* KeyInfoResolver::resolve(const Signature* sig, int types) const { const KeyInfo* keyInfo = sig->getKeyInfo(); if (keyInfo) return resolve(keyInfo, types); DSIGSignature* native = sig->getXMLSignature(); return resolve(native ? native->getKeyInfoList() : (DSIGKeyInfoList*)nullptr, types); } Credential* KeyInfoResolver::resolve(const CredentialCriteria& criteria, int types) const { const KeyInfo* keyInfo = criteria.getKeyInfo(); if (keyInfo) return resolve(keyInfo, types); DSIGKeyInfoList* native = criteria.getNativeKeyInfo(); return native ? resolve(native, types) : nullptr; } xmltooling-1.5.3/xmltooling/security/impl/OpenSSLCryptoX509CRL.cpp000644 001751 001751 00000006766 12003305017 026233 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * OpenSSLCryptoX509CRL.cpp * * OpenSSL-based class for handling X.509 CRLs. */ #include "internal.h" #include "security/OpenSSLCryptoX509CRL.h" #include #include #include #include XSEC_USING_XERCES(ArrayJanitor); XSEC_USING_XERCES(Janitor); using namespace xmltooling; OpenSSLCryptoX509CRL::OpenSSLCryptoX509CRL() : mp_X509CRL(nullptr), m_DERX509CRL("") { } OpenSSLCryptoX509CRL::~OpenSSLCryptoX509CRL() { if (mp_X509CRL) X509_CRL_free(mp_X509CRL); } OpenSSLCryptoX509CRL::OpenSSLCryptoX509CRL(X509_CRL* x) { // Build this from an existing X509_CRL structure mp_X509CRL = X509_CRL_dup(x); // Now need to create the DER encoding BIO* b64 = BIO_new(BIO_f_base64()); BIO* bmem = BIO_new(BIO_s_mem()); BIO_set_mem_eof_return(bmem, 0); b64 = BIO_push(b64, bmem); // Translate X509 to Base64 i2d_X509_CRL_bio(b64, x); BIO_flush(b64); char buf[1024]; unsigned int l; m_DERX509CRL.sbStrcpyIn(""); while ((l = BIO_read(bmem, buf, 1023)) > 0) { buf[l] = '\0'; m_DERX509CRL.sbStrcatIn(buf); } BIO_free_all(b64); } const XMLCh* OpenSSLCryptoX509CRL::getProviderName() const { return DSIGConstants::s_unicodeStrPROVOpenSSL; } void OpenSSLCryptoX509CRL::loadX509CRLBase64Bin(const char* buf, unsigned int len) { // Free anything currently held. if (mp_X509CRL) X509_CRL_free(mp_X509CRL); int bufLen = len; unsigned char* outBuf; XSECnew(outBuf, unsigned char[len + 1]); ArrayJanitor j_outBuf(outBuf); XSCryptCryptoBase64 *b64; XSECnew(b64, XSCryptCryptoBase64); Janitor j_b64(b64); b64->decodeInit(); bufLen = b64->decode((unsigned char *) buf, len, outBuf, len); bufLen += b64->decodeFinish(&outBuf[bufLen], len-bufLen); if (bufLen > 0) { #if defined(XSEC_OPENSSL_D2IX509_CONST_BUFFER) mp_X509CRL= d2i_X509_CRL(nullptr, (const unsigned char **) (&outBuf), bufLen); #else mp_X509CRL= d2i_X509_CRL(nullptr, &outBuf, bufLen); #endif } // Check to see if we have a CRL.... if (mp_X509CRL == nullptr) { throw XSECCryptoException(XSECCryptoException::X509Error, "OpenSSL:X509CRL - Error translating Base64 DER encoding into OpenSSL X509 CRL structure"); } m_DERX509CRL.sbStrcpyIn(buf); } safeBuffer& OpenSSLCryptoX509CRL::getDEREncodingSB() { return m_DERX509CRL; } X509_CRL* OpenSSLCryptoX509CRL::getOpenSSLX509CRL() { return mp_X509CRL; } XSECCryptoX509CRL* OpenSSLCryptoX509CRL::clone() const { OpenSSLCryptoX509CRL* copy = new OpenSSLCryptoX509CRL(); copy->mp_X509CRL = X509_CRL_dup(mp_X509CRL); copy->m_DERX509CRL = m_DERX509CRL; return copy; } xmltooling-1.5.3/xmltooling/security/impl/PKIXPathValidator.cpp000644 001751 001751 00000054274 12003305017 026053 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * PKIXPathValidator.cpp * * A path validator based on PKIX support in OpenSSL. */ #include "internal.h" #include "logging.h" #include "security/OpenSSLPathValidator.h" #include "security/OpenSSLCryptoX509CRL.h" #include "security/PKIXPathValidatorParams.h" #include "security/SecurityHelper.h" #include "util/NDC.h" #include "util/PathResolver.h" #include "util/Threads.h" #include "util/XMLHelper.h" #include #include #include #include #include #include #include using namespace xmltooling::logging; using namespace xmltooling; using namespace std; namespace { static int XMLTOOL_DLLLOCAL error_callback(int ok, X509_STORE_CTX* ctx) { if (!ok) { Category::getInstance("OpenSSL").error( "path validation failure at depth(%d): %s", ctx->error_depth, X509_verify_cert_error_string(ctx->error) ); } return ok; } static string XMLTOOL_DLLLOCAL X509_NAME_to_string(X509_NAME* n) { string s; BIO* b = BIO_new(BIO_s_mem()); X509_NAME_print_ex(b,n,0,XN_FLAG_RFC2253); BIO_flush(b); BUF_MEM* bptr=nullptr; BIO_get_mem_ptr(b, &bptr); if (bptr && bptr->length > 0) { s.append(bptr->data, bptr->length); } BIO_free(b); return s; } static time_t XMLTOOL_DLLLOCAL getCRLTime(const ASN1_TIME *a) { struct tm t; memset(&t, 0, sizeof(t)); // RFC 5280, sections 5.1.2.4 and 5.1.2.5 require thisUpdate and nextUpdate // to be encoded as UTCTime until 2049, and RFC 5280 section 4.1.2.5.1 // further restricts the format to "YYMMDDHHMMSSZ" ("even where the number // of seconds is zero"). // As long as OpenSSL doesn't provide any API to convert ASN1_TIME values // time_t, we therefore have to parse it ourselves, unfortunately. if (sscanf((const char*)a->data, "%2d%2d%2d%2d%2d%2dZ", &t.tm_year, &t.tm_mon, &t.tm_mday, &t.tm_hour, &t.tm_min, &t.tm_sec) == 6) { if (t.tm_year <= 50) { // RFC 5280, section 4.1.2.5.1 t.tm_year += 100; } t.tm_mon--; #if defined(HAVE_TIMEGM) return timegm(&t); #else // Windows, and hopefully most others...? return mktime(&t) - timezone; #endif } return (time_t)-1; } static const XMLCh minRefreshDelay[] = UNICODE_LITERAL_15(m,i,n,R,e,f,r,e,s,h,D,e,l,a,y); static const XMLCh minSecondsRemaining[] = UNICODE_LITERAL_19(m,i,n,S,e,c,o,n,d,s,R,e,m,a,i,n,i,n,g); static const XMLCh minPercentRemaining[] = UNICODE_LITERAL_19(m,i,n,P,e,r,c,e,n,t,R,e,m,a,i,n,i,n,g); }; namespace xmltooling { class XMLTOOL_DLLLOCAL PKIXPathValidator : public OpenSSLPathValidator { public: PKIXPathValidator(const xercesc::DOMElement* e) : m_log(Category::getInstance(XMLTOOLING_LOGCAT".PathValidator.PKIX")), m_lock(XMLToolingConfig::getConfig().getNamedMutex(XMLTOOLING_LOGCAT".PathValidator.PKIX")), m_minRefreshDelay(XMLHelper::getAttrInt(e, 60, minRefreshDelay)), m_minSecondsRemaining(XMLHelper::getAttrInt(e, 86400, minSecondsRemaining)), m_minPercentRemaining(XMLHelper::getAttrInt(e, 10, minPercentRemaining)) { } virtual ~PKIXPathValidator() {} bool validate( XSECCryptoX509* certEE, const vector& certChain, const PathValidatorParams& params ) const; bool validate( X509* certEE, STACK_OF(X509)* certChain, const PathValidatorParams& params ) const; private: XSECCryptoX509CRL* getRemoteCRLs(const char* cdpuri) const; bool isFreshCRL(XSECCryptoX509CRL *c, Category* log=nullptr) const; Category& m_log; Mutex& m_lock; time_t m_minRefreshDelay,m_minSecondsRemaining; unsigned short m_minPercentRemaining; static map m_crlUpdateMap; }; PathValidator* XMLTOOL_DLLLOCAL PKIXPathValidatorFactory(const xercesc::DOMElement* const & e) { return new PKIXPathValidator(e); } }; map PKIXPathValidator::m_crlUpdateMap; void XMLTOOL_API xmltooling::registerPathValidators() { XMLToolingConfig& conf=XMLToolingConfig::getConfig(); conf.PathValidatorManager.registerFactory(PKIX_PATHVALIDATOR, PKIXPathValidatorFactory); } PathValidator::PathValidator() { } PathValidator::~PathValidator() { } PathValidator::PathValidatorParams::PathValidatorParams() { } PathValidator::PathValidatorParams::~PathValidatorParams() { } PKIXPathValidatorParams::PKIXPathValidatorParams() { } PKIXPathValidatorParams::~PKIXPathValidatorParams() { } OpenSSLPathValidator::OpenSSLPathValidator() { } OpenSSLPathValidator::~OpenSSLPathValidator() { } bool PKIXPathValidator::validate( XSECCryptoX509* certEE, const vector& certChain, const PathValidatorParams& params ) const { if (certEE->getProviderName()!=DSIGConstants::s_unicodeStrPROVOpenSSL) { m_log.error("only the OpenSSL XSEC provider is supported"); return false; } STACK_OF(X509)* untrusted=sk_X509_new_null(); for (vector::const_iterator i=certChain.begin(); i!=certChain.end(); ++i) sk_X509_push(untrusted,static_cast(*i)->getOpenSSLX509()); bool ret = validate(static_cast(certEE)->getOpenSSLX509(), untrusted, params); sk_X509_free(untrusted); return ret; } bool PKIXPathValidator::validate(X509* EE, STACK_OF(X509)* untrusted, const PathValidatorParams& params) const { #ifdef _DEBUG NDC ndc("validate"); #endif const PKIXPathValidatorParams* pkixParams = dynamic_cast(¶ms); if (!pkixParams) { m_log.error("input parameters were of incorrect type"); return false; } // First we build a stack of CA certs. These objects are all referenced in place. m_log.debug("supplying PKIX Validation information"); // We need this for CRL support. X509_STORE* store=X509_STORE_new(); if (!store) { log_openssl(); return false; } // PKIX policy checking (cf. RFCs 3280/5280 section 6) if (pkixParams->isPolicyMappingInhibited() || pkixParams->isAnyPolicyInhibited() || (!pkixParams->getPolicies().empty())) { #if (OPENSSL_VERSION_NUMBER < 0x00908000L) m_log.error("PKIX policy checking option is configured, but OpenSSL version is less than 0.9.8"); X509_STORE_free(store); return false; #else unsigned long pflags = 0; X509_VERIFY_PARAM *vpm = X509_VERIFY_PARAM_new(); if (!vpm) { log_openssl(); X509_STORE_free(store); return false; } // populate the "user-initial-policy-set" input variable const set& policies = pkixParams->getPolicies(); if (!policies.empty()) { for (set::const_iterator o=policies.begin(); o!=policies.end(); o++) { ASN1_OBJECT *oid = OBJ_txt2obj(o->c_str(), 1); if (oid && X509_VERIFY_PARAM_add0_policy(vpm, oid)) { m_log.debug("OID (%s) added to set of acceptable policies", o->c_str()); } else { log_openssl(); m_log.error("unable to parse/configure policy OID value (%s)", o->c_str()); if (oid) ASN1_OBJECT_free(oid); X509_VERIFY_PARAM_free(vpm); X509_STORE_free(store); return false; } } // when the user has supplied at least one policy OID, he obviously wants to check // for an explicit policy ("initial-explicit-policy") pflags |= X509_V_FLAG_EXPLICIT_POLICY; } // "initial-policy-mapping-inhibit" input variable if (pkixParams->isPolicyMappingInhibited()) pflags |= X509_V_FLAG_INHIBIT_MAP; // "initial-any-policy-inhibit" input variable if (pkixParams->isAnyPolicyInhibited()) pflags |= X509_V_FLAG_INHIBIT_ANY; if (!X509_VERIFY_PARAM_set_flags(vpm, pflags) || !X509_STORE_set1_param(store, vpm)) { log_openssl(); m_log.error("unable to set PKIX policy checking parameters"); X509_VERIFY_PARAM_free(vpm); X509_STORE_free(store); return false; } X509_VERIFY_PARAM_free(vpm); #endif } // This contains the state of the validate operation. int count=0; X509_STORE_CTX ctx; // AFAICT, EE and untrusted are passed in but not owned by the ctx. #if (OPENSSL_VERSION_NUMBER >= 0x00907000L) if (X509_STORE_CTX_init(&ctx,store,EE,untrusted)!=1) { log_openssl(); m_log.error("unable to initialize X509_STORE_CTX"); X509_STORE_free(store); return false; } #else X509_STORE_CTX_init(&ctx,store,EE,untrusted); #endif STACK_OF(X509)* CAstack = sk_X509_new_null(); const vector& CAcerts = pkixParams->getTrustAnchors(); for (vector::const_iterator i=CAcerts.begin(); i!=CAcerts.end(); ++i) { if ((*i)->getProviderName()==DSIGConstants::s_unicodeStrPROVOpenSSL) { sk_X509_push(CAstack,static_cast(*i)->getOpenSSLX509()); ++count; } } m_log.debug("supplied (%d) CA certificate(s)", count); // Seems to be most efficient to just pass in the CA stack. X509_STORE_CTX_trusted_stack(&ctx,CAstack); X509_STORE_CTX_set_depth(&ctx,100); // we check the depth down below X509_STORE_CTX_set_verify_cb(&ctx,error_callback); // Do a first pass verify. If CRLs aren't used, this is the only pass. int ret=X509_verify_cert(&ctx); if (ret==1) { // Now see if the depth was acceptable by counting the number of intermediates. int depth=sk_X509_num(ctx.chain)-2; if (pkixParams->getVerificationDepth() < depth) { m_log.error( "certificate chain was too long (%d intermediates, only %d allowed)", (depth==-1) ? 0 : depth, pkixParams->getVerificationDepth() ); ret=0; } } if (pkixParams->getRevocationChecking() != PKIXPathValidatorParams::REVOCATION_OFF) { #if (OPENSSL_VERSION_NUMBER >= 0x00907000L) // When we add CRLs, we have to be sure the nextUpdate hasn't passed, because OpenSSL won't accept // the CRL in that case. If we end up not adding a CRL for a particular link in the chain, the // validation will fail (if the fullChain option was set). set crlissuers; time_t now = time(nullptr); // Pull CRLs from external CDP first, since an attacker is likely to stick an old but valid CRL into // the signature. for (int i = 0; i < sk_X509_num(untrusted); ++i) { X509 *cert = sk_X509_value(untrusted, i); string crlissuer(X509_NAME_to_string(X509_get_issuer_name(cert))); if (crlissuers.count(crlissuer)) { // We already have a CRL for this cert, so skip CRLDP processing for this one. continue; } bool foundUsableCDP = false; STACK_OF(DIST_POINT)* dps = (STACK_OF(DIST_POINT)*)X509_get_ext_d2i(cert, NID_crl_distribution_points, nullptr, nullptr); for (int ii = 0; !foundUsableCDP && ii < sk_DIST_POINT_num(dps); ++ii) { DIST_POINT* dp = sk_DIST_POINT_value(dps, ii); if (!dp->distpoint || dp->distpoint->type != 0) continue; for (int iii = 0; !foundUsableCDP && iii < sk_GENERAL_NAME_num(dp->distpoint->name.fullname); ++iii) { GENERAL_NAME* gen = sk_GENERAL_NAME_value(dp->distpoint->name.fullname, iii); // Only consider URIs, and stop after the first one we find. if (gen->type == GEN_URI) { const char* cdpuri = (const char*)gen->d.ia5->data; auto_ptr crl(getRemoteCRLs(cdpuri)); if (crl.get() && crl->getProviderName()==DSIGConstants::s_unicodeStrPROVOpenSSL && (isFreshCRL(crl.get()) || (ii == sk_DIST_POINT_num(dps)-1 && iii == sk_GENERAL_NAME_num(dp->distpoint->name.fullname)-1))) { // owned by store X509_STORE_add_crl(store, X509_CRL_dup(static_cast(crl.get())->getOpenSSLX509CRL())); m_log.debug("added CRL issued by (%s)", crlissuer.c_str()); crlissuers.insert(crlissuer); foundUsableCDP = true; } } } } sk_DIST_POINT_free(dps); } // Pick up any valid CRLs inline. const vector& crls = pkixParams->getCRLs(); for (vector::const_iterator j=crls.begin(); j!=crls.end(); ++j) { if ((*j)->getProviderName()==DSIGConstants::s_unicodeStrPROVOpenSSL && (X509_cmp_time(X509_CRL_get_nextUpdate(static_cast(*j)->getOpenSSLX509CRL()), &now) > 0)) { string crlissuer(X509_NAME_to_string(X509_CRL_get_issuer(static_cast(*j)->getOpenSSLX509CRL()))); if (crlissuer.empty() || crlissuers.count(crlissuer)) { // We already have a CRL for this cert, so skip this one. continue; } m_log.debug("added CRL issued by (%s)", crlissuer.c_str()); crlissuers.insert(crlissuer); // owned by store X509_STORE_add_crl(store, X509_CRL_dup(static_cast(*j)->getOpenSSLX509CRL())); } } // Do a second pass verify with CRLs in place. if (pkixParams->getRevocationChecking() == PKIXPathValidatorParams::REVOCATION_FULLCHAIN) X509_STORE_CTX_set_flags(&ctx, X509_V_FLAG_CRL_CHECK|X509_V_FLAG_CRL_CHECK_ALL); else X509_STORE_CTX_set_flags(&ctx, X509_V_FLAG_CRL_CHECK); ret=X509_verify_cert(&ctx); #else m_log.warn("CRL checking is enabled, but OpenSSL version is too old"); ret = 0; #endif } if (ret == 1) { m_log.debug("successfully validated certificate chain"); } #if defined(X509_V_ERR_NO_EXPLICIT_POLICY) && (OPENSSL_VERSION_NUMBER < 0x10000000L) else if (X509_STORE_CTX_get_error(&ctx) == X509_V_ERR_NO_EXPLICIT_POLICY && !pkixParams->isPolicyMappingInhibited()) { m_log.warn("policy mapping requires OpenSSL 1.0.0 or later"); } #endif // Clean up... X509_STORE_CTX_cleanup(&ctx); X509_STORE_free(store); sk_X509_free(CAstack); return (ret == 1); } XSECCryptoX509CRL* PKIXPathValidator::getRemoteCRLs(const char* cdpuri) const { // This is a filesystem-based CRL cache using a shared lock across all instances // of this class. // The filenames for the CRL cache are based on a hash of the CRL location. string cdpfile = SecurityHelper::doHash("SHA1", cdpuri, strlen(cdpuri)) + ".crl"; XMLToolingConfig::getConfig().getPathResolver()->resolve(cdpfile, PathResolver::XMLTOOLING_CACHE_FILE); string cdpstaging = cdpfile + ".tmp"; time_t now = time(nullptr); vector crls; try { // While holding the lock, check for a cached copy of the CRL, and remove "expired" ones. Lock glock(m_lock); #ifdef WIN32 struct _stat stat_buf; if (_stat(cdpfile.c_str(), &stat_buf) == 0) { #else struct stat stat_buf; if (stat(cdpfile.c_str(), &stat_buf) == 0) { #endif SecurityHelper::loadCRLsFromFile(crls, cdpfile.c_str()); if (crls.empty() || crls.front()->getProviderName() != DSIGConstants::s_unicodeStrPROVOpenSSL || X509_cmp_time(X509_CRL_get_nextUpdate(static_cast(crls.front())->getOpenSSLX509CRL()), &now) < 0) { for_each(crls.begin(), crls.end(), xmltooling::cleanup()); crls.clear(); remove(cdpfile.c_str()); // may as well delete the local copy m_crlUpdateMap.erase(cdpuri); m_log.info("deleting cached CRL from %s with nextUpdate field in the past", cdpuri); } } } catch (exception& ex) { m_log.error("exception loading cached copy of CRL from %s: %s", cdpuri, ex.what()); } if (crls.empty() || !isFreshCRL(crls.front(), &m_log)) { bool updateTimestamp = true; try { // If we get here, the cached copy didn't exist yet, or it's time to refresh. // To limit the rate of unsuccessful attempts when a CRLDP is unreachable, // we remember the timestamp of the last attempt (both successful/unsuccessful). time_t ts = 0; m_lock.lock(); map::const_iterator tsit = m_crlUpdateMap.find(cdpuri); if (tsit != m_crlUpdateMap.end()) ts = tsit->second; m_lock.unlock(); if (difftime(now, ts) > m_minRefreshDelay) { SOAPTransport::Address addr("AbstractPKIXTrustEngine", cdpuri, cdpuri); string scheme(addr.m_endpoint, strchr(addr.m_endpoint,':') - addr.m_endpoint); auto_ptr soap(XMLToolingConfig::getConfig().SOAPTransportManager.newPlugin(scheme.c_str(), addr)); soap->send(); istream& msg = soap->receive(); Lock glock(m_lock); ofstream out(cdpstaging.c_str(), fstream::trunc|fstream::binary); out << msg.rdbuf(); out.close(); SecurityHelper::loadCRLsFromFile(crls, cdpstaging.c_str()); if (crls.empty() || crls.front()->getProviderName() != DSIGConstants::s_unicodeStrPROVOpenSSL || X509_cmp_time(X509_CRL_get_nextUpdate(static_cast(crls.front())->getOpenSSLX509CRL()), &now) < 0) { // The "new" CRL wasn't usable, so get rid of it. for_each(crls.begin(), crls.end(), xmltooling::cleanup()); crls.clear(); remove(cdpstaging.c_str()); m_log.error("ignoring CRL retrieved from %s with nextUpdate field in the past", cdpuri); } else { // "Commit" the new CRL. Note that we might add a CRL which doesn't pass // isFreshCRL, but that's preferrable over adding none at all. m_log.info("CRL refreshed from %s", cdpuri); remove(cdpfile.c_str()); if (rename(cdpstaging.c_str(), cdpfile.c_str()) != 0) m_log.error("unable to rename CRL staging file"); } } else { updateTimestamp = false; // don't update if we're within the backoff window } } catch (exception& ex) { m_log.error("exception downloading/caching CRL from %s: %s", cdpuri, ex.what()); } if (updateTimestamp) { Lock glock(m_lock); m_crlUpdateMap[cdpuri] = now; } } if (crls.empty()) return nullptr; for_each(crls.begin() + 1, crls.end(), xmltooling::cleanup()); return crls.front(); } bool PKIXPathValidator::isFreshCRL(XSECCryptoX509CRL *c, Category* log) const { if (c) { const X509_CRL* crl = static_cast(c)->getOpenSSLX509CRL(); time_t thisUpdate = getCRLTime(X509_CRL_get_lastUpdate(crl)); time_t nextUpdate = getCRLTime(X509_CRL_get_nextUpdate(crl)); time_t now = time(nullptr); if (thisUpdate < 0 || nextUpdate < 0) { // we failed to parse at least one of the fields (they were not encoded // as required by RFC 5280, actually) time_t exp = now + m_minSecondsRemaining; if (log) { log->warn("isFreshCRL (issuer '%s'): improperly encoded thisUpdate or nextUpdate field - falling back to simple time comparison", (X509_NAME_to_string(X509_CRL_get_issuer(crl))).c_str()); } return (X509_cmp_time(X509_CRL_get_nextUpdate(crl), &exp) > 0) ? true : false; } else { if (log && log->isDebugEnabled()) { log->debug("isFreshCRL (issuer '%s'): %.0f seconds until nextUpdate (%3.2f%% elapsed since thisUpdate)", (X509_NAME_to_string(X509_CRL_get_issuer(crl))).c_str(), difftime(nextUpdate, now), (difftime(now, thisUpdate) * 100) / difftime(nextUpdate, thisUpdate)); } // consider it recent enough if there are at least MIN_SECS_REMAINING // to the nextUpdate, and at least MIN_PERCENT_REMAINING of its // overall "validity" are remaining to the nextUpdate return (now + m_minSecondsRemaining < nextUpdate) && ((difftime(nextUpdate, now) * 100) / difftime(nextUpdate, thisUpdate) > m_minPercentRemaining); } } return false; } xmltooling-1.5.3/xmltooling/security/impl/SecurityHelper.cpp000644 001751 001751 00000072743 12003305017 025565 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * SecurityHelper.cpp * * A helper class for working with keys, certificates, etc. */ #include "internal.h" #include "logging.h" #include "io/HTTPResponse.h" #include "security/OpenSSLCryptoX509CRL.h" #include "security/SecurityHelper.h" #include "security/X509Credential.h" #include "soap/HTTPSOAPTransport.h" #include "util/NDC.h" #include #include #include #include #include #include #include #include #include #ifdef WIN32 # if (OPENSSL_VERSION_NUMBER >= 0x00907000) # define XMLTOOLING_OPENSSL_HAVE_EC 1 # endif #endif #if defined(XMLTOOLING_XMLSEC_ECC) && defined(XMLTOOLING_OPENSSL_HAVE_EC) # include #endif using namespace xmltooling::logging; using namespace xmltooling; using namespace std; // OpenSSL password callback... static int passwd_callback(char* buf, int len, int verify, void* passwd) { if(!verify) { if(passwd && len > strlen(reinterpret_cast(passwd))) { strcpy(buf,reinterpret_cast(passwd)); return strlen(buf); } } return 0; } const char* SecurityHelper::guessEncodingFormat(const char* pathname) { const char* format=nullptr; BIO* in=BIO_new(BIO_s_file_internal()); if (in && BIO_read_filename(in, pathname)>0) { const int READSIZE = 1; char buf[READSIZE]; int mark; // Examine the first byte. try { if ((mark = BIO_tell(in)) < 0) throw XMLSecurityException("Error loading file: BIO_tell() can't get the file position."); if (BIO_read(in, buf, READSIZE) <= 0) throw XMLSecurityException("Error loading file: BIO_read() can't read from the stream."); if (BIO_seek(in, mark) < 0) throw XMLSecurityException("Error loading file: BIO_seek() can't reset the file position."); } catch (exception&) { log_openssl(); BIO_free(in); throw; } // Check the first byte of the file. If it's some kind of DER-encoded structure // (including PKCS12), it will begin with ASCII 048. Otherwise, assume it's PEM. if (buf[0] != 48) { format = "PEM"; } else { // Here we know it's DER-encoded, now try to parse it as a PKCS12 ASN.1 structure. // If it fails, must be another kind of DER-encoded structure. PKCS12* p12; if ((p12=d2i_PKCS12_bio(in, nullptr)) == nullptr) { format = "DER"; } else { format = "PKCS12"; PKCS12_free(p12); } } } if (in) BIO_free(in); if (format) return format; throw XMLSecurityException("Unable to determine encoding for file ($1).", params(1,pathname)); } XSECCryptoKey* SecurityHelper::loadKeyFromFile(const char* pathname, const char* format, const char* password) { #ifdef _DEBUG NDC ndc("loadKeyFromFile"); #endif Category& log = Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper"); log.info("loading private key from file (%s)", pathname); // Native objects. PKCS12* p12=nullptr; EVP_PKEY* pkey=nullptr; BIO* in=BIO_new(BIO_s_file_internal()); if (in && BIO_read_filename(in, pathname)>0) { // If the format isn't set, try and guess it. if (!format || !*format) { const int READSIZE = 1; char buf[READSIZE]; int mark; // Examine the first byte. try { if ((mark = BIO_tell(in)) < 0) throw XMLSecurityException("Error loading key: BIO_tell() can't get the file position."); if (BIO_read(in, buf, READSIZE) <= 0) throw XMLSecurityException("Error loading key: BIO_read() can't read from the stream."); if (BIO_seek(in, mark) < 0) throw XMLSecurityException("Error loading key: BIO_seek() can't reset the file position."); } catch (exception&) { log_openssl(); BIO_free(in); throw; } // Check the first byte of the file. If it's some kind of DER-encoded structure // (including PKCS12), it will begin with ASCII 048. Otherwise, assume it's PEM. if (buf[0] != 48) { format = "PEM"; } else { // Here we know it's DER-encoded, now try to parse it as a PKCS12 ASN.1 structure. // If it fails, must be another kind of DER-encoded structure. if ((p12=d2i_PKCS12_bio(in, nullptr)) == nullptr) { format = "DER"; if (BIO_seek(in, mark) < 0) { log_openssl(); BIO_free(in); throw XMLSecurityException("Error loading key: BIO_seek() can't reset the file position."); } } else { format = "PKCS12"; } } log.debug("key encoding format for (%s) dynamically resolved as (%s)", pathname, format); } // The format should be known, so parse accordingly. if (!strcmp(format, "PEM")) { pkey = PEM_read_bio_PrivateKey(in, nullptr, passwd_callback, const_cast(password)); } else if (!strcmp(format, "DER")) { pkey=d2i_PrivateKey_bio(in, nullptr); } else if (!strcmp(format, "PKCS12")) { if (!p12) p12 = d2i_PKCS12_bio(in, nullptr); if (p12) { X509* x=nullptr; PKCS12_parse(p12, const_cast(password), &pkey, &x, nullptr); PKCS12_free(p12); X509_free(x); } } else { log.error("unknown key encoding format (%s)", format); } } if (in) BIO_free(in); // Now map it to an XSEC wrapper. if (pkey) { XSECCryptoKey* ret=nullptr; switch (pkey->type) { case EVP_PKEY_RSA: ret=new OpenSSLCryptoKeyRSA(pkey); break; case EVP_PKEY_DSA: ret=new OpenSSLCryptoKeyDSA(pkey); break; #if defined(XMLTOOLING_XMLSEC_ECC) && defined(XMLTOOLING_OPENSSL_HAVE_EC) case EVP_PKEY_EC: ret=new OpenSSLCryptoKeyEC(pkey); break; #endif default: log.error("unsupported private key type"); } EVP_PKEY_free(pkey); if (ret) return ret; } log_openssl(); throw XMLSecurityException("Unable to load private key from file ($1).", params(1, pathname)); } vector::size_type SecurityHelper::loadCertificatesFromFile( vector& certs, const char* pathname, const char* format, const char* password ) { #ifdef _DEBUG NDC ndc("loadCertificatesFromFile"); #endif Category& log = Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper"); log.info("loading certificate(s) from file (%s)", pathname); vector::size_type count = certs.size(); // Native objects. X509* x=nullptr; PKCS12* p12=nullptr; BIO* in=BIO_new(BIO_s_file_internal()); if (in && BIO_read_filename(in, pathname)>0) { // If the format isn't set, try and guess it. if (!format || !*format) { const int READSIZE = 1; char buf[READSIZE]; int mark; // Examine the first byte. try { if ((mark = BIO_tell(in)) < 0) throw XMLSecurityException("Error loading certificate: BIO_tell() can't get the file position."); if (BIO_read(in, buf, READSIZE) <= 0) throw XMLSecurityException("Error loading certificate: BIO_read() can't read from the stream."); if (BIO_seek(in, mark) < 0) throw XMLSecurityException("Error loading certificate: BIO_seek() can't reset the file position."); } catch (exception&) { log_openssl(); BIO_free(in); throw; } // Check the first byte of the file. If it's some kind of DER-encoded structure // (including PKCS12), it will begin with ASCII 048. Otherwise, assume it's PEM. if (buf[0] != 48) { format = "PEM"; } else { // Here we know it's DER-encoded, now try to parse it as a PKCS12 ASN.1 structure. // If it fails, must be another kind of DER-encoded structure. if ((p12=d2i_PKCS12_bio(in, nullptr)) == nullptr) { format = "DER"; if (BIO_seek(in, mark) < 0) { log_openssl(); BIO_free(in); throw XMLSecurityException("Error loading certificate: BIO_seek() can't reset the file position."); } } else { format = "PKCS12"; } } } // The format should be known, so parse accordingly. if (!strcmp(format, "PEM")) { while (x=PEM_read_bio_X509(in, nullptr, nullptr, nullptr)) { certs.push_back(new OpenSSLCryptoX509(x)); X509_free(x); } } else if (!strcmp(format, "DER")) { x=d2i_X509_bio(in, nullptr); if (x) { certs.push_back(new OpenSSLCryptoX509(x)); X509_free(x); } } else if (!strcmp(format, "PKCS12")) { if (!p12) p12 = d2i_PKCS12_bio(in, nullptr); if (p12) { EVP_PKEY* pkey=nullptr; STACK_OF(X509)* CAstack = sk_X509_new_null(); PKCS12_parse(p12, const_cast(password), &pkey, &x, &CAstack); PKCS12_free(p12); EVP_PKEY_free(pkey); if (x) { certs.push_back(new OpenSSLCryptoX509(x)); X509_free(x); } x = sk_X509_pop(CAstack); while (x) { certs.push_back(new OpenSSLCryptoX509(x)); X509_free(x); x = sk_X509_pop(CAstack); } sk_X509_free(CAstack); } } } if (in) BIO_free(in); if (certs.size() == count) { log_openssl(); throw XMLSecurityException("Unable to load certificate(s) from file ($1).", params(1, pathname)); } return certs.size(); } vector::size_type SecurityHelper::loadCRLsFromFile( vector& crls, const char* pathname, const char* format ) { #ifdef _DEBUG NDC ndc("loadCRLsFromFile"); #endif Category& log = Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper"); log.info("loading CRL(s) from file (%s)", pathname); vector::size_type count = crls.size(); BIO* in=BIO_new(BIO_s_file_internal()); if (in && BIO_read_filename(in, pathname)>0) { // If the format isn't set, try and guess it. if (!format || !*format) { const int READSIZE = 1; char buf[READSIZE]; int mark; // Examine the first byte. try { if ((mark = BIO_tell(in)) < 0) throw XMLSecurityException("Error loading CRL: BIO_tell() can't get the file position."); if (BIO_read(in, buf, READSIZE) <= 0) throw XMLSecurityException("Error loading CRL: BIO_read() can't read from the stream."); if (BIO_seek(in, mark) < 0) throw XMLSecurityException("Error loading CRL: BIO_seek() can't reset the file position."); } catch (exception&) { log_openssl(); BIO_free(in); throw; } // Check the first byte of the file. If it's some kind of DER-encoded structure // it will begin with ASCII 048. Otherwise, assume it's PEM. if (buf[0] != 48) { format = "PEM"; } else { format = "DER"; } log.debug("CRL encoding format for (%s) dynamically resolved as (%s)", pathname, format); } X509_CRL* crl=nullptr; if (!strcmp(format, "PEM")) { while (crl=PEM_read_bio_X509_CRL(in, nullptr, nullptr, nullptr)) { crls.push_back(new OpenSSLCryptoX509CRL(crl)); X509_CRL_free(crl); } } else if (!strcmp(format, "DER")) { crl=d2i_X509_CRL_bio(in, nullptr); if (crl) { crls.push_back(new OpenSSLCryptoX509CRL(crl)); X509_CRL_free(crl); } } else { log.error("unknown CRL encoding format (%s)", format); } } if (in) BIO_free(in); if (crls.size() == count) { log_openssl(); throw XMLSecurityException("Unable to load CRL(s) from file ($1).", params(1, pathname)); } return crls.size(); } XSECCryptoKey* SecurityHelper::loadKeyFromURL(SOAPTransport& transport, const char* backing, const char* format, const char* password) { // Fetch the data. transport.send(); istream& msg = transport.receive(); // Check for "not modified" status. if (dynamic_cast(&transport) && transport.getStatusCode() == HTTPResponse::XMLTOOLING_HTTP_STATUS_NOTMODIFIED) throw (long)HTTPResponse::XMLTOOLING_HTTP_STATUS_NOTMODIFIED; // Dump to output file. ofstream out(backing, fstream::trunc|fstream::binary); out << msg.rdbuf(); out.close(); return loadKeyFromFile(backing, format, password); } vector::size_type SecurityHelper::loadCertificatesFromURL( vector& certs, SOAPTransport& transport, const char* backing, const char* format, const char* password ) { transport.send(); istream& msg = transport.receive(); // Check for "not modified" status. if (dynamic_cast(&transport) && transport.getStatusCode() == HTTPResponse::XMLTOOLING_HTTP_STATUS_NOTMODIFIED) throw (long)HTTPResponse::XMLTOOLING_HTTP_STATUS_NOTMODIFIED; // Dump to output file. ofstream out(backing, fstream::trunc|fstream::binary); out << msg.rdbuf(); out.close(); return loadCertificatesFromFile(certs, backing, format, password); } vector::size_type SecurityHelper::loadCRLsFromURL( vector& crls, SOAPTransport& transport, const char* backing, const char* format ) { // Fetch the data. transport.send(); istream& msg = transport.receive(); // Check for "not modified" status. if (dynamic_cast(&transport) && transport.getStatusCode() == HTTPResponse::XMLTOOLING_HTTP_STATUS_NOTMODIFIED) throw (long)HTTPResponse::XMLTOOLING_HTTP_STATUS_NOTMODIFIED; // Dump to output file. ofstream out(backing, fstream::trunc|fstream::binary); out << msg.rdbuf(); out.close(); return loadCRLsFromFile(crls, backing, format); } bool SecurityHelper::matches(const XSECCryptoKey& key1, const XSECCryptoKey& key2) { if (key1.getProviderName()!=DSIGConstants::s_unicodeStrPROVOpenSSL || key2.getProviderName()!=DSIGConstants::s_unicodeStrPROVOpenSSL) { Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper").warn("comparison of non-OpenSSL keys not supported"); return false; } // If one key is public or both, just compare the public key half. if (key1.getKeyType()==XSECCryptoKey::KEY_RSA_PUBLIC || key1.getKeyType()==XSECCryptoKey::KEY_RSA_PAIR) { if (key2.getKeyType()!=XSECCryptoKey::KEY_RSA_PUBLIC && key2.getKeyType()!=XSECCryptoKey::KEY_RSA_PAIR) return false; const RSA* rsa1 = static_cast(key1).getOpenSSLRSA(); const RSA* rsa2 = static_cast(key2).getOpenSSLRSA(); return (rsa1 && rsa2 && BN_cmp(rsa1->n,rsa2->n) == 0 && BN_cmp(rsa1->e,rsa2->e) == 0); } // For a private key, compare the private half. if (key1.getKeyType()==XSECCryptoKey::KEY_RSA_PRIVATE) { if (key2.getKeyType()!=XSECCryptoKey::KEY_RSA_PRIVATE && key2.getKeyType()!=XSECCryptoKey::KEY_RSA_PAIR) return false; const RSA* rsa1 = static_cast(key1).getOpenSSLRSA(); const RSA* rsa2 = static_cast(key2).getOpenSSLRSA(); return (rsa1 && rsa2 && BN_cmp(rsa1->n,rsa2->n) == 0 && BN_cmp(rsa1->d,rsa2->d) == 0); } // If one key is public or both, just compare the public key half. if (key1.getKeyType()==XSECCryptoKey::KEY_DSA_PUBLIC || key1.getKeyType()==XSECCryptoKey::KEY_DSA_PAIR) { if (key2.getKeyType()!=XSECCryptoKey::KEY_DSA_PUBLIC && key2.getKeyType()!=XSECCryptoKey::KEY_DSA_PAIR) return false; const DSA* dsa1 = static_cast(key1).getOpenSSLDSA(); const DSA* dsa2 = static_cast(key2).getOpenSSLDSA(); return (dsa1 && dsa2 && BN_cmp(dsa1->pub_key,dsa2->pub_key) == 0); } // For a private key, compare the private half. if (key1.getKeyType()==XSECCryptoKey::KEY_DSA_PRIVATE) { if (key2.getKeyType()!=XSECCryptoKey::KEY_DSA_PRIVATE && key2.getKeyType()!=XSECCryptoKey::KEY_DSA_PAIR) return false; const DSA* dsa1 = static_cast(key1).getOpenSSLDSA(); const DSA* dsa2 = static_cast(key2).getOpenSSLDSA(); return (dsa1 && dsa2 && BN_cmp(dsa1->priv_key,dsa2->priv_key) == 0); } #if defined(XMLTOOLING_XMLSEC_ECC) && defined(XMLTOOLING_OPENSSL_HAVE_EC) // If one key is public or both, just compare the public key half. if (key1.getKeyType()==XSECCryptoKey::KEY_EC_PUBLIC || key1.getKeyType()==XSECCryptoKey::KEY_EC_PAIR) { if (key2.getKeyType()!=XSECCryptoKey::KEY_EC_PUBLIC && key2.getKeyType()!=XSECCryptoKey::KEY_EC_PAIR) return false; const EC_KEY* ec1 = static_cast(key1).getOpenSSLEC(); const EC_KEY* ec2 = static_cast(key2).getOpenSSLEC(); if (!ec1 || !ec2) return false; if (EC_GROUP_cmp(EC_KEY_get0_group(ec1), EC_KEY_get0_group(ec2), nullptr) != 0) return false; return (EC_POINT_cmp(EC_KEY_get0_group(ec1), EC_KEY_get0_public_key(ec1), EC_KEY_get0_public_key(ec2), nullptr) == 0); } // For a private key, compare the private half. if (key1.getKeyType()==XSECCryptoKey::KEY_EC_PRIVATE) { if (key2.getKeyType()!=XSECCryptoKey::KEY_EC_PRIVATE && key2.getKeyType()!=XSECCryptoKey::KEY_EC_PAIR) return false; const EC_KEY* ec1 = static_cast(key1).getOpenSSLEC(); const EC_KEY* ec2 = static_cast(key2).getOpenSSLEC(); return (ec1 && ec2 && BN_cmp(EC_KEY_get0_private_key(ec1), EC_KEY_get0_private_key(ec2)) == 0); } #endif Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper").warn("unsupported key type for comparison"); return false; } string SecurityHelper::doHash(const char* hashAlg, const char* buf, unsigned long buflen, bool toHex) { static char DIGITS[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; string ret; const EVP_MD* md = EVP_get_digestbyname(hashAlg); if (!md) { Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper").error("hash algorithm (%s) not available", hashAlg); return ret; } BIO* chain = BIO_new(BIO_s_mem()); BIO* b = BIO_new(BIO_f_md()); BIO_set_md(b, md); chain = BIO_push(b, chain); BIO_write(chain, buf, buflen); BIO_flush(chain); char digest[EVP_MAX_MD_SIZE]; int len = BIO_gets(chain, digest, EVP_MD_size(md)); BIO_free_all(chain); if (len != EVP_MD_size(md)) { Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper").error( "hash result length (%d) did not match expected value (%d)", len, EVP_MD_size(md) ); return ret; } if (toHex) { for (int i=0; i < len; ++i) { ret += (DIGITS[((unsigned char)(0xF0 & digest[i])) >> 4 ]); ret += (DIGITS[0x0F & digest[i]]); } } else { for (int i=0; i < len; ++i) { ret += digest[i]; } } return ret; } string SecurityHelper::getDEREncoding(const XSECCryptoKey& key, const char* hash, bool nowrap) { string ret; if (key.getProviderName()!=DSIGConstants::s_unicodeStrPROVOpenSSL) { Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper").warn("encoding of non-OpenSSL keys not supported"); return ret; } const RSA* rsa = nullptr; const DSA* dsa = nullptr; #if defined(XMLTOOLING_XMLSEC_ECC) && defined(XMLTOOLING_OPENSSL_HAVE_EC) const EC_KEY* ec = nullptr; #endif if (key.getKeyType() == XSECCryptoKey::KEY_RSA_PUBLIC || key.getKeyType() == XSECCryptoKey::KEY_RSA_PAIR) { rsa = static_cast(key).getOpenSSLRSA(); if (!rsa) { Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper").warn("key was not populated"); return ret; } } else if (key.getKeyType() == XSECCryptoKey::KEY_DSA_PUBLIC || key.getKeyType() == XSECCryptoKey::KEY_DSA_PAIR) { dsa = static_cast(key).getOpenSSLDSA(); if (!dsa) { Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper").warn("key was not populated"); return ret; } } #if defined(XMLTOOLING_XMLSEC_ECC) && defined(XMLTOOLING_OPENSSL_HAVE_EC) else if (key.getKeyType() == XSECCryptoKey::KEY_EC_PUBLIC || key.getKeyType() == XSECCryptoKey::KEY_EC_PAIR) { ec = static_cast(key).getOpenSSLEC(); if (!ec) { Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper").warn("key was not populated"); return ret; } } #endif else { Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper").warn("public key type not supported"); return ret; } const EVP_MD* md=nullptr; if (hash) { md = EVP_get_digestbyname(hash); if (!md) { Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper").error("hash algorithm (%s) not available", hash); return ret; } } BIO* chain = BIO_new(BIO_s_mem()); BIO* b = BIO_new(BIO_f_base64()); if (nowrap) BIO_set_flags(b, BIO_FLAGS_BASE64_NO_NL); chain = BIO_push(b, chain); if (md) { b = BIO_new(BIO_f_md()); BIO_set_md(b, md); chain = BIO_push(b, chain); } if (rsa) i2d_RSA_PUBKEY_bio(chain, const_cast(rsa)); else if (dsa) i2d_DSA_PUBKEY_bio(chain, const_cast(dsa)); #if defined(XMLTOOLING_XMLSEC_ECC) && defined(XMLTOOLING_OPENSSL_HAVE_EC) else i2d_EC_PUBKEY_bio(chain, const_cast(ec)); #endif BIO_flush(chain); if (md) { char digest[EVP_MAX_MD_SIZE]; int len = BIO_gets(chain, digest, EVP_MD_size(md)); if (len != EVP_MD_size(md)) { BIO_free_all(chain); return ret; } b = BIO_pop(chain); BIO_free(chain); chain = b; BIO_reset(chain); BIO_write(chain, digest, len); BIO_flush(chain); } BUF_MEM* bptr=nullptr; BIO_get_mem_ptr(chain, &bptr); if (bptr && bptr->length > 0) ret.append(bptr->data, bptr->length); BIO_free_all(chain); return ret; } string SecurityHelper::getDEREncoding(const XSECCryptoX509& cert, const char* hash, bool nowrap) { string ret; if (cert.getProviderName()!=DSIGConstants::s_unicodeStrPROVOpenSSL) { Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper").warn("encoding of non-OpenSSL keys not supported"); return ret; } const EVP_MD* md=nullptr; if (hash) { md = EVP_get_digestbyname(hash); if (!md) { Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper").error("hash algorithm (%s) not available", hash); return ret; } } const X509* x = static_cast(cert).getOpenSSLX509(); EVP_PKEY* key = X509_get_pubkey(const_cast(x)); BIO* chain = BIO_new(BIO_s_mem()); BIO* b = BIO_new(BIO_f_base64()); if (nowrap) BIO_set_flags(b, BIO_FLAGS_BASE64_NO_NL); chain = BIO_push(b, chain); if (md) { b = BIO_new(BIO_f_md()); BIO_set_md(b, md); chain = BIO_push(b, chain); } i2d_PUBKEY_bio(chain, key); EVP_PKEY_free(key); BIO_flush(chain); if (md) { char digest[EVP_MAX_MD_SIZE]; int len = BIO_gets(chain, digest, EVP_MD_size(md)); if (len != EVP_MD_size(md)) { BIO_free_all(chain); return ret; } b = BIO_pop(chain); BIO_free(chain); chain = b; BIO_reset(chain); BIO_write(chain, digest, len); BIO_flush(chain); } BUF_MEM* bptr=nullptr; BIO_get_mem_ptr(chain, &bptr); if (bptr && bptr->length > 0) ret.append(bptr->data, bptr->length); BIO_free_all(chain); return ret; } string SecurityHelper::getDEREncoding(const Credential& cred, const char* hash, bool nowrap) { const X509Credential* x509 = dynamic_cast(&cred); if (x509 && !x509->getEntityCertificateChain().empty()) return getDEREncoding(*(x509->getEntityCertificateChain().front()), hash, nowrap); else if (cred.getPublicKey()) return getDEREncoding(*(cred.getPublicKey()), hash, nowrap); return ""; } string SecurityHelper::getDEREncoding(const XSECCryptoKey& key, bool hash, bool nowrap) { return getDEREncoding(key, hash ? "SHA1" : nullptr, nowrap); } string SecurityHelper::getDEREncoding(const XSECCryptoX509& cert, bool hash, bool nowrap) { return getDEREncoding(cert, hash ? "SHA1" : nullptr, nowrap); } string SecurityHelper::getDEREncoding(const Credential& cred, bool hash, bool nowrap) { return getDEREncoding(cred, hash ? "SHA1" : nullptr, nowrap); } XSECCryptoKey* SecurityHelper::fromDEREncoding(const char* buf, unsigned long buflen, bool base64) { xsecsize_t x; XMLByte* decoded=nullptr; if (base64) { decoded = xercesc::Base64::decode(reinterpret_cast(buf), &x); if (!decoded) { Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper").error("base64 decode failed"); return nullptr; } } BIO* b = BIO_new_mem_buf((void*)(base64 ? (char*)decoded : buf), (base64 ? x : buflen)); EVP_PKEY* pkey = d2i_PUBKEY_bio(b, nullptr); BIO_free(b); if (base64) { #ifdef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE XMLString::release(&decoded); #else XMLString::release((char**)&decoded); #endif } if (pkey) { // Now map it to an XSEC wrapper. XSECCryptoKey* ret = nullptr; try { switch (pkey->type) { case EVP_PKEY_RSA: ret = new OpenSSLCryptoKeyRSA(pkey); break; case EVP_PKEY_DSA: ret = new OpenSSLCryptoKeyDSA(pkey); break; #if defined(XMLTOOLING_XMLSEC_ECC) && defined(XMLTOOLING_OPENSSL_HAVE_EC) case EVP_PKEY_EC: ret = new OpenSSLCryptoKeyEC(pkey); break; #endif default: Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper").error("unsupported public key type"); } } catch (XSECCryptoException& ex) { Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper").error(ex.getMsg()); } EVP_PKEY_free(pkey); return ret; } return nullptr; } XSECCryptoKey* SecurityHelper::fromDEREncoding(const XMLCh* buf) { xsecsize_t x; XMLByte* decoded = xercesc::Base64::decodeToXMLByte(buf, &x); if (!decoded) { Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper").error("base64 decode failed"); return nullptr; } XSECCryptoKey* ret = fromDEREncoding((const char*)decoded, x, false); #ifdef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE XMLString::release(&decoded); #else XMLString::release((char**)&decoded); #endif return ret; } xmltooling-1.5.3/xmltooling/security/impl/StaticPKIXTrustEngine.cpp000644 001751 001751 00000013103 12003305017 026712 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * PKIXTrustEngine.cpp * * Shibboleth-specific PKIX-validation TrustEngine. */ #include "internal.h" #include "logging.h" #include "XMLToolingConfig.h" #include "security/AbstractPKIXTrustEngine.h" #include "security/CredentialResolver.h" #include "security/X509Credential.h" #include "util/XMLHelper.h" #include using namespace xmlsignature; using namespace xmltooling; using namespace xercesc; using namespace std; namespace xmltooling { static const XMLCh _CredentialResolver[] = UNICODE_LITERAL_18(C,r,e,d,e,n,t,i,a,l,R,e,s,o,l,v,e,r); static const XMLCh type[] = UNICODE_LITERAL_4(t,y,p,e); static const XMLCh certificate[] = UNICODE_LITERAL_11(c,e,r,t,i,f,i,c,a,t,e); static const XMLCh Certificate[] = UNICODE_LITERAL_11(C,e,r,t,i,f,i,c,a,t,e); static const XMLCh Path[] = UNICODE_LITERAL_4(P,a,t,h); static const XMLCh verifyDepth[] = UNICODE_LITERAL_11(v,e,r,i,f,y,D,e,p,t,h); class XMLTOOL_DLLLOCAL StaticPKIXTrustEngine : public AbstractPKIXTrustEngine { public: StaticPKIXTrustEngine(const DOMElement* e=nullptr); virtual ~StaticPKIXTrustEngine() {} AbstractPKIXTrustEngine::PKIXValidationInfoIterator* getPKIXValidationInfoIterator( const CredentialResolver& pkixSource, CredentialCriteria* criteria=nullptr ) const; const KeyInfoResolver* getKeyInfoResolver() const { return m_keyInfoResolver ? m_keyInfoResolver : XMLToolingConfig::getConfig().getKeyInfoResolver(); } private: int m_depth; auto_ptr m_credResolver; friend class XMLTOOL_DLLLOCAL StaticPKIXIterator; }; TrustEngine* XMLTOOL_DLLLOCAL StaticPKIXTrustEngineFactory(const DOMElement* const & e) { return new StaticPKIXTrustEngine(e); } class XMLTOOL_DLLLOCAL StaticPKIXIterator : public AbstractPKIXTrustEngine::PKIXValidationInfoIterator { public: StaticPKIXIterator(const StaticPKIXTrustEngine& engine) : m_engine(engine), m_done(false) { // Merge together all X509Credentials we can resolve. m_engine.m_credResolver->lock(); try { vector creds; m_engine.m_credResolver->resolve(creds); for (vector::const_iterator i = creds.begin(); i != creds.end(); ++i) { const X509Credential* xcred = dynamic_cast(*i); if (xcred) { m_certs.insert(m_certs.end(), xcred->getEntityCertificateChain().begin(), xcred->getEntityCertificateChain().end()); m_crls.insert(m_crls.end(), xcred->getCRLs().begin(), xcred->getCRLs().end()); } } } catch (exception& ex) { logging::Category::getInstance(XMLTOOLING_LOGCAT".TrustEngine.StaticPKIX").error(ex.what()); } } virtual ~StaticPKIXIterator() { m_engine.m_credResolver->unlock(); } bool next() { if (m_done) return false; m_done = true; return true; } int getVerificationDepth() const { return m_engine.m_depth; } const vector& getTrustAnchors() const { return m_certs; } const vector& getCRLs() const { return m_crls; } private: const StaticPKIXTrustEngine& m_engine; vector m_certs; vector m_crls; bool m_done; }; }; StaticPKIXTrustEngine::StaticPKIXTrustEngine(const DOMElement* e) : AbstractPKIXTrustEngine(e), m_depth(XMLHelper::getAttrInt(e, 1, verifyDepth)) { if (e && e->hasAttributeNS(nullptr, certificate)) { // Simple File resolver config rooted here. m_credResolver.reset(XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(FILESYSTEM_CREDENTIAL_RESOLVER, e)); } else { e = e ? XMLHelper::getFirstChildElement(e, _CredentialResolver) : nullptr; string t = XMLHelper::getAttrString(e, nullptr, type); if (!t.empty()) m_credResolver.reset(XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(t.c_str(), e)); else throw XMLSecurityException("Missing element, or no type attribute found"); } } AbstractPKIXTrustEngine::PKIXValidationInfoIterator* StaticPKIXTrustEngine::getPKIXValidationInfoIterator( const CredentialResolver& pkixSource, CredentialCriteria* criteria ) const { return new StaticPKIXIterator(*this); } xmltooling-1.5.3/xmltooling/security/impl/TrustEngine.cpp000644 001751 001751 00000006054 12003305017 025055 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * TrustEngine.cpp * * Registration of factories for built-in engines. */ #include "internal.h" #include "security/KeyInfoResolver.h" #include "security/SignatureTrustEngine.h" #include "security/OpenSSLTrustEngine.h" #include "util/XMLHelper.h" #include using namespace xmltooling; using namespace std; using xercesc::DOMElement; namespace xmltooling { XMLTOOL_DLLLOCAL PluginManager::Factory ExplicitKeyTrustEngineFactory; XMLTOOL_DLLLOCAL PluginManager::Factory StaticPKIXTrustEngineFactory; XMLTOOL_DLLLOCAL PluginManager::Factory ChainingTrustEngineFactory; }; void XMLTOOL_API xmltooling::registerTrustEngines() { XMLToolingConfig& conf=XMLToolingConfig::getConfig(); conf.TrustEngineManager.registerFactory(EXPLICIT_KEY_TRUSTENGINE, ExplicitKeyTrustEngineFactory); conf.TrustEngineManager.registerFactory(STATIC_PKIX_TRUSTENGINE, StaticPKIXTrustEngineFactory); conf.TrustEngineManager.registerFactory(CHAINING_TRUSTENGINE, ChainingTrustEngineFactory); } static const XMLCh _KeyInfoResolver[] = UNICODE_LITERAL_15(K,e,y,I,n,f,o,R,e,s,o,l,v,e,r); static const XMLCh type[] = UNICODE_LITERAL_4(t,y,p,e); TrustEngine::TrustEngine(const DOMElement* e) : m_keyInfoResolver(nullptr) { DOMElement* child = e ? XMLHelper::getFirstChildElement(e, _KeyInfoResolver) : nullptr; if (child) { string t = XMLHelper::getAttrString(child, nullptr, type); if (!t.empty()) m_keyInfoResolver = XMLToolingConfig::getConfig().KeyInfoResolverManager.newPlugin(t.c_str(), child); else throw UnknownExtensionException(" element found with no type attribute"); } } TrustEngine::~TrustEngine() { delete m_keyInfoResolver; } SignatureTrustEngine::SignatureTrustEngine(const DOMElement* e) : TrustEngine(e) { } SignatureTrustEngine::~SignatureTrustEngine() { } X509TrustEngine::X509TrustEngine(const DOMElement* e) : TrustEngine(e) { } X509TrustEngine::~X509TrustEngine() { } OpenSSLTrustEngine::OpenSSLTrustEngine(const DOMElement* e) : X509TrustEngine(e) { } OpenSSLTrustEngine::~OpenSSLTrustEngine() { } xmltooling-1.5.3/xmltooling/security/impl/XSECCryptoX509CRL.cpp000644 001751 001751 00000004263 12003305017 025500 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * XSECCryptoX509CRL.cpp * * Wrapper for X.509 CRL objects, similar to existing XSEC wrappers. */ #include "internal.h" #include "security/XSECCryptoX509CRL.h" #include #include using namespace xmltooling; XSECCryptoX509CRL::XSECCryptoX509CRL() { } XSECCryptoX509CRL::~XSECCryptoX509CRL() { } void XSECCryptoX509CRL::loadX509CRLPEM(const char* buf, unsigned int len) { const char * b; char * b1 = nullptr; if (len == 0) b = buf; else { XSECnew(b1, char[len+1]); memcpy(b1, buf, len); b1[len] = '\0'; b = b1; } const char *p = strstr(buf, "-----BEGIN X509 CRL-----"); if (p == nullptr) { if (b1 != nullptr) delete[] b1; throw XSECCryptoException(XSECCryptoException::X509Error, "X509CRL::loadX509CRLPEM - Cannot find start of PEM CRL"); } p += strlen("-----BEGIN X509 CRL-----"); while (*p == '\n' || *p == '\r' || *p == '-') p++; safeBuffer output; int i = 0; while (*p != '\0' && *p != '-') { output[i++] = *p; ++p; } if (strstr(p, "-----END X509 CRL-----") != p) { if (b1 != nullptr) delete[] b1; throw XSECCryptoException(XSECCryptoException::X509Error, "X509CRL::loadX509PEMCRL - Cannot find end of PEM certificate"); } if (b1 != nullptr) delete[] b1; output[i] = '\0'; this->loadX509CRLBase64Bin(output.rawCharBuffer(), i); } xmltooling-1.5.3/xmltooling/io/AbstractXMLObjectMarshaller.h000644 001751 001751 00000014070 12003305017 025335 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/io/AbstractXMLObjectMarshaller.h * * A mix-in to implement object marshalling with DOM reuse. */ #ifndef __xmltooling_xmlmarshaller_h__ #define __xmltooling_xmlmarshaller_h__ #include #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif namespace xmltooling { /** * A mix-in to implement object marshalling with DOM reuse. */ class XMLTOOL_API AbstractXMLObjectMarshaller : public virtual AbstractXMLObject { public: virtual ~AbstractXMLObjectMarshaller(); xercesc::DOMElement* marshall( xercesc::DOMDocument* document=nullptr #ifndef XMLTOOLING_NO_XMLSEC ,const std::vector* sigs=nullptr ,const Credential* credential=nullptr #endif ) const; xercesc::DOMElement* marshall( xercesc::DOMElement* parentElement #ifndef XMLTOOLING_NO_XMLSEC ,const std::vector* sigs=nullptr ,const Credential* credential=nullptr #endif ) const; protected: AbstractXMLObjectMarshaller(); /** * Sets the given element as the Document Element of the given Document. * If the document already has a Document Element it is replaced by the given element. * * @param document the document * @param element the Element that will serve as the Document Element */ void setDocumentElement(xercesc::DOMDocument* document, xercesc::DOMElement* element) const; #ifndef XMLTOOLING_NO_XMLSEC /** * Marshalls the XMLObject into the given DOM Element. * The DOM Element must be within a DOM tree rooted in the owning Document. * * @param targetElement the Element into which the XMLObject is marshalled into * @param sigs optional array of signatures to create after marshalling * @param credential optional credential to supply signing key and related info * * @throws MarshallingException thrown if there is a problem marshalling the object * @throws SignatureException thrown if a problem occurs during signature creation */ void marshallInto( xercesc::DOMElement* targetElement, const std::vector* sigs, const Credential* credential=nullptr ) const; #else /** * Marshalls the XMLObject into the given DOM Element. * The DOM Element must be within a DOM tree rooted in the owning Document. * * @param targetElement the Element into which the XMLObject is marshalled into * * @throws MarshallingException thrown if there is a problem marshalling the object */ void marshallInto(xercesc::DOMElement* targetElement) const; #endif /** * Creates an xsi:type attribute, corresponding to the given type of the XMLObject, on the DOM element. * * @param domElement the DOM element * * @throws MarshallingException thrown if the type on the XMLObject is doesn't contain * a local name, prefix, and namespace URI */ void marshallElementType(xercesc::DOMElement* domElement) const; /** * Creates the xmlns attributes for any namespaces set on the XMLObject. * * @param domElement the DOM element the namespaces will be added to */ void marshallNamespaces(xercesc::DOMElement* domElement) const; #ifndef XMLTOOLING_NO_XMLSEC /** * Marshalls the text content and/or child elements of the XMLObject. * * @param domElement the DOM element that will recieved the marshalled children * @param credential optional credential to supply signing key and related info * * @throws MarshallingException thrown if there is a problem marshalling a child element */ void marshallContent(xercesc::DOMElement* domElement, const Credential* credential) const; #else /** * Marshalls the text content and/or child elements of the XMLObject. * * @param domElement the DOM element that will recieved the marshalled children * * @throws MarshallingException thrown if there is a problem marshalling a child element */ void marshallContent(xercesc::DOMElement* domElement) const; #endif /** * Marshalls the attributes from the XMLObject into the given DOM element. * * @param domElement the DOM Element into which attributes will be marshalled * * @throws MarshallingException thrown if there is a problem marshalling an attribute */ virtual void marshallAttributes(xercesc::DOMElement* domElement) const; /** * Called before marshalling in the event that a new DOM is being generated. *

Allows objects to adjust internal state prior to the marshalling step. */ virtual void prepareForMarshalling() const; }; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif #endif /* __xmltooling_xmlmarshaller_h__ */ xmltooling-1.5.3/xmltooling/io/AbstractXMLObjectUnmarshaller.h000644 001751 001751 00000007336 12003305017 025707 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/io/AbstractXMLObjectUnmarshaller.h * * A mix-in to implement object unmarshalling. */ #ifndef __xmltooling_xmlunmarshaller_h__ #define __xmltooling_xmlunmarshaller_h__ #include #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif namespace xmltooling { /** * A mix-in to implement object unmarshalling. */ class XMLTOOL_API AbstractXMLObjectUnmarshaller : public virtual AbstractXMLObject { public: virtual ~AbstractXMLObjectUnmarshaller(); XMLObject* unmarshall(xercesc::DOMElement* element, bool bindDocument=false); protected: AbstractXMLObjectUnmarshaller(); /** * Unmarshalls the attributes from the given DOM Element into the XMLObject. If the attribute * is an XML namespace declaration the namespace is added via XMLObject::addNamespace(). * If it is a schema type (xsi:type) the schema type is added via XMLObject::setSchemaType(). * All other attributes are passed to the processAttribute hook. * * @param domElement the DOM Element whose attributes will be unmarshalled * * @throws UnmarshallingException thrown if there is a problem unmarshalling an attribute */ virtual void unmarshallAttributes(const xercesc::DOMElement* domElement); /** * Unmarshalls a given Element's child nodes. The resulting XMLObject children and content * are passed to processChildElement() or processText() for further processing. * * @param domElement the DOM Element whose children will be unmarshalled * * @throws UnmarshallingException thrown if an error occurs unmarshalling the child elements */ virtual void unmarshallContent(const xercesc::DOMElement* domElement); /** * Called after a child element has been unmarshalled so that it can be added to the parent XMLObject. * * @param child pointer to the child XMLObject * @param childRoot root element of the child (must not be stored, just a hint) * * @throws UnmarshallingException thrown if there is a problem adding the child to the parent */ virtual void processChildElement(XMLObject* child, const xercesc::DOMElement* childRoot); /** * Called after an attribute has been unmarshalled so that it can be added to the XMLObject. * * @param attribute the attribute being unmarshalled * * @throws UnmarshallingException thrown if there is a problem adding the attribute to the XMLObject */ virtual void processAttribute(const xercesc::DOMAttr* attribute); }; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif #endif /* __xmltooling_xmlunmarshaller_h__ */ xmltooling-1.5.3/xmltooling/io/GenericRequest.h000644 001751 001751 00000017202 12003305017 022774 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/io/GenericRequest.h * * Interface to generic protocol requests that transport XML messages. */ #ifndef __xmltooling_genreq_h__ #define __xmltooling_genreq_h__ #include #include #include #include #ifndef XMLTOOLING_NO_XMLSEC # include #endif namespace xmltooling { #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4251 ) #endif /** * Interface to generic protocol requests that transport XML messages. * *

This interface need not be threadsafe. */ class XMLTOOL_API GenericRequest { MAKE_NONCOPYABLE(GenericRequest); protected: GenericRequest(); public: virtual ~GenericRequest(); /** * Returns the URL scheme of the request (http, https, ftp, ldap, etc.) * * @return the URL scheme */ virtual const char* getScheme() const=0; /** * Returns true iff the request is over a confidential channel. * * @return confidential channel indicator */ virtual bool isSecure() const=0; /** * Returns hostname of service that received request. * * @return hostname of service */ virtual const char* getHostname() const=0; /** * Returns incoming port. * * @return incoming port */ virtual int getPort() const=0; /** * Returns true iff the request port is the default port for the request protocol. * * @return default port indicator */ virtual bool isDefaultPort() const; /** * Returns the MIME type of the request, if known. * * @return the MIME type, or an empty string */ virtual std::string getContentType() const=0; /** * Returns the length of the request body, if known. * * @return the content length, or -1 if unknown */ virtual long getContentLength() const=0; /** * Returns the raw request body. * * @return the request body, or nullptr */ virtual const char* getRequestBody() const=0; /** * Returns a decoded named parameter value from the request. * If a parameter has multiple values, only one will be returned. * * @param name the name of the parameter to return * @return a single parameter value or nullptr */ virtual const char* getParameter(const char* name) const=0; /** * Returns all of the decoded values of a named parameter from the request. * All values found will be returned. * * @param name the name of the parameter to return * @param values a vector in which to return pointers to the decoded values * @return the number of values returned */ virtual std::vector::size_type getParameters( const char* name, std::vector& values ) const=0; /** * Returns the transport-authenticated identity associated with the request, * if authentication is solely handled by the transport. * * @return the authenticated username or an empty string */ virtual std::string getRemoteUser() const=0; /** * Gets the authentication type associated with the request. * * @return the authentication type or nullptr */ virtual std::string getAuthType() const { return ""; } /** * Returns the IP address of the client. * * @return the client's IP address */ virtual std::string getRemoteAddr() const=0; /** * Returns the chain of certificates sent by the client. * They are not guaranteed to be valid according to any particular definition. * * @return the client's certificate chain */ virtual const #ifndef XMLTOOLING_NO_XMLSEC std::vector& #else std::vector& #endif getClientCertificates() const=0; /** * Converts a relative URL into an absolute one based on the properties of the request. * * @param url input URL to convert, will be modified in place */ virtual void absolutize(std::string& url) const; /** * Returns a language range to use in selecting language-specific * content for this request. *

The syntax is that of the HTTP 1.1 Accept-Language header, even * if the underlying request is not HTTP. * * @return an HTTP 1.1 syntax language range specifier */ virtual std::string getLanguageRange() const { return ""; } /** * Initializes the language matching process; call this method to begin the * matching process by calling the matchLang method. *

The language matching process is not thread-safe and must be externally * syncronized. * * @return true iff language matching is possible */ bool startLangMatching() const; /** * Continues the language matching process; additional calls to matchLang can * be done as long as this method returns true. *

The language matching process is not thread-safe and must be externally * syncronized. * * @return true iff more ranges are available to match against */ bool continueLangMatching() const; /** * Matches a language tag against the currently active range. *

The language matching process is not thread-safe and must be externally * syncronized. * * @param tag a language tag (e.g., an xml:lang value) * @return true iff the tag matches the active range */ bool matchLang(const XMLCh* tag) const; /** * Establish default handling of language ranges. * * @param langFromClient honor client's language preferences if any * @param defaultRange priority list of space-delimited language tags to use by default */ static void setLangDefaults(bool langFromClient, const XMLCh* defaultRange); private: typedef std::multimap< float,std::vector > langrange_t; mutable langrange_t m_langRange; mutable langrange_t::const_reverse_iterator m_langRangeIter; static langrange_t m_defaultRange; static bool m_langFromClient; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif }; #endif /* __xmltooling_genreq_h__ */ xmltooling-1.5.3/xmltooling/io/GenericResponse.h000644 001751 001751 00000005403 12003305017 023142 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/io/GenericResponse.h * * Interface to generic protocol responses that transport XML messages. */ #ifndef __xmltooling_genres_h__ #define __xmltooling_genres_h__ #include #include namespace xmltooling { /** * Interface to generic protocol responses that transport XML messages. * *

This interface need not be threadsafe. */ class XMLTOOL_API GenericResponse { MAKE_NONCOPYABLE(GenericResponse); protected: GenericResponse(); public: virtual ~GenericResponse(); /** * Sets or clears the MIME type of the response. * * @param type the MIME type, or nullptr to clear */ virtual void setContentType(const char* type=nullptr)=0; /** * Sends a completed response to the client along with a * transport-specific "OK" indication. Used for "normal" responses. * * @param inputStream reference to source of response data * @return a result code to return from the calling MessageEncoder */ virtual long sendResponse(std::istream& inputStream)=0; /** * Sends an "error" response to the client along with a * transport-specific error indication. * * @param inputStream reference to source of response data * @return a result code to return from the calling MessageEncoder */ virtual long sendError(std::istream& inputStream)=0; /** * Sends a completed response to the client. * * @param inputStream reference to source of response data * @param status transport-specific status to return * @return a result code to return from the calling MessageEncoder */ virtual long sendResponse(std::istream& inputStream, long status)=0; }; }; #endif /* __xmltooling_genres_h__ */ xmltooling-1.5.3/xmltooling/io/HTTPRequest.h000644 001751 001751 00000006716 12003305017 022207 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/io/HTTPRequest.h * * Interface to HTTP requests. */ #ifndef __xmltooling_httpreq_h__ #define __xmltooling_httpreq_h__ #include namespace xmltooling { #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4251 ) #endif /** * Interface to HTTP requests. * *

To supply information from the surrounding web server environment, * a shim must be supplied in the form of this interface to adapt the * library to different proprietary server APIs. * *

This interface need not be threadsafe. */ class XMLTOOL_API HTTPRequest : public GenericRequest { protected: HTTPRequest(); public: virtual ~HTTPRequest(); bool isSecure() const; bool isDefaultPort() const; std::string getLanguageRange() const; /** * Returns the HTTP method of the request (GET, POST, etc.) * * @return the HTTP method */ virtual const char* getMethod() const=0; /** * Returns the request URI. * * @return the request URI */ virtual const char* getRequestURI() const=0; /** * Returns the complete request URL, including scheme, host, port, and URI. * * @return the request URL */ virtual const char* getRequestURL() const=0; /** * Returns the HTTP query string appened to the request. The query * string is returned without any decoding applied, everything found * after the ? delimiter. * * @return the query string */ virtual const char* getQueryString() const=0; /** * Returns a request header value. * * @param name the name of the header to return * @return the header's value, or an empty string */ virtual std::string getHeader(const char* name) const=0; /** * Get a cookie value supplied by the client. * * @param name name of cookie * @return cookie value or nullptr */ virtual const char* getCookie(const char* name) const; /** * Gets all the cookies supplied by the client. * * @return a map of cookie name/value pairs */ virtual const std::map& getCookies() const; private: mutable std::map m_cookieMap; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif }; #endif /* __xmltooling_httpreq_h__ */ xmltooling-1.5.3/xmltooling/io/HTTPResponse.h000644 001751 001751 00000007736 12003305017 022360 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/io/HTTPResponse.h * * Interface to HTTP responses. */ #ifndef __xmltooling_httpres_h__ #define __xmltooling_httpres_h__ #include #include #include namespace xmltooling { #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4251 ) #endif /** * Interface to HTTP response. * *

To supply information to the surrounding web server environment, * a shim must be supplied in the form of this interface to adapt the * library to different proprietary server APIs. * *

This interface need not be threadsafe. */ class XMLTOOL_API HTTPResponse : public GenericResponse { protected: HTTPResponse(); public: virtual ~HTTPResponse(); void setContentType(const char* type); /** * Sets or clears a response header. * * @param name header name * @param value value to set, or nullptr to clear */ virtual void setResponseHeader(const char* name, const char* value); /** * Sets a client cookie. * * @param name cookie name * @param value value to set, or nullptr to clear */ virtual void setCookie(const char* name, const char* value); /** * Redirect the client to the specified URL and complete the response. * *

Any headers previously set will be sent ahead of the redirect. * *

The URL will be validated with the sanitizeURL method below. * * @param url location to redirect client * @return a result code to return from the calling MessageEncoder */ virtual long sendRedirect(const char* url); /** Some common HTTP status codes. */ enum status_t { XMLTOOLING_HTTP_STATUS_OK = 200, XMLTOOLING_HTTP_STATUS_MOVED = 302, XMLTOOLING_HTTP_STATUS_NOTMODIFIED = 304, XMLTOOLING_HTTP_STATUS_UNAUTHORIZED = 401, XMLTOOLING_HTTP_STATUS_FORBIDDEN = 403, XMLTOOLING_HTTP_STATUS_NOTFOUND = 404, XMLTOOLING_HTTP_STATUS_ERROR = 500 }; long sendError(std::istream& inputStream); using GenericResponse::sendResponse; long sendResponse(std::istream& inputStream); /** * Returns a modifiable array of schemes to permit in sanitized URLs. * *

Updates to this array must be externally synchronized with any use * of this class or its subclasses. * * @return a mutable array of strings containing the schemes to permit */ static std::vector& getAllowedSchemes(); /** * Manually check for unsafe URLs vulnerable to injection attacks. * * @param url location to check */ static void sanitizeURL(const char* url); private: static std::vector m_allowedSchemes; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif }; #endif /* __xmltooling_httpres_h__ */ xmltooling-1.5.3/xmltooling/io/AbstractXMLObjectMarshaller.cpp000644 001751 001751 00000035162 12003305017 025675 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * AbstractXMLObjectMarshaller.cpp * * A thread-safe abstract marshaller. */ #include "internal.h" #include "exceptions.h" #include "io/AbstractXMLObjectMarshaller.h" #ifndef XMLTOOLING_NO_XMLSEC #include "security/Credential.h" #include "signature/Signature.h" #endif #include "util/NDC.h" #include "util/XMLConstants.h" #include "util/XMLHelper.h" #include #include #include #ifndef XMLTOOLING_NO_XMLSEC using namespace xmlsignature; #endif using namespace xmlconstants; using namespace xmltooling; using namespace xercesc; using namespace std; AbstractXMLObjectMarshaller::AbstractXMLObjectMarshaller() { } AbstractXMLObjectMarshaller::~AbstractXMLObjectMarshaller() { } void AbstractXMLObjectMarshaller::setDocumentElement(DOMDocument* document, DOMElement* element) const { DOMElement* documentRoot = document->getDocumentElement(); if (documentRoot) document->replaceChild(element, documentRoot); else document->appendChild(element); } DOMElement* AbstractXMLObjectMarshaller::marshall( DOMDocument* document #ifndef XMLTOOLING_NO_XMLSEC ,const vector* sigs ,const Credential* credential #endif ) const { #ifdef _DEBUG xmltooling::NDC ndc("marshall"); #endif if (m_log.isDebugEnabled()) { m_log.debug("starting to marshal %s", getElementQName().toString().c_str()); } DOMElement* cachedDOM=getDOM(); if (cachedDOM) { if (!document || document==cachedDOM->getOwnerDocument()) { m_log.debug("XMLObject has a usable cached DOM, reusing it"); if (document) setDocumentElement(cachedDOM->getOwnerDocument(),cachedDOM); releaseParentDOM(true); return cachedDOM; } // We have a DOM but it doesn't match the document we were given. This both sucks and blows. // Without an adoptNode option to maintain the child pointers, we have to either import the // DOM while somehow reassigning all the nested references (which amounts to a complete // *unmarshall* operation), or we just release the existing DOM and hope that we can get // it back. This depends on all objects being able to preserve their DOM at all costs. releaseChildrenDOM(true); releaseDOM(); } // If we get here, we didn't have a usable DOM (and/or we released the one we had). prepareForMarshalling(); // We may need to create our own document. bool bindDocument=false; if (!document) { document=DOMImplementationRegistry::getDOMImplementation(nullptr)->createDocument(); bindDocument=true; } XercesJanitor janitor(bindDocument ? document : nullptr); m_log.debug("creating root element to marshall"); DOMElement* domElement = document->createElementNS( getElementQName().getNamespaceURI(), getElementQName().getLocalPart() ); setDocumentElement(document, domElement); #ifndef XMLTOOLING_NO_XMLSEC marshallInto(domElement, sigs, credential); #else marshallInto(domElement); #endif //Recache the DOM. m_log.debug("caching DOM for XMLObject (document is %sbound)", bindDocument ? "" : "not "); setDOM(domElement, bindDocument); janitor.release(); // safely transferred releaseParentDOM(true); return domElement; } DOMElement* AbstractXMLObjectMarshaller::marshall( DOMElement* parentElement #ifndef XMLTOOLING_NO_XMLSEC ,const vector* sigs ,const Credential* credential #endif ) const { #ifdef _DEBUG xmltooling::NDC ndc("marshall"); #endif if (m_log.isDebugEnabled()) { m_log.debug("starting to marshalling %s", getElementQName().toString().c_str()); } DOMElement* cachedDOM=getDOM(); if (cachedDOM) { if (parentElement->getOwnerDocument()==cachedDOM->getOwnerDocument()) { m_log.debug("XMLObject has a usable cached DOM, reusing it"); if (parentElement!=cachedDOM->getParentNode()) { parentElement->appendChild(cachedDOM); releaseParentDOM(true); } return cachedDOM; } // We have a DOM but it doesn't match the document we were given. This both sucks and blows. // Without an adoptNode option to maintain the child pointers, we have to either import the // DOM while somehow reassigning all the nested references (which amounts to a complete // *unmarshall* operation), or we just release the existing DOM and hope that we can get // it back. This depends on all objects being able to preserve their DOM at all costs. releaseChildrenDOM(true); releaseDOM(); } // If we get here, we didn't have a usable DOM (and/or we released the one we had). prepareForMarshalling(); m_log.debug("creating root element to marshall"); DOMElement* domElement = parentElement->getOwnerDocument()->createElementNS( getElementQName().getNamespaceURI(), getElementQName().getLocalPart() ); parentElement->appendChild(domElement); #ifndef XMLTOOLING_NO_XMLSEC marshallInto(domElement, sigs, credential); #else marshallInto(domElement); #endif //Recache the DOM. m_log.debug("caching DOM for XMLObject"); setDOM(domElement, false); releaseParentDOM(true); return domElement; } void AbstractXMLObjectMarshaller::marshallInto( DOMElement* targetElement #ifndef XMLTOOLING_NO_XMLSEC ,const vector* sigs ,const Credential* credential #endif ) const { if (getElementQName().hasPrefix()) targetElement->setPrefix(getElementQName().getPrefix()); if (m_schemaLocation || m_noNamespaceSchemaLocation) { static const XMLCh schemaLocation[] = { chLatin_x, chLatin_s, chLatin_i, chColon, chLatin_s, chLatin_c, chLatin_h, chLatin_e, chLatin_m, chLatin_a, chLatin_L, chLatin_o, chLatin_c, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull }; static const XMLCh noNamespaceSchemaLocation[] = { chLatin_x, chLatin_s, chLatin_i, chColon, chLatin_n, chLatin_o, chLatin_N, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chLatin_p, chLatin_a, chLatin_c, chLatin_e, chLatin_S, chLatin_c, chLatin_h, chLatin_e, chLatin_m, chLatin_a, chLatin_L, chLatin_o, chLatin_c, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull }; if (targetElement->getParentNode()==nullptr || targetElement->getParentNode()->getNodeType()==DOMNode::DOCUMENT_NODE) { if (m_schemaLocation) targetElement->setAttributeNS(XSI_NS,schemaLocation,m_schemaLocation); if (m_noNamespaceSchemaLocation) targetElement->setAttributeNS(XSI_NS,noNamespaceSchemaLocation,m_noNamespaceSchemaLocation); } } static const XMLCh _nil[] = { chLatin_x, chLatin_s, chLatin_i, chColon, chLatin_n, chLatin_i, chLatin_l, chNull }; if (m_nil != xmlconstants::XML_BOOL_NULL) { switch (m_nil) { case xmlconstants::XML_BOOL_TRUE: targetElement->setAttributeNS(XSI_NS, _nil, xmlconstants::XML_TRUE); break; case xmlconstants::XML_BOOL_ONE: targetElement->setAttributeNS(XSI_NS, _nil, xmlconstants::XML_ONE); break; case xmlconstants::XML_BOOL_FALSE: targetElement->setAttributeNS(XSI_NS, _nil, xmlconstants::XML_FALSE); break; case xmlconstants::XML_BOOL_ZERO: targetElement->setAttributeNS(XSI_NS, _nil, xmlconstants::XML_ZERO); break; } m_log.debug("adding XSI namespace to list of namespaces visibly used by XMLObject"); addNamespace(Namespace(XSI_NS, XSI_PREFIX, false, Namespace::VisiblyUsed)); } marshallElementType(targetElement); marshallNamespaces(targetElement); marshallAttributes(targetElement); #ifndef XMLTOOLING_NO_XMLSEC marshallContent(targetElement,credential); if (sigs) { for_each(sigs->begin(),sigs->end(),bind2nd(mem_fun1_t(&Signature::sign),credential)); } #else marshallContent(targetElement); #endif } void AbstractXMLObjectMarshaller::marshallElementType(DOMElement* domElement) const { const QName* type = getSchemaType(); if (type) { m_log.debug("setting xsi:type attribute for XMLObject"); const XMLCh* typeLocalName = type->getLocalPart(); if (!typeLocalName || !*typeLocalName) { throw MarshallingException("Schema type of XMLObject may not have an empty local name."); } static const XMLCh xsitype[] = { chLatin_x, chLatin_s, chLatin_i, chColon, chLatin_t, chLatin_y, chLatin_p, chLatin_e, chNull }; XMLCh* xsivalue=const_cast(typeLocalName); const XMLCh* prefix=type->getPrefix(); if (prefix && *prefix) { xsivalue=new XMLCh[XMLString::stringLen(typeLocalName) + XMLString::stringLen(prefix) + 2*sizeof(XMLCh)]; *xsivalue=chNull; XMLString::catString(xsivalue,prefix); static const XMLCh colon[] = {chColon, chNull}; XMLString::catString(xsivalue,colon); XMLString::catString(xsivalue,typeLocalName); } domElement->setAttributeNS(XSI_NS, xsitype, xsivalue); if (xsivalue != typeLocalName) delete[] xsivalue; m_log.debug("adding XSI namespace to list of namespaces visibly used by XMLObject"); addNamespace(Namespace(XSI_NS, XSI_PREFIX, false, Namespace::VisiblyUsed)); } } class _addns : public binary_function { public: void operator()(DOMElement* domElement, const Namespace& ns) const { const XMLCh* prefix=ns.getNamespacePrefix(); const XMLCh* uri=ns.getNamespaceURI(); // Check for xmlns:xml. if (XMLString::equals(prefix, XML_PREFIX) && XMLString::equals(uri, XML_NS)) return; // Check to see if the prefix is already declared properly above this node. if (!ns.alwaysDeclare()) { const XMLCh* declared=lookupNamespaceURI(domElement->getParentNode(),prefix); if (declared && XMLString::equals(declared,uri)) return; } if (prefix && *prefix) { XMLCh* xmlns=new XMLCh[XMLString::stringLen(XMLNS_PREFIX) + XMLString::stringLen(prefix) + 2*sizeof(XMLCh)]; *xmlns=chNull; XMLString::catString(xmlns,XMLNS_PREFIX); static const XMLCh colon[] = {chColon, chNull}; XMLString::catString(xmlns,colon); XMLString::catString(xmlns,prefix); domElement->setAttributeNS(XMLNS_NS, xmlns, uri); delete[] xmlns; } else { domElement->setAttributeNS(XMLNS_NS, XMLNS_PREFIX, uri); } } const XMLCh* lookupNamespaceURI(const DOMNode* n, const XMLCh* prefix) const { // Return nullptr if no declaration in effect. The empty string signifies the null namespace. if (!n || n->getNodeType()!=DOMNode::ELEMENT_NODE) { // At the root, the default namespace is set to the null namespace. if (!prefix || !*prefix) return &chNull; return nullptr; // we're done } DOMNamedNodeMap* attributes = static_cast(n)->getAttributes(); if (!attributes) return lookupNamespaceURI(n->getParentNode(),prefix); // defer to parent DOMNode* childNode; DOMAttr* attribute; for (XMLSize_t i=0; igetLength(); i++) { childNode = attributes->item(i); if (childNode->getNodeType() != DOMNode::ATTRIBUTE_NODE) // not an attribute? continue; attribute = static_cast(childNode); if (!XMLString::equals(attribute->getNamespaceURI(),XMLNS_NS)) continue; // not a namespace declaration // Local name should be the prefix and the value would be the URI, except for the default namespace. if ((!prefix || !*prefix) && XMLString::equals(attribute->getLocalName(),XMLNS_PREFIX)) return attribute->getNodeValue(); else if (XMLString::equals(prefix,attribute->getLocalName())) return attribute->getNodeValue(); } // Defer to parent. return lookupNamespaceURI(n->getParentNode(),prefix); } }; void AbstractXMLObjectMarshaller::marshallNamespaces(DOMElement* domElement) const { m_log.debug("marshalling namespace attributes for XMLObject"); const set& namespaces = getNamespaces(); for_each(namespaces.begin(),namespaces.end(),bind1st(_addns(),domElement)); } void AbstractXMLObjectMarshaller::marshallContent( DOMElement* domElement #ifndef XMLTOOLING_NO_XMLSEC ,const Credential* credential #endif ) const { m_log.debug("marshalling text and child elements for XMLObject"); unsigned int pos=0; const XMLCh* val = getTextContent(pos); if (val && *val) domElement->appendChild(domElement->getOwnerDocument()->createTextNode(val)); const list& children=getOrderedChildren(); for (list::const_iterator i=children.begin(); i!=children.end(); ++i) { if (*i) { #ifndef XMLTOOLING_NO_XMLSEC (*i)->marshall(domElement,nullptr,credential); #else (*i)->marshall(domElement); #endif val = getTextContent(++pos); if (val && *val) domElement->appendChild(domElement->getOwnerDocument()->createTextNode(val)); } } } void AbstractXMLObjectMarshaller::marshallAttributes(DOMElement* domElement) const { } void AbstractXMLObjectMarshaller::prepareForMarshalling() const { } xmltooling-1.5.3/xmltooling/io/AbstractXMLObjectUnmarshaller.cpp000644 001751 001751 00000021526 12003305017 026237 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * AbstractXMLObjectUnmarshaller.cpp * * A thread-safe abstract unmarshaller. */ #include "internal.h" #include "exceptions.h" #include "XMLObjectBuilder.h" #include "io/AbstractXMLObjectUnmarshaller.h" #include "util/NDC.h" #include "util/XMLConstants.h" #include "util/XMLHelper.h" #include using namespace xmlconstants; using namespace xmltooling; using namespace xercesc; using namespace std; AbstractXMLObjectUnmarshaller::AbstractXMLObjectUnmarshaller() { } AbstractXMLObjectUnmarshaller::~AbstractXMLObjectUnmarshaller() { } XMLObject* AbstractXMLObjectUnmarshaller::unmarshall(DOMElement* element, bool bindDocument) { #ifdef _DEBUG xmltooling::NDC ndc("unmarshall"); #endif if (getDOM() || hasParent()) throw UnmarshallingException("Object already contains data, it cannot be unmarshalled at this stage."); if (!XMLString::equals(element->getNamespaceURI(),getElementQName().getNamespaceURI()) || !XMLString::equals(element->getLocalName(),getElementQName().getLocalPart())) { throw UnmarshallingException("Unrecognized element supplied to implementation for unmarshalling."); } if (m_log.isDebugEnabled()) { auto_ptr_char dname(element->getNodeName()); m_log.debug("unmarshalling DOM element (%s)", dname.get()); } if (element->hasAttributes()) { unmarshallAttributes(element); } unmarshallContent(element); setDOM(element,bindDocument); return this; } void AbstractXMLObjectUnmarshaller::unmarshallAttributes(const DOMElement* domElement) { #ifdef _DEBUG xmltooling::NDC ndc("unmarshallAttributes"); #endif if (m_log.isDebugEnabled()) { auto_ptr_char dname(domElement->getNodeName()); m_log.debug("unmarshalling attributes for DOM element (%s)", dname.get()); } DOMNamedNodeMap* attributes = domElement->getAttributes(); if (!attributes) { m_log.debug("no attributes to unmarshall"); return; } DOMNode* childNode; DOMAttr* attribute; for (XMLSize_t i=0; igetLength(); i++) { childNode = attributes->item(i); // The child node should always be an attribute, but just in case if (childNode->getNodeType() != DOMNode::ATTRIBUTE_NODE) { m_log.debug("encountered child node of type %d in attribute list, ignoring it", childNode->getNodeType()); continue; } attribute = static_cast(childNode); const XMLCh* nsuri=attribute->getNamespaceURI(); if (XMLString::equals(nsuri,XMLNS_NS)) { if (XMLString::equals(attribute->getLocalName(),XMLNS_PREFIX)) { m_log.debug("found default namespace declaration, adding it to the list of namespaces on the XMLObject"); addNamespace(Namespace(attribute->getValue(), nullptr, true)); } else if (XMLString::equals(attribute->getLocalName(),XML_PREFIX) && XMLString::equals(attribute->getNodeValue(),XML_NS)) { m_log.debug("found standard xml prefix declaration, ignoring as superfluous"); } else { m_log.debug("found namespace declaration, adding it to the list of namespaces on the XMLObject"); addNamespace(Namespace(attribute->getValue(), attribute->getLocalName(), true)); } continue; } else if (XMLString::equals(nsuri,XSI_NS)) { static const XMLCh type[]= UNICODE_LITERAL_4(t,y,p,e); static const XMLCh schemaLocation[]= UNICODE_LITERAL_14(s,c,h,e,m,a,L,o,c,a,t,i,o,n); static const XMLCh noNamespaceSchemaLocation[]= UNICODE_LITERAL_25(n,o,N,a,m,e,s,p,a,c,e,S,c,h,e,m,a,L,o,c,a,t,i,o,n); static const XMLCh _nil[]= UNICODE_LITERAL_3(n,i,l); if (XMLString::equals(attribute->getLocalName(),type)) { m_log.debug("skipping xsi:type declaration"); continue; } else if (XMLString::equals(attribute->getLocalName(),schemaLocation)) { m_log.debug("storing off xsi:schemaLocation attribute"); if (m_schemaLocation) XMLString::release(&m_schemaLocation); m_schemaLocation=XMLString::replicate(attribute->getValue()); continue; } else if (XMLString::equals(attribute->getLocalName(),noNamespaceSchemaLocation)) { m_log.debug("storing off xsi:noNamespaceSchemaLocation attribute"); if (m_noNamespaceSchemaLocation) XMLString::release(&m_noNamespaceSchemaLocation); m_schemaLocation=XMLString::replicate(attribute->getValue()); m_noNamespaceSchemaLocation=XMLString::replicate(attribute->getValue()); continue; } else if (XMLString::equals(attribute->getLocalName(), _nil)) { m_log.debug("processing xsi:nil attribute"); setNil(attribute->getValue()); continue; } // Note that the prefix is visibly used. addNamespace(Namespace(nsuri, attribute->getPrefix(), false, Namespace::VisiblyUsed)); } else if (nsuri && !XMLString::equals(nsuri,XML_NS)) { m_log.debug("found namespace-qualified attribute, adding prefix to the list of visible namespaces on the XMLObject"); addNamespace(Namespace(nsuri, attribute->getPrefix(), false, Namespace::VisiblyUsed)); } m_log.debug("processing generic attribute"); processAttribute(attribute); } } void AbstractXMLObjectUnmarshaller::unmarshallContent(const DOMElement* domElement) { #ifdef _DEBUG xmltooling::NDC ndc("unmarshallContent"); #endif if (m_log.isDebugEnabled()) { auto_ptr_char dname(domElement->getNodeName()); m_log.debug("unmarshalling child nodes of DOM element (%s)", dname.get()); } DOMNode* childNode = domElement->getFirstChild(); if (!childNode) { m_log.debug("element had no children"); return; } unsigned int position = 0; while (childNode) { if (childNode->getNodeType() == DOMNode::ELEMENT_NODE) { const XMLObjectBuilder* builder = XMLObjectBuilder::getBuilder(static_cast(childNode)); if (!builder) { auto_ptr cname(XMLHelper::getNodeQName(childNode)); m_log.error("no default builder installed, found unknown child element (%s)", cname->toString().c_str()); throw UnmarshallingException("Unmarshaller found unknown child element, but no default builder was found."); } if (m_log.isDebugEnabled()) { auto_ptr cname(XMLHelper::getNodeQName(childNode)); m_log.debug("unmarshalling child element (%s)", cname->toString().c_str()); } // Retain ownership of the unmarshalled child until it's processed by the parent. auto_ptr childObject(builder->buildFromElement(static_cast(childNode))); processChildElement(childObject.get(), static_cast(childNode)); childObject.release(); // Advance the text node position marker. ++position; } else if (childNode->getNodeType() == DOMNode::TEXT_NODE || childNode->getNodeType() == DOMNode::CDATA_SECTION_NODE) { m_log.debug("processing text content at position (%d)", position); setTextContent(childNode->getNodeValue(), position); } childNode = childNode->getNextSibling(); } } void AbstractXMLObjectUnmarshaller::processChildElement(XMLObject* child, const DOMElement* childRoot) { throw UnmarshallingException("Invalid child element: $1",params(1,child->getElementQName().toString().c_str())); } void AbstractXMLObjectUnmarshaller::processAttribute(const DOMAttr* attribute) { auto_ptr q(XMLHelper::getNodeQName(attribute)); throw UnmarshallingException("Invalid attribute: $1",params(1,q->toString().c_str())); } xmltooling-1.5.3/xmltooling/io/HTTPRequest.cpp000644 001751 001751 00000020326 12003322024 022530 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * HTTPRequest.cpp * * Interface to HTTP requests. */ #include "internal.h" #include "HTTPRequest.h" #include "util/Threads.h" #include #include #include #include #include #include #include using namespace xmltooling; using namespace xercesc; using namespace boost; using namespace std; bool GenericRequest::m_langFromClient = true; GenericRequest::langrange_t GenericRequest::m_defaultRange; GenericRequest::GenericRequest() : m_langRangeIter(m_langRange.rend()) { } GenericRequest::~GenericRequest() { } bool GenericRequest::isDefaultPort() const { return false; } void GenericRequest::absolutize(string& url) const { if (url.empty()) url = '/'; if (url[0] == '/') { // Compute a URL to the root of the site. const char* scheme = getScheme(); string root = string(scheme) + "://" + getHostname(); if (!isDefaultPort()) root += ":" + lexical_cast(getPort()); url = root + url; } } void GenericRequest::setLangDefaults(bool langFromClient, const XMLCh* defaultRange) { m_langFromClient = langFromClient; m_defaultRange.clear(); if (!defaultRange) return; float q = 0.0f; XMLStringTokenizer tokens(defaultRange); while (tokens.hasMoreTokens()) { const XMLCh* t = tokens.nextToken(); if (t && *t) { vector tagArray; static const XMLCh delims[] = {chDash, chNull}; XMLStringTokenizer tags(t, delims); while (tags.hasMoreTokens()) tagArray.push_back(tags.nextToken()); m_defaultRange.insert(langrange_t::value_type(q, tagArray)); q -= 0.0001f; } } } bool GenericRequest::startLangMatching() const { // This is a no-op except on the first call, to populate the // range information to use in matching. if (m_langRange.empty()) { if (m_langFromClient) { string hdr(getLanguageRange()); char_separator sep1(", "); // tags are split by commas or spaces char_separator sep2("; "); // quality is separated by semicolon tokenizer< char_separator > tokens(hdr, sep1); for (tokenizer< char_separator >::iterator t = tokens.begin(); t != tokens.end(); ++t) { string tag = trim_copy(*t); // handle any surrounding ws tokenizer< char_separator > subtokens(tag, sep2); tokenizer< char_separator >::iterator s = subtokens.begin(); if (s != subtokens.end() && *s != "*") { float q = 1.0f; auto_ptr_XMLCh lang((s++)->c_str()); // Check for quality tag if (s != subtokens.end() && starts_with(*s, "q=")) { try { q = lexical_cast(s->c_str() + 2); } catch (bad_lexical_cast&) { q = 0.0f; } } // Split range into tokens. vector tagArray; static const XMLCh delims[] = {chDash, chNull}; XMLStringTokenizer tags(lang.get(), delims); const XMLCh* tag; while (tags.hasMoreTokens()) { tag = tags.nextToken(); if (*tag != chAsterisk) tagArray.push_back(tag); } if (tagArray.empty()) continue; // Adjust q using the server priority list. As long as the supplied q deltas are larger than // factors like .0001, the client settings will always trump ours. if (!m_defaultRange.empty()) { float adj = (m_defaultRange.size() + 1) * 0.0001f; for (langrange_t::const_iterator prio = m_defaultRange.begin(); prio != m_defaultRange.end(); ++prio) { if (prio->second == tagArray) { adj = prio->first; break; } } q -= adj; } m_langRange.insert(langrange_t::value_type(q, tagArray)); } } } else { m_langRange = m_defaultRange; } } m_langRangeIter = m_langRange.rbegin(); return (m_langRangeIter != const_cast(m_langRange).rend()); } bool GenericRequest::continueLangMatching() const { return (++m_langRangeIter != const_cast(m_langRange).rend()); } bool GenericRequest::matchLang(const XMLCh* tag) const { if (m_langRangeIter == const_cast(m_langRange).rend()) return false; // To match against a given range, the range has to be built up and then // truncated segment by segment to look for a match against the tag. // That allows more specific ranges like en-US to match the tag en. // The "end" fence tells us how much of the original range to recompose // into a hyphenated string, and we stop on a match, or when the fence // moves back to the beginning of the array. bool match = false; vector::size_type end = m_langRangeIter->second.size(); do { // Skip single-character private extension separators. while (end > 1 && m_langRangeIter->second[end-1].length() <= 1) --end; // Build a range from 0 to end - 1 of segments. xstring compareTo(m_langRangeIter->second[0]); for (vector::size_type ix = 1; ix <= end - 1; ++ix) compareTo = compareTo + chDash + m_langRangeIter->second[ix]; match = (compareTo.length() > 1 && XMLString::compareIStringASCII(compareTo.c_str(), tag) == 0); } while (!match && --end > 0); return match; } HTTPRequest::HTTPRequest() { } HTTPRequest::~HTTPRequest() { } bool HTTPRequest::isSecure() const { return strcmp(getScheme(),"https")==0; } bool HTTPRequest::isDefaultPort() const { if (isSecure()) return getPort() == 443; else return getPort() == 80; } string HTTPRequest::getLanguageRange() const { return getHeader("Accept-Language"); } namespace { void handle_cookie_fn(map& cookieMap, vector& nvpair, const string& s) { nvpair.clear(); split(nvpair, s, is_any_of("=")); if (nvpair.size() == 2) { trim(nvpair[0]); cookieMap[nvpair[0]] = nvpair[1]; } } } const map& HTTPRequest::getCookies() const { if (m_cookieMap.empty()) { string cookies=getHeader("Cookie"); vector nvpair; tokenizer< char_separator > nvpairs(cookies, char_separator(";")); for_each(nvpairs.begin(), nvpairs.end(), boost::bind(handle_cookie_fn, boost::ref(m_cookieMap), boost::ref(nvpair), _1)); } return m_cookieMap; } const char* HTTPRequest::getCookie(const char* name) const { map::const_iterator lookup = getCookies().find(name); return (lookup==m_cookieMap.end()) ? nullptr : lookup->second.c_str(); } xmltooling-1.5.3/xmltooling/io/HTTPResponse.cpp000644 001751 001751 00000006336 12003305017 022706 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * HTTPResponse.cpp * * Interface to HTTP responses. */ #include "internal.h" #include "HTTPResponse.h" #include #include using namespace xmltooling; using namespace boost; using namespace std; GenericResponse::GenericResponse() { } GenericResponse::~GenericResponse() { } vector HTTPResponse::m_allowedSchemes; vector& HTTPResponse::getAllowedSchemes() { return m_allowedSchemes; } void HTTPResponse::sanitizeURL(const char* url) { // predicate for checking scheme below static bool (*fn)(const string&, const string&, const std::locale&) = iequals; const char* ch; for (ch=url; *ch; ++ch) { if (iscntrl((unsigned char)(*ch))) // convert to unsigned to allow full range from 00-FF throw IOException("URL contained a control character."); } ch = strchr(url, ':'); if (!ch) throw IOException("URL is malformed."); string s(url, ch - url); vector::const_iterator i = find_if(m_allowedSchemes.begin(), m_allowedSchemes.end(), boost::bind(fn, boost::cref(s), _1, boost::cref(std::locale()))); if (i != m_allowedSchemes.end()) return; throw IOException("URL contains invalid scheme ($1).", params(1, s.c_str())); } HTTPResponse::HTTPResponse() { } HTTPResponse::~HTTPResponse() { } void HTTPResponse::setContentType(const char* type) { setResponseHeader("Content-Type", type); } void HTTPResponse::setCookie(const char* name, const char* value) { string cookie(name); cookie = cookie + '=' + value; setResponseHeader("Set-Cookie", cookie.c_str()); } void HTTPResponse::setResponseHeader(const char* name, const char* value) { for (const char* ch=name; *ch; ++ch) { if (iscntrl(*ch)) throw IOException("Response header name contained a control character."); } for (const char* ch=value; *ch; ++ch) { if (iscntrl(*ch)) throw IOException("Value for response header ($1) contained a control character.", params(1,name)); } } long HTTPResponse::sendRedirect(const char* url) { sanitizeURL(url); return XMLTOOLING_HTTP_STATUS_MOVED; } long HTTPResponse::sendError(istream& inputStream) { return sendResponse(inputStream, XMLTOOLING_HTTP_STATUS_ERROR); } long HTTPResponse::sendResponse(istream& inputStream) { return sendResponse(inputStream, XMLTOOLING_HTTP_STATUS_OK); } xmltooling-1.5.3/xmltooling/impl/AnyElement.h000644 001751 001751 00000006600 12003305016 022441 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/impl/AnyElement.h * * Advanced anyType implementation suitable for deep processing of unknown content. */ #ifndef __xmltooling_anyelement_h__ #define __xmltooling_anyelement_h__ #include #include #include #include #include #include #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif namespace xmltooling { /** * Implements a smart wrapper around unknown or arbitrary DOM content. */ class XMLTOOL_API AnyElementImpl : public virtual ElementProxy, public AbstractDOMCachingXMLObject, public AbstractComplexElement, public AbstractAttributeExtensibleXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { /// @cond OFF public: virtual ~AnyElementImpl(); AnyElementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=nullptr, const QName* schemaType=nullptr); XMLObject* clone() const; protected: AnyElementImpl(); AnyElementImpl(const AnyElementImpl& src); /** * Copies the content of a source object into a newly constructed instance. *

Used to solve compiler problems that limit calling virtual functions * from the actual copy constructor. * * @param src source to clone */ void _clone(const AnyElementImpl& src); IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end()); void marshallAttributes(xercesc::DOMElement* domElement) const; void processChildElement(XMLObject* childXMLObject, const xercesc::DOMElement* childRoot); void processAttribute(const xercesc::DOMAttr* attribute); }; /// @endcond /** * Builder for AnyElementImpl objects. * Use as the default builder when you want to wrap each unknown element and * process the DOM content through xmltooling interfaces. */ class XMLTOOL_API AnyElementBuilder : public XMLObjectBuilder { public: XMLObject* buildObject( const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=nullptr, const QName* schemaType=nullptr ) const; }; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif #endif /* __xmltooling_anyelement_h__ */ xmltooling-1.5.3/xmltooling/impl/UnknownElement.h000644 001751 001751 00000006427 12003305016 023360 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/impl/UnknownElement.h * * Basic implementation suitable for use as default for unrecognized content. */ #ifndef __xmltooling_unkelement_h__ #define __xmltooling_unkelement_h__ #include #include #include #include #include #include #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif namespace xmltooling { /// @cond off class XMLTOOL_DLLLOCAL UnknownElementImpl : public AbstractSimpleElement, public AbstractDOMCachingXMLObject { public: UnknownElementImpl(const XMLCh* namespaceURI=nullptr, const XMLCh* elementLocalName=nullptr, const XMLCh* namespacePrefix=nullptr); virtual ~UnknownElementImpl(); void releaseDOM() const; XMLObject* clone() const; const XMLCh* getTextContent(unsigned int position=0) const; void setTextContent(const XMLCh*, unsigned int position=0); xercesc::DOMElement* marshall( xercesc::DOMDocument* document=nullptr #ifndef XMLTOOLING_NO_XMLSEC ,const std::vector* sigs=nullptr ,const Credential* credential=nullptr #endif ) const; xercesc::DOMElement* marshall( xercesc::DOMElement* parentElement #ifndef XMLTOOLING_NO_XMLSEC ,const std::vector* sigs=nullptr ,const Credential* credential=nullptr #endif ) const; XMLObject* unmarshall(xercesc::DOMElement* element, bool bindDocument=false); protected: void setDocumentElement(xercesc::DOMDocument* document, xercesc::DOMElement* element) const; mutable std::string m_xml; void serialize(std::string& s) const; }; /// @endcond /** * Builder for UnknownElementImpl objects. * Use as the default builder when you want unknown DOM content treated as raw/ignored XML. */ class XMLTOOL_API UnknownElementBuilder : public XMLObjectBuilder { public: XMLObject* buildObject( const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=nullptr, const QName* schemaType=nullptr ) const; }; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif #endif /* __xmltooling_unkelement_h__ */ xmltooling-1.5.3/xmltooling/impl/AnyElement.cpp000644 001751 001751 00000005643 12003305016 023002 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * AnyElement.cpp * * Advanced anyType implementation suitable for deep processing of unknown content. */ #include "internal.h" #include "exceptions.h" #include "impl/AnyElement.h" #include "util/NDC.h" #include "util/XMLHelper.h" #include using namespace xmltooling; using namespace xercesc; using namespace std; AnyElementImpl::AnyElementImpl() { } AnyElementImpl::AnyElementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { } AnyElementImpl::AnyElementImpl(const AnyElementImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractComplexElement(src), AbstractAttributeExtensibleXMLObject(src) { } AnyElementImpl::~AnyElementImpl() { } void AnyElementImpl::_clone(const AnyElementImpl& src) { const vector& children = src.getUnknownXMLObjects(); for (vector::const_iterator i=children.begin(); i!=children.end(); ++i) getUnknownXMLObjects().push_back((*i)->clone()); } XMLObject* AnyElementImpl::clone() const { auto_ptr domClone(AbstractDOMCachingXMLObject::clone()); AnyElementImpl* ret=dynamic_cast(domClone.get()); if (ret) { domClone.release(); return ret; } auto_ptr ret2(new AnyElementImpl(*this)); ret2->_clone(*ret2.get()); return ret2.release(); } void AnyElementImpl::marshallAttributes(DOMElement* domElement) const { marshallExtensionAttributes(domElement); } void AnyElementImpl::processChildElement(XMLObject* childXMLObject, const DOMElement* root) { getUnknownXMLObjects().push_back(childXMLObject); } void AnyElementImpl::processAttribute(const DOMAttr* attribute) { unmarshallExtensionAttribute(attribute); } XMLObject* AnyElementBuilder::buildObject( const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType ) const { return new AnyElementImpl(nsURI, localName, prefix, schemaType); } xmltooling-1.5.3/xmltooling/impl/UnknownElement.cpp000644 001751 001751 00000022400 12003305016 023700 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * UnknownElement.cpp * * Basic implementation suitable for use as default for unrecognized content. */ #include "internal.h" #include "exceptions.h" #include "logging.h" #include "impl/UnknownElement.h" #include "util/NDC.h" #include "util/XMLHelper.h" #include #include #include using namespace xmltooling::logging; using namespace xmltooling; using namespace xercesc; using namespace std; #ifndef XMLTOOLING_NO_XMLSEC using xmlsignature::Signature; #endif UnknownElementImpl::UnknownElementImpl(const XMLCh* namespaceURI, const XMLCh* elementLocalName, const XMLCh* namespacePrefix) : AbstractXMLObject(namespaceURI, elementLocalName, namespacePrefix) { } UnknownElementImpl::~UnknownElementImpl() { } void UnknownElementImpl::releaseDOM() const { #ifdef _DEBUG xmltooling::NDC ndc("releaseDOM"); #endif Category& log=Category::getInstance(XMLTOOLING_LOGCAT".XMLObject"); log.debug("releasing DOM for unknown content, preserving current DOM in XML form"); // We're losing our DOM, so assuming we have one, we preserve it. serialize(m_xml); // This takes care of the generic housekeeping now that we've preserved things. AbstractDOMCachingXMLObject::releaseDOM(); } XMLObject* UnknownElementImpl::clone() const { UnknownElementImpl* ret=new UnknownElementImpl(); // If there's no XML locally, serialize this object into the new one. // Otherwise just copy it over. if (m_xml.empty()) serialize(ret->m_xml); else ret->m_xml=m_xml; return ret; } const XMLCh* UnknownElementImpl::getTextContent(unsigned int position) const { throw XMLObjectException("Direct access to content is not permitted."); } void UnknownElementImpl::setTextContent(const XMLCh*, unsigned int position) { throw XMLObjectException("Direct access to content is not permitted."); } void UnknownElementImpl::setDocumentElement(DOMDocument* document, DOMElement* element) const { DOMElement* documentRoot = document->getDocumentElement(); if (documentRoot) document->replaceChild(element, documentRoot); else document->appendChild(element); } void UnknownElementImpl::serialize(string& s) const { if (getDOM()) XMLHelper::serialize(getDOM(),s); } DOMElement* UnknownElementImpl::marshall( DOMDocument* document #ifndef XMLTOOLING_NO_XMLSEC ,const vector* sigs ,const Credential* credential #endif ) const { #ifdef _DEBUG xmltooling::NDC ndc("marshall"); #endif Category& log=Category::getInstance(XMLTOOLING_LOGCAT".XMLObject"); log.debug("marshalling unknown content"); DOMElement* cachedDOM=getDOM(); if (cachedDOM) { if (!document || document==cachedDOM->getOwnerDocument()) { log.debug("XMLObject has a usable cached DOM, reusing it"); if (document) setDocumentElement(cachedDOM->getOwnerDocument(),cachedDOM); releaseParentDOM(true); return cachedDOM; } // We have a DOM but it doesn't match the document we were given, so we import // it into the new document. try { cachedDOM=static_cast(document->importNode(cachedDOM, true)); } catch (XMLException& ex) { auto_ptr_char temp(ex.getMessage()); throw XMLParserException( string("Error importing DOM into caller-supplied document: ") + (temp.get() ? temp.get() : "no message") ); } // Recache the DOM. setDocumentElement(document, cachedDOM); log.debug("caching imported DOM for XMLObject"); setDOM(cachedDOM, false); releaseParentDOM(true); return cachedDOM; } // If we get here, we didn't have a usable DOM. // We need to reparse the XML we saved off into a new DOM. bool bindDocument=false; MemBufInputSource src(reinterpret_cast(m_xml.c_str()),m_xml.length(),"UnknownElementImpl"); Wrapper4InputSource dsrc(&src,false); log.debug("parsing XML back into DOM tree"); DOMDocument* internalDoc=XMLToolingConfig::getConfig().getParser().parse(dsrc); if (document) { // The caller insists on using his own document, so we now have to import the thing // into it. Then we're just dumping the one we built. log.debug("reimporting new DOM into caller-supplied document"); try { cachedDOM=static_cast(document->importNode(internalDoc->getDocumentElement(), true)); } catch (XMLException& ex) { internalDoc->release(); auto_ptr_char temp(ex.getMessage()); throw XMLParserException( string("Error importing DOM into caller-supplied document: ") + (temp.get() ? temp.get() : "no message") ); } internalDoc->release(); } else { // We just bind the document we built to the object as the result. cachedDOM=static_cast(internalDoc->getDocumentElement()); document=internalDoc; bindDocument=true; } // Recache the DOM and clear the serialized copy. setDocumentElement(document, cachedDOM); log.debug("caching DOM for XMLObject (document is %sbound)", bindDocument ? "" : "not "); setDOM(cachedDOM, bindDocument); releaseParentDOM(true); m_xml.erase(); return cachedDOM; } DOMElement* UnknownElementImpl::marshall( DOMElement* parentElement #ifndef XMLTOOLING_NO_XMLSEC ,const vector* sigs ,const Credential* credential #endif ) const { #ifdef _DEBUG xmltooling::NDC ndc("marshall"); #endif Category& log=Category::getInstance(XMLTOOLING_LOGCAT".XMLObject"); log.debug("marshalling unknown content"); DOMElement* cachedDOM=getDOM(); if (cachedDOM) { if (parentElement->getOwnerDocument()==cachedDOM->getOwnerDocument()) { log.debug("XMLObject has a usable cached DOM, reusing it"); parentElement->appendChild(cachedDOM); releaseParentDOM(true); return cachedDOM; } // We have a DOM but it doesn't match the document we were given, so we import // it into the new document. try { cachedDOM=static_cast(parentElement->getOwnerDocument()->importNode(cachedDOM, true)); } catch (XMLException& ex) { auto_ptr_char temp(ex.getMessage()); throw XMLParserException( string("Error importing DOM into caller-supplied document: ") + (temp.get() ? temp.get() : "no message") ); } // Recache the DOM. parentElement->appendChild(cachedDOM); log.debug("caching imported DOM for XMLObject"); setDOM(cachedDOM, false); releaseParentDOM(true); return cachedDOM; } // If we get here, we didn't have a usable DOM (and/or we flushed the one we had). // We need to reparse the XML we saved off into a new DOM. MemBufInputSource src(reinterpret_cast(m_xml.c_str()),m_xml.length(),"UnknownElementImpl"); Wrapper4InputSource dsrc(&src,false); log.debug("parsing XML back into DOM tree"); DOMDocument* internalDoc=XMLToolingConfig::getConfig().getParser().parse(dsrc); log.debug("reimporting new DOM into caller-supplied document"); try { cachedDOM=static_cast(parentElement->getOwnerDocument()->importNode(internalDoc->getDocumentElement(), true)); } catch (XMLException& ex) { internalDoc->release(); auto_ptr_char temp(ex.getMessage()); throw XMLParserException( string("Error importing DOM into caller-supplied document: ") + (temp.get() ? temp.get() : "no message") ); } internalDoc->release(); // Recache the DOM and clear the serialized copy. parentElement->appendChild(cachedDOM); log.debug("caching DOM for XMLObject"); setDOM(cachedDOM, false); releaseParentDOM(true); m_xml.erase(); return cachedDOM; } XMLObject* UnknownElementImpl::unmarshall(DOMElement* element, bool bindDocument) { setDOM(element, bindDocument); return this; } XMLObject* UnknownElementBuilder::buildObject( const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType ) const { return new UnknownElementImpl(nsURI,localName,prefix); } xmltooling-1.5.3/xmltooling/impl/MemoryStorageService.cpp000644 001751 001751 00000024210 12003305016 025046 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * MemoryStorageService.cpp * * In-memory "persistent" storage, suitable for simple applications. */ #include "internal.h" #include "logging.h" #include "util/NDC.h" #include "util/StorageService.h" #include "util/Threads.h" #include "util/XMLHelper.h" #include #include using namespace xmltooling::logging; using namespace xmltooling; using namespace std; using xercesc::DOMElement; namespace { // Reasonably extended sizes to avoid callers needing to shrink unduly. static const XMLTOOL_DLLLOCAL StorageService::Capabilities g_memCaps(0x4000, 0x4000, 0x4000); }; namespace xmltooling { class XMLTOOL_DLLLOCAL MemoryStorageService : public StorageService { public: MemoryStorageService(const DOMElement* e); virtual ~MemoryStorageService(); const Capabilities& getCapabilities() const { return g_memCaps; } bool createString(const char* context, const char* key, const char* value, time_t expiration); int readString(const char* context, const char* key, string* pvalue=nullptr, time_t* pexpiration=nullptr, int version=0); int updateString(const char* context, const char* key, const char* value=nullptr, time_t expiration=0, int version=0); bool deleteString(const char* context, const char* key); bool createText(const char* context, const char* key, const char* value, time_t expiration) { return createString(context, key, value, expiration); } int readText(const char* context, const char* key, string* pvalue=nullptr, time_t* pexpiration=nullptr, int version=0) { return readString(context, key, pvalue, pexpiration, version); } int updateText(const char* context, const char* key, const char* value=nullptr, time_t expiration=0, int version=0) { return updateString(context, key, value, expiration, version); } bool deleteText(const char* context, const char* key) { return deleteString(context, key); } void reap(const char* context); void updateContext(const char* context, time_t expiration); void deleteContext(const char* context) { m_lock->wrlock(); m_contextMap.erase(context); m_lock->unlock(); } private: struct XMLTOOL_DLLLOCAL Record { Record() : expiration(0), version(1) {} Record(const string& s, time_t t) : data(s), expiration(t), version(1) {} string data; time_t expiration; int version; }; struct XMLTOOL_DLLLOCAL Context { Context() {} Context(const Context& src) { m_dataMap = src.m_dataMap; } map m_dataMap; unsigned long reap(time_t exp); }; Context& readContext(const char* context) { m_lock->rdlock(); map::iterator i = m_contextMap.find(context); if (i != m_contextMap.end()) return i->second; m_lock->unlock(); m_lock->wrlock(); return m_contextMap[context]; } Context& writeContext(const char* context) { m_lock->wrlock(); return m_contextMap[context]; } map m_contextMap; auto_ptr m_lock; auto_ptr shutdown_wait; auto_ptr cleanup_thread; static void* cleanup_fn(void*); bool shutdown; int m_cleanupInterval; Category& m_log; }; StorageService* XMLTOOL_DLLLOCAL MemoryStorageServiceFactory(const DOMElement* const & e) { return new MemoryStorageService(e); } }; static const XMLCh cleanupInterval[] = UNICODE_LITERAL_15(c,l,e,a,n,u,p,I,n,t,e,r,v,a,l); MemoryStorageService::MemoryStorageService(const DOMElement* e) : m_lock(RWLock::create()), shutdown_wait(CondWait::create()), shutdown(false), m_cleanupInterval(XMLHelper::getAttrInt(e, 900, cleanupInterval)), m_log(Category::getInstance(XMLTOOLING_LOGCAT".StorageService")) { cleanup_thread.reset(Thread::create(&cleanup_fn, (void*)this)); } MemoryStorageService::~MemoryStorageService() { // Shut down the cleanup thread and let it know... shutdown = true; shutdown_wait->signal(); cleanup_thread->join(nullptr); } void* MemoryStorageService::cleanup_fn(void* pv) { MemoryStorageService* cache = reinterpret_cast(pv); #ifndef WIN32 // First, let's block all signals Thread::mask_all_signals(); #endif #ifdef _DEBUG NDC ndc("cleanup"); #endif auto_ptr mutex(Mutex::create()); mutex->lock(); cache->m_log.info("cleanup thread started...running every %d seconds", cache->m_cleanupInterval); while (!cache->shutdown) { cache->shutdown_wait->timedwait(mutex.get(), cache->m_cleanupInterval); if (cache->shutdown) break; unsigned long count=0; time_t now = time(nullptr); cache->m_lock->wrlock(); SharedLock locker(cache->m_lock.get(), false); for (map::iterator i=cache->m_contextMap.begin(); i!=cache->m_contextMap.end(); ++i) count += i->second.reap(now); if (count) cache->m_log.info("purged %d expired record(s) from storage", count); } cache->m_log.info("cleanup thread finished"); mutex->unlock(); return nullptr; } void MemoryStorageService::reap(const char* context) { Context& ctx = writeContext(context); SharedLock locker(m_lock.get(), false); ctx.reap(time(nullptr)); } unsigned long MemoryStorageService::Context::reap(time_t exp) { // Garbage collect any expired entries. unsigned long count=0; map::iterator cur = m_dataMap.begin(); map::iterator stop = m_dataMap.end(); while (cur != stop) { if (cur->second.expiration <= exp) { map::iterator tmp = cur++; m_dataMap.erase(tmp); ++count; } else { cur++; } } return count; } bool MemoryStorageService::createString(const char* context, const char* key, const char* value, time_t expiration) { Context& ctx = writeContext(context); SharedLock locker(m_lock.get(), false); // Check for a duplicate. map::iterator i=ctx.m_dataMap.find(key); if (i!=ctx.m_dataMap.end()) { // Not yet expired? if (time(nullptr) < i->second.expiration) return false; // It's dead, so we can just remove it now and create the new record. ctx.m_dataMap.erase(i); } ctx.m_dataMap[key]=Record(value,expiration); m_log.debug("inserted record (%s) in context (%s) with expiration (%lu)", key, context, expiration); return true; } int MemoryStorageService::readString(const char* context, const char* key, string* pvalue, time_t* pexpiration, int version) { Context& ctx = readContext(context); SharedLock locker(m_lock.get(), false); map::iterator i=ctx.m_dataMap.find(key); if (i==ctx.m_dataMap.end()) return 0; else if (time(nullptr) >= i->second.expiration) return 0; if (pexpiration) *pexpiration = i->second.expiration; if (i->second.version == version) return version; // nothing's changed, so just echo back the version if (pvalue) *pvalue = i->second.data; return i->second.version; } int MemoryStorageService::updateString(const char* context, const char* key, const char* value, time_t expiration, int version) { Context& ctx = writeContext(context); SharedLock locker(m_lock.get(), false); map::iterator i=ctx.m_dataMap.find(key); if (i==ctx.m_dataMap.end()) return 0; else if (time(nullptr) >= i->second.expiration) return 0; if (version > 0 && version != i->second.version) return -1; // caller's out of sync if (value) { i->second.data = value; ++(i->second.version); } if (expiration && expiration != i->second.expiration) i->second.expiration = expiration; m_log.debug("updated record (%s) in context (%s) with expiration (%lu)", key, context, i->second.expiration); return i->second.version; } bool MemoryStorageService::deleteString(const char* context, const char* key) { Context& ctx = writeContext(context); SharedLock locker(m_lock.get(), false); // Find the record. map::iterator i=ctx.m_dataMap.find(key); if (i!=ctx.m_dataMap.end()) { ctx.m_dataMap.erase(i); m_log.debug("deleted record (%s) in context (%s)", key, context); return true; } m_log.debug("deleting record (%s) in context (%s)....not found", key, context); return false; } void MemoryStorageService::updateContext(const char* context, time_t expiration) { Context& ctx = writeContext(context); SharedLock locker(m_lock.get(), false); time_t now = time(nullptr); map::iterator stop=ctx.m_dataMap.end(); for (map::iterator i = ctx.m_dataMap.begin(); i!=stop; ++i) { if (now < i->second.expiration) i->second.expiration = expiration; } m_log.debug("updated expiration of valid records in context (%s) to (%lu)", context, expiration); } xmltooling-1.5.3/xmltooling/encryption/impl/000755 001751 001751 00000000000 12157725415 022442 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/xmltooling/encryption/Decrypter.h000644 001751 001751 00000016125 12003305016 023575 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/encryption/Decrypter.h * * Wrapper API for XML Decryption functionality. */ #if !defined(__xmltooling_decrypter_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_decrypter_h__ #include class XENCCipher; class XSECCryptoKey; namespace xmltooling { class XMLTOOL_API CredentialCriteria; class XMLTOOL_API CredentialResolver; }; namespace xmlencryption { class XMLTOOL_API EncryptedData; class XMLTOOL_API EncryptedKey; class XMLTOOL_API EncryptedKeyResolver; /** * Wrapper API for XML Decryption functionality. */ class XMLTOOL_API Decrypter { public: /** * Constructor. * *

The final boolean parameter is used to enforce a requirement for an authenticated cipher * suite such as AES-GCM or similar. These ciphers include an HMAC or equivalent step that * prevents tampering. Newer applications should set this parameter to true unless the ciphertext * has been independently authenticated, and even in such a case, it is rarely possible to prevent * chosen ciphertext attacks by trusted signers. * * @param credResolver locked credential resolver to supply decryption keys * @param criteria optional external criteria to use with resolver * @param EKResolver locates an EncryptedKey pertaining to the EncryptedData * @param requireAuthenticatedCipher true iff the bulk data encryption algorithm must be an authenticated cipher */ Decrypter( const xmltooling::CredentialResolver* credResolver=nullptr, xmltooling::CredentialCriteria* criteria=nullptr, const EncryptedKeyResolver* EKResolver=nullptr, bool requireAuthenticatedCipher=false ); virtual ~Decrypter(); /** * Replace the current EncryptedKeyResolver interface, if any, with a new one. * * @param EKResolver the EncryptedKeyResolver to attach */ void setEncryptedKeyResolver(const EncryptedKeyResolver* EKResolver); /** * Replace the current CredentialResolver interface, if any, with a new one. * * @param resolver the locked CredentialResolver to attach, or nullptr to clear * @param criteria optional external criteria to use with resolver */ void setKEKResolver(const xmltooling::CredentialResolver* resolver, xmltooling::CredentialCriteria* criteria); /** * Decrypts the supplied information using the supplied key, and returns * the resulting as a DOM fragment owned by the document associated with the * marshalled EncryptedData object. * * Note that the DOM nodes will be invalidated once that document * is released. The caller should therefore process the DOM fragment as * required and drop all references to it before that happens. The usual * approach should be to unmarshall the DOM and then release it, or the * DOM can also be imported into a separately owned document. * * @param encryptedData the data to decrypt * @param key the decryption key to use (it will not be freed internally) * @return the decrypted DOM fragment */ xercesc::DOMDocumentFragment* decryptData(const EncryptedData& encryptedData, XSECCryptoKey* key); /** * Decrypts the supplied information and returns the resulting as a DOM * fragment owned by the document associated with the marshalled EncryptedData * object. * * Note that the DOM nodes will be invalidated once that document * is released. The caller should therefore process the DOM fragment as * required and drop all references to it before that happens. The usual * approach should be to unmarshall the DOM and then release it, or the * DOM can also be imported into a separately owned document. * * @param encryptedData the data to decrypt * @param recipient identifier of decrypting entity for use in identifying multi-cast keys * @return the decrypted DOM fragment */ xercesc::DOMDocumentFragment* decryptData(const EncryptedData& encryptedData, const XMLCh* recipient=nullptr); /** * Decrypts the supplied information to an output stream. * * @param out output stream to receive the decrypted data * @param encryptedData the data to decrypt * @param key the decryption key to use (it will not be freed internally) */ void decryptData(std::ostream& out, const EncryptedData& encryptedData, XSECCryptoKey* key); /** * Decrypts the supplied information to an output stream. * * @param out output stream to receive the decrypted data * @param encryptedData the data to decrypt * @param recipient identifier of decrypting entity for use in identifying multi-cast keys */ void decryptData(std::ostream& out, const EncryptedData& encryptedData, const XMLCh* recipient=nullptr); /** * Decrypts the supplied information and returns the resulting key. * The caller is responsible for deleting the key. The algorithm of the * key must be supplied by the caller based on knowledge of the associated * EncryptedData information. * * @param encryptedKey the encrypted/wrapped key to decrypt * @param algorithm the algorithm associated with the decrypted key * @return the decrypted key */ XSECCryptoKey* decryptKey(const EncryptedKey& encryptedKey, const XMLCh* algorithm); private: XENCCipher* m_cipher; const xmltooling::CredentialResolver* m_credResolver; xmltooling::CredentialCriteria* m_criteria; const EncryptedKeyResolver* m_EKResolver; bool m_requireAuthenticatedCipher; }; DECL_XMLTOOLING_EXCEPTION(DecryptionException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmlencryption,xmltooling::XMLToolingException,Exceptions in decryption processing); }; #endif /* __xmltooling_decrypter_h__ */ xmltooling-1.5.3/xmltooling/encryption/EncryptedKeyResolver.h000644 001751 001751 00000003572 12003305016 025766 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/encryption/EncryptedKeyResolver.h * * Resolves encrypted keys based on EncryptedData information or other external factors. */ #if !defined(__xmltooling_enckeyres_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_enckeyres_h__ #include namespace xmlencryption { /** * An API for resolving encrypted decryption keys. */ class XMLTOOL_API EncryptedKeyResolver { MAKE_NONCOPYABLE(EncryptedKeyResolver); public: EncryptedKeyResolver(); virtual ~EncryptedKeyResolver(); /** * Returns an encrypted key based on the supplied object's KeyInfo information. * * @param encryptedData an encrypted object * @param recipient identifier of recipient of encrypted key * @return the resolved EncryptedKey object */ virtual const EncryptedKey* resolveKey(const EncryptedData& encryptedData, const XMLCh* recipient=nullptr) const; }; }; #endif /* __xmltooling_enckeyres_h__ */ xmltooling-1.5.3/xmltooling/encryption/Encrypter.h000644 001751 001751 00000023067 12003305016 023612 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/encryption/Encrypter.h * * Methods for encrypting XMLObjects and other data. */ #if !defined(__xmltooling_encrypter_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_encrypter_h__ #include #include class XENCCipher; namespace xmltooling { class XMLTOOL_API Credential; }; namespace xmlencryption { class XMLTOOL_API EncryptedData; class XMLTOOL_API EncryptedKey; /** * Wrapper API for XML Encryption functionality. * Designed to allow both external and internal key generation as follows: * * If no keying material is supplied, then the algorithm MAY be recognized * and a key can be generated internally. This is only done if a KeyEncryptionParams * structure is also supplied to the operation (otherwise the key would be lost). * * If an XSECCryptoKey is supplied, then it is used directly, but if KeyEncryptionParams * are supplied, an exception will result unless the raw key buffer is also supplied. * * If a raw key is provided, then a key object can also be created internally if the * algorithm is recognized. * * Summing up, if KeyEncryptionParams are used, a raw key must be available or the * key can be generated when the encryption algorithm itself is a standard one. If * no KeyEncryptionParams are supplied, then the key must be supplied either in raw * or object form. * * Finally, when encrypting data, the key transport algorithm can be left blank to * derive it from the data encryption algorithm. */ class XMLTOOL_API Encrypter { public: /** * Structure to collect encryption requirements. */ struct XMLTOOL_API EncryptionParams { /** * Constructor. * * The algorithm constant and key buffer MUST be accessible for the life of * the structure. * * @param algorithm the XML Encryption algorithm constant * @param keyBuffer buffer containing the raw key information * @param keyBufferSize the size of the raw key buffer in bytes * @param credential optional Credential supplying the encryption key * @param compact true iff the encrypted representation should be made as small as possible */ EncryptionParams( #ifdef XSEC_OPENSSL_HAVE_AES const XMLCh* algorithm=DSIGConstants::s_unicodeStrURIAES128_CBC, #else const XMLCh* algorithm=DSIGConstants::s_unicodeStrURI3DES_CBC, #endif const unsigned char* keyBuffer=nullptr, unsigned int keyBufferSize=0, const xmltooling::Credential* credential=nullptr, bool compact=false ); ~EncryptionParams(); /** Data encryption algorithm. */ const XMLCh* m_algorithm; /** Buffer containing encryption key. */ const unsigned char* m_keyBuffer; /** Size of buffer. */ unsigned int m_keyBufferSize; /** Credential containing the encryption key. */ const xmltooling::Credential* m_credential; /** Flag limiting the size of the encrypted XML representation. */ bool m_compact; }; /** * Structure to collect key wrapping/transport requirements. */ struct XMLTOOL_API KeyEncryptionParams { /** * Constructor. * * @param credential a Credential supplying the key encryption key * @param algorithm XML Encryption key wrapping or transport algorithm constant * @param recipient optional name of recipient of encrypted key */ KeyEncryptionParams( const xmltooling::Credential& credential, const XMLCh* algorithm=nullptr, const XMLCh* recipient=nullptr ); ~KeyEncryptionParams(); /** Credential containing key encryption key. */ const xmltooling::Credential& m_credential; /** Key transport or wrapping algorithm. */ const XMLCh* m_algorithm; /** Name of recipient that owns the key encryption key. */ const XMLCh* m_recipient; }; Encrypter(); virtual ~Encrypter(); /** * Encrypts the supplied element and returns the resulting object. * * If an encryption algorithm is set, but no key, a random key will be * generated iff kencParams is non-NULL and the algorithm is known. * * If key encryption parameters are supplied, then the encryption key * is wrapped and the result placed into an EncryptedKey object in the * KeyInfo of the returned EncryptedData. * * @param element the DOM element to encrypt * @param encParams primary encryption settings * @param kencParams key encryption settings, or nullptr * @return a stand-alone EncryptedData object, unconnected to the source DOM */ EncryptedData* encryptElement( xercesc::DOMElement* element, EncryptionParams& encParams, KeyEncryptionParams* kencParams=nullptr ); /** * Encrypts the supplied element's children and returns the resulting object. * * If an encryption algorithm is set, but no key, a random key will be * generated iff kencParams is non-NULL and the algorithm is known. * If key encryption parameters are supplied, then the encryption key * is wrapped and the result placed into an EncryptedKey object in the * KeyInfo of the returned EncryptedData. * * @param element parent element of children to encrypt * @param encParams primary encryption settings * @param kencParams key encryption settings, or nullptr * @return a stand-alone EncryptedData object, unconnected to the source DOM */ EncryptedData* encryptElementContent( xercesc::DOMElement* element, EncryptionParams& encParams, KeyEncryptionParams* kencParams=nullptr ); /** * Encrypts the supplied input stream and returns the resulting object. * * If an encryption algorithm is set, but no key, a random key will be * generated iff kencParams is non-NULL and the algorithm is known. * If key encryption parameters are supplied, then the encryption key * is wrapped and the result placed into an EncryptedKey object in the * KeyInfo of the returned EncryptedData. * * @param input the stream to encrypt * @param encParams primary encryption settings * @param kencParams key encryption settings, or nullptr * @return a stand-alone EncryptedData object, unconnected to any DOM */ EncryptedData* encryptStream(std::istream& input, EncryptionParams& encParams, KeyEncryptionParams* kencParams=nullptr); /** * Encrypts the supplied key and returns the resulting object. * * @param keyBuffer raw key material to encrypt * @param keyBufferSize size in bytes of raw key material * @param kencParams key encryption settings * @param compact true iff the encrypted representation should be made as small as possible * @return a stand-alone EncryptedKey object, unconnected to any DOM */ EncryptedKey* encryptKey( const unsigned char* keyBuffer, unsigned int keyBufferSize, KeyEncryptionParams& kencParams, bool compact=false ); /** * Maps a data encryption algorithm to an appropriate key transport algorithm to use. * * @param credential the key encryption key * @param encryptionAlg data encryption algorithm * @return a key transport algorithm */ static const XMLCh* getKeyTransportAlgorithm(const xmltooling::Credential& credential, const XMLCh* encryptionAlg); private: void checkParams(EncryptionParams& encParams, KeyEncryptionParams* kencParams); EncryptedData* decorateAndUnmarshall(EncryptionParams& encParams, KeyEncryptionParams* kencParams); XENCCipher* m_cipher; unsigned char m_keyBuffer[32]; }; DECL_XMLTOOLING_EXCEPTION(EncryptionException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmlencryption,xmltooling::XMLSecurityException,Exceptions in encryption processing); }; #endif /* __xmltooling_encrypter_h__ */ xmltooling-1.5.3/xmltooling/encryption/Encryption.h000644 001751 001751 00000015746 12007564200 024004 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * @file xmltooling/encryption/Encryption.h * * XMLObjects representing XML Encryption content */ #if !defined(__xmltooling_encryption_h__) && !defined(XMLTOOLING_NO_XMLSEC) #define __xmltooling_encryption_h__ #include #include #include #include #include namespace xmlsignature { class XMLTOOL_API KeyInfo; class XMLTOOL_API Transform; }; /** * Macro for declaring encryption builders. * * @param cname name of class being built */ #define DECL_XMLENCOBJECTBUILDER(cname) \ DECL_XMLOBJECTBUILDER(XMLTOOL_API,cname,xmlconstants::XMLENC_NS,xmlconstants::XMLENC_PREFIX) /** * Macro for declaring encryption 1.1 builders. * * @param cname name of class being built */ #define DECL_XMLENC11OBJECTBUILDER(cname) \ DECL_XMLOBJECTBUILDER(XMLTOOL_API,cname,xmlconstants::XMLENC11_NS,xmlconstants::XMLENC11_PREFIX) /** * @namespace xmlencryption * Namespace for XML Encryption schema objects */ namespace xmlencryption { DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,CarriedKeyName,Name,XML Encryption CarriedKeyName element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,CipherValue,Value,XML Encryption CipherValue element); DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,OAEPparams,Name,XML Encryption OAEPparams element); BEGIN_XMLOBJECT(XMLTOOL_API,KeySize,xmltooling::XMLObject,XML Encryption KeySize element); DECL_INTEGER_CONTENT(Size); END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,EncryptionMethod,xmltooling::ElementExtensibleXMLObject,XML Encryption EncryptionMethod element); DECL_STRING_ATTRIB(Algorithm,ALGORITHM); DECL_TYPED_CHILD(KeySize); DECL_TYPED_CHILD(OAEPparams); /** EncryptionMethodType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,Transforms,xmltooling::XMLObject,XML Encryption Transforms element); DECL_TYPED_FOREIGN_CHILDREN(Transform,xmlsignature); /** TransformsType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,CipherReference,xmltooling::XMLObject,XML Encryption CipherReference element); DECL_STRING_ATTRIB(URI,URI); DECL_TYPED_CHILD(Transforms); /** CipherReferenceType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,CipherData,xmltooling::XMLObject,XML Encryption CipherData element); DECL_TYPED_CHILD(CipherValue); DECL_TYPED_CHILD(CipherReference); /** CipherDataType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,EncryptionProperty,xmltooling::ElementProxy,XML Encryption EncryptionProperty element); DECL_STRING_ATTRIB(Target,TARGET); DECL_STRING_ATTRIB(Id,ID); /** EncryptionPropertyType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,EncryptionProperties,xmltooling::XMLObject,XML Encryption EncryptionProperties element); DECL_STRING_ATTRIB(Id,ID); DECL_TYPED_CHILDREN(EncryptionProperty); /** EncryptionPropertiesType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,ReferenceType,xmltooling::ElementExtensibleXMLObject,XML Encryption ReferenceType type); DECL_STRING_ATTRIB(URI,URI); /** ReferenceType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,DataReference,ReferenceType,XML Encryption DataReference element); END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,KeyReference,ReferenceType,XML Encryption KeyReference element); END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,ReferenceList,xmltooling::XMLObject,XML Encryption ReferenceList element); DECL_TYPED_CHILDREN(DataReference); DECL_TYPED_CHILDREN(KeyReference); END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,EncryptedType,xmltooling::XMLObject,XML Encryption EncryptedType abstract type); DECL_STRING_ATTRIB(Id,ID); DECL_STRING_ATTRIB(Type,TYPE); DECL_STRING_ATTRIB(MimeType,MIMETYPE); DECL_STRING_ATTRIB(Encoding,ENCODING); DECL_TYPED_CHILD(EncryptionMethod); DECL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature); DECL_TYPED_CHILD(CipherData); DECL_TYPED_CHILD(EncryptionProperties); /** EncryptedType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,EncryptedData,EncryptedType,XML Encryption EncryptedData element); /** EncryptedDataType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,EncryptedKey,EncryptedType,XML Encryption EncryptedKey element); DECL_STRING_ATTRIB(Recipient,RECIPIENT); DECL_TYPED_CHILD(ReferenceList); DECL_TYPED_CHILD(CarriedKeyName); /** EncryptedKeyType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,MGF,xmltooling::XMLObject,XML Encryption 1.1 MGF element); DECL_STRING_ATTRIB(Algorithm,ALGORITHM); /** MGFType local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; DECL_XMLENCOBJECTBUILDER(CarriedKeyName); DECL_XMLENCOBJECTBUILDER(CipherData); DECL_XMLENCOBJECTBUILDER(CipherReference); DECL_XMLENCOBJECTBUILDER(CipherValue); DECL_XMLENCOBJECTBUILDER(DataReference); DECL_XMLENCOBJECTBUILDER(EncryptedData); DECL_XMLENCOBJECTBUILDER(EncryptedKey); DECL_XMLENCOBJECTBUILDER(EncryptionMethod); DECL_XMLENCOBJECTBUILDER(EncryptionProperties); DECL_XMLENCOBJECTBUILDER(EncryptionProperty); DECL_XMLENCOBJECTBUILDER(KeyReference); DECL_XMLENCOBJECTBUILDER(KeySize); DECL_XMLENCOBJECTBUILDER(OAEPparams); DECL_XMLENCOBJECTBUILDER(ReferenceList); DECL_XMLENCOBJECTBUILDER(Transforms); DECL_XMLENC11OBJECTBUILDER(MGF); /** * Registers builders and validators for XML Encryption classes into the runtime. */ void XMLTOOL_API registerEncryptionClasses(); }; #endif /* __xmltooling_encryption_h__ */ xmltooling-1.5.3/xmltooling/encryption/impl/Decrypter.cpp000644 001751 001751 00000037365 12003305016 025102 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * Decrypter.cpp * * Methods for decrypting XMLObjects and other data. */ #include "internal.h" #include "logging.h" #include "encryption/Decrypter.h" #include "encryption/EncryptedKeyResolver.h" #include "encryption/Encryption.h" #include "security/Credential.h" #include "security/CredentialCriteria.h" #include "security/CredentialResolver.h" #include #include #include #include #include #include #include #include using namespace xmlencryption; using namespace xmlsignature; using namespace xmltooling; using namespace xercesc; using namespace std; Decrypter::Decrypter( const CredentialResolver* credResolver, CredentialCriteria* criteria, const EncryptedKeyResolver* EKResolver, bool requireAuthenticatedCipher ) : m_cipher(nullptr), m_credResolver(credResolver), m_criteria(criteria), m_EKResolver(EKResolver), m_requireAuthenticatedCipher(requireAuthenticatedCipher) { } Decrypter::~Decrypter() { if (m_cipher) XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->releaseCipher(m_cipher); } void Decrypter::setEncryptedKeyResolver(const EncryptedKeyResolver* EKResolver) { m_EKResolver=EKResolver; } void Decrypter::setKEKResolver(const CredentialResolver* resolver, CredentialCriteria* criteria) { m_credResolver=resolver; m_criteria=criteria; } DOMDocumentFragment* Decrypter::decryptData(const EncryptedData& encryptedData, XSECCryptoKey* key) { if (encryptedData.getDOM() == nullptr) throw DecryptionException("The object must be marshalled before decryption."); XMLToolingInternalConfig& xmlconf = XMLToolingInternalConfig::getInternalConfig(); if (m_requireAuthenticatedCipher) { const XMLCh* alg = encryptedData.getEncryptionMethod() ? encryptedData.getEncryptionMethod()->getAlgorithm() : nullptr; if (!alg || !xmlconf.isXMLAlgorithmSupported(alg, XMLToolingConfig::ALGTYPE_AUTHNENCRYPT)) { throw DecryptionException("Unauthenticated data encryption algorithm unsupported."); } } // We can reuse the cipher object if the document hasn't changed. if (m_cipher && m_cipher->getDocument()!=encryptedData.getDOM()->getOwnerDocument()) { xmlconf.m_xsecProvider->releaseCipher(m_cipher); m_cipher=nullptr; } if (!m_cipher) m_cipher = xmlconf.m_xsecProvider->newCipher(encryptedData.getDOM()->getOwnerDocument()); try { m_cipher->setKey(key->clone()); DOMNode* ret = m_cipher->decryptElementDetached(encryptedData.getDOM()); if (ret->getNodeType()!=DOMNode::DOCUMENT_FRAGMENT_NODE) { ret->release(); throw DecryptionException("Decryption operation did not result in DocumentFragment."); } return static_cast(ret); } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); throw DecryptionException(string("XMLSecurity exception while decrypting: ") + temp.get()); } catch(XSECCryptoException& e) { throw DecryptionException(string("XMLSecurity exception while decrypting: ") + e.getMsg()); } } DOMDocumentFragment* Decrypter::decryptData(const EncryptedData& encryptedData, const XMLCh* recipient) { if (!m_credResolver) throw DecryptionException("No CredentialResolver supplied to provide decryption keys."); // Resolve a decryption key directly. vector creds; int types = CredentialCriteria::KEYINFO_EXTRACTION_KEY | CredentialCriteria::KEYINFO_EXTRACTION_KEYNAMES; if (m_criteria) { m_criteria->setUsage(Credential::ENCRYPTION_CREDENTIAL); m_criteria->setKeyInfo(encryptedData.getKeyInfo(), types); const EncryptionMethod* meth = encryptedData.getEncryptionMethod(); if (meth) m_criteria->setXMLAlgorithm(meth->getAlgorithm()); m_credResolver->resolve(creds, m_criteria); } else { CredentialCriteria criteria; criteria.setUsage(Credential::ENCRYPTION_CREDENTIAL); criteria.setKeyInfo(encryptedData.getKeyInfo(), types); const EncryptionMethod* meth = encryptedData.getEncryptionMethod(); if (meth) criteria.setXMLAlgorithm(meth->getAlgorithm()); m_credResolver->resolve(creds, &criteria); } // Loop over them and try each one. XSECCryptoKey* key; for (vector::const_iterator cred = creds.begin(); cred != creds.end(); ++cred) { try { key = (*cred)->getPrivateKey(); if (!key) continue; return decryptData(encryptedData, key); } catch(DecryptionException& ex) { logging::Category::getInstance(XMLTOOLING_LOGCAT".Decrypter").warn(ex.what()); } } // We need to find an encrypted decryption key somewhere. We'll need the underlying algorithm... const XMLCh* algorithm= encryptedData.getEncryptionMethod() ? encryptedData.getEncryptionMethod()->getAlgorithm() : nullptr; if (!algorithm) throw DecryptionException("No EncryptionMethod/@Algorithm set, key decryption cannot proceed."); // Check for external resolver. const EncryptedKey* encKey=nullptr; if (m_EKResolver) encKey = m_EKResolver->resolveKey(encryptedData, recipient); else { EncryptedKeyResolver ekr; encKey = ekr.resolveKey(encryptedData, recipient); } if (!encKey) throw DecryptionException("Unable to locate an encrypted key."); auto_ptr keywrapper(decryptKey(*encKey, algorithm)); if (!keywrapper.get()) throw DecryptionException("Unable to decrypt the encrypted key."); return decryptData(encryptedData, keywrapper.get()); } void Decrypter::decryptData(ostream& out, const EncryptedData& encryptedData, XSECCryptoKey* key) { if (encryptedData.getDOM() == nullptr) throw DecryptionException("The object must be marshalled before decryption."); XMLToolingInternalConfig& xmlconf = XMLToolingInternalConfig::getInternalConfig(); if (m_requireAuthenticatedCipher) { const XMLCh* alg = encryptedData.getEncryptionMethod() ? encryptedData.getEncryptionMethod()->getAlgorithm() : nullptr; if (!alg || !xmlconf.isXMLAlgorithmSupported(alg, XMLToolingConfig::ALGTYPE_AUTHNENCRYPT)) { throw DecryptionException("Unauthenticated data encryption algorithm unsupported."); } } // We can reuse the cipher object if the document hasn't changed. if (m_cipher && m_cipher->getDocument() != encryptedData.getDOM()->getOwnerDocument()) { xmlconf.m_xsecProvider->releaseCipher(m_cipher); m_cipher = nullptr; } if (!m_cipher) m_cipher = xmlconf.m_xsecProvider->newCipher(encryptedData.getDOM()->getOwnerDocument()); try { m_cipher->setKey(key->clone()); auto_ptr in(m_cipher->decryptToBinInputStream(encryptedData.getDOM())); XMLByte buf[8192]; xsecsize_t count = in->readBytes(buf, sizeof(buf)); while (count > 0) out.write(reinterpret_cast(buf),count); } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); throw DecryptionException(string("XMLSecurity exception while decrypting: ") + temp.get()); } catch(XSECCryptoException& e) { throw DecryptionException(string("XMLSecurity exception while decrypting: ") + e.getMsg()); } } void Decrypter::decryptData(ostream& out, const EncryptedData& encryptedData, const XMLCh* recipient) { if (!m_credResolver) throw DecryptionException("No CredentialResolver supplied to provide decryption keys."); // Resolve a decryption key directly. vector creds; int types = CredentialCriteria::KEYINFO_EXTRACTION_KEY | CredentialCriteria::KEYINFO_EXTRACTION_KEYNAMES; if (m_criteria) { m_criteria->setUsage(Credential::ENCRYPTION_CREDENTIAL); m_criteria->setKeyInfo(encryptedData.getKeyInfo(), types); const EncryptionMethod* meth = encryptedData.getEncryptionMethod(); if (meth) m_criteria->setXMLAlgorithm(meth->getAlgorithm()); m_credResolver->resolve(creds,m_criteria); } else { CredentialCriteria criteria; criteria.setUsage(Credential::ENCRYPTION_CREDENTIAL); criteria.setKeyInfo(encryptedData.getKeyInfo(), types); const EncryptionMethod* meth = encryptedData.getEncryptionMethod(); if (meth) criteria.setXMLAlgorithm(meth->getAlgorithm()); m_credResolver->resolve(creds,&criteria); } // Loop over them and try each one. XSECCryptoKey* key; for (vector::const_iterator cred = creds.begin(); cred != creds.end(); ++cred) { try { key = (*cred)->getPrivateKey(); if (!key) continue; return decryptData(out, encryptedData, key); } catch(DecryptionException& ex) { logging::Category::getInstance(XMLTOOLING_LOGCAT".Decrypter").warn(ex.what()); } } // We need to find an encrypted decryption key somewhere. We'll need the underlying algorithm... const XMLCh* algorithm= encryptedData.getEncryptionMethod() ? encryptedData.getEncryptionMethod()->getAlgorithm() : nullptr; if (!algorithm) throw DecryptionException("No EncryptionMethod/@Algorithm set, key decryption cannot proceed."); // Check for external resolver. const EncryptedKey* encKey=nullptr; if (m_EKResolver) encKey = m_EKResolver->resolveKey(encryptedData, recipient); else { EncryptedKeyResolver ekr; encKey = ekr.resolveKey(encryptedData, recipient); } if (!encKey) throw DecryptionException("Unable to locate an encrypted key."); auto_ptr keywrapper(decryptKey(*encKey, algorithm)); if (!keywrapper.get()) throw DecryptionException("Unable to decrypt the encrypted key."); decryptData(out, encryptedData, keywrapper.get()); } XSECCryptoKey* Decrypter::decryptKey(const EncryptedKey& encryptedKey, const XMLCh* algorithm) { if (!m_credResolver) throw DecryptionException("No CredentialResolver supplied to provide decryption keys."); if (encryptedKey.getDOM()==nullptr) throw DecryptionException("The object must be marshalled before decryption."); XSECAlgorithmHandler* handler; try { handler = XSECPlatformUtils::g_algorithmMapper->mapURIToHandler(algorithm); if (!handler) throw DecryptionException("Unrecognized algorithm, no way to build object around decrypted key."); } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); throw DecryptionException(string("XMLSecurity exception while decrypting key: ") + temp.get()); } catch(XSECCryptoException& e) { throw DecryptionException(string("XMLSecurity exception while decrypting key: ") + e.getMsg()); } // We can reuse the cipher object if the document hasn't changed. if (m_cipher && m_cipher->getDocument()!=encryptedKey.getDOM()->getOwnerDocument()) { XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->releaseCipher(m_cipher); m_cipher = nullptr; } if (!m_cipher) m_cipher = XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->newCipher(encryptedKey.getDOM()->getOwnerDocument()); // Resolve key decryption keys. int types = CredentialCriteria::KEYINFO_EXTRACTION_KEY | CredentialCriteria::KEYINFO_EXTRACTION_KEYNAMES; vector creds; if (m_criteria) { m_criteria->setUsage(Credential::ENCRYPTION_CREDENTIAL); m_criteria->setKeyInfo(encryptedKey.getKeyInfo(), types); const EncryptionMethod* meth = encryptedKey.getEncryptionMethod(); if (meth) m_criteria->setXMLAlgorithm(meth->getAlgorithm()); m_credResolver->resolve(creds, m_criteria); } else { CredentialCriteria criteria; criteria.setUsage(Credential::ENCRYPTION_CREDENTIAL); criteria.setKeyInfo(encryptedKey.getKeyInfo(), types); const EncryptionMethod* meth = encryptedKey.getEncryptionMethod(); if (meth) criteria.setXMLAlgorithm(meth->getAlgorithm()); m_credResolver->resolve(creds, &criteria); } if (creds.empty()) throw DecryptionException("Unable to resolve any key decryption keys."); XMLByte buffer[1024]; for (vector::const_iterator cred = creds.begin(); cred != creds.end(); ++cred) { try { if (!(*cred)->getPrivateKey()) throw DecryptionException("Credential did not contain a private key."); memset(buffer,0,sizeof(buffer)); m_cipher->setKEK((*cred)->getPrivateKey()->clone()); try { int keySize = m_cipher->decryptKey(encryptedKey.getDOM(), buffer, 1024); if (keySize<=0) throw DecryptionException("Unable to decrypt key."); // Try to wrap the key. return handler->createKeyForURI(algorithm, buffer, keySize); } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); throw DecryptionException(string("XMLSecurity exception while decrypting key: ") + temp.get()); } catch(XSECCryptoException& e) { throw DecryptionException(string("XMLSecurity exception while decrypting key: ") + e.getMsg()); } } catch(DecryptionException& ex) { logging::Category::getInstance(XMLTOOLING_LOGCAT".Decrypter").warn(ex.what()); } } // Some algorithms are vulnerable to chosen ciphertext attacks, so we generate a random key // to prevent discovery of the validity of the original candidate. logging::Category::getInstance(XMLTOOLING_LOGCAT".Decrypter").warn( "unable to decrypt key, generating random key for defensive purposes" ); pair mapped = XMLToolingConfig::getConfig().mapXMLAlgorithmToKeyAlgorithm(algorithm); if (!mapped.second) mapped.second = 256; try { if (XSECPlatformUtils::g_cryptoProvider->getRandom(reinterpret_cast(buffer),mapped.second) < mapped.second) throw DecryptionException("Unable to generate random data; was PRNG seeded?"); return handler->createKeyForURI(algorithm, buffer, mapped.second); } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); throw DecryptionException(string("XMLSecurity exception while generating key: ") + temp.get()); } catch (XSECCryptoException& e) { throw DecryptionException(string("XMLSecurity exception while generating key: ") + e.getMsg()); } } xmltooling-1.5.3/xmltooling/encryption/impl/EncryptedKeyResolver.cpp000644 001751 001751 00000006653 12003305016 027265 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * EncryptedKeyResolver.cpp * * Resolves encrypted keys based on EncryptedData information or other external factors. */ #include "internal.h" #include "encryption/EncryptedKeyResolver.h" #include "signature/KeyInfo.h" #include using namespace xmlencryption; using namespace xmlsignature; using namespace xmltooling; using namespace xercesc; using namespace std; EncryptedKeyResolver::EncryptedKeyResolver() { } EncryptedKeyResolver::~EncryptedKeyResolver() { } const EncryptedKey* EncryptedKeyResolver::resolveKey(const EncryptedData& encryptedData, const XMLCh* recipient) const { if (!encryptedData.getKeyInfo()) return nullptr; const vector& others = const_cast(encryptedData.getKeyInfo())->getUnknownXMLObjects(); for (vector::const_iterator i = others.begin(); i != others.end(); i++) { EncryptedKey* encKey = dynamic_cast(*i); if (encKey) { if (!recipient || !encKey->getRecipient() || XMLString::equals(recipient,encKey->getRecipient())) return encKey; } } static const XMLCh rmtype[] = { // http://www.w3.org/2001/04/xmlenc#EncryptedKey chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash, chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash, chDigit_2, chDigit_0, chDigit_0, chDigit_1, chForwardSlash, chDigit_0, chDigit_4, chForwardSlash, chLatin_x, chLatin_m, chLatin_l, chLatin_e, chLatin_n, chLatin_c, chPound, chLatin_E, chLatin_n, chLatin_c, chLatin_r, chLatin_y, chLatin_p, chLatin_t, chLatin_e, chLatin_d, chLatin_K, chLatin_e, chLatin_y, chNull }; const XMLObject* treeRoot = nullptr; const vector& methods = const_cast(encryptedData.getKeyInfo())->getRetrievalMethods(); for (vector::const_iterator m = methods.begin(); m != methods.end(); ++m) { if (XMLString::equals((*m)->getType(), rmtype)) { const XMLCh* ref = (*m)->getURI(); if (ref && *ref == chPound) { if (!treeRoot) { treeRoot = &encryptedData; while (treeRoot->getParent()) treeRoot = treeRoot->getParent(); } const EncryptedKey* encKey = dynamic_cast(XMLHelper::getXMLObjectById(*treeRoot, ref+1)); if (encKey) return encKey; } } } return nullptr; } xmltooling-1.5.3/xmltooling/encryption/impl/Encrypter.cpp000644 001751 001751 00000034767 12003305016 025117 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * Encrypter.cpp * * Methods for encrypting XMLObjects and other data. */ #include "internal.h" #include "encryption/Encrypter.h" #include "encryption/Encryption.h" #include "security/Credential.h" #include "signature/KeyInfo.h" #include #include #include #include #include #include #include using namespace xmlencryption; using namespace xmlsignature; using namespace xmltooling; using namespace xercesc; using namespace std; Encrypter::EncryptionParams::EncryptionParams( const XMLCh* algorithm, const unsigned char* keyBuffer, unsigned int keyBufferSize, const Credential* credential, bool compact ) : m_algorithm(algorithm), m_keyBuffer(keyBuffer), m_keyBufferSize(keyBufferSize), m_credential(credential), m_compact(compact) { } Encrypter::EncryptionParams::~EncryptionParams() { } Encrypter::KeyEncryptionParams::KeyEncryptionParams(const Credential& credential, const XMLCh* algorithm, const XMLCh* recipient) : m_credential(credential), m_algorithm(algorithm), m_recipient(recipient) { } Encrypter::KeyEncryptionParams::~KeyEncryptionParams() { } Encrypter::Encrypter() : m_cipher(nullptr) { } Encrypter::~Encrypter() { XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->releaseCipher(m_cipher); memset(m_keyBuffer,0,32); } void Encrypter::checkParams(EncryptionParams& encParams, KeyEncryptionParams* kencParams) { if (encParams.m_keyBufferSize==0) { if (encParams.m_credential) { if (kencParams) throw EncryptionException("Generating EncryptedKey inline requires the encryption key in raw form."); } else { if (!kencParams) throw EncryptionException("Using a generated encryption key requires a KeyEncryptionParams object."); // We're generating a random key. The maximum supported length is AES-256, so we need 32 bytes. if (XSECPlatformUtils::g_cryptoProvider->getRandom(m_keyBuffer,32)<32) throw EncryptionException("Unable to generate random data; was PRNG seeded?"); encParams.m_keyBuffer=m_keyBuffer; encParams.m_keyBufferSize=32; } } XSECCryptoKey* key=nullptr; if (encParams.m_credential) { key = encParams.m_credential->getPrivateKey(); if (!key) throw EncryptionException("Credential in EncryptionParams structure did not supply a private/secret key."); // Set the encryption key. m_cipher->setKey(key->clone()); } else { // We have to have a raw key now, so we need to build a wrapper around it. XSECAlgorithmHandler* handler =XSECPlatformUtils::g_algorithmMapper->mapURIToHandler(encParams.m_algorithm); if (handler != nullptr) key = handler->createKeyForURI( encParams.m_algorithm,const_cast(encParams.m_keyBuffer),encParams.m_keyBufferSize ); if (!key) throw EncryptionException("Unable to build wrapper for key, unknown algorithm?"); // Overwrite the length if known. switch (static_cast(key)->getSymmetricKeyType()) { case XSECCryptoSymmetricKey::KEY_3DES_192: encParams.m_keyBufferSize = 192/8; break; case XSECCryptoSymmetricKey::KEY_AES_128: encParams.m_keyBufferSize = 128/8; break; case XSECCryptoSymmetricKey::KEY_AES_192: encParams.m_keyBufferSize = 192/8; break; case XSECCryptoSymmetricKey::KEY_AES_256: encParams.m_keyBufferSize = 256/8; break; } // Set the encryption key. m_cipher->setKey(key); } } EncryptedData* Encrypter::encryptElement(DOMElement* element, EncryptionParams& encParams, KeyEncryptionParams* kencParams) { // We can reuse the cipher object if the document hasn't changed. if (m_cipher && m_cipher->getDocument()!=element->getOwnerDocument()) { XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->releaseCipher(m_cipher); m_cipher=nullptr; } if (!m_cipher) { m_cipher=XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->newCipher(element->getOwnerDocument()); m_cipher->setExclusiveC14nSerialisation(false); } try { checkParams(encParams,kencParams); m_cipher->encryptElementDetached(element, ENCRYPT_NONE, encParams.m_algorithm); return decorateAndUnmarshall(encParams, kencParams); } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); throw EncryptionException(string("XMLSecurity exception while encrypting: ") + temp.get()); } catch(XSECCryptoException& e) { throw EncryptionException(string("XMLSecurity exception while encrypting: ") + e.getMsg()); } } EncryptedData* Encrypter::encryptElementContent(DOMElement* element, EncryptionParams& encParams, KeyEncryptionParams* kencParams) { // We can reuse the cipher object if the document hasn't changed. if (m_cipher && m_cipher->getDocument()!=element->getOwnerDocument()) { XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->releaseCipher(m_cipher); m_cipher=nullptr; } if (!m_cipher) { m_cipher=XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->newCipher(element->getOwnerDocument()); m_cipher->setExclusiveC14nSerialisation(false); } try { checkParams(encParams,kencParams); m_cipher->encryptElementContentDetached(element, ENCRYPT_NONE, encParams.m_algorithm); return decorateAndUnmarshall(encParams, kencParams); } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); throw EncryptionException(string("XMLSecurity exception while encrypting: ") + temp.get()); } catch(XSECCryptoException& e) { throw EncryptionException(string("XMLSecurity exception while encrypting: ") + e.getMsg()); } } EncryptedData* Encrypter::encryptStream(istream& input, EncryptionParams& encParams, KeyEncryptionParams* kencParams) { // Get a fresh cipher object and document. if (m_cipher) { XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->releaseCipher(m_cipher); m_cipher=nullptr; } DOMDocument* doc=nullptr; try { doc=XMLToolingConfig::getConfig().getParser().newDocument(); XercesJanitor janitor(doc); m_cipher=XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->newCipher(doc); m_cipher->setExclusiveC14nSerialisation(false); checkParams(encParams,kencParams); StreamInputSource::StreamBinInputStream xstream(input); m_cipher->encryptBinInputStream(&xstream, ENCRYPT_NONE, encParams.m_algorithm); return decorateAndUnmarshall(encParams, kencParams); } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); throw EncryptionException(string("XMLSecurity exception while encrypting: ") + temp.get()); } catch(XSECCryptoException& e) { throw EncryptionException(string("XMLSecurity exception while encrypting: ") + e.getMsg()); } } EncryptedData* Encrypter::decorateAndUnmarshall(EncryptionParams& encParams, KeyEncryptionParams* kencParams) { XENCEncryptedData* encData=m_cipher->getEncryptedData(); if (!encData) throw EncryptionException("No EncryptedData element found?"); // Unmarshall a tooling version of EncryptedData around the DOM. EncryptedData* xmlEncData=nullptr; auto_ptr xmlObject(XMLObjectBuilder::buildOneFromElement(encData->getElement())); if (!(xmlObject.get()) || !(xmlEncData=dynamic_cast(xmlObject.get()))) throw EncryptionException("Unable to unmarshall into EncryptedData object."); // Unbind from DOM so we can divorce this from the original document. xmlEncData->releaseThisAndChildrenDOM(); // KeyInfo? KeyInfo* kinfo = encParams.m_credential ? encParams.m_credential->getKeyInfo(encParams.m_compact) : nullptr; if (kinfo) xmlEncData->setKeyInfo(kinfo); // Are we doing a key encryption? if (kencParams) { XSECCryptoKey* kek = kencParams->m_credential.getPublicKey(); if (!kek) throw EncryptionException("Credential in KeyEncryptionParams structure did not supply a public key."); if (!kencParams->m_algorithm) kencParams->m_algorithm = getKeyTransportAlgorithm(kencParams->m_credential, encParams.m_algorithm); if (!kencParams->m_algorithm) throw EncryptionException("Unable to derive a supported key encryption algorithm."); m_cipher->setKEK(kek->clone()); // ownership of this belongs to us, for some reason... auto_ptr encKey( m_cipher->encryptKey(encParams.m_keyBuffer, encParams.m_keyBufferSize, ENCRYPT_NONE, kencParams->m_algorithm) ); EncryptedKey* xmlEncKey=nullptr; auto_ptr xmlObjectKey(XMLObjectBuilder::buildOneFromElement(encKey->getElement())); if (!(xmlObjectKey.get()) || !(xmlEncKey=dynamic_cast(xmlObjectKey.get()))) throw EncryptionException("Unable to unmarshall into EncryptedKey object."); xmlEncKey->releaseThisAndChildrenDOM(); // Recipient? if (kencParams->m_recipient) xmlEncKey->setRecipient(kencParams->m_recipient); // KeyInfo? kinfo = kencParams->m_credential.getKeyInfo(encParams.m_compact); if (kinfo) xmlEncKey->setKeyInfo(kinfo); // Add the EncryptedKey inline. if (!xmlEncData->getKeyInfo()) xmlEncData->setKeyInfo(KeyInfoBuilder::buildKeyInfo()); xmlEncData->getKeyInfo()->getUnknownXMLObjects().push_back(xmlEncKey); xmlObjectKey.release(); } xmlObject.release(); return xmlEncData; } EncryptedKey* Encrypter::encryptKey( const unsigned char* keyBuffer, unsigned int keyBufferSize, KeyEncryptionParams& kencParams, bool compact ) { if (!kencParams.m_algorithm) throw EncryptionException("KeyEncryptionParams structure did not include a key encryption algorithm."); // Get a fresh cipher object and document. if (m_cipher) { XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->releaseCipher(m_cipher); m_cipher=nullptr; } XSECCryptoKey* kek = kencParams.m_credential.getPublicKey(); if (!kek) throw EncryptionException("Credential in KeyEncryptionParams structure did not supply a public key."); DOMDocument* doc=nullptr; try { doc=XMLToolingConfig::getConfig().getParser().newDocument(); XercesJanitor janitor(doc); m_cipher=XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->newCipher(doc); m_cipher->setExclusiveC14nSerialisation(false); m_cipher->setKEK(kek->clone()); auto_ptr encKey(m_cipher->encryptKey(keyBuffer, keyBufferSize, ENCRYPT_NONE, kencParams.m_algorithm)); EncryptedKey* xmlEncKey=nullptr; auto_ptr xmlObjectKey(XMLObjectBuilder::buildOneFromElement(encKey->getElement())); if (!(xmlObjectKey.get()) || !(xmlEncKey=dynamic_cast(xmlObjectKey.get()))) throw EncryptionException("Unable to unmarshall into EncryptedKey object."); xmlEncKey->releaseThisAndChildrenDOM(); // Recipient? if (kencParams.m_recipient) xmlEncKey->setRecipient(kencParams.m_recipient); // KeyInfo? KeyInfo* kinfo = kencParams.m_credential.getKeyInfo(compact); if (kinfo) xmlEncKey->setKeyInfo(kinfo); xmlObjectKey.release(); return xmlEncKey; } catch(XSECException& e) { auto_ptr_char temp(e.getMsg()); throw EncryptionException(string("XMLSecurity exception while encrypting: ") + temp.get()); } catch(XSECCryptoException& e) { throw EncryptionException(string("XMLSecurity exception while encrypting: ") + e.getMsg()); } } const XMLCh* Encrypter::getKeyTransportAlgorithm(const Credential& credential, const XMLCh* encryptionAlg) { XMLToolingConfig& conf = XMLToolingConfig::getConfig(); const char* alg = credential.getAlgorithm(); if (!alg || !strcmp(alg, "RSA")) { if (conf.isXMLAlgorithmSupported(DSIGConstants::s_unicodeStrURIRSA_OAEP_MGFP1, XMLToolingConfig::ALGTYPE_KEYENCRYPT)) return DSIGConstants::s_unicodeStrURIRSA_OAEP_MGFP1; else if (conf.isXMLAlgorithmSupported(DSIGConstants::s_unicodeStrURIRSA_1_5, XMLToolingConfig::ALGTYPE_KEYENCRYPT)) return DSIGConstants::s_unicodeStrURIRSA_1_5; } else if (!strcmp(alg, "AES")) { const XMLCh* ret = nullptr; switch (credential.getKeySize()) { case 128: ret = DSIGConstants::s_unicodeStrURIKW_AES128; case 192: ret = DSIGConstants::s_unicodeStrURIKW_AES192; case 256: ret = DSIGConstants::s_unicodeStrURIKW_AES256; default: return nullptr; } if (conf.isXMLAlgorithmSupported(ret, XMLToolingConfig::ALGTYPE_KEYENCRYPT)) return ret; } else if (!strcmp(alg, "DESede")) { if (conf.isXMLAlgorithmSupported(DSIGConstants::s_unicodeStrURIKW_3DES, XMLToolingConfig::ALGTYPE_KEYENCRYPT)) return DSIGConstants::s_unicodeStrURIKW_3DES; } return nullptr; } xmltooling-1.5.3/xmltooling/encryption/impl/EncryptionImpl.cpp000644 001751 001751 00000072540 12007564200 026115 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * EncryptionImpl.cpp * * Implementation classes for XML Encryption schema. */ #include "internal.h" #include "AbstractAttributeExtensibleXMLObject.h" #include "AbstractComplexElement.h" #include "AbstractSimpleElement.h" #include "exceptions.h" #include "encryption/Encryption.h" #include "io/AbstractXMLObjectMarshaller.h" #include "io/AbstractXMLObjectUnmarshaller.h" #include "signature/KeyInfo.h" #include "util/XMLHelper.h" #include #include #include #include #include using namespace xmlencryption; using namespace xmltooling; using namespace xercesc; using namespace std; using xmlconstants::XMLENC_NS; using xmlconstants::XMLSIG_NS; #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) #endif namespace xmlencryption { DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,CarriedKeyName); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,CipherValue); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,KeySize); DECL_XMLOBJECTIMPL_SIMPLE(XMLTOOL_DLLLOCAL,OAEPparams); class XMLTOOL_DLLLOCAL EncryptionMethodImpl : public virtual EncryptionMethod, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { void init() { m_Algorithm=nullptr; m_KeySize=nullptr; m_OAEPparams=nullptr; m_children.push_back(nullptr); m_children.push_back(nullptr); m_pos_KeySize=m_children.begin(); m_pos_OAEPparams=m_pos_KeySize; ++m_pos_OAEPparams; } public: virtual ~EncryptionMethodImpl() { XMLString::release(&m_Algorithm); } EncryptionMethodImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { init(); } EncryptionMethodImpl(const EncryptionMethodImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { init(); IMPL_CLONE_ATTRIB(Algorithm); IMPL_CLONE_TYPED_CHILD(KeySize); IMPL_CLONE_TYPED_CHILD(OAEPparams); IMPL_CLONE_XMLOBJECT_CHILDREN(UnknownXMLObject); } IMPL_XMLOBJECT_CLONE(EncryptionMethod); IMPL_STRING_ATTRIB(Algorithm); IMPL_TYPED_CHILD(KeySize); IMPL_TYPED_CHILD(OAEPparams); IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end()); protected: void marshallAttributes(DOMElement* domElement) const { MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_CHILD(KeySize,XMLENC_NS,false); PROC_TYPED_CHILD(OAEPparams,XMLENC_NS,false); // Unknown child. const XMLCh* nsURI=root->getNamespaceURI(); if (!XMLString::equals(nsURI,XMLENC_NS) && nsURI && *nsURI) { getUnknownXMLObjects().push_back(childXMLObject); return; } AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } void processAttribute(const DOMAttr* attribute) { PROC_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr); AbstractXMLObjectUnmarshaller::processAttribute(attribute); } }; class XMLTOOL_DLLLOCAL TransformsImpl : public virtual Transforms, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { public: virtual ~TransformsImpl() {} TransformsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { } TransformsImpl(const TransformsImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { IMPL_CLONE_TYPED_FOREIGN_CHILDREN(Transform,xmlsignature); } IMPL_XMLOBJECT_CLONE(Transforms); IMPL_TYPED_FOREIGN_CHILDREN(Transform,xmlsignature,m_children.end()); protected: void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_FOREIGN_CHILDREN(Transform,xmlsignature,XMLSIG_NS,false); AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } }; class XMLTOOL_DLLLOCAL CipherReferenceImpl : public virtual CipherReference, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { void init() { m_URI=nullptr; m_Transforms=nullptr; m_children.push_back(nullptr); m_pos_Transforms=m_children.begin(); } public: virtual ~CipherReferenceImpl() { XMLString::release(&m_URI); } CipherReferenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { init(); } CipherReferenceImpl(const CipherReferenceImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { init(); IMPL_CLONE_ATTRIB(URI); IMPL_CLONE_TYPED_CHILD(Transforms); } IMPL_XMLOBJECT_CLONE(CipherReference); IMPL_STRING_ATTRIB(URI); IMPL_TYPED_CHILD(Transforms); protected: void marshallAttributes(DOMElement* domElement) const { MARSHALL_STRING_ATTRIB(URI,URI,nullptr); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_CHILD(Transforms,XMLENC_NS,false); AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } void processAttribute(const DOMAttr* attribute) { PROC_STRING_ATTRIB(URI,URI,nullptr); AbstractXMLObjectUnmarshaller::processAttribute(attribute); } }; class XMLTOOL_DLLLOCAL CipherDataImpl : public virtual CipherData, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { void init() { m_CipherValue=nullptr; m_CipherReference=nullptr; m_children.push_back(nullptr); m_children.push_back(nullptr); m_pos_CipherValue=m_children.begin(); m_pos_CipherReference=m_pos_CipherValue; ++m_pos_CipherReference; } public: virtual ~CipherDataImpl() {} CipherDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { init(); } CipherDataImpl(const CipherDataImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { init(); IMPL_CLONE_TYPED_CHILD(CipherValue); IMPL_CLONE_TYPED_CHILD(CipherReference); } IMPL_XMLOBJECT_CLONE(CipherData); IMPL_TYPED_CHILD(CipherValue); IMPL_TYPED_CHILD(CipherReference); protected: void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_CHILD(CipherValue,XMLENC_NS,false); PROC_TYPED_CHILD(CipherReference,XMLENC_NS,false); AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } }; class XMLTOOL_DLLLOCAL EncryptionPropertyImpl : public virtual EncryptionProperty, public AbstractAttributeExtensibleXMLObject, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { void init() { m_Id=m_Target=nullptr; } public: virtual ~EncryptionPropertyImpl() { XMLString::release(&m_Id); XMLString::release(&m_Target); } EncryptionPropertyImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { init(); } EncryptionPropertyImpl(const EncryptionPropertyImpl& src) : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { init(); IMPL_CLONE_ATTRIB(Id); IMPL_CLONE_ATTRIB(Target); IMPL_CLONE_XMLOBJECT_CHILDREN(UnknownXMLObject); } IMPL_XMLOBJECT_CLONE(EncryptionProperty); IMPL_ID_ATTRIB_EX(Id,ID,nullptr); IMPL_STRING_ATTRIB(Target); IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject, m_children.end()); void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) { if (!qualifiedName.hasNamespaceURI()) { if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) { setId(value); return; } else if (XMLString::equals(qualifiedName.getLocalPart(),TARGET_ATTRIB_NAME)) { setTarget(value); return; } } AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID); } protected: void marshallAttributes(DOMElement* domElement) const { MARSHALL_ID_ATTRIB(Id,ID,nullptr); MARSHALL_STRING_ATTRIB(Target,TARGET,nullptr); marshallExtensionAttributes(domElement); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { getUnknownXMLObjects().push_back(childXMLObject); } void processAttribute(const DOMAttr* attribute) { PROC_ID_ATTRIB(Id,ID,nullptr); unmarshallExtensionAttribute(attribute); } }; class XMLTOOL_DLLLOCAL EncryptionPropertiesImpl : public virtual EncryptionProperties, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { void init() { m_Id=nullptr; } public: virtual ~EncryptionPropertiesImpl() { XMLString::release(&m_Id); } EncryptionPropertiesImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { init(); } EncryptionPropertiesImpl(const EncryptionPropertiesImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { init(); IMPL_CLONE_ATTRIB(Id); IMPL_CLONE_TYPED_CHILDREN(EncryptionProperty); } IMPL_XMLOBJECT_CLONE(EncryptionProperties); IMPL_ID_ATTRIB_EX(Id,ID,nullptr); IMPL_TYPED_CHILDREN(EncryptionProperty,m_children.end()); protected: void marshallAttributes(DOMElement* domElement) const { MARSHALL_ID_ATTRIB(Id,ID,nullptr); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_CHILDREN(EncryptionProperty,XMLENC_NS,false); AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } void processAttribute(const DOMAttr* attribute) { PROC_ID_ATTRIB(Id,ID,nullptr); AbstractXMLObjectUnmarshaller::processAttribute(attribute); } }; class XMLTOOL_DLLLOCAL ReferenceTypeImpl : public virtual ReferenceType, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { protected: ReferenceTypeImpl() { m_URI=nullptr; } public: virtual ~ReferenceTypeImpl() { XMLString::release(&m_URI); } ReferenceTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_URI(nullptr) { } ReferenceTypeImpl(const ReferenceTypeImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src), m_URI(nullptr) { } void _clone(const ReferenceTypeImpl& src) { IMPL_CLONE_ATTRIB(URI); IMPL_CLONE_XMLOBJECT_CHILDREN(UnknownXMLObject); } IMPL_XMLOBJECT_CLONE_EX(ReferenceType); IMPL_STRING_ATTRIB(URI); IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end()); protected: void marshallAttributes(DOMElement* domElement) const { MARSHALL_STRING_ATTRIB(URI,URI,nullptr); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { getUnknownXMLObjects().push_back(childXMLObject); } void processAttribute(const DOMAttr* attribute) { PROC_STRING_ATTRIB(URI,URI,nullptr); AbstractXMLObjectUnmarshaller::processAttribute(attribute); } }; class XMLTOOL_DLLLOCAL DataReferenceImpl : public virtual DataReference, public ReferenceTypeImpl { public: virtual ~DataReferenceImpl() {} DataReferenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) {} DataReferenceImpl(const DataReferenceImpl& src) : AbstractXMLObject(src), ReferenceTypeImpl(src) {} IMPL_XMLOBJECT_CLONE_EX(DataReference); }; class XMLTOOL_DLLLOCAL KeyReferenceImpl : public virtual KeyReference, public ReferenceTypeImpl { public: virtual ~KeyReferenceImpl() {} KeyReferenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) {} KeyReferenceImpl(const KeyReferenceImpl& src) : AbstractXMLObject(src), ReferenceTypeImpl(src) {} IMPL_XMLOBJECT_CLONE_EX(KeyReference); }; class XMLTOOL_DLLLOCAL ReferenceListImpl : public virtual ReferenceList, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { public: virtual ~ReferenceListImpl() {} ReferenceListImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { } ReferenceListImpl(const ReferenceListImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { IMPL_CLONE_CHILDBAG_BEGIN; IMPL_CLONE_TYPED_CHILD_IN_BAG(DataReference); IMPL_CLONE_TYPED_CHILD_IN_BAG(KeyReference); IMPL_CLONE_CHILDBAG_END; } IMPL_XMLOBJECT_CLONE(ReferenceList); IMPL_TYPED_CHILDREN(DataReference,m_children.end()); IMPL_TYPED_CHILDREN(KeyReference,m_children.end()); protected: void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_CHILDREN(DataReference,XMLENC_NS,false); PROC_TYPED_CHILDREN(KeyReference,XMLENC_NS,false); AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } }; class XMLTOOL_DLLLOCAL EncryptedTypeImpl : public virtual EncryptedType, public AbstractComplexElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { void init() { m_Id=m_Type=m_MimeType=m_Encoding=nullptr; m_EncryptionMethod=nullptr; m_KeyInfo=nullptr; m_CipherData=nullptr; m_EncryptionProperties=nullptr; m_children.push_back(nullptr); m_children.push_back(nullptr); m_children.push_back(nullptr); m_children.push_back(nullptr); m_pos_EncryptionMethod=m_children.begin(); m_pos_KeyInfo=m_pos_EncryptionMethod; ++m_pos_KeyInfo; m_pos_CipherData=m_pos_KeyInfo; ++m_pos_CipherData; m_pos_EncryptionProperties=m_pos_CipherData; ++m_pos_EncryptionProperties; } protected: EncryptedTypeImpl() { init(); } public: virtual ~EncryptedTypeImpl() { XMLString::release(&m_Id); XMLString::release(&m_Type); XMLString::release(&m_MimeType); XMLString::release(&m_Encoding); } EncryptedTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { init(); } EncryptedTypeImpl(const EncryptedTypeImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { init(); } void _clone(const EncryptedTypeImpl& src) { IMPL_CLONE_ATTRIB(Id); IMPL_CLONE_ATTRIB(Type); IMPL_CLONE_ATTRIB(MimeType); IMPL_CLONE_ATTRIB(Encoding); IMPL_CLONE_TYPED_CHILD(EncryptionMethod); IMPL_CLONE_TYPED_CHILD(KeyInfo); IMPL_CLONE_TYPED_CHILD(CipherData); IMPL_CLONE_TYPED_CHILD(EncryptionProperties); } IMPL_XMLOBJECT_CLONE_EX(EncryptedType); IMPL_ID_ATTRIB_EX(Id,ID,nullptr); IMPL_STRING_ATTRIB(Type); IMPL_STRING_ATTRIB(MimeType); IMPL_STRING_ATTRIB(Encoding); IMPL_TYPED_CHILD(EncryptionMethod); IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature); IMPL_TYPED_CHILD(CipherData); IMPL_TYPED_CHILD(EncryptionProperties); protected: void marshallAttributes(DOMElement* domElement) const { MARSHALL_ID_ATTRIB(Id,ID,nullptr); MARSHALL_STRING_ATTRIB(Type,TYPE,nullptr); MARSHALL_STRING_ATTRIB(MimeType,MIMETYPE,nullptr); MARSHALL_STRING_ATTRIB(Encoding,ENCODING,nullptr); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_CHILD(EncryptionMethod,XMLENC_NS,false); PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLSIG_NS,false); PROC_TYPED_CHILD(CipherData,XMLENC_NS,false); PROC_TYPED_CHILD(EncryptionProperties,XMLENC_NS,false); AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } void processAttribute(const DOMAttr* attribute) { PROC_ID_ATTRIB(Id,ID,nullptr); PROC_STRING_ATTRIB(Type,TYPE,nullptr); PROC_STRING_ATTRIB(MimeType,MIMETYPE,nullptr); PROC_STRING_ATTRIB(Encoding,ENCODING,nullptr); AbstractXMLObjectUnmarshaller::processAttribute(attribute); } }; class XMLTOOL_DLLLOCAL EncryptedDataImpl : public virtual EncryptedData, public EncryptedTypeImpl { public: virtual ~EncryptedDataImpl() {} EncryptedDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) {} EncryptedDataImpl(const EncryptedDataImpl& src) : AbstractXMLObject(src), EncryptedTypeImpl(src) {} IMPL_XMLOBJECT_CLONE_EX(EncryptedData); }; class XMLTOOL_DLLLOCAL EncryptedKeyImpl : public virtual EncryptedKey, public EncryptedTypeImpl { void init() { m_Recipient=nullptr; m_ReferenceList=nullptr; m_CarriedKeyName=nullptr; m_children.push_back(nullptr); m_children.push_back(nullptr); m_pos_ReferenceList=m_pos_EncryptionProperties; ++m_pos_ReferenceList; m_pos_CarriedKeyName=m_pos_ReferenceList; ++m_pos_CarriedKeyName; } public: virtual ~EncryptedKeyImpl() { XMLString::release(&m_Recipient); } EncryptedKeyImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { init(); } EncryptedKeyImpl(const EncryptedKeyImpl& src) : AbstractXMLObject(src), EncryptedTypeImpl(src) { init(); } void _clone(const EncryptedKeyImpl& src) { EncryptedTypeImpl::_clone(src); IMPL_CLONE_ATTRIB(Recipient); IMPL_CLONE_TYPED_CHILD(ReferenceList); IMPL_CLONE_TYPED_CHILD(CarriedKeyName); } IMPL_XMLOBJECT_CLONE_EX(EncryptedKey); IMPL_STRING_ATTRIB(Recipient); IMPL_TYPED_CHILD(ReferenceList); IMPL_TYPED_CHILD(CarriedKeyName); protected: void marshallAttributes(DOMElement* domElement) const { MARSHALL_STRING_ATTRIB(Recipient,RECIPIENT,nullptr); EncryptedTypeImpl::marshallAttributes(domElement); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_CHILD(ReferenceList,XMLENC_NS,false); PROC_TYPED_CHILD(CarriedKeyName,XMLENC_NS,false); EncryptedTypeImpl::processChildElement(childXMLObject,root); } void processAttribute(const DOMAttr* attribute) { PROC_STRING_ATTRIB(Recipient,RECIPIENT,nullptr); EncryptedTypeImpl::processAttribute(attribute); } }; class XMLTOOL_DLLLOCAL MGFImpl : public virtual MGF, public AbstractSimpleElement, public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { void init() { m_Algorithm = nullptr; } public: virtual ~MGFImpl() { XMLString::release(&m_Algorithm); } MGFImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { init(); } MGFImpl(const MGFImpl& src) : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) { init(); IMPL_CLONE_ATTRIB(Algorithm); } IMPL_XMLOBJECT_CLONE(MGF); IMPL_STRING_ATTRIB(Algorithm); protected: void marshallAttributes(DOMElement* domElement) const { MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr); } void processAttribute(const DOMAttr* attribute) { PROC_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr); AbstractXMLObjectUnmarshaller::processAttribute(attribute); } }; }; #if defined (_MSC_VER) #pragma warning( pop ) #endif // Builder Implementations IMPL_XMLOBJECTBUILDER(CarriedKeyName); IMPL_XMLOBJECTBUILDER(CipherData); IMPL_XMLOBJECTBUILDER(CipherReference); IMPL_XMLOBJECTBUILDER(CipherValue); IMPL_XMLOBJECTBUILDER(DataReference); IMPL_XMLOBJECTBUILDER(EncryptedData); IMPL_XMLOBJECTBUILDER(EncryptedKey); IMPL_XMLOBJECTBUILDER(EncryptionMethod); IMPL_XMLOBJECTBUILDER(EncryptionProperties); IMPL_XMLOBJECTBUILDER(EncryptionProperty); IMPL_XMLOBJECTBUILDER(KeyReference); IMPL_XMLOBJECTBUILDER(KeySize); IMPL_XMLOBJECTBUILDER(OAEPparams); IMPL_XMLOBJECTBUILDER(ReferenceList); IMPL_XMLOBJECTBUILDER(Transforms); IMPL_XMLOBJECTBUILDER(MGF); // Unicode literals const XMLCh CarriedKeyName::LOCAL_NAME[] = UNICODE_LITERAL_14(C,a,r,r,i,e,d,K,e,y,N,a,m,e); const XMLCh CipherData::LOCAL_NAME[] = UNICODE_LITERAL_10(C,i,p,h,e,r,D,a,t,a); const XMLCh CipherData::TYPE_NAME[] = UNICODE_LITERAL_14(C,i,p,h,e,r,D,a,t,a,T,y,p,e); const XMLCh CipherReference::LOCAL_NAME[] = UNICODE_LITERAL_15(C,i,p,h,e,r,R,e,f,e,r,e,n,c,e); const XMLCh CipherReference::TYPE_NAME[] = UNICODE_LITERAL_19(C,i,p,h,e,r,R,e,f,e,r,e,n,c,e,T,y,p,e); const XMLCh CipherReference::URI_ATTRIB_NAME[] = UNICODE_LITERAL_3(U,R,I); const XMLCh CipherValue::LOCAL_NAME[] = UNICODE_LITERAL_11(C,i,p,h,e,r,V,a,l,u,e); const XMLCh DataReference::LOCAL_NAME[] = UNICODE_LITERAL_13(D,a,t,a,R,e,f,e,r,e,n,c,e); const XMLCh EncryptedData::LOCAL_NAME[] = UNICODE_LITERAL_13(E,n,c,r,y,p,t,e,d,D,a,t,a); const XMLCh EncryptedData::TYPE_NAME[] = UNICODE_LITERAL_17(E,n,c,r,y,p,t,e,d,D,a,t,a,T,y,p,e); const XMLCh EncryptedKey::LOCAL_NAME[] = UNICODE_LITERAL_12(E,n,c,r,y,p,t,e,d,K,e,y); const XMLCh EncryptedKey::TYPE_NAME[] = UNICODE_LITERAL_16(E,n,c,r,y,p,t,e,d,K,e,y,T,y,p,e); const XMLCh EncryptedKey::RECIPIENT_ATTRIB_NAME[] = UNICODE_LITERAL_9(R,e,c,i,p,i,e,n,t); const XMLCh EncryptedType::LOCAL_NAME[] = {chNull}; const XMLCh EncryptedType::TYPE_NAME[] = UNICODE_LITERAL_13(E,n,c,r,y,p,t,e,d,T,y,p,e); const XMLCh EncryptedType::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,d); const XMLCh EncryptedType::TYPE_ATTRIB_NAME[] = UNICODE_LITERAL_4(T,y,p,e); const XMLCh EncryptedType::MIMETYPE_ATTRIB_NAME[] = UNICODE_LITERAL_8(M,i,m,e,T,y,p,e); const XMLCh EncryptedType::ENCODING_ATTRIB_NAME[] = UNICODE_LITERAL_8(E,n,c,o,d,i,n,g); const XMLCh EncryptionMethod::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,c,r,y,p,t,i,o,n,M,e,t,h,o,d); const XMLCh EncryptionMethod::TYPE_NAME[] = UNICODE_LITERAL_20(E,n,c,r,y,p,t,i,o,n,M,e,t,h,o,d,T,y,p,e); const XMLCh EncryptionMethod::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m); const XMLCh EncryptionProperties::LOCAL_NAME[] = UNICODE_LITERAL_20(E,n,c,r,y,p,t,i,o,n,P,r,o,p,e,r,t,i,e,s); const XMLCh EncryptionProperties::TYPE_NAME[] = UNICODE_LITERAL_24(E,n,c,r,y,p,t,i,o,n,P,r,o,p,e,r,t,i,e,s,T,y,p,e); const XMLCh EncryptionProperties::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,d); const XMLCh EncryptionProperty::LOCAL_NAME[] = UNICODE_LITERAL_18(E,n,c,r,y,p,t,i,o,n,P,r,o,p,e,r,t,y); const XMLCh EncryptionProperty::TYPE_NAME[] = UNICODE_LITERAL_22(E,n,c,r,y,p,t,i,o,n,P,r,o,p,e,r,t,y,T,y,p,e); const XMLCh EncryptionProperty::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,d); const XMLCh EncryptionProperty::TARGET_ATTRIB_NAME[] = UNICODE_LITERAL_6(T,a,r,g,e,t); const XMLCh KeyReference::LOCAL_NAME[] = UNICODE_LITERAL_12(K,e,y,R,e,f,e,r,e,n,c,e); const XMLCh KeySize::LOCAL_NAME[] = UNICODE_LITERAL_7(K,e,y,S,i,z,e); const XMLCh OAEPparams::LOCAL_NAME[] = UNICODE_LITERAL_10(O,A,E,P,p,a,r,a,m,s); const XMLCh ReferenceList::LOCAL_NAME[] = UNICODE_LITERAL_13(R,e,f,e,r,e,n,c,e,L,i,s,t); const XMLCh ReferenceType::LOCAL_NAME[] = {chNull}; const XMLCh ReferenceType::TYPE_NAME[] = UNICODE_LITERAL_13(R,e,f,e,r,e,n,c,e,T,y,p,e); const XMLCh ReferenceType::URI_ATTRIB_NAME[] = UNICODE_LITERAL_3(U,R,I); const XMLCh Transforms::LOCAL_NAME[] = UNICODE_LITERAL_10(T,r,a,n,s,f,o,r,m,s); const XMLCh Transforms::TYPE_NAME[] = UNICODE_LITERAL_14(T,r,a,n,s,f,o,r,m,s,T,y,p,e); const XMLCh MGF::LOCAL_NAME[] = UNICODE_LITERAL_3(M,G,F); const XMLCh MGF::TYPE_NAME[] = UNICODE_LITERAL_7(M,G,F,T,y,p,e); const XMLCh MGF::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m);xmltooling-1.5.3/xmltooling/encryption/impl/EncryptionSchemaValidators.cpp000644 001751 001751 00000014112 12007564200 030434 0ustar00scantorscantor000000 000000 /** * Licensed to the University Corporation for Advanced Internet * Development, Inc. (UCAID) under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * UCAID licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the * License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ /** * EncryptionSchemaValidators.cpp * * Schema validators for XML Encryption schema */ #include "internal.h" #include "exceptions.h" #include "encryption/Encryption.h" #include "validation/Validator.h" #include "validation/ValidatorSuite.h" using namespace xmlencryption; using namespace xmltooling; using namespace std; using xmlconstants::XMLENC_NS; using xmlconstants::XMLENC11_NS; namespace xmlencryption { XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,CarriedKeyName); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,CipherValue); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,KeySize); XMLOBJECTVALIDATOR_SIMPLE(XMLTOOL_DLLLOCAL,OAEPparams); BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,EncryptionMethod); XMLOBJECTVALIDATOR_REQUIRE(EncryptionMethod,Algorithm); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,Transforms); XMLOBJECTVALIDATOR_NONEMPTY(Transforms,Transform); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,CipherReference); XMLOBJECTVALIDATOR_REQUIRE(CipherReference,URI); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,CipherData); XMLOBJECTVALIDATOR_ONLYONEOF(CipherData,CipherValue,CipherReference); END_XMLOBJECTVALIDATOR; class XMLTOOL_DLLLOCAL checkWildcardNS { public: void operator()(const XMLObject* xmlObject) const { const XMLCh* ns=xmlObject->getElementQName().getNamespaceURI(); if (XMLString::equals(ns,XMLENC_NS) || !ns || !*ns) { throw ValidationException( "Object contains an illegal extension child element ($1).", params(1,xmlObject->getElementQName().toString().c_str()) ); } } }; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,EncryptionProperty); if (!ptr->hasChildren()) throw ValidationException("EncryptionProperty must have at least one child element."); const vector& anys=ptr->getUnknownXMLObjects(); for_each(anys.begin(),anys.end(),checkWildcardNS()); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,EncryptionProperties); XMLOBJECTVALIDATOR_NONEMPTY(EncryptionProperties,EncryptionProperty); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,ReferenceType); XMLOBJECTVALIDATOR_REQUIRE(DataReference,URI); const vector& anys=ptr->getUnknownXMLObjects(); for_each(anys.begin(),anys.end(),checkWildcardNS()); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR_SUB(XMLTOOL_DLLLOCAL,DataReference,ReferenceType); ReferenceTypeSchemaValidator::validate(xmlObject); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR_SUB(XMLTOOL_DLLLOCAL,KeyReference,ReferenceType); ReferenceTypeSchemaValidator::validate(xmlObject); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,ReferenceList); if (!ptr->hasChildren()) throw ValidationException("ReferenceList must have at least one child element."); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,EncryptedType); XMLOBJECTVALIDATOR_REQUIRE(EncryptedType,CipherData); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR_SUB(XMLTOOL_DLLLOCAL,EncryptedData,EncryptedType); EncryptedTypeSchemaValidator::validate(xmlObject); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR_SUB(XMLTOOL_DLLLOCAL,EncryptedKey,EncryptedType); EncryptedTypeSchemaValidator::validate(xmlObject); END_XMLOBJECTVALIDATOR; BEGIN_XMLOBJECTVALIDATOR(XMLTOOL_DLLLOCAL,MGF); XMLOBJECTVALIDATOR_REQUIRE(MGF,Algorithm); END_XMLOBJECTVALIDATOR; }; #define REGISTER_ELEMENT(namespaceURI,cname) \ q=QName(namespaceURI,cname::LOCAL_NAME); \ XMLObjectBuilder::registerBuilder(q,new cname##Builder()); \ SchemaValidators.registerValidator(q,new cname##SchemaValidator()) #define REGISTER_TYPE(namespaceURI,cname) \ q=QName(namespaceURI,cname::TYPE_NAME); \ XMLObjectBuilder::registerBuilder(q,new cname##Builder()); \ SchemaValidators.registerValidator(q,new cname##SchemaValidator()) void xmlencryption::registerEncryptionClasses() { QName q; REGISTER_ELEMENT(XMLENC_NS,CarriedKeyName); REGISTER_ELEMENT(XMLENC_NS,CipherData); REGISTER_ELEMENT(XMLENC_NS,CipherReference); REGISTER_ELEMENT(XMLENC_NS,CipherValue); REGISTER_ELEMENT(XMLENC_NS,DataReference); REGISTER_ELEMENT(XMLENC_NS,EncryptedData); REGISTER_ELEMENT(XMLENC_NS,EncryptedKey); REGISTER_ELEMENT(XMLENC_NS,EncryptionMethod); REGISTER_ELEMENT(XMLENC_NS,EncryptionProperties); REGISTER_ELEMENT(XMLENC_NS,EncryptionProperty); REGISTER_ELEMENT(XMLENC_NS,KeyReference); REGISTER_ELEMENT(XMLENC_NS,KeySize); REGISTER_ELEMENT(XMLENC_NS,OAEPparams); REGISTER_ELEMENT(XMLENC_NS,ReferenceList); REGISTER_ELEMENT(XMLENC_NS,Transforms); REGISTER_TYPE(XMLENC_NS,CipherData); REGISTER_TYPE(XMLENC_NS,CipherReference); REGISTER_TYPE(XMLENC_NS,EncryptionMethod); REGISTER_TYPE(XMLENC_NS,EncryptionProperties); REGISTER_TYPE(XMLENC_NS,EncryptionProperty); REGISTER_TYPE(XMLENC_NS,Transforms); REGISTER_ELEMENT(XMLENC11_NS,MGF); REGISTER_TYPE(XMLENC11_NS,MGF); } xmltooling-1.5.3/schemas/Makefile.am000644 001751 001751 00000001253 12003305016 020550 0ustar00scantorscantor000000 000000 AUTOMAKE_OPTIONS = foreign schemafiles = \ soap-envelope.xsd \ xenc-schema.xsd \ xenc11-schema.xsd \ xmldsig-core-schema.xsd \ xmldsig11-schema.xsd \ xml.xsd \ xmltooling.xsd pkgxmldir = $(datadir)/xml/@PACKAGE_NAME@ pkgxml_DATA = \ catalog.xml \ $(schemafiles) # # Some of these need building # do-build-file: rm -f ${FILE}.tmp sed < ${srcdir}/${FILE}.in > ${FILE}.tmp \ -e 's:@-PKGXMLDIR-@:${pkgxmldir}:g' cmp -s ${FILE} ${FILE}.tmp || mv ${FILE}.tmp ${FILE} rm -f ${FILE}.tmp catalog.xml: ${srcdir}/catalog.xml.in Makefile ${top_builddir}/config.status $(MAKE) do-build-file FILE=$@ CLEANFILES = catalog.xml EXTRA_DIST = catalog.xml.in \ $(schemafiles) xmltooling-1.5.3/schemas/Makefile.in000644 001751 001751 00000034411 12147443212 020575 0ustar00scantorscantor000000 000000 # Makefile.in generated by automake 1.12.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = schemas DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ $(top_srcdir)/m4/boost.m4 $(top_srcdir)/m4/doxygen.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h \ $(top_builddir)/xmltooling/config_pub.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgxmldir)" DATA = $(pkgxml_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_ROOT = @BOOST_ROOT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTFLAGS = @CXXTESTFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOG4CPP_CONFIG = @LOG4CPP_CONFIG@ LOG4SHIB_CONFIG = @LOG4SHIB_CONFIG@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLSEC_LIBS = @XMLSEC_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_libdir = @pkgconfig_libdir@ pkgconfig_libfile = @pkgconfig_libfile@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign schemafiles = \ soap-envelope.xsd \ xenc-schema.xsd \ xenc11-schema.xsd \ xmldsig-core-schema.xsd \ xmldsig11-schema.xsd \ xml.xsd \ xmltooling.xsd pkgxmldir = $(datadir)/xml/@PACKAGE_NAME@ pkgxml_DATA = \ catalog.xml \ $(schemafiles) CLEANFILES = catalog.xml EXTRA_DIST = catalog.xml.in \ $(schemafiles) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign schemas/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign schemas/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgxmlDATA: $(pkgxml_DATA) @$(NORMAL_INSTALL) @list='$(pkgxml_DATA)'; test -n "$(pkgxmldir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgxmldir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgxmldir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgxmldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgxmldir)" || exit $$?; \ done uninstall-pkgxmlDATA: @$(NORMAL_UNINSTALL) @list='$(pkgxml_DATA)'; test -n "$(pkgxmldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgxmldir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: ctags: CTAGS CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(pkgxmldir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgxmlDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgxmlDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-pkgxmlDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-pkgxmlDATA # # Some of these need building # do-build-file: rm -f ${FILE}.tmp sed < ${srcdir}/${FILE}.in > ${FILE}.tmp \ -e 's:@-PKGXMLDIR-@:${pkgxmldir}:g' cmp -s ${FILE} ${FILE}.tmp || mv ${FILE}.tmp ${FILE} rm -f ${FILE}.tmp catalog.xml: ${srcdir}/catalog.xml.in Makefile ${top_builddir}/config.status $(MAKE) do-build-file FILE=$@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xmltooling-1.5.3/schemas/catalog.xml.in000644 001751 001751 00000001435 12003305016 021257 0ustar00scantorscantor000000 000000 xmltooling-1.5.3/schemas/soap-envelope.xsd000644 001751 001751 00000010320 12003305016 022004 0ustar00scantorscantor000000 000000 Prose in the spec does not specify that attributes are allowed on the Body element 'encodingStyle' indicates any canonicalization conventions followed in the contents of the containing element. For example, the value 'http://schemas.xmlsoap.org/soap/encoding/' indicates the pattern described in SOAP specification Fault reporting structure xmltooling-1.5.3/schemas/xenc-schema.xsd000644 001751 001751 00000012434 12003305016 021432 0ustar00scantorscantor000000 000000 xmltooling-1.5.3/schemas/xenc11-schema.xsd000644 001751 001751 00000007214 12003305016 021574 0ustar00scantorscantor000000 000000 xmltooling-1.5.3/schemas/xmldsig-core-schema.xsd000644 001751 001751 00000023516 12003305016 023075 0ustar00scantorscantor000000 000000 xmltooling-1.5.3/schemas/xmldsig11-schema.xsd000644 001751 001751 00000011070 12146253675 022326 0ustar00scantorscantor000000 000000 xmltooling-1.5.3/schemas/xml.xsd000644 001751 001751 00000013305 12003305016 020035 0ustar00scantorscantor000000 000000 See http://www.w3.org/XML/1998/namespace.html and http://www.w3.org/TR/REC-xml for information about this namespace. This schema document describes the XML namespace, in a form suitable for import by other schema documents. Note that local names in this namespace are intended to be defined only by the World Wide Web Consortium or its subgroups. The following names are currently defined in this namespace and should not be used with conflicting semantics by any Working Group, specification, or document instance: base (as an attribute name): denotes an attribute whose value provides a URI to be used as the base for interpreting any relative URIs in the scope of the element on which it appears; its value is inherited. This name is reserved by virtue of its definition in the XML Base specification. id (as an attribute name): denotes an attribute whose value should be interpreted as if declared to be of type ID. The xml:id specification is not yet a W3C Recommendation, but this attribute is included here to facilitate experimentation with the mechanisms it proposes. Note that it is _not_ included in the specialAttrs attribute group. lang (as an attribute name): denotes an attribute whose value is a language code for the natural language of the content of any element; its value is inherited. This name is reserved by virtue of its definition in the XML specification. space (as an attribute name): denotes an attribute whose value is a keyword indicating what whitespace processing discipline is intended for the content of the element; its value is inherited. This name is reserved by virtue of its definition in the XML specification. Father (in any context at all): denotes Jon Bosak, the chair of the original XML Working Group. This name is reserved by the following decision of the W3C XML Plenary and XML Coordination groups: In appreciation for his vision, leadership and dedication the W3C XML Plenary on this 10th day of February, 2000 reserves for Jon Bosak in perpetuity the XML name xml:Father This schema defines attributes and an attribute group suitable for use by schemas wishing to allow xml:base, xml:lang, xml:space or xml:id attributes on elements they define. To enable this, such a schema must import this schema for the XML namespace, e.g. as follows: <schema . . .> . . . <import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/> Subsequently, qualified reference to any of the attributes or the group defined below will have the desired effect, e.g. <type . . .> . . . <attributeGroup ref="xml:specialAttrs"/> will define a type which will schema-validate an instance element with any of those attributes In keeping with the XML Schema WG's standard versioning policy, this schema document will persist at http://www.w3.org/2005/08/xml.xsd. At the date of issue it can also be found at http://www.w3.org/2001/xml.xsd. The schema document at that URI may however change in the future, in order to remain compatible with the latest version of XML Schema itself, or with the XML namespace itself. In other words, if the XML Schema or XML namespaces change, the version of this document at http://www.w3.org/2001/xml.xsd will change accordingly; the version at http://www.w3.org/2005/08/xml.xsd will not change. Attempting to install the relevant ISO 2- and 3-letter codes as the enumerated possible values is probably never going to be a realistic possibility. See RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry at http://www.iana.org/assignments/lang-tag-apps.htm for further information. The union allows for the 'un-declaration' of xml:lang with the empty string. See http://www.w3.org/TR/xmlbase/ for information about this attribute. See http://www.w3.org/TR/xml-id/ for information about this attribute. xmltooling-1.5.3/schemas/xmltooling.xsd000644 001751 001751 00000002001 12003305016 021420 0ustar00scantorscantor000000 000000 xmltooling-1.5.3/doc/Makefile.am000644 001751 001751 00000000612 12003305016 017670 0ustar00scantorscantor000000 000000 AUTOMAKE_OPTIONS = foreign pkgdocdir = $(datadir)/doc/@PACKAGE@-@PACKAGE_VERSION@ install-data-hook: if test -d api ; then \ cp -r api $(DESTDIR)$(pkgdocdir); \ rm -rf `find $(DESTDIR)$(pkgdocdir)/api -name .svn`; \ fi; docfiles = \ README.txt \ LICENSE.txt \ NOTICE.txt \ OPENSSL.LICENSE \ LOG4CPP.LICENSE \ CURL.LICENSE pkgdoc_DATA = $(docfiles) EXTRA_DIST = $(docfiles) api xmltooling-1.5.3/doc/Makefile.in000644 001751 001751 00000034012 12147443212 017714 0ustar00scantorscantor000000 000000 # Makefile.in generated by automake 1.12.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ $(top_srcdir)/m4/boost.m4 $(top_srcdir)/m4/doxygen.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h \ $(top_builddir)/xmltooling/config_pub.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgdocdir)" DATA = $(pkgdoc_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_ROOT = @BOOST_ROOT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTFLAGS = @CXXTESTFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LOG4CPP_CONFIG = @LOG4CPP_CONFIG@ LOG4SHIB_CONFIG = @LOG4SHIB_CONFIG@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLSEC_LIBS = @XMLSEC_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_libdir = @pkgconfig_libdir@ pkgconfig_libfile = @pkgconfig_libfile@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign pkgdocdir = $(datadir)/doc/@PACKAGE@-@PACKAGE_VERSION@ docfiles = \ README.txt \ LICENSE.txt \ NOTICE.txt \ OPENSSL.LICENSE \ LOG4CPP.LICENSE \ CURL.LICENSE pkgdoc_DATA = $(docfiles) EXTRA_DIST = $(docfiles) api all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgdocDATA: $(pkgdoc_DATA) @$(NORMAL_INSTALL) @list='$(pkgdoc_DATA)'; test -n "$(pkgdocdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdocdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgdocdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdocdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdocdir)" || exit $$?; \ done uninstall-pkgdocDATA: @$(NORMAL_UNINSTALL) @list='$(pkgdoc_DATA)'; test -n "$(pkgdocdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgdocdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: ctags: CTAGS CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(pkgdocdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgdocDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgdocDATA .MAKE: install-am install-data-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-hook install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgdocDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-pkgdocDATA install-data-hook: if test -d api ; then \ cp -r api $(DESTDIR)$(pkgdocdir); \ rm -rf `find $(DESTDIR)$(pkgdocdir)/api -name .svn`; \ fi; # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xmltooling-1.5.3/doc/README.txt000644 001751 001751 00000000736 12003305016 017341 0ustar00scantorscantor000000 000000 Release Notes ----------- https://issues.shibboleth.net/jira/secure/ReleaseNote.jspa?projectId=10040 Documentation: -------------- The OpenSAML wiki is the home for any documentation on the XMLTooling package. https://wiki.shibboleth.net/confluence/display/OpenSAML/ Reporting Bugs: --------------- A Jira instance is available. https://issues.shibboleth.net/ Support: -------- A mailing list is available. https://wiki.shibboleth.net/confluence/display/OpenSAML/MailingList xmltooling-1.5.3/doc/LICENSE.txt000644 001751 001751 00000026135 12003305016 017467 0ustar00scantorscantor000000 000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. xmltooling-1.5.3/doc/NOTICE.txt000644 001751 001751 00000000774 12003305016 017367 0ustar00scantorscantor000000 000000 OpenSAML XMLTooling C++ Library This product includes software developed by the Apache Software Foundation (http://www.apache.org/). This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/). This project uses libraries covered by the Lesser GNU Public License. Source code for these libraries is available on request. This product includes software developed, copyrighted, and contributed by: The Ohio State University SWITCH, Zurich, CH xmltooling-1.5.3/doc/OPENSSL.LICENSE000644 001751 001751 00000014207 12003305016 017770 0ustar00scantorscantor000000 000000 LICENSE ISSUES ============== The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the OpenSSL License and the original SSLeay license apply to the toolkit. See below for the actual license texts. Actually both licenses are BSD-style Open Source licenses. In case of any license issues related to OpenSSL please contact openssl-core@openssl.org. OpenSSL License --------------- /* ==================================================================== * Copyright (c) 1998-2004 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. All advertising materials mentioning features or use of this * software must display the following acknowledgment: * "This product includes software developed by the OpenSSL Project * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" * * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to * endorse or promote products derived from this software without * prior written permission. For written permission, please contact * openssl-core@openssl.org. * * 5. Products derived from this software may not be called "OpenSSL" * nor may "OpenSSL" appear in their names without prior written * permission of the OpenSSL Project. * * 6. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by the OpenSSL Project * for use in the OpenSSL Toolkit (http://www.openssl.org/)" * * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * ==================================================================== * * This product includes cryptographic software written by Eric Young * (eay@cryptsoft.com). This product includes software written by Tim * Hudson (tjh@cryptsoft.com). * */ Original SSLeay License ----------------------- /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written * by Eric Young (eay@cryptsoft.com). * The implementation was written so as to conform with Netscapes SSL. * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@cryptsoft.com). * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * "This product includes cryptographic software written by * Eric Young (eay@cryptsoft.com)" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] */ xmltooling-1.5.3/doc/LOG4CPP.LICENSE000644 001751 001751 00000063476 12003305016 017731 0ustar00scantorscantor000000 000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! xmltooling-1.5.3/doc/CURL.LICENSE000644 001751 001751 00000002024 12003305016 017404 0ustar00scantorscantor000000 000000 COPYRIGHT AND PERMISSION NOTICE Copyright (c) 1996 - 2004, Daniel Stenberg, . All rights reserved. Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. xmltooling-1.5.3/doc/api/000755 001751 001751 00000000000 12003305016 016406 5ustar00scantorscantor000000 000000 xmltooling-1.5.3/m4/acinclude.m4000644 001751 001751 00000004722 12003305016 017606 0ustar00scantorscantor000000 000000 dnl @synopsis AC_CXX_NAMESPACES dnl dnl If the compiler can prevent names clashes using namespaces, define dnl HAVE_NAMESPACES. dnl dnl @author Luc Maisonobe dnl AC_DEFUN([AC_CXX_NAMESPACES], [AC_CACHE_CHECK(whether the compiler implements namespaces, ac_cv_cxx_namespaces, [ AC_LANG_PUSH([C++]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[namespace Outer { namespace Inner { int i = 0; }}]], [[using namespace Outer::Inner; return i;]])],[ac_cv_cxx_namespaces=yes],[ac_cv_cxx_namespaces=no]) AC_LANG_POP([]) ]) if test "$ac_cv_cxx_namespaces" = yes; then AC_DEFINE(HAVE_NAMESPACES,1,[define if the compiler implements namespaces]) fi ]) dnl dnl @author Luc Maisonobe dnl AC_DEFUN([AC_CXX_REQUIRE_STL], [AC_CACHE_CHECK(whether the compiler supports Standard Template Library, ac_cv_cxx_have_stl, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_PUSH([C++]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #include #ifdef HAVE_NAMESPACES using namespace std; #endif]], [[list x; x.push_back(5); list::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;]])],[ac_cv_cxx_have_stl=yes],[ac_cv_cxx_have_stl=no]) AC_LANG_POP([]) ]) if test "x_$ac_cv_cxx_have_stl" != x_yes; then AC_MSG_ERROR([C++ Standard Template Libary unsupported]) fi ]) dnl Determine whether we have gcc of a particular version or later, dnl based on major, minor, patchlevel versions and date. dnl AC_HAVE_GCC_VERSION(MAJOR_VERSION, MINOR_VERSION, PATCH_LEVEL, dnl SNAPSHOT_DATE [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) AC_DEFUN([AC_HAVE_GCC_VERSION], [AC_CACHE_CHECK([gcc is at least version $1.$2.$3.$4], ac_cv_gcc_version_$1_$2_$3_$4, [ if test x$GCC = x ; then ac_cv_gcc_version_$1_$2_$3_$4=no else ac_gcc_date=`$CC -v 2>&1 | grep '^gcc version ' | sed 's/ (.*//; s/.* //'` if test 0$ac_gcc_date -eq 0 ; then ac_gcc_date=0 ; fi AC_EGREP_CPP([yes], [#define HAVE_GCC_VERSION(MAJOR, MINOR, MICRO, DATE) \ (__GNUC__ > (MAJOR) \ || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ > (MINOR)) \ || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ == (MINOR) \ && __GNUC_PATCHLEVEL__ > (MICRO)) \ || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ == (MINOR) \ && __GNUC_PATCHLEVEL__ == (MICRO) && ${ac_gcc_date}L >= (DATE))) #if HAVE_GCC_VERSION($1,$2,$3,$4) yes #endif], AC_DEFINE_UNQUOTED(HAVE_GCC_VERSION_$1_$2_$3_$4, 1, [Define to 1 if we have gcc $1.$2.$3 ($4)]) ac_cv_gcc_version_$1_$2_$3_$4=yes ; $5, ac_cv_gcc_version_$1_$2_$3_$4=no ; $6) fi ])])dnl xmltooling-1.5.3/m4/acx_pthread.m4000644 001751 001751 00000025660 12003305016 020145 0ustar00scantorscantor000000 000000 ##### http://autoconf-archive.cryp.to/acx_pthread.html # # SYNOPSIS # # ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) # # DESCRIPTION # # This macro figures out how to build C programs using POSIX threads. # It sets the PTHREAD_LIBS output variable to the threads library and # linker flags, and the PTHREAD_CFLAGS output variable to any special # C compiler flags that are needed. (The user can also force certain # compiler flags/libs to be tested by setting these environment # variables.) # # Also sets PTHREAD_CC to any special C compiler that is needed for # multi-threaded programs (defaults to the value of CC otherwise). # (This is necessary on AIX to use the special cc_r compiler alias.) # # NOTE: You are assumed to not only compile your program with these # flags, but also link it with them as well. e.g. you should link # with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS # $LIBS # # If you are only building threads programs, you may wish to use # these variables in your default LIBS, CFLAGS, and CC: # # LIBS="$PTHREAD_LIBS $LIBS" # CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # CC="$PTHREAD_CC" # # In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute # constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to # that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). # # ACTION-IF-FOUND is a list of shell commands to run if a threads # library is found, and ACTION-IF-NOT-FOUND is a list of commands to # run it if it is not found. If ACTION-IF-FOUND is not specified, the # default action will define HAVE_PTHREAD. # # Please let the authors know if this macro fails on any platform, or # if you have any other suggestions or comments. This macro was based # on work by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) # (with help from M. Frigo), as well as ac_pthread and hb_pthread # macros posted by Alejandro Forero Cuervo to the autoconf macro # repository. We are also grateful for the helpful feedback of # numerous users. # # LAST MODIFICATION # # 2006-05-29 # # COPYLEFT # # Copyright (c) 2006 Steven G. Johnson # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # # As a special exception, the respective Autoconf Macro's copyright # owner gives unlimited permission to copy, distribute and modify the # configure scripts that are the output of Autoconf when processing # the Macro. You need not follow the terms of the GNU General Public # License when using or distributing such scripts, even though # portions of the text of the Macro appear in them. The GNU General # Public License (GPL) does govern all other use of the material that # constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the # Autoconf Macro released by the Autoconf Macro Archive. When you # make and distribute a modified version of the Autoconf Macro, you # may extend this special exception to the GPL to apply to your # modified version as well. AC_DEFUN([ACX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_LANG_PUSH([C]) acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) AC_MSG_RESULT($acx_pthread_ok) if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # ... -mt is also the pthreads flag for HP/aCC # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case "${host_cpu}-${host_os}" in *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthreads/-mt/ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" ;; esac if test x"$acx_pthread_ok" = xno; then for flag in $acx_pthread_flags; do case $flag in none) AC_MSG_CHECKING([whether pthreads work without any flags]) ;; -*) AC_MSG_CHECKING([whether pthreads work with $flag]) PTHREAD_CFLAGS="$flag" ;; pthread-config) AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) if test x"$acx_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) AC_MSG_CHECKING([for the pthreads library -l$flag]) PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ]])],[acx_pthread_ok=yes],[]) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" AC_MSG_RESULT($acx_pthread_ok) if test "x$acx_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$acx_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. AC_MSG_CHECKING([for joinable pthread attribute]) attr_name=unknown for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[int attr=$attr; return attr;]])],[attr_name=$attr; break],[]) done AC_MSG_RESULT($attr_name) if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, [Define to necessary symbol if this constant uses a non-standard name on your system.]) fi AC_MSG_CHECKING([if more special flags are required for pthreads]) flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; *-osf* | *-hpux*) flag="-D_REENTRANT";; *solaris*) if test "$GCC" = "yes"; then flag="-D_REENTRANT" else flag="-mt -D_REENTRANT" fi ;; esac AC_MSG_RESULT(${flag}) if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with xlc_r or cc_r if test x"$GCC" != xyes; then AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC}) else PTHREAD_CC=$CC fi else PTHREAD_CC="$CC" fi AC_SUBST(PTHREAD_LIBS) AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_CC) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) : else acx_pthread_ok=no $2 fi AC_LANG_POP ])dnl ACX_PTHREAD xmltooling-1.5.3/m4/ax_create_pkgconfig_info.m4000644 001751 001751 00000034201 12003305016 022647 0ustar00scantorscantor000000 000000 # =========================================================================== # http://www.nongnu.org/autoconf-archive/ax_create_pkgconfig_info.html # =========================================================================== # # SYNOPSIS # # AX_CREATE_PKGCONFIG_INFO [(outputfile, [requires [,libs [,summary [,cflags [, ldflags]]]]])] # # DESCRIPTION # # Defaults: # # $1 = $PACKAGE_NAME.pc # $2 = (empty) # $3 = $PACKAGE_LIBS $LIBS (as set at that point in configure.ac) # $4 = $PACKAGE_SUMMARY (or $1 Library) # $5 = $CPPFLAGS $PACKAGE_CFLAGS (as set at the point in configure.ac) # $6 = $LDFLAGS $PACKAGE_LDFLAGS (as set at the point in configure.ac) # # PACKAGE_NAME defaults to $PACKAGE if not set. # PACKAGE_LIBS defaults to -l$PACKAGE_NAME if not set. # # The resulting file is called $PACKAGE.pc.in / $PACKAGE.pc # # You will find this macro most useful in conjunction with # ax_spec_defaults that can read good initializers from the .spec file. In # consequencd, most of the generatable installable stuff can be made from # information being updated in a single place for the whole project. # # LICENSE # # Copyright (c) 2008 Guido U. Draheim # Copyright (c) 2008 Sven Verdoolaege # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. AC_DEFUN([AX_CREATE_PKGCONFIG_INFO],[dnl AS_VAR_PUSHDEF([PKGCONFIG_suffix],[ax_create_pkgconfig_suffix])dnl AS_VAR_PUSHDEF([PKGCONFIG_libdir],[ax_create_pkgconfig_libdir])dnl AS_VAR_PUSHDEF([PKGCONFIG_libfile],[ax_create_pkgconfig_libfile])dnl AS_VAR_PUSHDEF([PKGCONFIG_libname],[ax_create_pkgconfig_libname])dnl AS_VAR_PUSHDEF([PKGCONFIG_version],[ax_create_pkgconfig_version])dnl AS_VAR_PUSHDEF([PKGCONFIG_description],[ax_create_pkgconfig_description])dnl AS_VAR_PUSHDEF([PKGCONFIG_requires],[ax_create_pkgconfig_requires])dnl AS_VAR_PUSHDEF([PKGCONFIG_pkglibs],[ax_create_pkgconfig_pkglibs])dnl AS_VAR_PUSHDEF([PKGCONFIG_libs],[ax_create_pkgconfig_libs])dnl AS_VAR_PUSHDEF([PKGCONFIG_ldflags],[ax_create_pkgconfig_ldflags])dnl AS_VAR_PUSHDEF([PKGCONFIG_cppflags],[ax_create_pkgconfig_cppflags])dnl AS_VAR_PUSHDEF([PKGCONFIG_generate],[ax_create_pkgconfig_generate])dnl AS_VAR_PUSHDEF([PKGCONFIG_src_libdir],[ax_create_pkgconfig_src_libdir])dnl AS_VAR_PUSHDEF([PKGCONFIG_src_headers],[ax_create_pkgconfig_src_headers])dnl # we need the expanded forms... test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' AC_MSG_CHECKING(our pkgconfig libname) test ".$PKGCONFIG_libname" != "." || \ PKGCONFIG_libname="ifelse($1,,${PACKAGE_NAME},`basename $1 .pc`)" test ".$PKGCONFIG_libname" != "." || \ PKGCONFIG_libname="$PACKAGE" PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"` PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"` AC_MSG_RESULT($PKGCONFIG_libname) AC_MSG_CHECKING(our pkgconfig version) test ".$PKGCONFIG_version" != "." || \ PKGCONFIG_version="${PACKAGE_VERSION}" test ".$PKGCONFIG_version" != "." || \ PKGCONFIG_version="$VERSION" PKGCONFIG_version=`eval echo "$PKGCONFIG_version"` PKGCONFIG_version=`eval echo "$PKGCONFIG_version"` AC_MSG_RESULT($PKGCONFIG_version) AC_MSG_CHECKING(our pkgconfig_libdir) test ".$pkgconfig_libdir" = "." && \ pkgconfig_libdir='${libdir}/pkgconfig' PKGCONFIG_libdir=`eval echo "$pkgconfig_libdir"` PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"` PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"` AC_MSG_RESULT($pkgconfig_libdir) test "$pkgconfig_libdir" != "$PKGCONFIG_libdir" && ( AC_MSG_RESULT(expanded our pkgconfig_libdir... $PKGCONFIG_libdir)) AC_SUBST([pkgconfig_libdir]) AC_MSG_CHECKING(our pkgconfig_libfile) test ".$pkgconfig_libfile" != "." || \ pkgconfig_libfile="ifelse($1,,$PKGCONFIG_libname.pc,`basename $1`)" PKGCONFIG_libfile=`eval echo "$pkgconfig_libfile"` PKGCONFIG_libfile=`eval echo "$PKGCONFIG_libfile"` AC_MSG_RESULT($pkgconfig_libfile) test "$pkgconfig_libfile" != "$PKGCONFIG_libfile" && ( AC_MSG_RESULT(expanded our pkgconfig_libfile... $PKGCONFIG_libfile)) AC_SUBST([pkgconfig_libfile]) AC_MSG_CHECKING(our package / suffix) PKGCONFIG_suffix="$program_suffix" test ".$PKGCONFIG_suffix" != .NONE || PKGCONFIG_suffix="" AC_MSG_RESULT(${PACKAGE_NAME} / ${PKGCONFIG_suffix}) AC_MSG_CHECKING(our pkgconfig description) PKGCONFIG_description="ifelse($4,,$PACKAGE_SUMMARY,$4)" test ".$PKGCONFIG_description" != "." || \ PKGCONFIG_description="$PKGCONFIG_libname Library" PKGCONFIG_description=`eval echo "$PKGCONFIG_description"` PKGCONFIG_description=`eval echo "$PKGCONFIG_description"` AC_MSG_RESULT($PKGCONFIG_description) AC_MSG_CHECKING(our pkgconfig requires) PKGCONFIG_requires="ifelse($2,,$PACKAGE_REQUIRES,$2)" PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"` PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"` AC_MSG_RESULT($PKGCONFIG_requires) AC_MSG_CHECKING(our pkgconfig ext libs) PKGCONFIG_pkglibs="$PACKAGE_LIBS" test ".$PKGCONFIG_pkglibs" != "." || PKGCONFIG_pkglibs="-l$PKGCONFIG_libname" PKGCONFIG_libs="ifelse($3,,$PKGCONFIG_pkglibs $LIBS,$3)" PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"` PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"` AC_MSG_RESULT($PKGCONFIG_libs) AC_MSG_CHECKING(our pkgconfig cppflags) PKGCONFIG_cppflags="ifelse($5,,$CPPFLAGS $PACKAGE_CFLAGS,$5)" PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"` PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"` AC_MSG_RESULT($PKGCONFIG_cppflags) AC_MSG_CHECKING(our pkgconfig ldflags) PKGCONFIG_ldflags="ifelse($6,,$LDFLAGS $PACKAGE_LDFLAGS,$5)" PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"` PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"` AC_MSG_RESULT($PKGCONFIG_ldflags) test ".$PKGCONFIG_generate" != "." || \ PKGCONFIG_generate="ifelse($1,,$PKGCONFIG_libname.pc,$1)" PKGCONFIG_generate=`eval echo "$PKGCONFIG_generate"` PKGCONFIG_generate=`eval echo "$PKGCONFIG_generate"` test "$pkgconfig_libfile" != "$PKGCONFIG_generate" && ( AC_MSG_RESULT(generate the pkgconfig later... $PKGCONFIG_generate)) if test ".$PKGCONFIG_src_libdir" = "." ; then PKGCONFIG_src_libdir=`pwd` PKGCONFIG_src_libdir=`AS_DIRNAME("$PKGCONFIG_src_libdir/$PKGCONFIG_generate")` test ! -d $PKGCONFIG_src_libdir/src || \ PKGCONFIG_src_libdir="$PKGCONFIG_src_libdir/src" case ".$objdir" in *libs) PKGCONFIG_src_libdir="$PKGCONFIG_src_libdir/$objdir" ;; esac AC_MSG_RESULT(noninstalled pkgconfig -L $PKGCONFIG_src_libdir) fi if test ".$PKGCONFIG_src_headers" = "." ; then PKGCONFIG_src_headers=`pwd` v="$ac_top_srcdir" ; test ".$v" != "." || v="$ax_spec_dir" test ".$v" != "." || v="$srcdir" case "$v" in /*) PKGCONFIG_src_headers="" ;; esac PKGCONFIG_src_headers=`AS_DIRNAME("$PKGCONFIG_src_headers/$v/x")` test ! -d $PKGCONFIG_src_headers/incl[]ude || \ PKGCONFIG_src_headers="$PKGCONFIG_src_headers/incl[]ude" AC_MSG_RESULT(noninstalled pkgconfig -I $PKGCONFIG_src_headers) fi dnl AC_CONFIG_COMMANDS crap disallows to use $PKGCONFIG_libfile here... AC_CONFIG_COMMANDS([$ax_create_pkgconfig_generate],[ pkgconfig_generate="$ax_create_pkgconfig_generate" if test ! -f "$pkgconfig_generate.in" then generate="true" elif grep ' generated by configure ' $pkgconfig_generate.in >/dev/null then generate="true" else generate="false"; fi if $generate ; then AC_MSG_NOTICE(creating $pkgconfig_generate.in) cat > $pkgconfig_generate.in <conftest.sed < $pkgconfig_generate if test ! -s $pkgconfig_generate ; then AC_MSG_ERROR([$pkgconfig_generate is empty]) fi ; rm conftest.sed # DONE generate $pkgconfig_generate pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.pc/'` AC_MSG_NOTICE(creating $pkgconfig_uninstalled) cat >conftest.sed < $pkgconfig_uninstalled if test ! -s $pkgconfig_uninstalled ; then AC_MSG_ERROR([$pkgconfig_uninstalled is empty]) fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled pkgconfig_requires_add=`echo ${pkgconfig_requires}` if test ".$pkgconfig_requires_add" != "." ; then pkgconfig_requires_add="pkg-config $pkgconfig_requires_add" else pkgconfig_requires_add=":" ; fi pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.sh/'` AC_MSG_NOTICE(creating $pkgconfig_uninstalled) cat >conftest.sed <Name:>for option\\; do case \"\$option\" in --list-all|--name) echo > s>Description: *>\\;\\; --help) pkg-config --help \\; echo Buildscript Of > s>Version: *>\\;\\; --modversion|--version) echo > s>Requires:>\\;\\; --requires) echo $pkgconfig_requires_add> s>Libs: *>\\;\\; --libs) echo > s>Cflags: *>\\;\\; --cflags) echo > /--libs)/a\\ $pkgconfig_requires_add /--cflags)/a\\ $pkgconfig_requires_add\\ ;; --variable=*) eval echo '\$'\`echo \$option | sed -e 's/.*=//'\`\\ ;; --uninstalled) exit 0 \\ ;; *) ;; esac done AXEOF sed -f conftest.sed $pkgconfig_generate.in > $pkgconfig_uninstalled if test ! -s $pkgconfig_uninstalled ; then AC_MSG_ERROR([$pkgconfig_uninstalled is empty]) fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled ],[ dnl AC_CONFIG_COMMANDS crap, the AS_PUSHVAR defines are invalid here... ax_create_pkgconfig_generate="$ax_create_pkgconfig_generate" pkgconfig_prefix='$prefix' pkgconfig_execprefix='$exec_prefix' pkgconfig_bindir='$bindir' pkgconfig_libdir='$libdir' pkgconfig_includedir='$includedir' pkgconfig_datarootdir='$datarootdir' pkgconfig_datadir='$datadir' pkgconfig_sysconfdir='$sysconfdir' pkgconfig_suffix='$ax_create_pkgconfig_suffix' pkgconfig_package='$PACKAGE_NAME' pkgconfig_libname='$ax_create_pkgconfig_libname' pkgconfig_description='$ax_create_pkgconfig_description' pkgconfig_version='$ax_create_pkgconfig_version' pkgconfig_requires='$ax_create_pkgconfig_requires' pkgconfig_libs='$ax_create_pkgconfig_libs' pkgconfig_ldflags='$ax_create_pkgconfig_ldflags' pkgconfig_cppflags='$ax_create_pkgconfig_cppflags' pkgconfig_src_libdir='$ax_create_pkgconfig_src_libdir' pkgconfig_src_headers='$ax_create_pkgconfig_src_headers' ])dnl AS_VAR_POPDEF([PKGCONFIG_suffix])dnl AS_VAR_POPDEF([PKGCONFIG_libdir])dnl AS_VAR_POPDEF([PKGCONFIG_libfile])dnl AS_VAR_POPDEF([PKGCONFIG_libname])dnl AS_VAR_POPDEF([PKGCONFIG_version])dnl AS_VAR_POPDEF([PKGCONFIG_description])dnl AS_VAR_POPDEF([PKGCONFIG_requires])dnl AS_VAR_POPDEF([PKGCONFIG_pkglibs])dnl AS_VAR_POPDEF([PKGCONFIG_libs])dnl AS_VAR_POPDEF([PKGCONFIG_ldflags])dnl AS_VAR_POPDEF([PKGCONFIG_cppflags])dnl AS_VAR_POPDEF([PKGCONFIG_generate])dnl AS_VAR_POPDEF([PKGCONFIG_src_libdir])dnl AS_VAR_POPDEF([PKGCONFIG_src_headers])dnl ]) xmltooling-1.5.3/m4/boost.m4000644 001751 001751 00000122573 12003305016 017012 0ustar00scantorscantor000000 000000 # boost.m4: Locate Boost headers and libraries for autoconf-based projects. # Copyright (C) 2007, 2008, 2009, 2010, 2011 Benoit Sigoure # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Additional permission under section 7 of the GNU General Public # License, version 3 ("GPLv3"): # # If you convey this file as part of a work that contains a # configuration script generated by Autoconf, you may do so under # terms of your choice. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . m4_define([_BOOST_SERIAL], [m4_translit([ # serial 16 ], [# ], [])]) # Original sources can be found at http://github.com/tsuna/boost.m4 # You can fetch the latest version of the script by doing: # wget http://github.com/tsuna/boost.m4/raw/master/build-aux/boost.m4 # ------ # # README # # ------ # # This file provides several macros to use the various Boost libraries. # The first macro is BOOST_REQUIRE. It will simply check if it's possible to # find the Boost headers of a given (optional) minimum version and it will # define BOOST_CPPFLAGS accordingly. It will add an option --with-boost to # your configure so that users can specify non standard locations. # If the user's environment contains BOOST_ROOT and --with-boost was not # specified, --with-boost=$BOOST_ROOT is implicitly used. # For more README and documentation, go to http://github.com/tsuna/boost.m4 # Note: THESE MACROS ASSUME THAT YOU USE LIBTOOL. If you don't, don't worry, # simply read the README, it will show you what to do step by step. m4_pattern_forbid([^_?(BOOST|Boost)_]) # _BOOST_SED_CPP(SED-PROGRAM, PROGRAM, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # -------------------------------------------------------- # Same as AC_EGREP_CPP, but leave the result in conftest.i. # # SED-PROGRAM is *not* overquoted, as in AC_EGREP_CPP. It is expanded # in double-quotes, so escape your double quotes. # # It could be useful to turn this into a macro which extracts the # value of any macro. m4_define([_BOOST_SED_CPP], [AC_LANG_PREPROC_REQUIRE()dnl AC_REQUIRE([AC_PROG_SED])dnl AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])]) AS_IF([dnl eval is necessary to expand ac_cpp. dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell. dnl Beware of Windows end-of-lines, for instance if we are running dnl some Windows programs under Wine. In that case, boost/version.hpp dnl is certainly using "\r\n", but the regular Unix shell will only dnl strip `\n' with backquotes, not the `\r'. This results in dnl boost_cv_lib_version='1_37\r' for instance, which breaks dnl everything else. dnl Cannot use 'dnl' after [$4] because a trailing dnl may break AC_CACHE_CHECK (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | tr -d '\r' | $SED -n -e "$1" >conftest.i 2>&1], [$3], [$4]) rm -rf conftest* ])# AC_EGREP_CPP # BOOST_REQUIRE([VERSION], [ACTION-IF-NOT-FOUND]) # ----------------------------------------------- # Look for Boost. If version is given, it must either be a literal of the form # "X.Y.Z" where X, Y and Z are integers (the ".Z" part being optional) or a # variable "$var". # Defines the value BOOST_CPPFLAGS. This macro only checks for headers with # the required version, it does not check for any of the Boost libraries. # On # success, defines HAVE_BOOST. On failure, calls the optional # ACTION-IF-NOT-FOUND action if one was supplied. # Otherwise aborts with an error message. AC_DEFUN([BOOST_REQUIRE], [AC_REQUIRE([AC_PROG_CXX])dnl AC_REQUIRE([AC_PROG_GREP])dnl echo "$as_me: this is boost.m4[]_BOOST_SERIAL" >&AS_MESSAGE_LOG_FD boost_save_IFS=$IFS boost_version_req=$1 IFS=. set x $boost_version_req 0 0 0 IFS=$boost_save_IFS shift boost_version_req=`expr "$[1]" '*' 100000 + "$[2]" '*' 100 + "$[3]"` boost_version_req_string=$[1].$[2].$[3] AC_ARG_WITH([boost], [AS_HELP_STRING([--with-boost=DIR], [prefix of Boost $1 @<:@guess@:>@])])dnl AC_ARG_VAR([BOOST_ROOT],[Location of Boost installation])dnl # If BOOST_ROOT is set and the user has not provided a value to # --with-boost, then treat BOOST_ROOT as if it the user supplied it. if test x"$BOOST_ROOT" != x; then if test x"$with_boost" = x; then AC_MSG_NOTICE([Detected BOOST_ROOT; continuing with --with-boost=$BOOST_ROOT]) with_boost=$BOOST_ROOT else AC_MSG_NOTICE([Detected BOOST_ROOT=$BOOST_ROOT, but overridden by --with-boost=$with_boost]) fi fi AC_SUBST([DISTCHECK_CONFIGURE_FLAGS], ["$DISTCHECK_CONFIGURE_FLAGS '--with-boost=$with_boost'"])dnl boost_save_CPPFLAGS=$CPPFLAGS AC_CACHE_CHECK([for Boost headers version >= $boost_version_req_string], [boost_cv_inc_path], [boost_cv_inc_path=no AC_LANG_PUSH([C++])dnl m4_pattern_allow([^BOOST_VERSION$])dnl AC_LANG_CONFTEST([AC_LANG_PROGRAM([[#include #if !defined BOOST_VERSION # error BOOST_VERSION is not defined #elif BOOST_VERSION < $boost_version_req # error Boost headers version < $boost_version_req #endif ]])]) # If the user provided a value to --with-boost, use it and only it. case $with_boost in #( ''|yes) set x '' /opt/local/include /usr/local/include /opt/include \ /usr/include C:/Boost/include;; #( *) set x "$with_boost/include" "$with_boost";; esac shift for boost_dir do # Without --layout=system, Boost (or at least some versions) installs # itself in /include/boost-. This inner loop helps to # find headers in such directories. # # Any ${boost_dir}/boost-x_xx directories are searched in reverse version # order followed by ${boost_dir}. The final '.' is a sentinel for # searching $boost_dir" itself. Entries are whitespace separated. # # I didn't indent this loop on purpose (to avoid over-indented code) boost_layout_system_search_list=`cd "$boost_dir" 2>/dev/null \ && ls -1 | "${GREP}" '^boost-' | sort -rn -t- -k2 \ && echo .` for boost_inc in $boost_layout_system_search_list do if test x"$boost_inc" != x.; then boost_inc="$boost_dir/$boost_inc" else boost_inc="$boost_dir" # Uses sentinel in boost_layout_system_search_list fi if test x"$boost_inc" != x; then # We are going to check whether the version of Boost installed # in $boost_inc is usable by running a compilation that # #includes it. But if we pass a -I/some/path in which Boost # is not installed, the compiler will just skip this -I and # use other locations (either from CPPFLAGS, or from its list # of system include directories). As a result we would use # header installed on the machine instead of the /some/path # specified by the user. So in that precise case (trying # $boost_inc), make sure the version.hpp exists. # # Use test -e as there can be symlinks. test -e "$boost_inc/boost/version.hpp" || continue CPPFLAGS="$CPPFLAGS -I$boost_inc" fi AC_COMPILE_IFELSE([], [boost_cv_inc_path=yes], [boost_cv_version=no]) if test x"$boost_cv_inc_path" = xyes; then if test x"$boost_inc" != x; then boost_cv_inc_path=$boost_inc fi break 2 fi done done AC_LANG_POP([C++])dnl ]) case $boost_cv_inc_path in #( no) boost_errmsg="cannot find Boost headers version >= $boost_version_req_string" m4_if([$2], [], [AC_MSG_ERROR([$boost_errmsg])], [AC_MSG_NOTICE([$boost_errmsg])]) $2 ;;#( yes) BOOST_CPPFLAGS= ;;#( *) AC_SUBST([BOOST_CPPFLAGS], ["-I$boost_cv_inc_path"])dnl ;; esac if test x"$boost_cv_inc_path" != xno; then AC_DEFINE([HAVE_BOOST], [1], [Defined if the requested minimum BOOST version is satisfied]) AC_CACHE_CHECK([for Boost's header version], [boost_cv_lib_version], [m4_pattern_allow([^BOOST_LIB_VERSION$])dnl _BOOST_SED_CPP([/^boost_lib_version = /{s///;s/\"//g;p;q;}], [#include boost_lib_version = BOOST_LIB_VERSION], [boost_cv_lib_version=`cat conftest.i`])]) # e.g. "134" for 1_34_1 or "135" for 1_35 boost_major_version=`echo "$boost_cv_lib_version" | $SED 's/_//;s/_.*//;s/ //'` case $boost_major_version in #( '' | *[[!0-9]]*) AC_MSG_ERROR([invalid value: boost_major_version=$boost_major_version]) ;; esac fi CPPFLAGS=$boost_save_CPPFLAGS ])# BOOST_REQUIRE # BOOST_STATIC() # -------------- # Add the "--enable-static-boost" configure argument. If this argument is given # on the command line, static versions of the libraries will be looked up. AC_DEFUN([BOOST_STATIC], [AC_ARG_ENABLE([static-boost], [AC_HELP_STRING([--enable-static-boost], [Prefer the static boost libraries over the shared ones [no]])], [enable_static_boost=yes], [enable_static_boost=no])])# BOOST_STATIC # BOOST_FIND_HEADER([HEADER-NAME], [ACTION-IF-NOT-FOUND], [ACTION-IF-FOUND]) # -------------------------------------------------------------------------- # Wrapper around AC_CHECK_HEADER for Boost headers. Useful to check for # some parts of the Boost library which are only made of headers and don't # require linking (such as Boost.Foreach). # # Default ACTION-IF-NOT-FOUND: Fail with a fatal error unless Boost couldn't be # found in the first place, in which case by default a notice is issued to the # user. Presumably if we haven't died already it's because it's OK to not have # Boost, which is why only a notice is issued instead of a hard error. # # Default ACTION-IF-FOUND: define the preprocessor symbol HAVE_ in # case of success # (where HEADER-NAME is written LIKE_THIS, e.g., # HAVE_BOOST_FOREACH_HPP). AC_DEFUN([BOOST_FIND_HEADER], [AC_REQUIRE([BOOST_REQUIRE])dnl if test x"$boost_cv_inc_path" = xno; then m4_default([$2], [AC_MSG_NOTICE([Boost not available, not searching for $1])]) else AC_LANG_PUSH([C++])dnl boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" AC_CHECK_HEADER([$1], [m4_default([$3], [AC_DEFINE(AS_TR_CPP([HAVE_$1]), [1], [Define to 1 if you have <$1>])])], [m4_default([$2], [AC_MSG_ERROR([cannot find $1])])]) CPPFLAGS=$boost_save_CPPFLAGS AC_LANG_POP([C++])dnl fi ])# BOOST_FIND_HEADER # BOOST_FIND_LIB([LIB-NAME], [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], # [CXX-PROLOGUE]) # ------------------------------------------------------------------------- # Look for the Boost library LIB-NAME (e.g., LIB-NAME = `thread', for # libboost_thread). Check that HEADER-NAME works and check that # libboost_LIB-NAME can link with the code CXX-TEST. The optional argument # CXX-PROLOGUE can be used to include some C++ code before the `main' # function. # # Invokes BOOST_FIND_HEADER([HEADER-NAME]) (see above). # # Boost libraries typically come compiled with several flavors (with different # runtime options) so PREFERRED-RT-OPT is the preferred suffix. A suffix is one # or more of the following letters: sgdpn (in that order). s = static # runtime, d = debug build, g = debug/diagnostic runtime, p = STLPort build, # n = (unsure) STLPort build without iostreams from STLPort (it looks like `n' # must always be used along with `p'). Additionally, PREFERRED-RT-OPT can # start with `mt-' to indicate that there is a preference for multi-thread # builds. Some sample values for PREFERRED-RT-OPT: (nothing), mt, d, mt-d, gdp # ... If you want to make sure you have a specific version of Boost # (eg, >= 1.33) you *must* invoke BOOST_REQUIRE before this macro. AC_DEFUN([BOOST_FIND_LIB], [AC_REQUIRE([BOOST_REQUIRE])dnl AC_REQUIRE([_BOOST_FIND_COMPILER_TAG])dnl AC_REQUIRE([BOOST_STATIC])dnl AC_REQUIRE([_BOOST_GUESS_WHETHER_TO_USE_MT])dnl if test x"$boost_cv_inc_path" = xno; then AC_MSG_NOTICE([Boost not available, not searching for the Boost $1 library]) else dnl The else branch is huge and wasn't intended on purpose. AC_LANG_PUSH([C++])dnl AS_VAR_PUSHDEF([Boost_lib], [boost_cv_lib_$1])dnl AS_VAR_PUSHDEF([Boost_lib_LDFLAGS], [boost_cv_lib_$1_LDFLAGS])dnl AS_VAR_PUSHDEF([Boost_lib_LDPATH], [boost_cv_lib_$1_LDPATH])dnl AS_VAR_PUSHDEF([Boost_lib_LIBS], [boost_cv_lib_$1_LIBS])dnl BOOST_FIND_HEADER([$3]) boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" # Now let's try to find the library. The algorithm is as follows: first look # for a given library name according to the user's PREFERRED-RT-OPT. For each # library name, we prefer to use the ones that carry the tag (toolset name). # Each library is searched through the various standard paths were Boost is # usually installed. If we can't find the standard variants, we try to # enforce -mt (for instance on MacOSX, libboost_threads.dylib doesn't exist # but there's -obviously- libboost_threads-mt.dylib). AC_CACHE_CHECK([for the Boost $1 library], [Boost_lib], [Boost_lib=no case "$2" in #( mt | mt-) boost_mt=-mt; boost_rtopt=;; #( mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X$2" : 'Xmt-*\(.*\)'`;; #( *) boost_mt=; boost_rtopt=$2;; esac if test $enable_static_boost = yes; then boost_rtopt="s$boost_rtopt" fi # Find the proper debug variant depending on what we've been asked to find. case $boost_rtopt in #( *d*) boost_rt_d=$boost_rtopt;; #( *[[sgpn]]*) # Insert the `d' at the right place (in between `sg' and `pn') boost_rt_d=`echo "$boost_rtopt" | sed 's/\(s*g*\)\(p*n*\)/\1\2/'`;; #( *) boost_rt_d='-d';; esac # If the PREFERRED-RT-OPT are not empty, prepend a `-'. test -n "$boost_rtopt" && boost_rtopt="-$boost_rtopt" $boost_guess_use_mt && boost_mt=-mt # Look for the abs path the static archive. # $libext is computed by Libtool but let's make sure it's non empty. test -z "$libext" && AC_MSG_ERROR([the libext variable is empty, did you invoke Libtool?]) boost_save_ac_objext=$ac_objext # Generate the test file. AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <$3> $5], [$4])]) dnl Optimization hacks: compiling C++ is slow, especially with Boost. What dnl we're trying to do here is guess the right combination of link flags dnl (LIBS / LDFLAGS) to use a given library. This can take several dnl iterations before it succeeds and is thus *very* slow. So what we do dnl instead is that we compile the code first (and thus get an object file, dnl typically conftest.o). Then we try various combinations of link flags dnl until we succeed to link conftest.o in an executable. The problem is dnl that the various TRY_LINK / COMPILE_IFELSE macros of Autoconf always dnl remove all the temporary files including conftest.o. So the trick here dnl is to temporarily change the value of ac_objext so that conftest.o is dnl preserved accross tests. This is obviously fragile and I will burn in dnl hell for not respecting Autoconf's documented interfaces, but in the dnl mean time, it optimizes the macro by a factor of 5 to 30. dnl Another small optimization: the first argument of AC_COMPILE_IFELSE left dnl empty because the test file is generated only once above (before we dnl start the for loops). AC_COMPILE_IFELSE([], [ac_objext=do_not_rm_me_plz], [AC_MSG_ERROR([cannot compile a test that uses Boost $1])]) ac_objext=$boost_save_ac_objext boost_failed_libs= # Don't bother to ident the 6 nested for loops, only the 2 innermost ones # matter. for boost_tag_ in -$boost_cv_lib_tag ''; do for boost_ver_ in -$boost_cv_lib_version ''; do for boost_mt_ in $boost_mt -mt ''; do for boost_rtopt_ in $boost_rtopt '' -d; do for boost_lib in \ boost_$1$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \ boost_$1$boost_tag_$boost_rtopt_$boost_ver_ \ boost_$1$boost_tag_$boost_mt_$boost_ver_ \ boost_$1$boost_tag_$boost_ver_ do # Avoid testing twice the same lib case $boost_failed_libs in #( *@$boost_lib@*) continue;; esac # If with_boost is empty, we'll search in /lib first, which is not quite # right so instead we'll try to a location based on where the headers are. boost_tmp_lib=$with_boost test x"$with_boost" = x && boost_tmp_lib=${boost_cv_inc_path%/include} for boost_ldpath in "$boost_tmp_lib/lib" '' \ /opt/local/lib* /usr/local/lib* /opt/lib* /usr/lib* \ "$with_boost" C:/Boost/lib /lib* do test -e "$boost_ldpath" || continue boost_save_LDFLAGS=$LDFLAGS # Are we looking for a static library? case $boost_ldpath:$boost_rtopt_ in #( *?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt) Boost_lib_LIBS="$boost_ldpath/lib$boost_lib.$libext" test -e "$Boost_lib_LIBS" || continue;; #( *) # No: use -lboost_foo to find the shared library. Boost_lib_LIBS="-l$boost_lib";; esac boost_save_LIBS=$LIBS LIBS="$Boost_lib_LIBS $LIBS" test x"$boost_ldpath" != x && LDFLAGS="$LDFLAGS -L$boost_ldpath" dnl First argument of AC_LINK_IFELSE left empty because the test file is dnl generated only once above (before we start the for loops). _BOOST_AC_LINK_IFELSE([], [Boost_lib=yes], [Boost_lib=no]) ac_objext=$boost_save_ac_objext LDFLAGS=$boost_save_LDFLAGS LIBS=$boost_save_LIBS if test x"$Boost_lib" = xyes; then Boost_lib_LDFLAGS="-L$boost_ldpath -Wl,-R$boost_ldpath" Boost_lib_LDPATH="$boost_ldpath" break 6 else boost_failed_libs="$boost_failed_libs@$boost_lib@" fi done done done done done done rm -f conftest.$ac_objext ]) case $Boost_lib in #( no) _AC_MSG_LOG_CONFTEST AC_MSG_ERROR([cannot find the flags to link with Boost $1]) ;; esac AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS])dnl AC_SUBST(AS_TR_CPP([BOOST_$1_LDPATH]), [$Boost_lib_LDPATH])dnl AC_SUBST([BOOST_LDPATH], [$Boost_lib_LDPATH])dnl AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS])dnl CPPFLAGS=$boost_save_CPPFLAGS AS_VAR_POPDEF([Boost_lib])dnl AS_VAR_POPDEF([Boost_lib_LDFLAGS])dnl AS_VAR_POPDEF([Boost_lib_LDPATH])dnl AS_VAR_POPDEF([Boost_lib_LIBS])dnl AC_LANG_POP([C++])dnl fi ])# BOOST_FIND_LIB # --------------------------------------- # # Checks for the various Boost libraries. # # --------------------------------------- # # List of boost libraries: http://www.boost.org/libs/libraries.htm # The page http://beta.boost.org/doc/libs is useful: it gives the first release # version of each library (among other things). # BOOST_DEFUN(LIBRARY, CODE) # -------------------------- # Define BOOST_ as a macro that runs CODE. # # Use indir to avoid the warning on underquoted macro name given to AC_DEFUN. m4_define([BOOST_DEFUN], [m4_indir([AC_DEFUN], m4_toupper([BOOST_$1]), [m4_pushdef([BOOST_Library], [$1])dnl $2 m4_popdef([BOOST_Library])dnl ]) ]) # BOOST_ARRAY() # ------------- # Look for Boost.Array BOOST_DEFUN([Array], [BOOST_FIND_HEADER([boost/array.hpp])]) # BOOST_ASIO() # ------------ # Look for Boost.Asio (new in Boost 1.35). BOOST_DEFUN([Asio], [AC_REQUIRE([BOOST_SYSTEM])dnl BOOST_FIND_HEADER([boost/asio.hpp])]) # BOOST_BIND() # ------------ # Look for Boost.Bind BOOST_DEFUN([Bind], [BOOST_FIND_HEADER([boost/bind.hpp])]) # BOOST_CONVERSION() # ------------------ # Look for Boost.Conversion (cast / lexical_cast) BOOST_DEFUN([Conversion], [BOOST_FIND_HEADER([boost/cast.hpp]) BOOST_FIND_HEADER([boost/lexical_cast.hpp]) ])# BOOST_CONVERSION # BOOST_DATE_TIME([PREFERRED-RT-OPT]) # ----------------------------------- # Look for Boost.Date_Time. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Date_Time], [BOOST_FIND_LIB([date_time], [$1], [boost/date_time/posix_time/posix_time.hpp], [boost::posix_time::ptime t;]) ])# BOOST_DATE_TIME # BOOST_FILESYSTEM([PREFERRED-RT-OPT]) # ------------------------------------ # Look for Boost.Filesystem. For the documentation of PREFERRED-RT-OPT, see # the documentation of BOOST_FIND_LIB above. # Do not check for boost/filesystem.hpp because this file was introduced in # 1.34. BOOST_DEFUN([Filesystem], [# Do we have to check for Boost.System? This link-time dependency was # added as of 1.35.0. If we have a version <1.35, we must not attempt to # find Boost.System as it didn't exist by then. if test $boost_major_version -ge 135; then BOOST_SYSTEM([$1]) fi # end of the Boost.System check. boost_filesystem_save_LIBS=$LIBS boost_filesystem_save_LDFLAGS=$LDFLAGS m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl LIBS="$LIBS $BOOST_SYSTEM_LIBS" LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS" BOOST_FIND_LIB([filesystem], [$1], [boost/filesystem/path.hpp], [boost::filesystem::path p;]) if test $enable_static_boost = yes && test $boost_major_version -ge 135; then AC_SUBST([BOOST_FILESYSTEM_LIBS], ["$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"]) fi LIBS=$boost_filesystem_save_LIBS LDFLAGS=$boost_filesystem_save_LDFLAGS ])# BOOST_FILESYSTEM # BOOST_FOREACH() # --------------- # Look for Boost.Foreach BOOST_DEFUN([Foreach], [BOOST_FIND_HEADER([boost/foreach.hpp])]) # BOOST_FORMAT() # -------------- # Look for Boost.Format # Note: we can't check for boost/format/format_fwd.hpp because the header isn't # standalone. It can't be compiled because it triggers the following error: # boost/format/detail/config_macros.hpp:88: error: 'locale' in namespace 'std' # does not name a type BOOST_DEFUN([Format], [BOOST_FIND_HEADER([boost/format.hpp])]) # BOOST_FUNCTION() # ---------------- # Look for Boost.Function BOOST_DEFUN([Function], [BOOST_FIND_HEADER([boost/function.hpp])]) # BOOST_GRAPH([PREFERRED-RT-OPT]) # ------------------------------- # Look for Boost.Graphs. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Graph], [BOOST_FIND_LIB([graph], [$1], [boost/graph/adjacency_list.hpp], [boost::adjacency_list<> g;]) ])# BOOST_GRAPH # BOOST_IOSTREAMS([PREFERRED-RT-OPT]) # ----------------------------------- # Look for Boost.IOStreams. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([IOStreams], [BOOST_FIND_LIB([iostreams], [$1], [boost/iostreams/device/file_descriptor.hpp], [boost::iostreams::file_descriptor fd; fd.close();]) ])# BOOST_IOSTREAMS # BOOST_HASH() # ------------ # Look for Boost.Functional/Hash BOOST_DEFUN([Hash], [BOOST_FIND_HEADER([boost/functional/hash.hpp])]) # BOOST_LAMBDA() # -------------- # Look for Boost.Lambda BOOST_DEFUN([Lambda], [BOOST_FIND_HEADER([boost/lambda/lambda.hpp])]) # BOOST_LOG([PREFERRED-RT-OPT]) # ----------------------------- # Look for Boost.Log For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Log], [BOOST_FIND_LIB([log], [$1], [boost/log/core/core.hpp], [boost::log::attribute a; a.get_value();]) ])# BOOST_LOG # BOOST_LOG_SETUP([PREFERRED-RT-OPT]) # ----------------------------------- # Look for Boost.Log For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Log_Setup], [AC_REQUIRE([BOOST_LOG])dnl BOOST_FIND_LIB([log_setup], [$1], [boost/log/utility/init/from_settings.hpp], [boost::log::basic_settings bs; bs.empty();]) ])# BOOST_LOG_SETUP # BOOST_MATH() # ------------ # Look for Boost.Math # TODO: This library isn't header-only but it comes in multiple different # flavors that don't play well with BOOST_FIND_LIB (e.g, libboost_math_c99, # libboost_math_c99f, libboost_math_c99l, libboost_math_tr1, # libboost_math_tr1f, libboost_math_tr1l). This macro must be fixed to do the # right thing anyway. BOOST_DEFUN([Math], [BOOST_FIND_HEADER([boost/math/special_functions.hpp])]) # BOOST_MULTIARRAY() # ------------------ # Look for Boost.MultiArray BOOST_DEFUN([MultiArray], [BOOST_FIND_HEADER([boost/multi_array.hpp])]) # BOOST_NUMERIC_CONVERSION() # -------------------------- # Look for Boost.NumericConversion (policy-based numeric conversion) BOOST_DEFUN([Numeric_Conversion], [BOOST_FIND_HEADER([boost/numeric/conversion/converter.hpp]) ])# BOOST_NUMERIC_CONVERSION # BOOST_OPTIONAL() # ---------------- # Look for Boost.Optional BOOST_DEFUN([Optional], [BOOST_FIND_HEADER([boost/optional.hpp])]) # BOOST_PTR_CONTAINER() # ---------------- # Look for Boost.PointerContainer BOOST_DEFUN([Ptr_Container], [BOOST_FIND_HEADER([boost/ptr_container/ptr_vector.hpp])]) # BOOST_PREPROCESSOR() # -------------------- # Look for Boost.Preprocessor BOOST_DEFUN([Preprocessor], [BOOST_FIND_HEADER([boost/preprocessor/repeat.hpp])]) # BOOST_UNORDERED() # ----------------- # Look for Boost.Unordered BOOST_DEFUN([Unordered], [BOOST_FIND_HEADER([boost/unordered_map.hpp])]) # BOOST_UUID() # ------------ # Look for Boost.Uuid BOOST_DEFUN([Uuid], [BOOST_FIND_HEADER([boost/uuid/uuid.hpp])]) # BOOST_PROGRAM_OPTIONS([PREFERRED-RT-OPT]) # ----------------------------------------- # Look for Boost.Program_options. For the documentation of PREFERRED-RT-OPT, # see the documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Program_Options], [BOOST_FIND_LIB([program_options], [$1], [boost/program_options.hpp], [boost::program_options::options_description d("test");]) ])# BOOST_PROGRAM_OPTIONS # _BOOST_PYTHON_CONFIG(VARIABLE, FLAG) # ------------------------------------ # Save VARIABLE, and define it via `python-config --FLAG`. # Substitute BOOST_PYTHON_VARIABLE. m4_define([_BOOST_PYTHON_CONFIG], [AC_SUBST([BOOST_PYTHON_$1], [`python-config --$2 2>/dev/null`])dnl boost_python_save_$1=$$1 $1="$$1 $BOOST_PYTHON_$1"]) # BOOST_PYTHON([PREFERRED-RT-OPT]) # -------------------------------- # Look for Boost.Python. For the documentation of PREFERRED-RT-OPT, # see the documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Python], [_BOOST_PYTHON_CONFIG([CPPFLAGS], [includes]) _BOOST_PYTHON_CONFIG([LDFLAGS], [ldflags]) _BOOST_PYTHON_CONFIG([LIBS], [libs]) m4_pattern_allow([^BOOST_PYTHON_MODULE$])dnl BOOST_FIND_LIB([python], [$1], [boost/python.hpp], [], [BOOST_PYTHON_MODULE(empty) {}]) CPPFLAGS=$boost_python_save_CPPFLAGS LDFLAGS=$boost_python_save_LDFLAGS LIBS=$boost_python_save_LIBS ])# BOOST_PYTHON # BOOST_REF() # ----------- # Look for Boost.Ref BOOST_DEFUN([Ref], [BOOST_FIND_HEADER([boost/ref.hpp])]) # BOOST_REGEX([PREFERRED-RT-OPT]) # ------------------------------- # Look for Boost.Regex. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Regex], [BOOST_FIND_LIB([regex], [$1], [boost/regex.hpp], [boost::regex exp("*"); boost::regex_match("foo", exp);]) ])# BOOST_REGEX # BOOST_SERIALIZATION([PREFERRED-RT-OPT]) # --------------------------------------- # Look for Boost.Serialization. For the documentation of PREFERRED-RT-OPT, see # the documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Serialization], [BOOST_FIND_LIB([serialization], [$1], [boost/archive/text_oarchive.hpp], [std::ostream* o = 0; // Cheap way to get an ostream... boost::archive::text_oarchive t(*o);]) ])# BOOST_SERIALIZATION # BOOST_SIGNALS([PREFERRED-RT-OPT]) # --------------------------------- # Look for Boost.Signals. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Signals], [BOOST_FIND_LIB([signals], [$1], [boost/signal.hpp], [boost::signal s;]) ])# BOOST_SIGNALS # BOOST_SMART_PTR() # ----------------- # Look for Boost.SmartPtr BOOST_DEFUN([Smart_Ptr], [BOOST_FIND_HEADER([boost/scoped_ptr.hpp]) BOOST_FIND_HEADER([boost/shared_ptr.hpp]) ]) # BOOST_STATICASSERT() # -------------------- # Look for Boost.StaticAssert BOOST_DEFUN([StaticAssert], [BOOST_FIND_HEADER([boost/static_assert.hpp])]) # BOOST_STRING_ALGO() # ------------------- # Look for Boost.StringAlgo BOOST_DEFUN([String_Algo], [BOOST_FIND_HEADER([boost/algorithm/string.hpp]) ]) # BOOST_SYSTEM([PREFERRED-RT-OPT]) # -------------------------------- # Look for Boost.System. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. This library was introduced in Boost # 1.35.0. BOOST_DEFUN([System], [BOOST_FIND_LIB([system], [$1], [boost/system/error_code.hpp], [boost::system::error_code e; e.clear();]) ])# BOOST_SYSTEM # BOOST_TEST([PREFERRED-RT-OPT]) # ------------------------------ # Look for Boost.Test. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Test], [m4_pattern_allow([^BOOST_CHECK$])dnl BOOST_FIND_LIB([unit_test_framework], [$1], [boost/test/unit_test.hpp], [BOOST_CHECK(2 == 2);], [using boost::unit_test::test_suite; test_suite* init_unit_test_suite(int argc, char ** argv) { return NULL; }]) ])# BOOST_TEST # BOOST_THREADS([PREFERRED-RT-OPT]) # --------------------------------- # Look for Boost.Thread. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. # FIXME: Provide an alias "BOOST_THREAD". BOOST_DEFUN([Threads], [dnl Having the pthread flag is required at least on GCC3 where dnl boost/thread.hpp would complain if we try to compile without dnl -pthread on GNU/Linux. AC_REQUIRE([_BOOST_PTHREAD_FLAG])dnl boost_threads_save_LIBS=$LIBS boost_threads_save_CPPFLAGS=$CPPFLAGS LIBS="$LIBS $boost_cv_pthread_flag" # Yes, we *need* to put the -pthread thing in CPPFLAGS because with GCC3, # boost/thread.hpp will trigger a #error if -pthread isn't used: # boost/config/requires_threads.hpp:47:5: #error "Compiler threading support # is not turned on. Please set the correct command line options for # threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" CPPFLAGS="$CPPFLAGS $boost_cv_pthread_flag" BOOST_FIND_LIB([thread], [$1], [boost/thread.hpp], [boost::thread t; boost::mutex m;]) BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $boost_cv_pthread_flag" BOOST_CPPFLAGS="$BOOST_CPPFLAGS $boost_cv_pthread_flag" LIBS=$boost_threads_save_LIBS CPPFLAGS=$boost_threads_save_CPPFLAGS ])# BOOST_THREADS # BOOST_TOKENIZER() # ----------------- # Look for Boost.Tokenizer BOOST_DEFUN([Tokenizer], [BOOST_FIND_HEADER([boost/tokenizer.hpp])]) # BOOST_TRIBOOL() # --------------- # Look for Boost.Tribool BOOST_DEFUN([Tribool], [BOOST_FIND_HEADER([boost/logic/tribool_fwd.hpp]) BOOST_FIND_HEADER([boost/logic/tribool.hpp]) ]) # BOOST_TUPLE() # ------------- # Look for Boost.Tuple BOOST_DEFUN([Tuple], [BOOST_FIND_HEADER([boost/tuple/tuple.hpp])]) # BOOST_TYPETRAITS() # -------------------- # Look for Boost.TypeTraits BOOST_DEFUN([TypeTraits], [BOOST_FIND_HEADER([boost/type_traits.hpp])]) # BOOST_UTILITY() # --------------- # Look for Boost.Utility (noncopyable, result_of, base-from-member idiom, # etc.) BOOST_DEFUN([Utility], [BOOST_FIND_HEADER([boost/utility.hpp])]) # BOOST_VARIANT() # --------------- # Look for Boost.Variant. BOOST_DEFUN([Variant], [BOOST_FIND_HEADER([boost/variant/variant_fwd.hpp]) BOOST_FIND_HEADER([boost/variant.hpp])]) # BOOST_WAVE([PREFERRED-RT-OPT]) # ------------------------------ # NOTE: If you intend to use Wave/Spirit with thread support, make sure you # call BOOST_THREADS first. # Look for Boost.Wave. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Wave], [AC_REQUIRE([BOOST_FILESYSTEM])dnl AC_REQUIRE([BOOST_DATE_TIME])dnl boost_wave_save_LIBS=$LIBS boost_wave_save_LDFLAGS=$LDFLAGS m4_pattern_allow([^BOOST_((FILE)?SYSTEM|DATE_TIME|THREAD)_(LIBS|LDFLAGS)$])dnl LIBS="$LIBS $BOOST_SYSTEM_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_DATE_TIME_LIBS\ $BOOST_THREAD_LIBS" LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS $BOOST_FILESYSTEM_LDFLAGS\ $BOOST_DATE_TIME_LDFLAGS $BOOST_THREAD_LDFLAGS" BOOST_FIND_LIB([wave], [$1], [boost/wave.hpp], [boost::wave::token_id id; get_token_name(id);]) LIBS=$boost_wave_save_LIBS LDFLAGS=$boost_wave_save_LDFLAGS ])# BOOST_WAVE # BOOST_XPRESSIVE() # ----------------- # Look for Boost.Xpressive (new since 1.36.0). BOOST_DEFUN([Xpressive], [BOOST_FIND_HEADER([boost/xpressive/xpressive.hpp])]) # ----------------- # # Internal helpers. # # ----------------- # # _BOOST_PTHREAD_FLAG() # --------------------- # Internal helper for BOOST_THREADS. Based on ACX_PTHREAD: # http://autoconf-archive.cryp.to/acx_pthread.html AC_DEFUN([_BOOST_PTHREAD_FLAG], [AC_REQUIRE([AC_PROG_CXX])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_LANG_PUSH([C++])dnl AC_CACHE_CHECK([for the flags needed to use pthreads], [boost_cv_pthread_flag], [ boost_cv_pthread_flag= # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # (none): in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -lpthreads: AIX (must check this before -lpthread) # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # -llthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: GNU Linux/GCC (kernel threads), BSD/GCC (userland threads) # -pthreads: Solaris/GCC # -mthreads: MinGW32/GCC, Lynx/GCC # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # ... -mt is also the pthreads flag for HP/aCC # -lpthread: GNU Linux, etc. # --thread-safe: KAI C++ case $host_os in #( *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthreads/-mt/ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: boost_pthread_flags="-pthreads -lpthread -mt -pthread";; #( *) boost_pthread_flags="-lpthreads -Kthread -kthread -llthread -pthread \ -pthreads -mthreads -lpthread --thread-safe -mt";; esac # Generate the test file. AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include ], [pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0);])]) for boost_pthread_flag in '' $boost_pthread_flags; do boost_pthread_ok=false dnl Re-use the test file already generated. boost_pthreads__save_LIBS=$LIBS LIBS="$LIBS $boost_pthread_flag" AC_LINK_IFELSE([], [if grep ".*$boost_pthread_flag" conftest.err; then echo "This flag seems to have triggered warnings" >&AS_MESSAGE_LOG_FD else boost_pthread_ok=:; boost_cv_pthread_flag=$boost_pthread_flag fi]) LIBS=$boost_pthreads__save_LIBS $boost_pthread_ok && break done ]) AC_LANG_POP([C++])dnl ])# _BOOST_PTHREAD_FLAG # _BOOST_gcc_test(MAJOR, MINOR) # ----------------------------- # Internal helper for _BOOST_FIND_COMPILER_TAG. m4_define([_BOOST_gcc_test], ["defined __GNUC__ && __GNUC__ == $1 && __GNUC_MINOR__ == $2 && !defined __ICC @ gcc$1$2"])dnl # _BOOST_FIND_COMPILER_TAG() # -------------------------- # Internal. When Boost is installed without --layout=system, each library # filename will hold a suffix that encodes the compiler used during the # build. The Boost build system seems to call this a `tag'. AC_DEFUN([_BOOST_FIND_COMPILER_TAG], [AC_REQUIRE([AC_PROG_CXX])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_CACHE_CHECK([for the toolset name used by Boost for $CXX], [boost_cv_lib_tag], [boost_cv_lib_tag=unknown if test x$boost_cv_inc_path != xno; then AC_LANG_PUSH([C++])dnl # The following tests are mostly inspired by boost/config/auto_link.hpp # The list is sorted to most recent/common to oldest compiler (in order # to increase the likelihood of finding the right compiler with the # least number of compilation attempt). # Beware that some tests are sensible to the order (for instance, we must # look for MinGW before looking for GCC3). # I used one compilation test per compiler with a #error to recognize # each compiler so that it works even when cross-compiling (let me know # if you know a better approach). # Known missing tags (known from Boost's tools/build/v2/tools/common.jam): # como, edg, kcc, bck, mp, sw, tru, xlc # I'm not sure about my test for `il' (be careful: Intel's ICC pre-defines # the same defines as GCC's). for i in \ _BOOST_gcc_test(4, 6) \ _BOOST_gcc_test(4, 5) \ _BOOST_gcc_test(4, 4) \ _BOOST_gcc_test(4, 3) \ _BOOST_gcc_test(4, 2) \ _BOOST_gcc_test(4, 1) \ _BOOST_gcc_test(4, 0) \ "defined __GNUC__ && __GNUC__ == 3 && !defined __ICC \ && (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw" \ _BOOST_gcc_test(3, 4) \ _BOOST_gcc_test(3, 3) \ "defined _MSC_VER && _MSC_VER >= 1500 @ vc90" \ "defined _MSC_VER && _MSC_VER == 1400 @ vc80" \ _BOOST_gcc_test(3, 2) \ "defined _MSC_VER && _MSC_VER == 1310 @ vc71" \ _BOOST_gcc_test(3, 1) \ _BOOST_gcc_test(3, 0) \ "defined __BORLANDC__ @ bcb" \ "defined __ICC && (defined __unix || defined __unix__) @ il" \ "defined __ICL @ iw" \ "defined _MSC_VER && _MSC_VER == 1300 @ vc7" \ _BOOST_gcc_test(2, 95) \ "defined __MWERKS__ && __MWERKS__ <= 0x32FF @ cw9" \ "defined _MSC_VER && _MSC_VER < 1300 && !defined UNDER_CE @ vc6" \ "defined _MSC_VER && _MSC_VER < 1300 && defined UNDER_CE @ evc4" \ "defined __MWERKS__ && __MWERKS__ <= 0x31FF @ cw8" do boost_tag_test=`expr "X$i" : 'X\([[^@]]*\) @ '` boost_tag=`expr "X$i" : 'X[[^@]]* @ \(.*\)'` AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #if $boost_tag_test /* OK */ #else # error $boost_tag_test #endif ]])], [boost_cv_lib_tag=$boost_tag; break], []) done AC_LANG_POP([C++])dnl case $boost_cv_lib_tag in #( # Some newer (>= 1.35?) versions of Boost seem to only use "gcc" as opposed # to "gcc41" for instance. *-gcc | *'-gcc ') :;; #( Don't re-add -gcc: it's already in there. gcc*) boost_tag_x= case $host_os in #( darwin*) if test $boost_major_version -ge 136; then # The `x' added in r46793 of Boost. boost_tag_x=x fi;; esac # We can specify multiple tags in this variable because it's used by # BOOST_FIND_LIB that does a `for tag in -$boost_cv_lib_tag' ... boost_cv_lib_tag="$boost_tag_x$boost_cv_lib_tag -${boost_tag_x}gcc" ;; #( unknown) AC_MSG_WARN([[could not figure out which toolset name to use for $CXX]]) boost_cv_lib_tag= ;; esac fi])dnl end of AC_CACHE_CHECK ])# _BOOST_FIND_COMPILER_TAG # _BOOST_GUESS_WHETHER_TO_USE_MT() # -------------------------------- # Compile a small test to try to guess whether we should favor MT (Multi # Thread) flavors of Boost. Sets boost_guess_use_mt accordingly. AC_DEFUN([_BOOST_GUESS_WHETHER_TO_USE_MT], [# Check whether we do better use `mt' even though we weren't ask to. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #if defined _REENTRANT || defined _MT || defined __MT__ /* use -mt */ #else # error MT not needed #endif ]])], [boost_guess_use_mt=:], [boost_guess_use_mt=false]) ]) # _BOOST_AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # ------------------------------------------------------------------- # Fork of _AC_LINK_IFELSE that preserves conftest.o across calls. Fragile, # will break when Autoconf changes its internals. Requires that you manually # rm -f conftest.$ac_objext in between to really different tests, otherwise # you will try to link a conftest.o left behind by a previous test. # Used to aggressively optimize BOOST_FIND_LIB (see the big comment in this # macro). # # Don't use "break" in the actions, as it would short-circuit some code # this macro runs after the actions. m4_define([_BOOST_AC_LINK_IFELSE], [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl rm -f conftest$ac_exeext boost_save_ac_ext=$ac_ext boost_use_source=: # If we already have a .o, re-use it. We change $ac_ext so that $ac_link # tries to link the existing object file instead of compiling from source. test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false && _AS_ECHO_LOG([re-using the existing conftest.$ac_objext]) AS_IF([_AC_DO_STDERR($ac_link) && { test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_executable_p conftest$ac_exeext dnl FIXME: use AS_TEST_X instead when 2.61 is widespread enough. }], [$2], [if $boost_use_source; then _AC_MSG_LOG_CONFTEST fi $3]) ac_objext=$boost_save_ac_objext ac_ext=$boost_save_ac_ext dnl Delete also the IPA/IPO (Inter Procedural Analysis/Optimization) dnl information created by the PGI compiler (conftest_ipa8_conftest.oo), dnl as it would interfere with the next link command. rm -f core conftest.err conftest_ipa8_conftest.oo \ conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl ])# _BOOST_AC_LINK_IFELSE # Local Variables: # mode: autoconf # End: xmltooling-1.5.3/m4/doxygen.m4000644 001751 001751 00000043163 12003305016 017336 0ustar00scantorscantor000000 000000 # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_prog_doxygen.html # =========================================================================== # # SYNOPSIS # # DX_INIT_DOXYGEN(PROJECT-NAME, DOXYFILE-PATH, [OUTPUT-DIR]) # DX_DOXYGEN_FEATURE(ON|OFF) # DX_DOT_FEATURE(ON|OFF) # DX_HTML_FEATURE(ON|OFF) # DX_CHM_FEATURE(ON|OFF) # DX_CHI_FEATURE(ON|OFF) # DX_MAN_FEATURE(ON|OFF) # DX_RTF_FEATURE(ON|OFF) # DX_XML_FEATURE(ON|OFF) # DX_PDF_FEATURE(ON|OFF) # DX_PS_FEATURE(ON|OFF) # # DESCRIPTION # # The DX_*_FEATURE macros control the default setting for the given # Doxygen feature. Supported features are 'DOXYGEN' itself, 'DOT' for # generating graphics, 'HTML' for plain HTML, 'CHM' for compressed HTML # help (for MS users), 'CHI' for generating a seperate .chi file by the # .chm file, and 'MAN', 'RTF', 'XML', 'PDF' and 'PS' for the appropriate # output formats. The environment variable DOXYGEN_PAPER_SIZE may be # specified to override the default 'a4wide' paper size. # # By default, HTML, PDF and PS documentation is generated as this seems to # be the most popular and portable combination. MAN pages created by # Doxygen are usually problematic, though by picking an appropriate subset # and doing some massaging they might be better than nothing. CHM and RTF # are specific for MS (note that you can't generate both HTML and CHM at # the same time). The XML is rather useless unless you apply specialized # post-processing to it. # # The macros mainly control the default state of the feature. The use can # override the default by specifying --enable or --disable. The macros # ensure that contradictory flags are not given (e.g., # --enable-doxygen-html and --enable-doxygen-chm, # --enable-doxygen-anything with --disable-doxygen, etc.) Finally, each # feature will be automatically disabled (with a warning) if the required # programs are missing. # # Once all the feature defaults have been specified, call DX_INIT_DOXYGEN # with the following parameters: a one-word name for the project for use # as a filename base etc., an optional configuration file name (the # default is 'Doxyfile', the same as Doxygen's default), and an optional # output directory name (the default is 'doxygen-doc'). # # Automake Support # # The following is a template aminclude.am file for use with Automake. # Make targets and variables values are controlled by the various # DX_COND_* conditionals set by autoconf. # # The provided targets are: # # doxygen-doc: Generate all doxygen documentation. # # doxygen-run: Run doxygen, which will generate some of the # documentation (HTML, CHM, CHI, MAN, RTF, XML) # but will not do the post processing required # for the rest of it (PS, PDF, and some MAN). # # doxygen-man: Rename some doxygen generated man pages. # # doxygen-ps: Generate doxygen PostScript documentation. # # doxygen-pdf: Generate doxygen PDF documentation. # # Note that by default these are not integrated into the automake targets. # If doxygen is used to generate man pages, you can achieve this # integration by setting man3_MANS to the list of man pages generated and # then adding the dependency: # # $(man3_MANS): doxygen-doc # # This will cause make to run doxygen and generate all the documentation. # # The following variable is intended for use in Makefile.am: # # DX_CLEANFILES = everything to clean. # # Then add this variable to MOSTLYCLEANFILES. # # ----- begin aminclude.am ------------------------------------- # # ## --------------------------------- ## # ## Format-independent Doxygen rules. ## # ## --------------------------------- ## # # if DX_COND_doc # # ## ------------------------------- ## # ## Rules specific for HTML output. ## # ## ------------------------------- ## # # if DX_COND_html # # DX_CLEAN_HTML = @DX_DOCDIR@/html # # endif DX_COND_html # # ## ------------------------------ ## # ## Rules specific for CHM output. ## # ## ------------------------------ ## # # if DX_COND_chm # # DX_CLEAN_CHM = @DX_DOCDIR@/chm # # if DX_COND_chi # # DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi # # endif DX_COND_chi # # endif DX_COND_chm # # ## ------------------------------ ## # ## Rules specific for MAN output. ## # ## ------------------------------ ## # # if DX_COND_man # # DX_CLEAN_MAN = @DX_DOCDIR@/man # # endif DX_COND_man # # ## ------------------------------ ## # ## Rules specific for RTF output. ## # ## ------------------------------ ## # # if DX_COND_rtf # # DX_CLEAN_RTF = @DX_DOCDIR@/rtf # # endif DX_COND_rtf # # ## ------------------------------ ## # ## Rules specific for XML output. ## # ## ------------------------------ ## # # if DX_COND_xml # # DX_CLEAN_XML = @DX_DOCDIR@/xml # # endif DX_COND_xml # # ## ----------------------------- ## # ## Rules specific for PS output. ## # ## ----------------------------- ## # # if DX_COND_ps # # DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps # # DX_PS_GOAL = doxygen-ps # # doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps # # @DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag # cd @DX_DOCDIR@/latex; \ # rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ # $(DX_LATEX) refman.tex; \ # $(MAKEINDEX_PATH) refman.idx; \ # $(DX_LATEX) refman.tex; \ # countdown=5; \ # while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ # refman.log > /dev/null 2>&1 \ # && test $$countdown -gt 0; do \ # $(DX_LATEX) refman.tex; \ # countdown=`expr $$countdown - 1`; \ # done; \ # $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi # # endif DX_COND_ps # # ## ------------------------------ ## # ## Rules specific for PDF output. ## # ## ------------------------------ ## # # if DX_COND_pdf # # DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf # # DX_PDF_GOAL = doxygen-pdf # # doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf # # @DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag # cd @DX_DOCDIR@/latex; \ # rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ # $(DX_PDFLATEX) refman.tex; \ # $(DX_MAKEINDEX) refman.idx; \ # $(DX_PDFLATEX) refman.tex; \ # countdown=5; \ # while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ # refman.log > /dev/null 2>&1 \ # && test $$countdown -gt 0; do \ # $(DX_PDFLATEX) refman.tex; \ # countdown=`expr $$countdown - 1`; \ # done; \ # mv refman.pdf ../@PACKAGE@.pdf # # endif DX_COND_pdf # # ## ------------------------------------------------- ## # ## Rules specific for LaTeX (shared for PS and PDF). ## # ## ------------------------------------------------- ## # # if DX_COND_latex # # DX_CLEAN_LATEX = @DX_DOCDIR@/latex # # endif DX_COND_latex # # .PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL) # # .INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) # # doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag # # doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) # # @DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS) # rm -rf @DX_DOCDIR@ # $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG) # # DX_CLEANFILES = \ # @DX_DOCDIR@/@PACKAGE@.tag \ # -r \ # $(DX_CLEAN_HTML) \ # $(DX_CLEAN_CHM) \ # $(DX_CLEAN_CHI) \ # $(DX_CLEAN_MAN) \ # $(DX_CLEAN_RTF) \ # $(DX_CLEAN_XML) \ # $(DX_CLEAN_PS) \ # $(DX_CLEAN_PDF) \ # $(DX_CLEAN_LATEX) # # endif DX_COND_doc # # ----- end aminclude.am --------------------------------------- # # LICENSE # # Copyright (c) 2009 Oren Ben-Kiki # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 11 ## ----------## ## Defaults. ## ## ----------## DX_ENV="" AC_DEFUN([DX_FEATURE_doc], ON) AC_DEFUN([DX_FEATURE_dot], OFF) AC_DEFUN([DX_FEATURE_man], OFF) AC_DEFUN([DX_FEATURE_html], ON) AC_DEFUN([DX_FEATURE_chm], OFF) AC_DEFUN([DX_FEATURE_chi], OFF) AC_DEFUN([DX_FEATURE_rtf], OFF) AC_DEFUN([DX_FEATURE_xml], OFF) AC_DEFUN([DX_FEATURE_pdf], ON) AC_DEFUN([DX_FEATURE_ps], ON) # Compatibility with older autoconf versions. m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))]) ## --------------- ## ## Private macros. ## ## --------------- ## # DX_ENV_APPEND(VARIABLE, VALUE) # ------------------------------ # Append VARIABLE="VALUE" to DX_ENV for invoking doxygen. AC_DEFUN([DX_ENV_APPEND], [AC_SUBST([DX_ENV], ["$DX_ENV $1='$2'"])]) # DX_DIRNAME_EXPR # --------------- # Expand into a shell expression prints the directory part of a path. AC_DEFUN([DX_DIRNAME_EXPR], [[expr ".$1" : '\(\.\)[^/]*$' \| "x$1" : 'x\(.*\)/[^/]*$']]) # DX_IF_FEATURE(FEATURE, IF-ON, IF-OFF) # ------------------------------------- # Expands according to the M4 (static) status of the feature. AC_DEFUN([DX_IF_FEATURE], [ifelse(DX_FEATURE_$1, ON, [$2], [$3])]) # DX_REQUIRE_PROG(VARIABLE, PROGRAM) # ---------------------------------- # Require the specified program to be found for the DX_CURRENT_FEATURE to work. AC_DEFUN([DX_REQUIRE_PROG], [ AC_PATH_TOOL([$1], [$2]) if test "$DX_FLAG_[]DX_CURRENT_FEATURE$$1" = 1; then AC_MSG_WARN([$2 not found - will not DX_CURRENT_DESCRIPTION]) AC_SUBST(DX_FLAG_[]DX_CURRENT_FEATURE, 0) fi ]) # DX_TEST_FEATURE(FEATURE) # ------------------------ # Expand to a shell expression testing whether the feature is active. AC_DEFUN([DX_TEST_FEATURE], [test "$DX_FLAG_$1" = 1]) # DX_CHECK_DEPEND(REQUIRED_FEATURE, REQUIRED_STATE) # ------------------------------------------------- # Verify that a required features has the right state before trying to turn on # the DX_CURRENT_FEATURE. AC_DEFUN([DX_CHECK_DEPEND], [ test "$DX_FLAG_$1" = "$2" \ || AC_MSG_ERROR([doxygen-DX_CURRENT_FEATURE ifelse([$2], 1, requires, contradicts) doxygen-DX_CURRENT_FEATURE]) ]) # DX_CLEAR_DEPEND(FEATURE, REQUIRED_FEATURE, REQUIRED_STATE) # ---------------------------------------------------------- # Turn off the DX_CURRENT_FEATURE if the required feature is off. AC_DEFUN([DX_CLEAR_DEPEND], [ test "$DX_FLAG_$1" = "$2" || AC_SUBST(DX_FLAG_[]DX_CURRENT_FEATURE, 0) ]) # DX_FEATURE_ARG(FEATURE, DESCRIPTION, # CHECK_DEPEND, CLEAR_DEPEND, # REQUIRE, DO-IF-ON, DO-IF-OFF) # -------------------------------------------- # Parse the command-line option controlling a feature. CHECK_DEPEND is called # if the user explicitly turns the feature on (and invokes DX_CHECK_DEPEND), # otherwise CLEAR_DEPEND is called to turn off the default state if a required # feature is disabled (using DX_CLEAR_DEPEND). REQUIRE performs additional # requirement tests (DX_REQUIRE_PROG). Finally, an automake flag is set and # DO-IF-ON or DO-IF-OFF are called according to the final state of the feature. AC_DEFUN([DX_ARG_ABLE], [ AC_DEFUN([DX_CURRENT_FEATURE], [$1]) AC_DEFUN([DX_CURRENT_DESCRIPTION], [$2]) AC_ARG_ENABLE(doxygen-$1, [AS_HELP_STRING(DX_IF_FEATURE([$1], [--disable-doxygen-$1], [--enable-doxygen-$1]), DX_IF_FEATURE([$1], [don't $2], [$2]))], [ case "$enableval" in #( y|Y|yes|Yes|YES) AC_SUBST([DX_FLAG_$1], 1) $3 ;; #( n|N|no|No|NO) AC_SUBST([DX_FLAG_$1], 0) ;; #( *) AC_MSG_ERROR([invalid value '$enableval' given to doxygen-$1]) ;; esac ], [ AC_SUBST([DX_FLAG_$1], [DX_IF_FEATURE([$1], 1, 0)]) $4 ]) if DX_TEST_FEATURE([$1]); then $5 : fi if DX_TEST_FEATURE([$1]); then AM_CONDITIONAL(DX_COND_$1, :) $6 : else AM_CONDITIONAL(DX_COND_$1, false) $7 : fi ]) ## -------------- ## ## Public macros. ## ## -------------- ## # DX_XXX_FEATURE(DEFAULT_STATE) # ----------------------------- AC_DEFUN([DX_DOXYGEN_FEATURE], [AC_DEFUN([DX_FEATURE_doc], [$1])]) AC_DEFUN([DX_DOT_FEATURE], [AC_DEFUN([DX_FEATURE_dot], [$1])]) AC_DEFUN([DX_MAN_FEATURE], [AC_DEFUN([DX_FEATURE_man], [$1])]) AC_DEFUN([DX_HTML_FEATURE], [AC_DEFUN([DX_FEATURE_html], [$1])]) AC_DEFUN([DX_CHM_FEATURE], [AC_DEFUN([DX_FEATURE_chm], [$1])]) AC_DEFUN([DX_CHI_FEATURE], [AC_DEFUN([DX_FEATURE_chi], [$1])]) AC_DEFUN([DX_RTF_FEATURE], [AC_DEFUN([DX_FEATURE_rtf], [$1])]) AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])]) AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])]) AC_DEFUN([DX_PDF_FEATURE], [AC_DEFUN([DX_FEATURE_pdf], [$1])]) AC_DEFUN([DX_PS_FEATURE], [AC_DEFUN([DX_FEATURE_ps], [$1])]) # DX_INIT_DOXYGEN(PROJECT, [CONFIG-FILE], [OUTPUT-DOC-DIR]) # --------------------------------------------------------- # PROJECT also serves as the base name for the documentation files. # The default CONFIG-FILE is "Doxyfile" and OUTPUT-DOC-DIR is "doxygen-doc". AC_DEFUN([DX_INIT_DOXYGEN], [ # Files: AC_SUBST([DX_PROJECT], [$1]) AC_SUBST([DX_CONFIG], [ifelse([$2], [], Doxyfile, [$2])]) AC_SUBST([DX_DOCDIR], [ifelse([$3], [], doxygen-doc, [$3])]) # Environment variables used inside doxygen.cfg: DX_ENV_APPEND(SRCDIR, $srcdir) DX_ENV_APPEND(PROJECT, $DX_PROJECT) DX_ENV_APPEND(DOCDIR, $DX_DOCDIR) DX_ENV_APPEND(VERSION, $PACKAGE_VERSION) # Doxygen itself: DX_ARG_ABLE(doc, [generate any doxygen documentation], [], [], [DX_REQUIRE_PROG([DX_DOXYGEN], doxygen) DX_REQUIRE_PROG([DX_PERL], perl)], [DX_ENV_APPEND(PERL_PATH, $DX_PERL)]) # Dot for graphics: DX_ARG_ABLE(dot, [generate graphics for doxygen documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_DOT], dot)], [DX_ENV_APPEND(HAVE_DOT, YES) DX_ENV_APPEND(DOT_PATH, [`DX_DIRNAME_EXPR($DX_DOT)`])], [DX_ENV_APPEND(HAVE_DOT, NO)]) # Man pages generation: DX_ARG_ABLE(man, [generate doxygen manual pages], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [], [DX_ENV_APPEND(GENERATE_MAN, YES)], [DX_ENV_APPEND(GENERATE_MAN, NO)]) # RTF file generation: DX_ARG_ABLE(rtf, [generate doxygen RTF documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [], [DX_ENV_APPEND(GENERATE_RTF, YES)], [DX_ENV_APPEND(GENERATE_RTF, NO)]) # XML file generation: DX_ARG_ABLE(xml, [generate doxygen XML documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [], [DX_ENV_APPEND(GENERATE_XML, YES)], [DX_ENV_APPEND(GENERATE_XML, NO)]) # (Compressed) HTML help generation: DX_ARG_ABLE(chm, [generate doxygen compressed HTML help documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_HHC], hhc)], [DX_ENV_APPEND(HHC_PATH, $DX_HHC) DX_ENV_APPEND(GENERATE_HTML, YES) DX_ENV_APPEND(GENERATE_HTMLHELP, YES)], [DX_ENV_APPEND(GENERATE_HTMLHELP, NO)]) # Seperate CHI file generation. DX_ARG_ABLE(chi, [generate doxygen seperate compressed HTML help index file], [DX_CHECK_DEPEND(chm, 1)], [DX_CLEAR_DEPEND(chm, 1)], [], [DX_ENV_APPEND(GENERATE_CHI, YES)], [DX_ENV_APPEND(GENERATE_CHI, NO)]) # Plain HTML pages generation: DX_ARG_ABLE(html, [generate doxygen plain HTML documentation], [DX_CHECK_DEPEND(doc, 1) DX_CHECK_DEPEND(chm, 0)], [DX_CLEAR_DEPEND(doc, 1) DX_CLEAR_DEPEND(chm, 0)], [], [DX_ENV_APPEND(GENERATE_HTML, YES)], [DX_TEST_FEATURE(chm) || DX_ENV_APPEND(GENERATE_HTML, NO)]) # PostScript file generation: DX_ARG_ABLE(ps, [generate doxygen PostScript documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_LATEX], latex) DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex) DX_REQUIRE_PROG([DX_DVIPS], dvips) DX_REQUIRE_PROG([DX_EGREP], egrep)]) # PDF file generation: DX_ARG_ABLE(pdf, [generate doxygen PDF documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_PDFLATEX], pdflatex) DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex) DX_REQUIRE_PROG([DX_EGREP], egrep)]) # LaTeX generation for PS and/or PDF: if DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf); then AM_CONDITIONAL(DX_COND_latex, :) DX_ENV_APPEND(GENERATE_LATEX, YES) else AM_CONDITIONAL(DX_COND_latex, false) DX_ENV_APPEND(GENERATE_LATEX, NO) fi # Paper size for PS and/or PDF: AC_ARG_VAR(DOXYGEN_PAPER_SIZE, [a4wide (default), a4, letter, legal or executive]) case "$DOXYGEN_PAPER_SIZE" in #( "") AC_SUBST(DOXYGEN_PAPER_SIZE, "") ;; #( a4wide|a4|letter|legal|executive) DX_ENV_APPEND(PAPER_SIZE, $DOXYGEN_PAPER_SIZE) ;; #( *) AC_MSG_ERROR([unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE']) ;; esac #For debugging: #echo DX_FLAG_doc=$DX_FLAG_doc #echo DX_FLAG_dot=$DX_FLAG_dot #echo DX_FLAG_man=$DX_FLAG_man #echo DX_FLAG_html=$DX_FLAG_html #echo DX_FLAG_chm=$DX_FLAG_chm #echo DX_FLAG_chi=$DX_FLAG_chi #echo DX_FLAG_rtf=$DX_FLAG_rtf #echo DX_FLAG_xml=$DX_FLAG_xml #echo DX_FLAG_pdf=$DX_FLAG_pdf #echo DX_FLAG_ps=$DX_FLAG_ps #echo DX_ENV=$DX_ENV ])xmltooling-1.5.3/m4/libtool.m4000444 001751 001751 00001057216 12147443205 017344 0ustar00scantorscantor000000 000000 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS xmltooling-1.5.3/m4/ltoptions.m4000444 001751 001751 00000030073 12147443205 017722 0ustar00scantorscantor000000 000000 # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) xmltooling-1.5.3/m4/ltsugar.m4000444 001751 001751 00000010424 12147443205 017346 0ustar00scantorscantor000000 000000 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) xmltooling-1.5.3/m4/ltversion.m4000444 001751 001751 00000001262 12147443205 017712 0ustar00scantorscantor000000 000000 # ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) xmltooling-1.5.3/m4/lt~obsolete.m4000444 001751 001751 00000013756 12147443205 020252 0ustar00scantorscantor000000 000000 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) xmltooling-1.5.3/build-aux/config.guess000555 001751 001751 00000122065 12147443212 021320 0ustar00scantorscantor000000 000000 #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-07-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mipseb-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha*:OpenVMS:*:*) echo alpha-hp-vms exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit 0 ;; DRS?6000:UNIX_SV:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then # avoid double evaluation of $set_cc_for_build test -n "$CC_FOR_BUILD" || eval $set_cc_for_build if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; *:UNICOS/mp:*:*) echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) # Determine whether the default compiler uses glibc. eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #if __GLIBC__ >= 2 LIBC=gnu #else LIBC= #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` # GNU/FreeBSD systems have a "k" prefix to indicate we are using # FreeBSD's kernel, but not the complete OS. case ${LIBC} in gnu) kernel_only='k' ;; esac echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) case `uname -p` in *86) UNAME_PROCESSOR=i686 ;; powerpc) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: xmltooling-1.5.3/build-aux/config.sub000555 001751 001751 00000073153 12147443212 020766 0ustar00scantorscantor000000 000000 #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-07-04' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k \ | m32r | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* \ | m32r-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | msp430-* \ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nv1) basic_machine=nv1-cray os=-unicosmp ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: xmltooling-1.5.3/build-aux/install-sh000555 001751 001751 00000033255 12147443212 021006 0ustar00scantorscantor000000 000000 #!/bin/sh # install - install a program, script, or datafile scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: xmltooling-1.5.3/build-aux/ltmain.sh000444 001751 001751 00001054017 12147443205 020624 0ustar00scantorscantor000000 000000 # libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4.2 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION=2.4.2 TIMESTAMP="" package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-warning|--no-warn) opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug # FreeBSD-specific: where we install compilers with non-standard names tag_compilers_CC="*cc cc* *gcc gcc* clang" tag_compilers_CXX="*c++ c++* *g++ g++* clang++" base_compiler=`set -- "$@"; echo $1` # If $tagname isn't set, then try to infer if the default "CC" tag applies if test -z "$tagname"; then for zp in $tag_compilers_CC; do case $base_compiler in $zp) tagname="CC"; break;; esac done fi if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac # FreeBSD-specific: try compilers based on inferred tag if test -z "$tagname"; then eval "tag_compilers=\$tag_compilers_${z}" if test -n "$tag_compilers"; then for zp in $tag_compilers; do case $base_compiler in $zp) tagname=$z; break;; esac done if test -n "$tagname"; then break fi fi fi fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *-*-freebsd*) # FreeBSD doesn't need this... ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac deplibs="$deplibs $arg" continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" fi case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi ;; *) ;; esac # linkmode continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" func_resolve_sysroot "$deplib" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 xmltooling-1.5.3/build-aux/missing000555 001751 001751 00000023703 12147443212 020376 0ustar00scantorscantor000000 000000 #! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2012-01-06.18; # UTC # Copyright (C) 1996-2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, 'missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file 'aclocal.m4' autoconf touch file 'configure' autoheader touch file 'config.h.in' autom4te touch the output file, or create a stub one automake touch all 'Makefile.in' files bison create 'y.tab.[ch]', if possible, from existing .[ch] flex create 'lex.yy.c', if possible, from existing .c help2man touch the output file lex create 'lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create 'y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running '$TOOL --version' or '$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified 'acinclude.m4' or '${configure_ac}'. You might want to install the Automake and Perl packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified '${configure_ac}'. You might want to install the Autoconf and GNU m4 packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified 'acconfig.h' or '${configure_ac}'. You might want to install the Autoconf and GNU m4 packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'. You might want to install the Automake and Perl packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: '$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get '$1' as part of Autoconf from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: '$1' $msg. You should only need it if you modified a '.y' file. You may need the Bison package in order for those modifications to take effect. You can get Bison from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified a '.l' file. You may need the Flex package in order for those modifications to take effect. You can get Flex from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the Help2man package in order for those modifications to take effect. You can get Help2man from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified a '.texi' or '.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy 'make' (AIX, DU, IRIX). You might want to install the Texinfo package or the GNU make package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; *) echo 1>&2 "\ WARNING: '$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the 'README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing '$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: xmltooling-1.5.3/build-aux/depcomp000555 001751 001751 00000056546 12147443212 020367 0ustar00scantorscantor000000 000000 #! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2012-07-12.20; # UTC # Copyright (C) 1999-2012 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # A tabulation character. tab=' ' # A newline character. nl=' ' if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' "$nl" < "$tmpdepfile" | ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependent.h'. # Do two passes, one to just change these to # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. # However on # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\': # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... # tcc 0.9.26 (FIXME still under development at the moment of writing) # will emit a similar output, but also prepend the continuation lines # with horizontal tabulation characters. "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form 'foo.o: dependent.h', # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. # Do two passes, one to just change these to # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ < "$tmpdepfile" > "$depfile" sed ' s/[ '"$tab"'][ '"$tab"']*/ /g s/^ *// s/ *\\*$// s/^[^:]*: *// /^$/d /:$/d s/$/ :/ ' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. base=`echo "$source" | sed -e 's|^.*/||' -e 's/\.[-_a-zA-Z0-9]*$//'` tmpdepfile="$base.d" # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir="$base.d-lock" trap "echo '$0: caught signal, cleaning up...' >&2; rm -rf $lockdir" 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0 ; do # mkdir is a portable test-and-set. if mkdir $lockdir 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rm -rf $lockdir break else ## the lock is being held by a different process, ## wait until the winning process is done or we timeout while test -d $lockdir && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test "$stat" = 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' "$nl" < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: