AC_PREREQ([2.50])
AC_INIT([shibboleth], [0.1], [mace-shib-users@internet2.edu], [shibboleth])
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE(shibboleth, 0.1)
sinclude(acx_pthread.m4)
+sinclude(acx_rpctest.m4)
AC_PROG_CC([gcc3 gcc cc])
AC_PROG_CXX([g++3 g++ c++ CC])
AC_CXX_REQUIRE_STL
AC_CXX_NAMESPACES
+
+# old_LIBS="$LIBS"
+# AC_SEARCH_LIBS(xdr_uint64_t,nsl,,
+# [CFLAGS="$CFLAGS -DNEED_XDR_LONGLONG"
+# CXXFLAGS="$CXXFLAGS -DNEED_XDR_LONGLONG"])
+# LIBS="$old_LIBS"
+
# checks for pthreads
ACX_PTHREAD([enable_threads="pthread"],[enable_threads="no"])
if test $enable_threads != "pthread"; then
CXXFLAGS="$PTHREAD_CFLAGS $CXXFLAGS"
fi
+# Test RPC now -- deal with it later
+ACX_RPCTEST([rpctest="yes"],[rpctest="no"])
+
+AC_ARG_WITH(dmalloc,
+ AC_HELP_STRING([--with-dmalloc=PATH], [where dmalloc is installed]),
+ [if test x_$with_dmalloc != x_/usr; then
+ LDFLAGS="-L${with_dmalloc}/lib $LDFLAGS"
+ CPPFLAGS="-I${with_dmalloc}/include $CPPFLAGS"
+ fi
+ AC_CHECK_LIB(dmallocxx, dmalloc_shutdown,,
+ AC_MSG_ERROR([unable to find dmallocxx library]))
+ ])
+
AC_ARG_WITH(xerces,
AC_HELP_STRING([--with-xerces=PATH], [where xerces-c is installed]),
[if test x_$with_xerces != x_/usr; then
CPPFLAGS="-I${with_log4cpp}/include $CPPFLAGS"
fi])
+AC_ARG_WITH(xmlsec,
+ AC_HELP_STRING([--with-xmlsec=PATH], [where xmlsec is installed]),
+ [if test -f "${with_xmlsec}/bin/xmlsec-config"; then
+ LDFLAGS="`${with_xmlsec}/bin/xmlsec-config --libs` $LDFLAGS"
+ CPPFLAGS="`${with_xmlsec}/bin/xmlsec-config --cflags` $CPPFLAGS"
+ fi])
+
AC_ARG_WITH(saml,
AC_HELP_STRING([--with-saml=PATH], [where saml is installed]),
[if test x_$with_saml != x_/usr; then
AC_CHECK_LIB([ssl], [SSL_library_init],,
AC_MSG_ERROR([unable to link with openssl libraries]))
+AC_CHECK_HEADER([libxml/parser.h],,
+ AC_MSG_ERROR([unable to find libxml2 header files]))
+AC_CHECK_LIB([xml2], [xmlInitParser],echo "foo" > /dev/null,
+ AC_MSG_ERROR([unable to link with libxml2]))
+
+AC_CHECK_HEADER([xmlsec/xmlsec.h],,
+ AC_MSG_ERROR([unable to find xmlsec header files]))
+AC_CHECK_LIB([xmlsec], [xmlSecInit],echo "foo" > /dev/null,
+ AC_MSG_ERROR([unable to link with xmlsec]))
+
AC_CHECK_HEADER([log4cpp/Category.hh],,
AC_MSG_ERROR([unable to find log4cpp header files]))
])
# output the underlying makefiles
-WANT_SUBDIRS="shib schemas eduPerson shib-target shar test"
+WANT_SUBDIRS="shib schemas configs eduPerson shib-target shar test"
AC_CONFIG_FILES([Makefile shib/Makefile schemas/Makefile eduPerson/Makefile \
- shib-target/Makefile shar/Makefile test/Makefile])
+ configs/Makefile oncrpc/Makefile oncrpc/rpc/Makefile \
+ shib-target/Makefile shar/Makefile test/Makefile])
+
+# now deal with the rpc library, to see if we need to build our own
+if test $rpctest = "no"; then
+ WANT_SUBDIRS="oncrpc $WANT_SUBDIRS"
+fi
+AM_CONDITIONAL(USE_OUR_ONCRPC,test "$rpctest" = "no")
# Much of this is taken from mod_dav.
# The basic idea is to use configure options to control whether/which types
WANT_APACHE="no"
fi
+AM_CONDITIONAL(HAVE_APXS,test -n "$APXS")
+
if test "$WANT_APACHE" = "yes"; then
AC_ARG_WITH(apreq,
AC_HELP_STRING([--with-apreq=PATH], [where libapreq is installed]),
CPPFLAGS="-I${with_apreq}/include $CPPFLAGS"
fi])
+ saved_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I$APXS_INCLUDE $APXS_CFLAGS $CPPFLAGS"
+ AC_CHECK_HEADER([libapreq/apache_request.h],,
+ AC_MSG_ERROR([unable to find apreq header files]))
+
+dnl saved_LIBS="$LIBS"
+dnl LIBS="-lapreq $LIBS"
+dnl AC_TRY_LINK(
+dnl [#include <libapreq/apache_request.h>],
+dnl [ApacheRequest_expires],
+dnl [AC_DEFINE(HAVE_APREQ,1,[Define if apreq library was found])],
+dnl [AC_MSG_ERROR([unable to link with apreq])
+dnl ])
+dnl LIBS="$saved_LIBS"
+ CPPFLAGS="$saved_CPPFLAGS"
+
+ AC_ARG_ENABLE([apxs-install],
+ AC_HELP_STRING([--enable-apxs-install],
+ [use apxs to install the apache modules]),
+ APXS_INSTALL="yes", )
+
+
AC_SUBST(APXS_CFLAGS)
AC_SUBST(APXS_INCLUDE)
AC_SUBST(APXS_LIBEXEC)
AC_CONFIG_FILES([mod_shire/Makefile mod_shibrm/Makefile])
fi
+AM_CONDITIONAL(DO_APXS_INSTALL,test -n "$APXS_INSTALL")
+
AC_SUBST(WANT_SUBDIRS)
if test -n "$APXS_CC" && test "$APXS_CC" != "$CC" ; then