AC_PREREQ([2.50])
-AC_INIT([shibboleth],[2.5],[https://bugs.internet2.edu/],[shibboleth])
+AC_INIT([shibboleth],[2.5],[https://issues.shibboleth.net/],[shibboleth])
AC_CONFIG_SRCDIR(shibsp)
AC_CONFIG_AUX_DIR(build-aux)
AC_CONFIG_MACRO_DIR(m4)
fi
AC_CONFIG_HEADERS([config.h shibsp/config_pub.h])
-AC_CONFIG_FILES([shibboleth.spec pkginfo Portfile])
+AC_CONFIG_FILES([shibboleth.spec])
AC_PROG_CC([gcc gcc3 cc])
AC_PROG_CXX([g++ g++3 c++ CC])
# ])
CFLAGS="-Wall $GCC_CFLAGS"
CXXFLAGS="-Wall $GCC_CXXFLAGS"
-else
-# Fix for Sun Workshop compiler in debug mode, may be Sun case #6360993
- case "${host_cpu}-${host_os}" in
- *solaris*)
- if test "$CXX" = "CC" ; then
- CXXFLAGS="$CXXFLAGS -Qoption ccfe -stabs=no%dfltlit+no%dflthlp"
- fi
- ;;
- *osf*)
- CXXFLAGS="$CXXFLAGS -D_POSIX_PII_SOCKET"
- ;;
- esac
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
+ ;;
+ *osf*)
+ CXXFLAGS="$CXXFLAGS -D_POSIX_PII_SOCKET"
+ ;;
+esac
+
AC_LANG(C)
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_FUNC_STRFTIME
AC_FUNC_STRERROR_R
-AC_CHECK_HEADERS([sys/utsname.h])
-AC_CHECK_FUNCS([strchr strdup strstr timegm gmtime_r strtok_r strcasecmp])
+AC_CHECK_HEADERS([sys/utsname.h grp.h pwd.h])
+AC_CHECK_HEADERS([sys/socket.h], [AC_DEFINE([SHIBSP_HAVE_SYS_SOCKET_H],[1],[Define to 1 if you have the <sys/socket> header file.])], [])
+AC_CHECK_FUNCS([strchr strdup strstr timegm gmtime_r strtok_r strcasecmp getpwnam getgrnam])
+AC_CHECK_TYPES([struct sockaddr_storage], [], [], [[#include <sys/socket.h>]])
# checks for pthreads
ACX_PTHREAD([enable_threads="pthread"],[enable_threads="no"])
AC_CXX_NAMESPACES
AC_CXX_REQUIRE_STL
+# Boost
+BOOST_REQUIRE
+BOOST_BIND
+BOOST_LAMBDA
+BOOST_PTR_CONTAINER
+BOOST_SMART_PTR
+BOOST_STRING_ALGO
+BOOST_TUPLE
+CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
+
# Thank you Solaris, really.
AC_MSG_CHECKING(for ctime_r)
if test -z "$ac_cv_ctime_args"; then
# Xerces settings
AC_ARG_WITH(xerces,
- AS_HELP_STRING([--with-xerces=PATH],[where xerces-c is installed]),
- [if test x_$with_xerces != x_/usr; then
- LDFLAGS="-L${with_xerces}/lib $LDFLAGS"
- CPPFLAGS="-I${with_xerces}/include $CPPFLAGS"
- fi])
-LIBS="-lxerces-c $LIBS"
+ 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_ARG_WITH(xmlsec,
AS_HELP_STRING([--with-xmlsec=PATH],[where xmlsec is installed]),,
[with_xmlsec=/usr])
-
if test x_$with_xmlsec != x_/usr; then
- LDFLAGS="-L${with_xmlsec}/lib $LDFLAGS"
CPPFLAGS="-I${with_xmlsec}/include $CPPFLAGS"
-fi
-XMLSEC_LIBS="-lxml-security-c $XMLSEC_LIBS"
+ 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"
#XML-Tooling settings
AC_ARG_WITH(xmltooling,
- AS_HELP_STRING([--with-xmltooling=PATH],[where xmltooling is installed]),
- [if test x_$with_xmltooling != x_/usr; then
- LDFLAGS="-L${with_xmltooling}/lib $LDFLAGS"
- CPPFLAGS="-I${with_xmltooling}/include $CPPFLAGS"
- DX_INCLUDE="${with_xmltooling}/include"
- fi])
-LITE_LIBS="-lxmltooling-lite"
-XMLSEC_LIBS="-lxmltooling $XMLSEC_LIBS"
+ AS_HELP_STRING([--with-xmltooling=PATH],[where xmltooling is installed]),,
+ [with_xmltooling=/usr])
+if test x_$with_xmltooling != x_/usr; then
+ CPPFLAGS="-I${with_xmltooling}/include $CPPFLAGS"
+ DX_INCLUDE="${with_xmltooling}/include"
+ LITE_LIBS="-L${with_xmltooling}/lib -lxmltooling-lite"
+ XMLSEC_LIBS="-L${with_xmltooling}/lib -lxmltooling $XMLSEC_LIBS"
+else
+ LITE_LIBS="-lxmltooling-lite"
+ XMLSEC_LIBS="-lxmltooling $XMLSEC_LIBS"
+fi
+
AC_CHECK_HEADER([xmltooling/base.h],,AC_MSG_ERROR([unable to find xmltooling header files]))
-
# save and append master libs
save_LIBS="$LIBS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include <xmltooling/XMLToolingConfig.h>
#include <xmltooling/version.h>]],
- [[#if _XMLTOOLING_VERSION >= 10400
+ [[#if _XMLTOOLING_VERSION >= 10500
xmltooling::XMLToolingConfig::getConfig();
#else
-#error Need XMLTooling version 1.4 or higher
+#error Need XMLTooling version 1.5 or higher
#endif]])],
,[AC_MSG_ERROR([unable to link with XMLTooling, or version was too old])])
# OpenSAML settings
AC_ARG_WITH(saml,
- AS_HELP_STRING([--with-saml=PATH],[where saml is installed]),
- [if test x_$with_saml != x_/usr; then
- LDFLAGS="-L${with_saml}/lib $LDFLAGS"
- CPPFLAGS="-I${with_saml}/include $CPPFLAGS"
- DX_INCLUDE="$DX_INCLUDE ${with_saml}/include"
- fi])
-XMLSEC_LIBS="-lsaml $XMLSEC_LIBS"
+ AS_HELP_STRING([--with-saml=PATH],[where opensaml is installed]),,
+ [with_saml=/usr])
+if test x_$with_xmltooling != x_/usr; then
+ CPPFLAGS="-I${with_saml}/include $CPPFLAGS"
+ DX_INCLUDE="$DX_INCLUDE ${with_saml}/include"
+ XMLSEC_LIBS="-L${with_saml}/lib -lsaml $XMLSEC_LIBS"
+else
+ XMLSEC_LIBS="-lsaml $XMLSEC_LIBS"
+fi
# save and append master libs
save_LIBS="$LIBS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include <saml/SAMLConfig.h>
#include <saml/version.h>]],
-[[#if _OPENSAML_VERSION >= 20400
+[[#if _OPENSAML_VERSION >= 20500
opensaml::SAMLConfig::getConfig();
#else
-#error Need OpenSAML version 2.4 or higher
+#error Need OpenSAML version 2.5 or higher
#endif]])],
,[AC_MSG_ERROR([unable to link with OpenSAML, or version was too old])
])
fi
AC_CHECK_HEADER([libmemcached/memcached.h],,
AC_MSG_ERROR([unable to find Memcached header files]))
+ AC_CHECK_DECL([memcached_last_error_message],
+ [AC_DEFINE([HAVE_MEMCACHED_LAST_ERROR_MESSAGE],[1],[Define to 1 if libmemcached supports error handling function.])],,
+ [#include <libmemcached/memcached.h>])
MEMCACHED_LIBS="-lmemcached"
fi