[cpp-opensaml] 03/19: Use pkg-config for xmltooling

Scott Cantor cantor.2 at osu.edu
Tue Jun 26 19:28:01 EDT 2018


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch master
in repository cpp-opensaml.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-opensaml.git;a=commit;h=d38e2194c42a3a3aa8c28874172bd5856eeb85b0

commit d38e2194c42a3a3aa8c28874172bd5856eeb85b0
Author: Ferenc Wágner <wferi at debian.org>
AuthorDate: Mon Jun 25 15:09:47 2018 +0200

    Use pkg-config for xmltooling
---
 configure.ac         | 27 ++-------------------------
 saml/Makefile.am     |  2 ++
 samlsign/Makefile.am |  2 ++
 samltest/Makefile.am |  5 ++++-
 4 files changed, 10 insertions(+), 26 deletions(-)

diff --git a/configure.ac b/configure.ac
index cc122c5..2174e6a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,6 @@ DX_XML_FEATURE(OFF)
 DX_PDF_FEATURE(OFF)
 DX_PS_FEATURE(OFF)
 DX_INIT_DOXYGEN(opensaml, doxygen.cfg, doc/api)
-DX_INCLUDE=
 
 AC_ARG_ENABLE(debug,
     AS_HELP_STRING([--enable-debug],[Have GCC compile with symbols (Default = no)]),
@@ -191,28 +190,8 @@ AC_LINK_IFELSE(
         [[XSECPlatformUtils::Initialise()]])],,
     [AC_MSG_ERROR([unable to link with XML-Security])])
 
-# XML-Tooling settings
-AC_ARG_WITH(xmltooling,
-    AS_HELP_STRING([--with-xmltooling=PATH],[where xmltooling is installed]),,
-    [with_xmltooling=/usr])
-if test x_$with_xmltooling != x_/usr; then
-    CPPFLAGS="-I${with_xmltooling}/include $CPPFLAGS"
-    DX_INCLUDE="${with_xmltooling}/include"
-    LIBS="-L${with_xmltooling}/lib -lxmltooling $LIBS"
-else
-    LIBS="-lxmltooling $LIBS"
-fi
-
-AC_CHECK_HEADER([xmltooling/XMLToolingConfig.h],,AC_MSG_ERROR([unable to find xmltooling header files]))
-
-AC_PREPROC_IFELSE(
-    [AC_LANG_PROGRAM([[#include <xmltooling/version.h>]],
-        [[#if _XMLTOOLING_VERSION >= 30000
-int i = 0;
-#else
-#error Need XMLTooling version 3.0 or higher
-#endif]])],
-    ,[AC_MSG_ERROR([XMLTooling version 3.0.0 or greater is required.])])
+AX_PKG_CHECK_MODULES([xmltooling],,[xmltooling >= 3])
+PKG_CHECK_VAR([DX_INCLUDE], [xmltooling], [includedir])
 
 # Check for unit test support
 CXXTEST="/usr/bin/cxxtestgen.pl"
@@ -231,7 +210,5 @@ AC_SUBST(CXXTEST)
 AC_SUBST(CXXTESTFLAGS)
 AM_CONDITIONAL(BUILD_UNITTEST,test -f ${CXXTEST})
 
-AC_SUBST(DX_INCLUDE)
-
 # output packaging and makefiles
 AC_OUTPUT
diff --git a/saml/Makefile.am b/saml/Makefile.am
index 95a63f4..18bfd4f 100644
--- a/saml/Makefile.am
+++ b/saml/Makefile.am
@@ -181,8 +181,10 @@ libsaml_la_SOURCES = \
 # http://sources.redhat.com/autobook/autobook/autobook_91.html
 libsaml_la_LDFLAGS = -version-info 10:0:0
 libsaml_la_CXXFLAGS = \
+    $(xmltooling_CFLAGS) \
     $(log4shib_CFLAGS) $(log4cpp_CFLAGS)
 libsaml_la_LIBADD = \
+    $(xmltooling_LIBS) \
     $(log4shib_LIBS) $(log4cpp_LIBS)
 
 install-exec-hook:
diff --git a/samlsign/Makefile.am b/samlsign/Makefile.am
index 479b664..cdc2fb6 100644
--- a/samlsign/Makefile.am
+++ b/samlsign/Makefile.am
@@ -6,8 +6,10 @@ samlsign_SOURCES = samlsign.cpp
 
 samlsign_LDADD = $(top_builddir)/saml/libsaml.la
 samlsign_CXXFLAGS = \
+    $(xmltooling_CFLAGS) \
     $(log4shib_CFLAGS) $(log4cpp_CFLAGS)
 samlsign_LDADD += \
+    $(xmltooling_LIBS) \
     $(log4shib_LIBS) $(log4cpp_LIBS)
 
 EXTRA_DIST = resource.h samlsign.rc
diff --git a/samltest/Makefile.am b/samltest/Makefile.am
index 27cc395..a6de42c 100644
--- a/samltest/Makefile.am
+++ b/samltest/Makefile.am
@@ -121,6 +121,9 @@ do-cxxtestgen:
 $(nodist_samltest_SOURCES): %.cpp: %.h
 	$(MAKE) do-cxxtestgen HFILE=$< CPPFILE=$@
 
-samltest_LDADD = $(top_builddir)/saml/libsaml.la
+samltest_CXXFLAGS = \
+    $(xmltooling_CFLAGS)
+samltest_LDADD = $(top_builddir)/saml/libsaml.la \
+    $(xmltooling_LIBS)
 
 EXTRA_DIST = data

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list