X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=configure.ac;h=91ed82210d6d37e3f86fe998c188a4a542e710c6;hb=3c619d15721b218521f1bef117a6ebe09c587883;hp=75de6980dffb40202df2bdcfb2d3ef879de44add;hpb=2210b0e90eb7c025c4e3ff06c934e6f3a60c2995;p=shibboleth%2Fsp.git diff --git a/configure.ac b/configure.ac index 75de698..91ed822 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ AC_PREREQ([2.50]) -AC_INIT([shibboleth], [2.0], [shibboleth-users@internet2.edu], [shibboleth]) +AC_INIT([shibboleth], [2.4], [shibboleth-users@internet2.edu], [shibboleth]) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE([shibboleth],[2.0]) +AM_INIT_AUTOMAKE([shibboleth],[2.4]) sinclude(doxygen.m4) sinclude(acx_pthread.m4) @@ -52,7 +52,10 @@ else if test "$CXX" = "CC" ; then CXXFLAGS="$CXXFLAGS -Qoption ccfe -stabs=no%dfltlit+no%dflthlp" fi - ;; + ;; + *osf*) + CXXFLAGS="$CXXFLAGS -D_POSIX_PII_SOCKET" + ;; esac fi @@ -82,6 +85,37 @@ else CXXFLAGS="$PTHREAD_CFLAGS $CXXFLAGS" fi +# OpenSSL settings +AC_ARG_WITH(openssl, + AC_HELP_STRING([--with-openssl=PATH], [where openssl is installed]), + [if test x_$with_openssl != x_/usr; then + SSLFLAGS="-I${with_openssl}/include" + fi]) + +if test "x$with_openssl" = "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 + SSLFLAGS="`$PKG_CONFIG --cflags openssl`" + else + AC_MSG_WARN([OpenSSL not supported by pkg-config, try --with-openssl instead]) + fi + fi +fi + +AC_MSG_CHECKING(for OpenSSL cflags) +AC_MSG_RESULT($SSLFLAGS) +CPPFLAGS="$SSLFLAGS $CPPFLAGS" + +AC_CHECK_HEADER([openssl/x509.h],, + AC_MSG_ERROR([unable to find openssl header files])) + +AC_LANG(C++) + +# C++ requirements +AC_CXX_REQUIRE_STL +AC_CXX_NAMESPACES + # Thank you Solaris, really. AC_MSG_CHECKING(for ctime_r) if test -z "$ac_cv_ctime_args"; then @@ -112,37 +146,6 @@ AC_MSG_CHECKING(for ctime_r) AC_MSG_RESULT([yes, and it takes $ac_cv_ctime_args arguments]) fi -# OpenSSL settings -AC_ARG_WITH(openssl, - AC_HELP_STRING([--with-openssl=PATH], [where openssl is installed]), - [if test x_$with_openssl != x_/usr; then - SSLFLAGS="-I${with_openssl}/include" - fi]) - -if test "x$SSLFLAGS" = "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 - SSLFLAGS="`$PKG_CONFIG --cflags openssl`" - else - AC_MSG_ERROR([OpenSSL not supported by pkg-config, try --with-openssl instead]) - fi - fi -fi - -AC_MSG_CHECKING(for OpenSSL cflags) -AC_MSG_RESULT($SSLFLAGS) -CPPFLAGS="$SSLFLAGS $CPPFLAGS" - -AC_CHECK_HEADER([openssl/x509.h],, - AC_MSG_ERROR([unable to find openssl header files])) - -AC_LANG(C++) - -# C++ requirements -AC_CXX_REQUIRE_STL -AC_CXX_NAMESPACES - # log4shib settings (favor this version over the log4cpp code) AC_PATH_PROG(LOG4SHIB_CONFIG,log4shib-config) AC_ARG_WITH(log4shib, @@ -154,7 +157,7 @@ AC_ARG_WITH(log4shib, fi ]) if test -f "${LOG4SHIB_CONFIG}"; then - LDFLAGS="`${LOG4SHIB_CONFIG} --libs` $LDFLAGS" + 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_TRY_LINK( @@ -179,7 +182,7 @@ else ]) 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]) - LDFLAGS="`${LOG4CPP_CONFIG} --libs` $LDFLAGS" + 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_TRY_LINK( @@ -219,6 +222,30 @@ AC_TRY_LINK( [AC_DEFINE(HAVE_LIBXERCESC,1,[Define if Xerces-C library was found])], [AC_MSG_ERROR([unable to link with Xerces])]) +AC_MSG_CHECKING([whether Xerces XMLString::release(XMLByte**) exists]) +AC_TRY_COMPILE([#include ], + [using namespace XERCES_CPP_NAMESPACE; + XMLByte* buf=NULL; + XMLString::release(&buf); + ], + [AC_MSG_RESULT([yes])] + [AC_DEFINE([SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE], [1], [Define to 1 if Xerces XMLString includes XMLByte release.])], + [AC_MSG_RESULT([no])]) + +AC_MSG_CHECKING([whether Xerces DOMNodeFilter API returns a short]) +AC_TRY_COMPILE([#include ], + [using namespace XERCES_CPP_NAMESPACE; + class Blocker : public DOMNodeFilter { + public: + short acceptNode(const DOMNode* node) const { + return FILTER_REJECT; + } + }; + static Blocker g_Blocker; + ], + [AC_MSG_RESULT([yes])] + [AC_DEFINE([SHIBSP_XERCESC_SHORT_ACCEPTNODE], [1], [Define to 1 if Xerces DOMNodeFilter API returns a short.])], + [AC_MSG_RESULT([no])]) #XML-Tooling settings AC_ARG_WITH(xmltooling, @@ -231,6 +258,30 @@ LITE_LIBS="-lxmltooling-lite" XMLSEC_LIBS="-lxmltooling" AC_CHECK_HEADER([xmltooling/base.h],, AC_MSG_ERROR([unable to find xmltooling header files])) + + +# save and append master libs +save_LIBS="$LIBS" +LIBS="$XMLSEC_LIBS $LIBS" + +AC_TRY_LINK( + [ +#include +#include + ], + [ +#if _XMLTOOLING_VERSION >= 10400 +xmltooling::XMLToolingConfig::getConfig(); +#else +#error Need XMLTooling version 1.4 or higher +#endif + ], + [AC_DEFINE(HAVE_XMLTOOLING,1,[Define if xmltooling library was found])], + [AC_MSG_ERROR([unable to link with XMLTooling, or version was too old])] + ) + +# restore master libs +LIBS="$save_LIBS" # Establish location of xmltooling catalog. XMLTOOLINGXMLDIR="" @@ -265,8 +316,8 @@ XMLSEC_LIBS="-lxml-security-c $XMLSEC_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_CHECK_HEADER([xsec/utils/XSECPlatformUtils.hpp],,AC_MSG_ERROR([unable to find XML-Security-C header files])) +AC_MSG_CHECKING([XML-Security-C version]) AC_PREPROC_IFELSE( [AC_LANG_PROGRAM([#include ], [#if XSEC_VERSION_MAJOR > 1 || (XSEC_VERSION_MAJOR == 1 && XSEC_VERSION_MEDIUM > 3) @@ -275,12 +326,21 @@ int i = 0; #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_MSG_FAILURE([XML-Security-C version 1.4.0 or greater is required.])]) AC_TRY_LINK( [#include ], [XSECPlatformUtils::Initialise()],, [AC_MSG_ERROR([unable to link with XML-Security])]) + +AC_MSG_CHECKING([whether XML-Security-C supports white/blacklisting of algorithms]) +AC_TRY_COMPILE([#include ], + [XSECAlgorithmMapper* mapper; mapper->whitelistAlgorithm(NULL);], + [AC_MSG_RESULT([yes])] + [AC_DEFINE([SHIBSP_XMLSEC_WHITELISTING], [1], [Define to 1 if XML-Security-C supports white/blacklisting algorithms.])], + [AC_MSG_RESULT([no])]) + + # restore master libs LIBS="$save_LIBS" @@ -300,15 +360,20 @@ LIBS="$XMLSEC_LIBS $LIBS" AC_CHECK_HEADER([saml/saml2/metadata/Metadata.h],, AC_MSG_ERROR([unable to find OpenSAML header files])) AC_TRY_LINK( - [#include -#include ], - [#if _OPENSAML_VERSION >= 20000 + [ +#include +#include + ], + [ +#if _OPENSAML_VERSION >= 20400 opensaml::SAMLConfig::getConfig(); #else -#error Need OpenSAML version 2.0 or higher -#endif], - [AC_DEFINE(HAVE_SAML,1,[Define if saml library was found])], - [AC_MSG_ERROR([unable to link with OpenSAML, or version was too old])]) +#error Need OpenSAML version 2.4 or higher +#endif + ], + [AC_DEFINE(HAVE_SAML,1,[Define if saml library was found])], + [AC_MSG_ERROR([unable to link with OpenSAML, or version was too old])] + ) # restore master libs LIBS="$save_LIBS" @@ -336,6 +401,8 @@ AC_SUBST(OPENSAMLXMLDIR) AC_SUBST(LITE_LIBS) AC_SUBST(XMLSEC_LIBS) +AC_CONFIG_FILES([shibboleth.spec pkginfo Portfile]) + # output the underlying makefiles WANT_SUBDIRS="doc schemas configs shibsp shibd util" AC_CONFIG_FILES([Makefile doc/Makefile schemas/Makefile \ @@ -589,6 +656,7 @@ AC_SUBST(APXS_INCLUDE) # --enable-apache-20 # --with-apxs2 (DSO build, the normal way, uses apxs to derive build flags) # --with-apr (DSO build, APR development package installed separately) +# --with-apu (DSO build, APR-UTIL development package installed separately) AC_ARG_ENABLE(apache-20, AC_HELP_STRING([--enable-apache-20], [enable the Apache 2.0 module]), @@ -666,9 +734,30 @@ if test "$WANT_APACHE_20" = "yes" ; then AC_MSG_ERROR([Unable to locate apr-config, may need --with-apr option.]) fi + # APU settings + AC_ARG_WITH(apu, + AC_HELP_STRING([--with-apu=PATH], [where apu-config is installed]), + [ + AC_MSG_CHECKING(for user-specified apu-config name/location) + if test "$withval" != "no" ; then + if test "$withval" != "yes"; then + APR_CONFIG=$withval + AC_MSG_RESULT("$withval") + fi + fi + ], + [ + AC_PATH_PROG(APU_CONFIG, apu-config,,[`$APXS2 -q SBINDIR`]:[$PATH]) + ]) + if test -f "${APU_CONFIG}"; then + APU_CFLAGS="`${APU_CONFIG} --includes`" + else + AC_MSG_ERROR([Unable to locate apu-config, may need --with-apu option.]) + fi + # extract settings we need from APXS2 -q APXS2_CC="`$APXS2 -q CC`" - APXS2_CFLAGS="`$APXS2 -q CPPFLAGS` `$APXS2 -q CFLAGS` $APR_CFLAGS" + APXS2_CFLAGS="`$APXS2 -q CPPFLAGS` `$APXS2 -q CFLAGS` $APR_CFLAGS $APU_CFLAGS" APXS2_INCLUDE="`$APXS2 -q INCLUDEDIR`" fi @@ -680,6 +769,7 @@ AC_SUBST(APXS2_INCLUDE) # --enable-apache-22 # --with-apxs22 (DSO build, the normal way, uses apxs to derive build flags) # --with-apr1 (DSO build, APR development package installed separately) +# --with-apu1 (DSO build, APR-UTIL development package installed separately) AC_ARG_ENABLE(apache-22, AC_HELP_STRING([--enable-apache-22], [enable the Apache 2.2 module]), @@ -757,9 +847,30 @@ if test "$WANT_APACHE_22" = "yes" ; then AC_MSG_ERROR([Unable to locate apr-1-config, may need --with-apr1 option.]) fi + # APU1 settings + AC_ARG_WITH(apu1, + AC_HELP_STRING([--with-apu1=PATH], [where apu-1-config is installed]), + [ + AC_MSG_CHECKING(for user-specified apu-1-config name/location) + if test "$withval" != "no" ; then + if test "$withval" != "yes"; then + APR1_CONFIG=$withval + AC_MSG_RESULT("$withval") + fi + fi + ], + [ + AC_PATH_PROG(APU1_CONFIG, apu-1-config,,[`$APXS22 -q SBINDIR`]:[$PATH]) + ]) + if test -f "${APU1_CONFIG}"; then + APU1_CFLAGS="`${APU1_CONFIG} --includes`" + else + AC_MSG_ERROR([Unable to locate apu-1-config, may need --with-apu1 option.]) + fi + # extract settings we need from APXS22 -q APXS22_CC="`$APXS22 -q CC`" - APXS22_CFLAGS="`$APXS22 -q CPPFLAGS` `$APXS22 -q CFLAGS` $APR1_CFLAGS" + APXS22_CFLAGS="`$APXS22 -q CPPFLAGS` `$APXS22 -q CFLAGS` $APR1_CFLAGS $APU1_CFLAGS" APXS22_INCLUDE="`$APXS22 -q INCLUDEDIR`" fi @@ -918,4 +1029,3 @@ fi LIBTOOL="$LIBTOOL --silent" AC_OUTPUT -