From cc359af2cae96ac1046bce9ff8c723ac95a1bf40 Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Sun, 16 Jun 2013 18:49:17 +0000 Subject: [PATCH] https://issues.shibboleth.net/jira/browse/SSPCPP-575 --- configure.ac | 20 +++++++++++++++++++- fastcgi/Makefile.am | 4 ++-- memcache-store/Makefile.am | 7 +++---- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 482acb7..50d8409 100644 --- a/configure.ac +++ b/configure.ac @@ -358,7 +358,7 @@ AC_SUBST(XMLTOOLINGXMLDIR) AC_ARG_WITH(saml, AS_HELP_STRING([--with-saml=PATH],[where opensaml is installed]),, [with_saml=/usr]) -if test x_$with_xmltooling != x_/usr; then +if test x_$with_saml != 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" @@ -485,14 +485,23 @@ AC_ARG_WITH(fastcgi, AC_MSG_RESULT($WANT_FASTCGI) if test "$WANT_FASTCGI" != "no"; then + if test "$WANT_FASTCGI" != "yes"; then if test x_$WANT_FASTCGI != x_/usr; then FASTCGI_INCLUDE="-I$WANT_FASTCGI/include" FASTCGI_LDFLAGS="-L$WANT_FASTCGI/lib" fi fi + + # save and append master flags + save_CFLAGS="$CFLAGS" + CFLAGS="$FASTCGI_INCLUDE $CFLAGS" + AC_CHECK_HEADER([fcgio.h],,AC_MSG_ERROR([unable to find FastCGI header files])) FASTCGI_LIBS="-lfcgi -lfcgi++" + + # restore standard flags + CFLAGS="$save_CFLAGS" fi AC_SUBST(FASTCGI_INCLUDE) @@ -517,18 +526,27 @@ AC_ARG_WITH(memcached, AC_MSG_RESULT($WANT_MEMCACHED) if test "$WANT_MEMCACHED" != "no"; then + if test "$WANT_MEMCACHED" != "yes"; then if test x_$WANT_MEMCACHED != x_/usr; then MEMCACHED_INCLUDE="-I$WANT_MEMCACHED/include" MEMCACHED_LDFLAGS="-L$WANT_MEMCACHED/lib" fi fi + + # save and append master flags + save_CFLAGS="$CFLAGS" + CFLAGS="$MEMCACHED_INCLUDE $CFLAGS" + 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 ]) MEMCACHED_LIBS="-lmemcached" + + # restore standard flags + CFLAGS="$save_CFLAGS" fi AC_SUBST(MEMCACHED_INCLUDE) diff --git a/fastcgi/Makefile.am b/fastcgi/Makefile.am index a1df92e..7c7baa3 100644 --- a/fastcgi/Makefile.am +++ b/fastcgi/Makefile.am @@ -7,13 +7,13 @@ fastcgidir = $(libdir)/@PACKAGE_NAME@ fastcgi_PROGRAMS = shibauthorizer shibresponder shibauthorizer_SOURCES = shibauthorizer.cpp -shibauthorizer_CXXFLAGS = -I$(FASTCGI_INCLUDE) +shibauthorizer_CXXFLAGS = $(FASTCGI_INCLUDE) shibauthorizer_LDFLAGS = $(FASTCGI_LDFLAGS) shibauthorizer_LDADD = $(FASTCGI_LIBS) \ $(top_builddir)/shibsp/libshibsp-lite.la shibresponder_SOURCES = shibresponder.cpp -shibresponder_CXXFLAGS = -I$(FASTCGI_INCLUDE) +shibresponder_CXXFLAGS = $(FASTCGI_INCLUDE) shibresponder_LDFLAGS = $(FASTCGI_LDFLAGS) shibresponder_LDADD = $(FASTCGI_LIBS) \ $(top_builddir)/shibsp/libshibsp-lite.la diff --git a/memcache-store/Makefile.am b/memcache-store/Makefile.am index 7928576..9c4cd67 100644 --- a/memcache-store/Makefile.am +++ b/memcache-store/Makefile.am @@ -3,16 +3,15 @@ AUTOMAKE_OPTIONS = foreign plugindir = $(libdir)/@PACKAGE_NAME@ plugin_LTLIBRARIES = memcache-store.la -AM_CFLAGS = $(MEMCACHED_CFLAGS) -AM_CXXFLAGS = $(MEMCACHED_CFLAGS) +AM_CFLAGS = $(MEMCACHED_INCLUDE) +AM_CXXFLAGS = $(MEMCACHED_INCLUDE) +memcache_store_la_LDFLAGS = $(MEMCACHED_LDFLAGS) -module -avoid-version memcache_store_la_LIBADD = $(XMLSEC_LIBS) $(MEMCACHED_LIBS) memcache_store_la_SOURCES = \ memcache-store.cpp -memcache_store_la_LDFLAGS = -module -avoid-version - install-data-hook: for la in $(plugin_LTLIBRARIES) ; do rm -f $(DESTDIR)$(plugindir)/$$la ; done -- 2.1.4