-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)
# Thank you Solaris, really.
AC_MSG_CHECKING(for ctime_r)
if test -z "$ac_cv_ctime_args"; then
- AC_TRY_COMPILE(
- [#include <time.h>],
- [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[
time_t clock;
char buf[26];
ctime_r(&clock, buf);
- ], [ac_cv_ctime_args=2])
+ ]])],[ac_cv_ctime_args=2],[])
- AC_TRY_COMPILE(
- [#include <time.h>],
- [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[
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)
[AC_MSG_RESULT([no])])
AC_MSG_CHECKING([whether Xerces DOMNodeFilter API returns a short])
-AC_TRY_COMPILE([#include <xercesc/dom/DOM.hpp>],
- [using namespace XERCES_CPP_NAMESPACE;
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <xercesc/dom/DOM.hpp>]], [[using namespace XERCES_CPP_NAMESPACE;
class Blocker : public DOMNodeFilter {
public:
short acceptNode(const DOMNode* node) const {
}
};
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,
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])])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#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="$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 <saml/SAMLConfig.h>
#include <saml/version.h>
- ],
- [
+ ]], [[
#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"
save_LIBS="$LIBS"
LIBS="$LIBS $ODBC_LIBS"
AC_MSG_CHECKING(if we can link againt ODBC)
- AC_TRY_LINK(
- [#include <sql.h>
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sql.h>
#include <sqlext.h>
- #include <stdio.h>],
- [SQLSetEnvAttr(SQL_NULL_HANDLE, SQL_ATTR_CONNECTION_POOLING, (void*)SQL_CP_ONE_PER_HENV, 0)],
- [have_odbc_libs=yes],
- [have_odbc_libs=no])
+ #include <stdio.h>]], [[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