From ab618a4d2bfdfe4226388244e3ad4662253b3526 Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Wed, 13 Oct 2010 15:04:21 +0000 Subject: [PATCH] Additional cleanup --- Makefile.am | 3 +-- configure.ac | 50 ++++++++++++++++---------------------------------- 2 files changed, 17 insertions(+), 36 deletions(-) diff --git a/Makefile.am b/Makefile.am index d4c4b46..ef1c791 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,5 @@ AUTOMAKE_OPTIONS = foreign - -ACLOCAL_AMFLAGS = -I . +ACLOCAL_AMFLAGS = -I m4 include doxygen.am diff --git a/configure.ac b/configure.ac index 543fe7a..95b3a47 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_PREREQ([2.50]) +AC_PREREQ([2.67]) AC_INIT([shibboleth],[2.4],[https://bugs.internet2.edu/],[shibboleth]) AC_CONFIG_SRCDIR(shibsp) AC_CONFIG_AUX_DIR(build-aux) @@ -118,21 +118,17 @@ AC_CXX_REQUIRE_STL # Thank you Solaris, really. AC_MSG_CHECKING(for ctime_r) if test -z "$ac_cv_ctime_args"; then - AC_TRY_COMPILE( - [#include ], - [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ time_t clock; char buf[26]; ctime_r(&clock, buf); - ], [ac_cv_ctime_args=2]) + ]])],[ac_cv_ctime_args=2],[]) - AC_TRY_COMPILE( - [#include ], - [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ time_t clock; char buf[26]; ctime_r(&clock, buf, 26); - ], [ac_cv_ctime_args=3]) + ]])],[ac_cv_ctime_args=3],[]) fi if test -z "$ac_cv_ctime_args"; then AC_MSG_RESULT(no) @@ -226,8 +222,7 @@ AC_COMPILE_IFELSE( [AC_MSG_RESULT([no])]) AC_MSG_CHECKING([whether Xerces DOMNodeFilter API returns a short]) -AC_TRY_COMPILE([#include ], - [using namespace XERCES_CPP_NAMESPACE; +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[using namespace XERCES_CPP_NAMESPACE; class Blocker : public DOMNodeFilter { public: short acceptNode(const DOMNode* node) const { @@ -235,10 +230,8 @@ AC_TRY_COMPILE([#include ], } }; 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])]) + ]])],[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, @@ -321,11 +314,8 @@ AC_LINK_IFELSE( 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])]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#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 @@ -346,21 +336,17 @@ save_LIBS="$LIBS" LIBS="$XMLSEC_LIBS $LIBS" AC_CHECK_HEADER([saml/saml2/metadata/Metadata.h],,AC_MSG_ERROR([unable to find OpenSAML header files])) -AC_TRY_LINK( - [ +AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include - ], - [ + ]], [[ #if _OPENSAML_VERSION >= 20400 opensaml::SAMLConfig::getConfig(); #else #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])] - ) + ]])],[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" @@ -940,13 +926,9 @@ if test "$build_odbc" = "yes" ; then save_LIBS="$LIBS" LIBS="$LIBS $ODBC_LIBS" AC_MSG_CHECKING(if we can link againt ODBC) - AC_TRY_LINK( - [#include + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include #include - #include ], - [SQLSetEnvAttr(SQL_NULL_HANDLE, SQL_ATTR_CONNECTION_POOLING, (void*)SQL_CP_ONE_PER_HENV, 0)], - [have_odbc_libs=yes], - [have_odbc_libs=no]) + #include ]], [[SQLSetEnvAttr(SQL_NULL_HANDLE, SQL_ATTR_CONNECTION_POOLING, (void*)SQL_CP_ONE_PER_HENV, 0)]])],[have_odbc_libs=yes],[have_odbc_libs=no]) LIBS="$save_LIBS" if test "$have_odbc_libs" = no ; then -- 2.1.4