4 AC_INIT([shibboleth], [0.1], [mace-shib-users@internet2.edu], [shibboleth])
5 AM_CONFIG_HEADER(config.h)
8 sinclude(acx_pthread.m4)
10 AC_PROG_CC([gcc3 gcc cc])
11 AC_PROG_CXX([g++3 g++ c++ CC])
17 # Checks for typedefs, structures, and compiler characteristics.
22 # Checks for library functions.
24 AC_CHECK_FUNCS([strchr strdup strstr gmtime_r])
25 AC_CHECK_HEADERS([dlfcn.h])
32 ACX_PTHREAD([enable_threads="pthread"],[enable_threads="no"])
33 if test $enable_threads != "pthread"; then
34 AC_MSG_ERROR([unable to find pthreads, currently this is required])
36 AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.])
37 LIBS="$PTHREAD_LIBS $LIBS"
38 CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
39 CXXFLAGS="$PTHREAD_CFLAGS $CXXFLAGS"
43 AC_HELP_STRING([--with-xerces=PATH], [where xerces-c is installed]),
44 [if test x_$with_xerces != x_/usr; then
45 LDFLAGS="-L${with_xerces}/lib $LDFLAGS"
46 CPPFLAGS="-I${with_xerces}/include $CPPFLAGS"
51 AC_HELP_STRING([--with-openssl=PATH], [where openssl is installed]),
52 [if test x_$with_openssl != x_/usr; then
53 LDFLAGS="-L${with_openssl}/lib $LDFLAGS"
54 CPPFLAGS="-I${with_openssl}/include $CPPFLAGS"
58 AC_HELP_STRING([--with-log4cpp=PATH], [where log4cpp is installed]),
59 [if test x_$with_log4cpp != x_/usr; then
60 LDFLAGS="-L${with_log4cpp}/lib $LDFLAGS"
61 CPPFLAGS="-I${with_log4cpp}/include $CPPFLAGS"
65 AC_HELP_STRING([--with-saml=PATH], [where saml is installed]),
66 [if test x_$with_saml != x_/usr; then
67 LDFLAGS="-L${with_saml}/lib $LDFLAGS"
68 CPPFLAGS="-I${with_saml}/include $CPPFLAGS"
71 AC_CHECK_HEADER([xercesc/dom/DOM.hpp],,
72 AC_MSG_ERROR([unable to find xerces header files]))
74 LIBS="-lxerces-c $LIBS"
76 [#include <xercesc/util/PlatformUtils.hpp>],
77 [XMLPlatformUtils::Initialize()],
78 [AC_DEFINE(HAVE_LIBXERCESC,1,[Define if Xerces-C library was found])],
79 [AC_MSG_ERROR([unable to link with Xerces])
83 AC_CHECK_HEADER([openssl/ssl.h],,
84 AC_MSG_ERROR([unable to find openssl header files]))
85 AC_CHECK_LIB([crypto], [ERR_load_CRYPTO_strings],,
86 AC_MSG_ERROR([unable to link with openssl libraries]))
87 AC_CHECK_LIB([ssl], [SSL_library_init],,
88 AC_MSG_ERROR([unable to link with openssl libraries]))
90 AC_CHECK_HEADER([log4cpp/Category.hh],,
91 AC_MSG_ERROR([unable to find log4cpp header files]))
93 AC_CHECK_HEADER([saml/saml.h],,
94 AC_MSG_ERROR([unable to find saml header files]))
97 LIBS="-llog4cpp $LIBS"
99 [#include <log4cpp/Category.hh>],
100 [log4cpp::Category::getInstance("foo")],
101 [AC_DEFINE(HAVE_LIBLOG4CPP,1,[Define if log4cpp library was found])],
102 [AC_MSG_ERROR([unable to link with log4cpp])
109 [#include <saml/saml.h>],
110 [saml::SAMLConfig::getConfig()],
111 [AC_DEFINE(HAVE_SAML,1,[Define if saml library was found])],
112 [AC_MSG_ERROR([unable to link with saml])
117 AC_OUTPUT(Makefile shib/Makefile schemas/Makefile eduPerson/Makefile \
118 shib-target/Makefile test/Makefile)