[cpp-sp] 11/17: Use pkg-config for OpenSAML
Scott Cantor
cantor.2 at osu.edu
Wed Jun 27 20:35:52 EDT 2018
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository cpp-sp.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=0f18127b806338af135fba83d6869540f069e141
commit 0f18127b806338af135fba83d6869540f069e141
Author: Ferenc Wágner <wferi at niif.hu>
AuthorDate: Thu Jul 14 15:31:44 2016 +0200
Use pkg-config for OpenSAML
---
adfs/Makefile.am | 2 ++
configure.ac | 52 +++-------------------------------------------
memcache-store/Makefile.am | 2 ++
odbc-store/Makefile.am | 2 ++
plugins/Makefile.am | 2 ++
shibd/Makefile.am | 2 ++
shibsp/Makefile.am | 2 ++
util/Makefile.am | 4 ++++
8 files changed, 19 insertions(+), 49 deletions(-)
diff --git a/adfs/Makefile.am b/adfs/Makefile.am
index c8f3410..13379a5 100644
--- a/adfs/Makefile.am
+++ b/adfs/Makefile.am
@@ -4,9 +4,11 @@ plugindir = $(libdir)/@PACKAGE_NAME@
plugin_LTLIBRARIES = adfs.la adfs-lite.la
adfs_la_CXXFLAGS = \
+ $(opensaml_CFLAGS) \
$(xmltooling_CFLAGS)
adfs_la_LIBADD = $(XMLSEC_LIBS) \
$(top_builddir)/shibsp/libshibsp.la \
+ $(opensaml_LIBS) \
$(xmltooling_LIBS)
adfs_la_SOURCES = \
diff --git a/configure.ac b/configure.ac
index 4688700..1f5f482 100644
--- a/configure.ac
+++ b/configure.ac
@@ -190,55 +190,9 @@ DX_INCLUDE="$DX_INCLUDE $xmltooling_includedir"
AX_PKG_CHECK_MODULES([xmltooling_lite],,[xmltooling-lite],,,
[SHIBSP_LITE_REQUIRES],[SHIBSP_LITE_REQUIRES_PRIVATE])
-# OpenSAML settings
-AC_ARG_WITH(saml,
- AS_HELP_STRING([--with-saml=PATH],[where opensaml is installed]),,
- [with_saml=/usr])
-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"
-else
- XMLSEC_LIBS="-lsaml $XMLSEC_LIBS"
-fi
-
-# save and append master libs
-save_LIBS="$LIBS"
-LIBS="$XMLSEC_LIBS $LIBS"
-
-AC_CHECK_HEADER([saml/saml2/metadata/Metadata.h],,AC_MSG_ERROR([unable to find OpenSAML header files]))
-AC_PREPROC_IFELSE(
- [AC_LANG_PROGRAM([[#include <saml/version.h>]],
-[[#if _OPENSAML_VERSION >= 30000
-int i = 0;
-#else
-#error Need OpenSAML version 3.0 or higher
-#endif]])],
- ,[AC_MSG_ERROR([OpenSAML version 3.0.0 or greater is required.])
- ])
-
-# restore master libs
-LIBS="$save_LIBS"
-
-# Establish location of opensaml catalogs.
-OPENSAMLXMLDIR=""
-if test "x$with_saml" = "x" ; then
- with_saml="/usr"
-fi
-if test -f $with_saml/share/xml/opensaml/saml20-catalog.xml ; then
- OPENSAMLXMLDIR="$with_saml"
-elif test -f $with_xmltooling/share/xml/opensaml/saml20-catalog.xml ; then
- OPENSAMLXMLDIR="$with_xmltooling"
-elif test -f $with_xerces/share/xml/opensaml/saml20-catalog.xml ; then
- OPENSAMLXMLDIR="$with_xerces"
-elif test -f $with_log4shib/share/xml/opensaml/saml20-catalog.xml ; then
- OPENSAMLXMLDIR="$with_log4shib"
-fi
-if test "x$OPENSAMLXMLDIR" = "x" ; then
- AC_MSG_ERROR([opensaml XML catalogs not found, may need to use --with-saml option])
-fi
-OPENSAMLXMLDIR="$OPENSAMLXMLDIR/share/xml/opensaml"
-AC_SUBST(OPENSAMLXMLDIR)
+AX_PKG_CHECK_MODULES([opensaml],,[opensaml >= 3],,,
+ [SHIBSP_REQUIRES],[SHIBSP_REQUIRES_PRIVATE])
+PKG_CHECK_VAR([OPENSAMLXMLDIR],[opensaml],[pkgxmldir])
AC_SUBST(XMLSEC_LIBS)
diff --git a/memcache-store/Makefile.am b/memcache-store/Makefile.am
index 66ee8c0..54f9c25 100644
--- a/memcache-store/Makefile.am
+++ b/memcache-store/Makefile.am
@@ -9,10 +9,12 @@ AM_CXXFLAGS = $(MEMCACHED_INCLUDE)
memcache_store_la_LDFLAGS = $(MEMCACHED_LDFLAGS) -module -avoid-version
memcache_store_la_CXXFLAGS = \
$(PTHREAD_CFLAGS) \
+ $(opensaml_CFLAGS) \
$(xerces_CFLAGS) \
$(xmltooling_CFLAGS)
memcache_store_la_LIBADD = $(XMLSEC_LIBS) $(MEMCACHED_LIBS) \
$(PTHREAD_LIBS) \
+ $(opensaml_LIBS) \
$(xerces_LIBS) \
$(xmltooling_LIBS)
diff --git a/odbc-store/Makefile.am b/odbc-store/Makefile.am
index 9f3ccf8..d5d9b63 100644
--- a/odbc-store/Makefile.am
+++ b/odbc-store/Makefile.am
@@ -9,10 +9,12 @@ AM_CXXFLAGS = $(ODBC_CFLAGS)
odbc_store_la_CXXFLAGS = \
$(BOOST_CPPFLAGS) \
$(PTHREAD_CFLAGS) \
+ $(opensaml_CFLAGS) \
$(xerces_CFLAGS) \
$(xmltooling_CFLAGS)
odbc_store_la_LIBADD = $(XMLSEC_LIBS) $(ODBC_LIBS) \
$(PTHREAD_LIBS) \
+ $(opensaml_LIBS) \
$(xerces_LIBS) \
$(xmltooling_LIBS)
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 588d804..7c859e0 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -23,11 +23,13 @@ plugins_lite_la_SOURCES = \
plugins_la_CXXFLAGS = \
$(PTHREAD_CFLAGS) \
+ $(opensaml_CFLAGS) \
$(xerces_CFLAGS) \
$(xmltooling_CFLAGS)
plugins_la_LIBADD = $(XMLSEC_LIBS) \
$(top_builddir)/shibsp/libshibsp.la \
$(PTHREAD_LIBS) \
+ $(opensaml_LIBS) \
$(xerces_LIBS) \
$(xmltooling_LIBS)
diff --git a/shibd/Makefile.am b/shibd/Makefile.am
index bcb4628..b856947 100644
--- a/shibd/Makefile.am
+++ b/shibd/Makefile.am
@@ -7,12 +7,14 @@ shibd_SOURCES = shibd.cpp
shibd_CXXFLAGS = \
$(PTHREAD_CFLAGS) \
$(SYSTEMD_CFLAGS) \
+ $(opensaml_CFLAGS) \
$(xerces_CFLAGS) \
$(xmltooling_CFLAGS)
shibd_LDADD = $(XMLSEC_LIBS) \
$(top_builddir)/shibsp/libshibsp.la \
$(PTHREAD_LIBS) \
$(SYSTEMD_LIBS) \
+ $(opensaml_LIBS) \
$(xerces_LIBS) \
$(xmltooling_LIBS)
diff --git a/shibsp/Makefile.am b/shibsp/Makefile.am
index eb7d19d..3505fe5 100644
--- a/shibsp/Makefile.am
+++ b/shibsp/Makefile.am
@@ -247,11 +247,13 @@ libshibsp_la_CXXFLAGS = \
$(BOOST_CPPFLAGS) \
$(PTHREAD_CFLAGS) \
$(log4shib_CFLAGS) $(log4cpp_CFLAGS) \
+ $(opensaml_CFLAGS) \
$(xerces_CFLAGS) \
$(xmltooling_CFLAGS)
libshibsp_la_LIBADD = \
$(PTHREAD_LIBS) \
$(log4shib_LIBS) $(log4cpp_LIBS) \
+ $(opensaml_LIBS) \
$(xerces_LIBS) \
$(xmltooling_LIBS) \
$(XMLSEC_LIBS)
diff --git a/util/Makefile.am b/util/Makefile.am
index 84d065e..bb13f81 100644
--- a/util/Makefile.am
+++ b/util/Makefile.am
@@ -7,11 +7,13 @@ resolvertest_SOURCES = resolvertest.cpp
resolvertest_CXXFLAGS = \
$(BOOST_CPPFLAGS) \
$(log4shib_CFLAGS) $(log4cpp_CFLAGS) \
+ $(opensaml_CFLAGS) \
$(xerces_CFLAGS) \
$(xmltooling_CFLAGS)
resolvertest_LDADD = \
$(top_builddir)/shibsp/libshibsp.la \
$(log4shib_LIBS) $(log4cpp_LIBS) \
+ $(opensaml_LIBS) \
$(xerces_LIBS) \
$(xmltooling_LIBS) \
$(XMLSEC_LIBS)
@@ -25,11 +27,13 @@ EXTRA_DIST = \
mdquery_CXXFLAGS = \
$(log4shib_CFLAGS) $(log4cpp_CFLAGS) \
+ $(opensaml_CFLAGS) \
$(xerces_CFLAGS) \
$(xmltooling_CFLAGS)
mdquery_LDADD = \
$(top_builddir)/shibsp/libshibsp.la \
$(log4shib_LIBS) $(log4cpp_LIBS) \
+ $(opensaml_LIBS) \
$(xerces_LIBS) \
$(xmltooling_LIBS) \
$(XMLSEC_LIBS)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list