AM_INIT_AUTOMAKE([opensaml], [2.0])
sinclude(doxygen.m4)
+sinclude(acx_pthread.m4)
# Docygen features
DX_HTML_FEATURE(ON)
AC_PROG_CC([gcc gcc3 cc])
AC_PROG_CXX([g++ g++3 c++ CC])
+AC_CANONICAL_HOST
if test "$GCC" = "yes" ; then
# AC_HAVE_GCC_VERSION(4,0,0,0,
# ])
CFLAGS="$GCC_CFLAGS"
CXXFLAGS="$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
+ ;;
+ esac
fi
AC_DISABLE_STATIC
# Checks for library functions.
AC_CHECK_FUNCS([strchr strdup strstr])
-
AC_CHECK_SIZEOF(time_t)
+# checks for pthreads
+ACX_PTHREAD([enable_threads="pthread"],[enable_threads="no"])
+if test $enable_threads != "pthread"; then
+ AC_MSG_ERROR([unable to find pthreads, currently this is required])
+else
+ AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.])
+ LIBS="$PTHREAD_LIBS $LIBS"
+ CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
+ CXXFLAGS="$PTHREAD_CFLAGS $CXXFLAGS"
+fi
+
# zlib settings
AC_ARG_WITH(zlib,
AC_HELP_STRING([--with-zlib=PATH], [where zlib is installed]),
AC_CHECK_HEADER([zlib.h],,AC_MSG_ERROR([unable to find zlib header files]))
AC_CHECK_LIB([z],[deflateInit2_],,AC_MSG_ERROR([unable to link with zlib library]))
+# 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
fi])
LIBS="-lxml-security-c $LIBS"
AC_CHECK_HEADER([xsec/utils/XSECPlatformUtils.hpp],,AC_MSG_ERROR([unable to find xmlsec header files]))
+AC_MSG_CHECKING([XML-Security 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) || (XSEC_VERSION_MAJOR == 1 && XSEC_VERSION_MEDIUM == 3 && XSEC_VERSION_MINOR > 0)
+int i = 0;
+#else
+#error need version 1.3.1 or later
+#endif])],
+ [AC_MSG_RESULT(OK)],
+ [AC_MSG_FAILURE([XML-Security version 1.3.1 or greater is required.])])
AC_TRY_LINK(
[#include <xsec/utils/XSECPlatformUtils.hpp>],
[XSECPlatformUtils::Initialise()],
LIBTOOL="$LIBTOOL --silent"
# output makefiles
-AC_OUTPUT(Makefile saml/Makefile samltest/Makefile schemas/Makefile)
+AC_OUTPUT(Makefile saml/Makefile samltest/Makefile schemas/Makefile doc/Makefile)