Reduce number of global elements by adding types, and switch plugins back to lax...
[shibboleth/sp.git] / configure.ac
index 7265638..74d787d 100644 (file)
@@ -1,7 +1,7 @@
 AC_PREREQ([2.50])
-AC_INIT([shibboleth], [2.3], [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.3])
+AM_INIT_AUTOMAKE([shibboleth],[2.4])
 
 sinclude(doxygen.m4)
 sinclude(acx_pthread.m4)
@@ -98,7 +98,7 @@ if test "x$SSLFLAGS" = "x" ; 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])
+            AC_MSG_WARN([OpenSSL not supported by pkg-config, try --with-openssl instead])
         fi
     fi
 fi
@@ -157,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(
@@ -182,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(
@@ -306,8 +306,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 <xsec/utils/XSECPlatformUtils.hpp>],
     [#if XSEC_VERSION_MAJOR > 1 || (XSEC_VERSION_MAJOR == 1 && XSEC_VERSION_MEDIUM > 3)
@@ -316,12 +316,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 <xsec/utils/XSECPlatformUtils.hpp>],
         [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 <xsec/framework/XSECAlgorithmMapper.hpp>],
+      [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"
 
@@ -733,7 +742,7 @@ if test "$WANT_APACHE_20" = "yes" ; then
 
     # extract settings we need from APXS2 -q
     APXS2_CC="`$APXS2 -q CC`"
-    APXS2_CFLAGS="`$APXS2 -q CPPFLAGS` `$APXS2 -q CFLAGS` $APU_CFLAGS"
+    APXS2_CFLAGS="`$APXS2 -q CPPFLAGS` `$APXS2 -q CFLAGS` $APR_CFLAGS $APU_CFLAGS"
     APXS2_INCLUDE="`$APXS2 -q INCLUDEDIR`"
 fi