[opensaml2] 15/24: Add 6 patches migrating to pkg-config fully
Ferenc Wágner
wferi at moszumanska.debian.org
Tue Aug 30 20:55:03 UTC 2016
This is an automated email from the git hooks/post-receive script.
wferi pushed a commit to branch debian/experimental
in repository opensaml2.
commit bfcfbd40de1b0d2ef302aaea33723f92afc811b6
Author: Ferenc Wágner <wferi at niif.hu>
Date: Mon Jul 11 13:00:27 2016 +0200
Add 6 patches migrating to pkg-config fully
---
debian/control | 2 -
.../Localize-Boost-and-pthread-library-flags.patch | 57 +++
...ate-requirements-into-our-pkg-config-file.patch | 524 +++++++++++++++++++++
debian/patches/Use-pkg-config-for-Xerces.patch | 249 ++++++++++
debian/patches/Use-pkg-config-for-xmlsec.patch | 81 ++++
.../Use-pkg-config-for-zlib-and-openssl.patch | 102 ++++
debian/patches/We-don-t-use-OpenSSL-directly.patch | 41 ++
debian/patches/series | 6 +
8 files changed, 1060 insertions(+), 2 deletions(-)
diff --git a/debian/control b/debian/control
index ef64897..4fbbf88 100644
--- a/debian/control
+++ b/debian/control
@@ -6,8 +6,6 @@ Uploaders:
Russ Allbery <rra at debian.org>,
Ferenc Wágner <wferi at niif.hu>,
Build-Depends:
-# the shipped ax_create_pkgconfig_info.m4 leaks the build flags
- autoconf-archive (>= 20111221-2),
debhelper (>= 9),
dh-autoreconf,
libboost-dev,
diff --git a/debian/patches/Localize-Boost-and-pthread-library-flags.patch b/debian/patches/Localize-Boost-and-pthread-library-flags.patch
new file mode 100644
index 0000000..1ee294f
--- /dev/null
+++ b/debian/patches/Localize-Boost-and-pthread-library-flags.patch
@@ -0,0 +1,57 @@
+From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi at niif.hu>
+Date: Mon, 11 Jul 2016 11:37:26 +0200
+Subject: Localize Boost and pthread library flags
+
+---
+ configure.ac | 13 +++----------
+ saml/Makefile.am | 3 +++
+ 2 files changed, 6 insertions(+), 10 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 916f6f3..16be5c8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -71,15 +71,9 @@ AC_HEADER_DIRENT
+ AC_CHECK_FUNCS([strchr strdup strstr])
+
+ # checks for pthreads
+-ACX_PTHREAD([enable_threads="pthread"],[enable_threads="no"])
+-if test $enable_threads != "pthread"; then
+- AC_MSG_ERROR([unable to find pthreads, currently this is required])
+-else
+- AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.])
+- LIBS="$PTHREAD_LIBS $LIBS"
+- CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
+- CXXFLAGS="$PTHREAD_CFLAGS $CXXFLAGS"
+-fi
++ACX_PTHREAD(
++ [AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.])],
++ [AC_MSG_ERROR([unable to find pthreads, currently this is required])])
+
+ # zlib settings
+ AC_ARG_WITH(zlib,
+@@ -157,7 +151,6 @@ BOOST_LAMBDA
+ BOOST_POINTER_CONTAINER
+ BOOST_SMART_PTR
+ BOOST_STRING_ALGO
+-CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
+
+ AX_PKG_CHECK_MODULES([log4shib],,[log4shib],
+ [AC_DEFINE([OPENSAML_LOG4SHIB],[1],[Define to 1 if log4shib library is used.])],
+diff --git a/saml/Makefile.am b/saml/Makefile.am
+index ff03803..9a137c2 100644
+--- a/saml/Makefile.am
++++ b/saml/Makefile.am
+@@ -194,9 +194,12 @@ libsaml_la_SOURCES = \
+ # http://sources.redhat.com/autobook/autobook/autobook_91.html
+ libsaml_la_LDFLAGS = -version-info 9:0:0
+ libsaml_la_CPPFLAGS = \
++ $(BOOST_CPPFLAGS) \
++ $(PTHREAD_CFLAGS) \
+ $(xmltooling_CFLAGS) \
+ $(log4shib_CFLAGS) $(log4cpp_CFLAGS)
+ libsaml_la_LIBADD = \
++ $(PTHREAD_LIBS) \
+ $(xmltooling_LIBS) \
+ $(log4shib_LIBS) $(log4cpp_LIBS)
+
diff --git a/debian/patches/Propagate-requirements-into-our-pkg-config-file.patch b/debian/patches/Propagate-requirements-into-our-pkg-config-file.patch
new file mode 100644
index 0000000..0e24726
--- /dev/null
+++ b/debian/patches/Propagate-requirements-into-our-pkg-config-file.patch
@@ -0,0 +1,524 @@
+From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi at niif.hu>
+Date: Mon, 11 Jul 2016 11:20:26 +0200
+Subject: Propagate requirements into our pkg-config file
+
+---
+ Makefile.am | 6 -
+ configure.ac | 10 +-
+ m4/ax_create_pkgconfig_info.m4 | 349 -----------------------------------------
+ m4/ax_pkg_check_modules.m4 | 69 ++++++++
+ opensaml.pc.in | 13 ++
+ 5 files changed, 86 insertions(+), 361 deletions(-)
+ delete mode 100644 m4/ax_create_pkgconfig_info.m4
+ create mode 100644 m4/ax_pkg_check_modules.m4
+ create mode 100644 opensaml.pc.in
+
+diff --git a/Makefile.am b/Makefile.am
+index baa476e..6376ee9 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -5,12 +5,6 @@ include doxygen.am
+
+ MOSTLYCLEANFILES = $(DX_CLEANFILES)
+
+-DISTCLEANFILES = \
+- @PACKAGE_NAME at .pc \
+- @PACKAGE_NAME at .pc.in \
+- @PACKAGE_NAME at -uninstalled.pc \
+- @PACKAGE_NAME at -uninstalled.sh
+-
+ SUBDIRS = doc schemas saml samltest samlsign
+
+ if DX_COND_doc
+diff --git a/configure.ac b/configure.ac
+index f248b0f..916f6f3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -31,7 +31,7 @@ else
+ fi
+
+ AC_CONFIG_HEADERS([config.h])
+-AC_CONFIG_FILES([opensaml.spec])
++AC_CONFIG_FILES([opensaml.pc opensaml.spec])
+ AC_CONFIG_FILES([Makefile saml/Makefile samltest/Makefile samlsign/Makefile schemas/Makefile doc/Makefile])
+
+ AC_PROG_CC([gcc gcc3 cc])
+@@ -159,9 +159,9 @@ BOOST_SMART_PTR
+ BOOST_STRING_ALGO
+ CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
+
+-PKG_CHECK_MODULES([log4shib], [log4shib],
++AX_PKG_CHECK_MODULES([log4shib],,[log4shib],
+ [AC_DEFINE([OPENSAML_LOG4SHIB],[1],[Define to 1 if log4shib library is used.])],
+- [PKG_CHECK_MODULES([log4cpp], [log4cpp],
++ [AX_PKG_CHECK_MODULES([log4cpp],,[log4cpp],
+ [AC_DEFINE([OPENSAML_LOG4CPP],[1],[Define to 1 if log4cpp library is used.])])])
+
+ # Xerces settings
+@@ -223,7 +223,7 @@ AC_LINK_IFELSE(
+ [[XSECPlatformUtils::Initialise()]])],,
+ [AC_MSG_ERROR([unable to link with XML-Security])])
+
+-PKG_CHECK_MODULES([xmltooling], [xmltooling >= 1.4])
++AX_PKG_CHECK_MODULES([xmltooling],,[xmltooling >= 1.4])
+ PKG_CHECK_VAR([DX_INCLUDE], [xmltooling], [includedir])
+
+ # Check for unit test support
+@@ -243,8 +243,6 @@ AC_SUBST(CXXTEST)
+ AC_SUBST(CXXTESTFLAGS)
+ AM_CONDITIONAL(BUILD_UNITTEST,test -f ${CXXTEST})
+
+-AX_CREATE_PKGCONFIG_INFO(,,[$LIBS -lsaml],[OpenSAML library])
+-
+ dnl Disabled on Debian since build log analysis wants verbose logs.
+ dnl LIBTOOL="$LIBTOOL --silent"
+
+diff --git a/m4/ax_create_pkgconfig_info.m4 b/m4/ax_create_pkgconfig_info.m4
+deleted file mode 100644
+index 60ac548..0000000
+--- a/m4/ax_create_pkgconfig_info.m4
++++ /dev/null
+@@ -1,349 +0,0 @@
+-# ===========================================================================
+-# http://www.nongnu.org/autoconf-archive/ax_create_pkgconfig_info.html
+-# ===========================================================================
+-#
+-# SYNOPSIS
+-#
+-# AX_CREATE_PKGCONFIG_INFO [(outputfile, [requires [,libs [,summary [,cflags [, ldflags]]]]])]
+-#
+-# DESCRIPTION
+-#
+-# Defaults:
+-#
+-# $1 = $PACKAGE_NAME.pc
+-# $2 = (empty)
+-# $3 = $PACKAGE_LIBS $LIBS (as set at that point in configure.ac)
+-# $4 = $PACKAGE_SUMMARY (or $1 Library)
+-# $5 = $CPPFLAGS $PACKAGE_CFLAGS (as set at the point in configure.ac)
+-# $6 = $LDFLAGS $PACKAGE_LDFLAGS (as set at the point in configure.ac)
+-#
+-# PACKAGE_NAME defaults to $PACKAGE if not set.
+-# PACKAGE_LIBS defaults to -l$PACKAGE_NAME if not set.
+-#
+-# The resulting file is called $PACKAGE.pc.in / $PACKAGE.pc
+-#
+-# You will find this macro most useful in conjunction with
+-# ax_spec_defaults that can read good initializers from the .spec file. In
+-# consequencd, most of the generatable installable stuff can be made from
+-# information being updated in a single place for the whole project.
+-#
+-# LICENSE
+-#
+-# Copyright (c) 2008 Guido U. Draheim <guidod at gmx.de>
+-# Copyright (c) 2008 Sven Verdoolaege <skimo at kotnet.org>
+-#
+-# This program is free software; you can redistribute it and/or modify it
+-# under the terms of the GNU General Public License as published by the
+-# Free Software Foundation; either version 2 of the License, or (at your
+-# option) any later version.
+-#
+-# This program is distributed in the hope that it will be useful, but
+-# WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+-# Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License along
+-# with this program. If not, see <http://www.gnu.org/licenses/>.
+-#
+-# As a special exception, the respective Autoconf Macro's copyright owner
+-# gives unlimited permission to copy, distribute and modify the configure
+-# scripts that are the output of Autoconf when processing the Macro. You
+-# need not follow the terms of the GNU General Public License when using
+-# or distributing such scripts, even though portions of the text of the
+-# Macro appear in them. The GNU General Public License (GPL) does govern
+-# all other use of the material that constitutes the Autoconf Macro.
+-#
+-# This special exception to the GPL applies to versions of the Autoconf
+-# Macro released by the Autoconf Archive. When you make and distribute a
+-# modified version of the Autoconf Macro, you may extend this special
+-# exception to the GPL to apply to your modified version as well.
+-
+-AC_DEFUN([AX_CREATE_PKGCONFIG_INFO],[dnl
+-AS_VAR_PUSHDEF([PKGCONFIG_suffix],[ax_create_pkgconfig_suffix])dnl
+-AS_VAR_PUSHDEF([PKGCONFIG_libdir],[ax_create_pkgconfig_libdir])dnl
+-AS_VAR_PUSHDEF([PKGCONFIG_libfile],[ax_create_pkgconfig_libfile])dnl
+-AS_VAR_PUSHDEF([PKGCONFIG_libname],[ax_create_pkgconfig_libname])dnl
+-AS_VAR_PUSHDEF([PKGCONFIG_version],[ax_create_pkgconfig_version])dnl
+-AS_VAR_PUSHDEF([PKGCONFIG_description],[ax_create_pkgconfig_description])dnl
+-AS_VAR_PUSHDEF([PKGCONFIG_requires],[ax_create_pkgconfig_requires])dnl
+-AS_VAR_PUSHDEF([PKGCONFIG_pkglibs],[ax_create_pkgconfig_pkglibs])dnl
+-AS_VAR_PUSHDEF([PKGCONFIG_libs],[ax_create_pkgconfig_libs])dnl
+-AS_VAR_PUSHDEF([PKGCONFIG_ldflags],[ax_create_pkgconfig_ldflags])dnl
+-AS_VAR_PUSHDEF([PKGCONFIG_cppflags],[ax_create_pkgconfig_cppflags])dnl
+-AS_VAR_PUSHDEF([PKGCONFIG_generate],[ax_create_pkgconfig_generate])dnl
+-AS_VAR_PUSHDEF([PKGCONFIG_src_libdir],[ax_create_pkgconfig_src_libdir])dnl
+-AS_VAR_PUSHDEF([PKGCONFIG_src_headers],[ax_create_pkgconfig_src_headers])dnl
+-
+-# we need the expanded forms...
+-test "x$prefix" = xNONE && prefix=$ac_default_prefix
+-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+-
+-AC_MSG_CHECKING(our pkgconfig libname)
+-test ".$PKGCONFIG_libname" != "." || \
+-PKGCONFIG_libname="ifelse($1,,${PACKAGE_NAME},`basename $1 .pc`)"
+-test ".$PKGCONFIG_libname" != "." || \
+-PKGCONFIG_libname="$PACKAGE"
+-PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"`
+-PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"`
+-AC_MSG_RESULT($PKGCONFIG_libname)
+-
+-AC_MSG_CHECKING(our pkgconfig version)
+-test ".$PKGCONFIG_version" != "." || \
+-PKGCONFIG_version="${PACKAGE_VERSION}"
+-test ".$PKGCONFIG_version" != "." || \
+-PKGCONFIG_version="$VERSION"
+-PKGCONFIG_version=`eval echo "$PKGCONFIG_version"`
+-PKGCONFIG_version=`eval echo "$PKGCONFIG_version"`
+-AC_MSG_RESULT($PKGCONFIG_version)
+-
+-AC_MSG_CHECKING(our pkgconfig_libdir)
+-test ".$pkgconfig_libdir" = "." && \
+-pkgconfig_libdir='${libdir}/pkgconfig'
+-PKGCONFIG_libdir=`eval echo "$pkgconfig_libdir"`
+-PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"`
+-PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"`
+-AC_MSG_RESULT($pkgconfig_libdir)
+-test "$pkgconfig_libdir" != "$PKGCONFIG_libdir" && (
+-AC_MSG_RESULT(expanded our pkgconfig_libdir... $PKGCONFIG_libdir))
+-AC_SUBST([pkgconfig_libdir])
+-
+-AC_MSG_CHECKING(our pkgconfig_libfile)
+-test ".$pkgconfig_libfile" != "." || \
+-pkgconfig_libfile="ifelse($1,,$PKGCONFIG_libname.pc,`basename $1`)"
+-PKGCONFIG_libfile=`eval echo "$pkgconfig_libfile"`
+-PKGCONFIG_libfile=`eval echo "$PKGCONFIG_libfile"`
+-AC_MSG_RESULT($pkgconfig_libfile)
+-test "$pkgconfig_libfile" != "$PKGCONFIG_libfile" && (
+-AC_MSG_RESULT(expanded our pkgconfig_libfile... $PKGCONFIG_libfile))
+-AC_SUBST([pkgconfig_libfile])
+-
+-AC_MSG_CHECKING(our package / suffix)
+-PKGCONFIG_suffix="$program_suffix"
+-test ".$PKGCONFIG_suffix" != .NONE || PKGCONFIG_suffix=""
+-AC_MSG_RESULT(${PACKAGE_NAME} / ${PKGCONFIG_suffix})
+-
+-AC_MSG_CHECKING(our pkgconfig description)
+-PKGCONFIG_description="ifelse($4,,$PACKAGE_SUMMARY,$4)"
+-test ".$PKGCONFIG_description" != "." || \
+-PKGCONFIG_description="$PKGCONFIG_libname Library"
+-PKGCONFIG_description=`eval echo "$PKGCONFIG_description"`
+-PKGCONFIG_description=`eval echo "$PKGCONFIG_description"`
+-AC_MSG_RESULT($PKGCONFIG_description)
+-
+-AC_MSG_CHECKING(our pkgconfig requires)
+-PKGCONFIG_requires="ifelse($2,,$PACKAGE_REQUIRES,$2)"
+-PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"`
+-PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"`
+-AC_MSG_RESULT($PKGCONFIG_requires)
+-
+-AC_MSG_CHECKING(our pkgconfig ext libs)
+-PKGCONFIG_pkglibs="$PACKAGE_LIBS"
+-test ".$PKGCONFIG_pkglibs" != "." || PKGCONFIG_pkglibs="-l$PKGCONFIG_libname"
+-PKGCONFIG_libs="ifelse($3,,$PKGCONFIG_pkglibs $LIBS,$3)"
+-PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"`
+-PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"`
+-AC_MSG_RESULT($PKGCONFIG_libs)
+-
+-AC_MSG_CHECKING(our pkgconfig cppflags)
+-PKGCONFIG_cppflags="ifelse($5,,$CPPFLAGS $PACKAGE_CFLAGS,$5)"
+-PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"`
+-PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"`
+-AC_MSG_RESULT($PKGCONFIG_cppflags)
+-
+-AC_MSG_CHECKING(our pkgconfig ldflags)
+-PKGCONFIG_ldflags="ifelse($6,,$LDFLAGS $PACKAGE_LDFLAGS,$5)"
+-PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"`
+-PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"`
+-AC_MSG_RESULT($PKGCONFIG_ldflags)
+-
+-test ".$PKGCONFIG_generate" != "." || \
+-PKGCONFIG_generate="ifelse($1,,$PKGCONFIG_libname.pc,$1)"
+-PKGCONFIG_generate=`eval echo "$PKGCONFIG_generate"`
+-PKGCONFIG_generate=`eval echo "$PKGCONFIG_generate"`
+-test "$pkgconfig_libfile" != "$PKGCONFIG_generate" && (
+-AC_MSG_RESULT(generate the pkgconfig later... $PKGCONFIG_generate))
+-
+-if test ".$PKGCONFIG_src_libdir" = "." ; then
+-PKGCONFIG_src_libdir=`pwd`
+-PKGCONFIG_src_libdir=`AS_DIRNAME("$PKGCONFIG_src_libdir/$PKGCONFIG_generate")`
+-test ! -d $PKGCONFIG_src_libdir/src || \
+-PKGCONFIG_src_libdir="$PKGCONFIG_src_libdir/src"
+-case ".$objdir" in
+-*libs) PKGCONFIG_src_libdir="$PKGCONFIG_src_libdir/$objdir" ;; esac
+-AC_MSG_RESULT(noninstalled pkgconfig -L $PKGCONFIG_src_libdir)
+-fi
+-
+-if test ".$PKGCONFIG_src_headers" = "." ; then
+-PKGCONFIG_src_headers=`pwd`
+-v="$ac_top_srcdir" ;
+-test ".$v" != "." || v="$ax_spec_dir"
+-test ".$v" != "." || v="$srcdir"
+-case "$v" in /*) PKGCONFIG_src_headers="" ;; esac
+-PKGCONFIG_src_headers=`AS_DIRNAME("$PKGCONFIG_src_headers/$v/x")`
+-test ! -d $PKGCONFIG_src_headers/incl[]ude || \
+-PKGCONFIG_src_headers="$PKGCONFIG_src_headers/incl[]ude"
+-AC_MSG_RESULT(noninstalled pkgconfig -I $PKGCONFIG_src_headers)
+-fi
+-
+-
+-dnl AC_CONFIG_COMMANDS crap disallows to use $PKGCONFIG_libfile here...
+-AC_CONFIG_COMMANDS([$ax_create_pkgconfig_generate],[
+-pkgconfig_generate="$ax_create_pkgconfig_generate"
+-if test ! -f "$pkgconfig_generate.in"
+-then generate="true"
+-elif grep ' generated by configure ' $pkgconfig_generate.in >/dev/null
+-then generate="true"
+-else generate="false";
+-fi
+-if $generate ; then
+-AC_MSG_NOTICE(creating $pkgconfig_generate.in)
+-cat > $pkgconfig_generate.in <<AXEOF
+-# generated by configure / remove this line to disable regeneration
+-prefix=@prefix@
+-exec_prefix=@exec_prefix@
+-bindir=@bindir@
+-libdir=@libdir@
+-datarootdir=@datarootdir@
+-datadir=@datadir@
+-sysconfdir=@sysconfdir@
+-includedir=@includedir@
+-package=@PACKAGE@
+-suffix=@suffix@
+-
+-Name: @PACKAGE_NAME@
+-Description: @PACKAGE_DESCRIPTION@
+-Version: @PACKAGE_VERSION@
+-Requires: @PACKAGE_REQUIRES@
+-Libs: -L\${libdir} @LDFLAGS@ @LIBS@
+-Cflags: -I\${includedir} @CPPFLAGS@
+-AXEOF
+-fi # DONE generate $pkgconfig_generate.in
+-AC_MSG_NOTICE(creating $pkgconfig_generate)
+-cat >conftest.sed <<AXEOF
+-s|@prefix@|${pkgconfig_prefix}|
+-s|@exec_prefix@|${pkgconfig_execprefix}|
+-s|@bindir@|${pkgconfig_bindir}|
+-s|@libdir@|${pkgconfig_libdir}|
+-s|@datarootdir@|${pkgconfig_datarootdir}|
+-s|@datadir@|${pkgconfig_datadir}|
+-s|@sysconfdir@|${pkgconfig_sysconfdir}|
+-s|@includedir@|${pkgconfig_includedir}|
+-s|@suffix@|${pkgconfig_suffix}|
+-s|@PACKAGE@|${pkgconfig_package}|
+-s|@PACKAGE_NAME@|${pkgconfig_libname}|
+-s|@PACKAGE_DESCRIPTION@|${pkgconfig_description}|
+-s|@PACKAGE_VERSION@|${pkgconfig_version}|
+-s|@PACKAGE_REQUIRES@|${pkgconfig_requires}|
+-s|@LIBS@|${pkgconfig_libs}|
+-s|@LDFLAGS@|${pkgconfig_ldflags}|
+-s|@CPPFLAGS@|${pkgconfig_cppflags}|
+-AXEOF
+-sed -f conftest.sed $pkgconfig_generate.in > $pkgconfig_generate
+-if test ! -s $pkgconfig_generate ; then
+- AC_MSG_ERROR([$pkgconfig_generate is empty])
+-fi ; rm conftest.sed # DONE generate $pkgconfig_generate
+-pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.pc/'`
+-AC_MSG_NOTICE(creating $pkgconfig_uninstalled)
+-cat >conftest.sed <<AXEOF
+-s|@prefix@|${pkgconfig_prefix}|
+-s|@exec_prefix@|${pkgconfig_execprefix}|
+-s|@bindir@|${pkgconfig_bindir}|
+-s|@libdir@|${pkgconfig_src_libdir}|
+-s|@datarootdir@|${pkgconfig_datarootdir}|
+-s|@datadir@|${pkgconfig_datadir}|
+-s|@sysconfdir@|${pkgconfig_sysconfdir}|
+-s|@includedir@|${pkgconfig_src_headers}|
+-s|@suffix@|${pkgconfig_suffix}|
+-s|@PACKAGE@|${pkgconfig_package}|
+-s|@PACKAGE_NAME@|${pkgconfig_libname}|
+-s|@PACKAGE_DESCRIPTION@|${pkgconfig_description}|
+-s|@PACKAGE_VERSION@|${pkgconfig_version}|
+-s|@PACKAGE_REQUIRES@|${pkgconfig_requires}|
+-s|@LIBS@|${pkgconfig_libs}|
+-s|@LDFLAGS@|${pkgconfig_ldflags}|
+-s|@CPPFLAGS@|${pkgconfig_cppflags}|
+-AXEOF
+-sed -f conftest.sed $pkgconfig_generate.in > $pkgconfig_uninstalled
+-if test ! -s $pkgconfig_uninstalled ; then
+- AC_MSG_ERROR([$pkgconfig_uninstalled is empty])
+-fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled
+- pkgconfig_requires_add=`echo ${pkgconfig_requires}`
+-if test ".$pkgconfig_requires_add" != "." ; then
+- pkgconfig_requires_add="pkg-config $pkgconfig_requires_add"
+- else pkgconfig_requires_add=":" ; fi
+-pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.sh/'`
+-AC_MSG_NOTICE(creating $pkgconfig_uninstalled)
+-cat >conftest.sed <<AXEOF
+-s|@prefix@|\"${pkgconfig_prefix}\"|
+-s|@exec_prefix@|\"${pkgconfig_execprefix}\"|
+-s|@bindir@|\"${pkgconfig_bindir}\"|
+-s|@libdir@|\"${pkgconfig_src_libdir}\"|
+-s|@datarootdir@|\"${pkgconfig_datarootdir}\"|
+-s|@datadir@|\"${pkgconfig_datadir}\"|
+-s|@sysconfdir@|\"${pkgconfig_sysconfdir}\"|
+-s|@includedir@|\"${pkgconfig_src_headers}\"|
+-s|@suffix@|\"${pkgconfig_suffix}\"|
+-s|@PACKAGE@|\"${pkgconfig_package}\"|
+-s|@PACKAGE_NAME@|\"${pkgconfig_libname}\"|
+-s|@PACKAGE_DESCRIPTION@|\"${pkgconfig_description}\"|
+-s|@PACKAGE_VERSION@|\"${pkgconfig_version}\"|
+-s|@PACKAGE_REQUIRES@|\"${pkgconfig_requires}\"|
+-s|@LIBS@|\"${pkgconfig_libs}\"|
+-s|@LDFLAGS@|\"${pkgconfig_ldflags}\"|
+-s|@CPPFLAGS@|\"${pkgconfig_cppflags}\"|
+-s>Name:>for option\\; do case \"\$option\" in --list-all|--name) echo >
+-s>Description: *>\\;\\; --help) pkg-config --help \\; echo Buildscript Of >
+-s>Version: *>\\;\\; --modversion|--version) echo >
+-s>Requires:>\\;\\; --requires) echo $pkgconfig_requires_add>
+-s>Libs: *>\\;\\; --libs) echo >
+-s>Cflags: *>\\;\\; --cflags) echo >
+-/--libs)/a\\
+- $pkgconfig_requires_add
+-/--cflags)/a\\
+- $pkgconfig_requires_add\\
+-;; --variable=*) eval echo '\$'\`echo \$option | sed -e 's/.*=//'\`\\
+-;; --uninstalled) exit 0 \\
+-;; *) ;; esac done
+-AXEOF
+-sed -f conftest.sed $pkgconfig_generate.in > $pkgconfig_uninstalled
+-if test ! -s $pkgconfig_uninstalled ; then
+- AC_MSG_ERROR([$pkgconfig_uninstalled is empty])
+-fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled
+-],[
+-dnl AC_CONFIG_COMMANDS crap, the AS_PUSHVAR defines are invalid here...
+-ax_create_pkgconfig_generate="$ax_create_pkgconfig_generate"
+-pkgconfig_prefix='$prefix'
+-pkgconfig_execprefix='$exec_prefix'
+-pkgconfig_bindir='$bindir'
+-pkgconfig_libdir='$libdir'
+-pkgconfig_includedir='$includedir'
+-pkgconfig_datarootdir='$datarootdir'
+-pkgconfig_datadir='$datadir'
+-pkgconfig_sysconfdir='$sysconfdir'
+-pkgconfig_suffix='$ax_create_pkgconfig_suffix'
+-pkgconfig_package='$PACKAGE_NAME'
+-pkgconfig_libname='$ax_create_pkgconfig_libname'
+-pkgconfig_description='$ax_create_pkgconfig_description'
+-pkgconfig_version='$ax_create_pkgconfig_version'
+-pkgconfig_requires='$ax_create_pkgconfig_requires'
+-pkgconfig_libs='$ax_create_pkgconfig_libs'
+-pkgconfig_ldflags='$ax_create_pkgconfig_ldflags'
+-pkgconfig_cppflags='$ax_create_pkgconfig_cppflags'
+-pkgconfig_src_libdir='$ax_create_pkgconfig_src_libdir'
+-pkgconfig_src_headers='$ax_create_pkgconfig_src_headers'
+-])dnl
+-AS_VAR_POPDEF([PKGCONFIG_suffix])dnl
+-AS_VAR_POPDEF([PKGCONFIG_libdir])dnl
+-AS_VAR_POPDEF([PKGCONFIG_libfile])dnl
+-AS_VAR_POPDEF([PKGCONFIG_libname])dnl
+-AS_VAR_POPDEF([PKGCONFIG_version])dnl
+-AS_VAR_POPDEF([PKGCONFIG_description])dnl
+-AS_VAR_POPDEF([PKGCONFIG_requires])dnl
+-AS_VAR_POPDEF([PKGCONFIG_pkglibs])dnl
+-AS_VAR_POPDEF([PKGCONFIG_libs])dnl
+-AS_VAR_POPDEF([PKGCONFIG_ldflags])dnl
+-AS_VAR_POPDEF([PKGCONFIG_cppflags])dnl
+-AS_VAR_POPDEF([PKGCONFIG_generate])dnl
+-AS_VAR_POPDEF([PKGCONFIG_src_libdir])dnl
+-AS_VAR_POPDEF([PKGCONFIG_src_headers])dnl
+-])
+diff --git a/m4/ax_pkg_check_modules.m4 b/m4/ax_pkg_check_modules.m4
+new file mode 100644
+index 0000000..ab8adf9
+--- /dev/null
++++ b/m4/ax_pkg_check_modules.m4
+@@ -0,0 +1,69 @@
++# ===========================================================================
++# http://www.gnu.org/software/autoconf-archive/ax_pkg_check_modules.html
++# ===========================================================================
++#
++# SYNOPSIS
++#
++# AX_PKG_CHECK_MODULES(PREFIX, PUBLIC-MODULES, PRIVATE-MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [PUBLIC-VARIABLE], [PRIVATE-VARIABLE])
++#
++# DESCRIPTION
++#
++# A wrapper around PKG_CHECK_MODULES which splits the list of modules into
++# public and private dependencies, and produces two variables listing the
++# dependencies across all invocations of AX_PKG_CHECK_MODULES. These two
++# variables are exposed via AC_SUBST, and should be used in a pkg-config
++# file as the substituted values for Requires and Requires.private.
++#
++# The PREFIX, PUBLIC-MODULES and PRIVATE-MODULES arguments should be
++# specified as for PKG_CHECK_MODULES, with the concatenation of
++# PUBLIC-MODULES and PRIVATE-MODULES equaling the LIST-OF-MODULES from
++# PKG_CHECK_MODULES. The ACTION-IF-FOUND and ACTION-IF-NOT-FOUND
++# arguments are optional, and should also be specified as for
++# PKG_CHECK_MODULES. ACTION-IF-FOUND is evaluated if the full
++# LIST-OF-MODULES is found; ACTION-IF-NOT-FOUND similarly.
++#
++# PUBLIC-VARIABLE defaults to AX_PACKAGE_REQUIRES, and PRIVATE-VARIABLE
++# defaults to AX_PACKAGE_REQUIRES_PRIVATE. Both variables are AC_SUBST-ed
++# by this macro.
++#
++# For example:
++#
++# AX_PKG_CHECK_MODULES([GLIB],[glib-2.0 gio-2.0],[gthread-2.0])
++# AX_PKG_CHECK_MODULES([DBUS],[],[dbus-glib-1 >= 0.98 dbus-1])
++#
++# results in the substitutions:
++#
++# AX_PACKAGE_REQUIRES="glib-2.0 gio-2.0"
++# AX_PACKAGE_REQUIRES_PRIVATE="gthread-2.0 dbus-glib-1 >= 0.98 dbus-1"
++#
++# and can be used with a template pkg-config file (.pc.in) using:
++#
++# Requires: @AX_PACKAGE_REQUIRES@
++# Requires.private: @AX_PACKAGE_REQUIRES_PRIVATE@
++#
++# LICENSE
++#
++# Copyright (c) 2014 Philip Withnall <philip at tecnocode.co.uk>
++#
++# Copying and distribution of this file, with or without modification, are
++# permitted in any medium without royalty provided the copyright notice
++# and this notice are preserved. This file is offered as-is, without any
++# warranty.
++
++#serial 2
++
++AC_DEFUN([AX_PKG_CHECK_MODULES],[
++ m4_define([ax_package_requires],
++ [m4_default_quoted([$6],[AX_PACKAGE_REQUIRES])])
++ m4_define([ax_package_requires_private],
++ [m4_default_quoted([$7],[AX_PACKAGE_REQUIRES_PRIVATE])])
++
++ PKG_CHECK_MODULES([$1],[$2 $3],[
++ ax_package_requires="$[]ax_package_requires $2"
++ ax_package_requires_private="$[]ax_package_requires_private $3"
++ $4],[$5])
++
++ # Substitute output.
++ AC_SUBST(ax_package_requires)
++ AC_SUBST(ax_package_requires_private)
++])dnl AX_PKG_CHECK_MODULES
+diff --git a/opensaml.pc.in b/opensaml.pc.in
+new file mode 100644
+index 0000000..858cefb
+--- /dev/null
++++ b/opensaml.pc.in
+@@ -0,0 +1,13 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: @PACKAGE_NAME@
++Description: OpenSAML library
++Version: @PACKAGE_VERSION@
++Libs: -L${libdir} -lsaml
++Libs.private: @PTHREAD_LIBS@
++Cflags: -I${includedir} @BOOST_CPPFLAGS@ @PTHREAD_CFLAGS@
++Requires: @AX_PACKAGE_REQUIRES@
++Requires.private: @AX_PACKAGE_REQUIRES_PRIVATE@
diff --git a/debian/patches/Use-pkg-config-for-Xerces.patch b/debian/patches/Use-pkg-config-for-Xerces.patch
new file mode 100644
index 0000000..929ac25
--- /dev/null
+++ b/debian/patches/Use-pkg-config-for-Xerces.patch
@@ -0,0 +1,249 @@
+From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi at niif.hu>
+Date: Mon, 11 Jul 2016 11:59:10 +0200
+Subject: Use pkg-config for Xerces
+
+---
+ configure.ac | 32 +++++------------------
+ m4/ax_restore_flags.m4 | 52 ++++++++++++++++++++++++++++++++++++
+ m4/ax_save_flags.m4 | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ saml/Makefile.am | 2 ++
+ samlsign/Makefile.am | 2 ++
+ samltest/Makefile.am | 2 ++
+ 6 files changed, 136 insertions(+), 25 deletions(-)
+ create mode 100644 m4/ax_restore_flags.m4
+ create mode 100644 m4/ax_save_flags.m4
+
+diff --git a/configure.ac b/configure.ac
+index cc32f7e..a608fd4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -97,31 +97,11 @@ AX_PKG_CHECK_MODULES([log4shib],,[log4shib],
+ [AX_PKG_CHECK_MODULES([log4cpp],,[log4cpp],
+ [AC_DEFINE([OPENSAML_LOG4CPP],[1],[Define to 1 if log4cpp library is used.])])])
+
+-# Xerces settings
+-AC_ARG_WITH(xerces,
+- AS_HELP_STRING([--with-xerces=PATH],[where xerces-c is installed]),,
+- [with_xerces=/usr])
+-if test x_$with_xerces != x_/usr; then
+- CPPFLAGS="-I${with_xerces}/include $CPPFLAGS"
+- LIBS="-L${with_xerces}/lib -lxerces-c $LIBS"
+-else
+- LIBS="-lxerces-c $LIBS"
+-fi
+-
+-AC_CHECK_HEADER([xercesc/dom/DOM.hpp],,AC_MSG_ERROR([unable to find xerces header files]))
+-AC_MSG_CHECKING([Xerces version])
+-AC_PREPROC_IFELSE(
+- [AC_LANG_PROGRAM([#include <xercesc/util/XercesVersion.hpp>],
+-[#if _XERCES_VERSION != 20600
+-int i = 0;
+-#else
+-#error cannot use version 2.6.0
+-#endif])],
+- [AC_MSG_RESULT(OK)],
+- [AC_MSG_FAILURE([Xerces-C v2.6.0 has bugs that inhibit use with signed XML, please use a newer version])])
+-AC_LINK_IFELSE(
+- [AC_LANG_PROGRAM([[#include <xercesc/util/PlatformUtils.hpp>]],[[xercesc::XMLPlatformUtils::Initialize()]])],
+- ,[AC_MSG_ERROR([unable to link with Xerces])])
++# Xerces-C v2.6.0 has bugs that inhibit use with signed XML
++AX_PKG_CHECK_MODULES([xerces],,[xerces-c != 2.6.0])
++AX_SAVE_FLAGS
++CPPFLAGS="$xerces_CFLAGS $CPPFLAGS"
++LIBS="$xerces_LIBS $LIBS"
+
+ AC_MSG_CHECKING([whether Xerces XMLString::release(XMLByte**) exists])
+ AC_COMPILE_IFELSE(
+@@ -130,6 +110,8 @@ AC_COMPILE_IFELSE(
+ [AC_MSG_RESULT([yes])AC_DEFINE([OPENSAML_XERCESC_HAS_XMLBYTE_RELEASE],[1],[Define to 1 if Xerces XMLString includes XMLByte release.])],
+ [AC_MSG_RESULT([no])])
+
++AX_RESTORE_FLAGS
++
+ # XML-Security settings
+ AC_ARG_WITH(xmlsec,
+ AS_HELP_STRING([--with-xmlsec=PATH],[where xmlsec is installed]),,
+diff --git a/m4/ax_restore_flags.m4 b/m4/ax_restore_flags.m4
+new file mode 100644
+index 0000000..aafd363
+--- /dev/null
++++ b/m4/ax_restore_flags.m4
+@@ -0,0 +1,52 @@
++# ===========================================================================
++# http://www.gnu.org/software/autoconf-archive/ax_restore_flags.html
++# ===========================================================================
++#
++# SYNOPSIS
++#
++# AX_RESTORE_FLAGS([namespace])
++#
++# DESCRIPTION
++#
++# Restore common compilation flags from temporary variables.
++#
++# Compilation flags includes: CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS, LIBS,
++# OBJCFLAGS.
++#
++# By default these flags are restored to a global (empty) namespace, but
++# user could restore from specific NAMESPACE by using
++# AX_RESTORE_FLAGS(NAMESPACE) macro.
++#
++# Typical usage is like:
++#
++# AX_SAVE_FLAGS(mypackage)
++# CPPFLAGS="-Imypackagespath ${CPPFLAGS}"
++# dnl ... do some detection ...
++# AX_RESTORE_FLAGS(mypackage)
++#
++# LICENSE
++#
++# Copyright (c) 2009 Filippo Giunchedi <filippo at esaurito.net>
++# Copyright (c) 2011 The Board of Trustees of the Leland Stanford Junior University
++# Copyright (c) 2011 Russ Allbery <rra at stanford.edu>
++# Copyright (c) 2013 Bastien ROUCARIES <roucaries.bastien+autoconf at gmail.com>
++#
++# Copying and distribution of this file, with or without modification, are
++# permitted in any medium without royalty provided the copyright notice
++# and this notice are preserved. This file is offered as-is, without any
++# warranty.
++
++#serial 6
++
++# save one flag in name space
++AC_DEFUN([_AX_RESTORE_ONE_FLAG],[dnl
++ AS_VAR_PUSHDEF([_ax_restore_flag_var], [$2[]_$1[]_ax_save_flags])
++ AS_VAR_COPY($2[],_ax_restore_flag_var)
++ AS_VAR_POPDEF([_ax_restore_flag_var])
++])
++
++AC_DEFUN([AX_RESTORE_FLAGS], [dnl
++ m4_foreach([FLAG], dnl
++ [_AX_SAVE_FLAGS_LIST()], dnl
++ [_AX_RESTORE_ONE_FLAG([$1],FLAG)])
++])
+diff --git a/m4/ax_save_flags.m4 b/m4/ax_save_flags.m4
+new file mode 100644
+index 0000000..39f45be
+--- /dev/null
++++ b/m4/ax_save_flags.m4
+@@ -0,0 +1,71 @@
++# ===========================================================================
++# http://www.gnu.org/software/autoconf-archive/ax_save_flags.html
++# ===========================================================================
++#
++# SYNOPSIS
++#
++# AX_SAVE_FLAGS([NAMESPACE])
++#
++# DESCRIPTION
++#
++# Save common compilation flags into temporary variables.
++#
++# Compilation flags includes: CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS, LIBS,
++# OBJCFLAGS.
++#
++# By default these flags are saved to a global (empty) namespace, but user
++# could specify a specific NAMESPACE to AX_SAVE_FLAGS macro and latter
++# restore it by using AX_RESTORE_FLAGS(NAMESPACE).
++#
++# AX_SAVE_FLAGS(mypackage)
++# CPPFLAGS="-Imypackagespath ${CPPFLAGS}"
++# dnl .. do some detection ...
++# AX_RESTORE_FLAGS(mypackage)
++#
++# LICENSE
++#
++# Copyright (c) 2009 Filippo Giunchedi <filippo at esaurito.net>
++# Copyright (c) 2011 The Board of Trustees of the Leland Stanford Junior University
++# Copyright (c) 2011 Russ Allbery <rra at stanford.edu>
++# Copyright (c) 2013 Bastien ROUCARIES <roucaries.bastien+autoconf at gmail.com>
++#
++# Copying and distribution of this file, with or without modification, are
++# permitted in any medium without royalty provided the copyright notice
++# and this notice are preserved. This file is offered as-is, without any
++# warranty.
++
++#serial 7
++
++# list of flag to save
++AC_DEFUN([_AX_SAVE_FLAGS_LIST],[dnl
++[CCASFLAGS],dnl
++[CFLAGS],dnl
++[CPPFLAGS],dnl
++[CXXFLAGS],dnl
++[ERLCFLAGS],dnl
++[FCFLAGS],dnl
++[FCLIBS],dnl
++[FFLAGS],dnl
++[FLIBS],dnl
++[GCJFLAGS],dnl
++[JAVACFLAGS],dnl
++[LDFLAGS],dnl
++[LIBS],dnl
++[OBJCFLAGS],dnl
++[OBJCXXFLAGS],dnl
++[UPCFLAGS],dnl
++[VALAFLAGS]dnl
++])
++
++# save one flag in name space
++AC_DEFUN([_AX_SAVE_ONE_FLAG],[
++ AS_VAR_PUSHDEF([_ax_save_flag_var], [$2[]_$1[]_ax_save_flags])
++ AS_VAR_COPY(_ax_save_flag_var, $2[])
++ AS_VAR_POPDEF([_ax_save_flag_var])
++])
++
++AC_DEFUN([AX_SAVE_FLAGS],[dnl
++ m4_foreach([FLAG], dnl
++ [_AX_SAVE_FLAGS_LIST()], dnl
++ [_AX_SAVE_ONE_FLAG([$1],FLAG)])
++])
+diff --git a/saml/Makefile.am b/saml/Makefile.am
+index 11ca189..4bf10b1 100644
+--- a/saml/Makefile.am
++++ b/saml/Makefile.am
+@@ -197,11 +197,13 @@ libsaml_la_CPPFLAGS = \
+ $(BOOST_CPPFLAGS) \
+ $(PTHREAD_CFLAGS) \
+ $(zlib_CFLAGS) \
++ $(xerces_CFLAGS) \
+ $(xmltooling_CFLAGS) \
+ $(log4shib_CFLAGS) $(log4cpp_CFLAGS)
+ libsaml_la_LIBADD = \
+ $(PTHREAD_LIBS) \
+ $(zlib_LIBS) \
++ $(xerces_LIBS) \
+ $(xmltooling_LIBS) \
+ $(log4shib_LIBS) $(log4cpp_LIBS)
+
+diff --git a/samlsign/Makefile.am b/samlsign/Makefile.am
+index 9181a20..a8a403e 100644
+--- a/samlsign/Makefile.am
++++ b/samlsign/Makefile.am
+@@ -6,9 +6,11 @@ samlsign_SOURCES = samlsign.cpp
+
+ samlsign_LDADD = $(top_builddir)/saml/libsaml.la
+ samlsign_CPPFLAGS = \
++ $(xerces_CFLAGS) \
+ $(xmltooling_CFLAGS) \
+ $(log4shib_CFLAGS) $(log4cpp_CFLAGS)
+ samlsign_LDADD += \
++ $(xerces_LIBS) \
+ $(xmltooling_LIBS) \
+ $(log4shib_LIBS) $(log4cpp_LIBS)
+
+diff --git a/samltest/Makefile.am b/samltest/Makefile.am
+index 37cb576..d70dabc 100644
+--- a/samltest/Makefile.am
++++ b/samltest/Makefile.am
+@@ -122,8 +122,10 @@ $(nodist_samltest_SOURCES): %.cpp: %.h
+ $(MAKE) do-cxxtestgen HFILE=$< CPPFILE=$@
+
+ samltest_CPPFLAGS = \
++ $(xerces_CFLAGS) \
+ $(xmltooling_CFLAGS)
+ samltest_LDADD = $(top_builddir)/saml/libsaml.la \
++ $(xerces_LIBS) \
+ $(xmltooling_LIBS)
+
+ EXTRA_DIST = data
diff --git a/debian/patches/Use-pkg-config-for-xmlsec.patch b/debian/patches/Use-pkg-config-for-xmlsec.patch
new file mode 100644
index 0000000..ef7ccfd
--- /dev/null
+++ b/debian/patches/Use-pkg-config-for-xmlsec.patch
@@ -0,0 +1,81 @@
+From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi at niif.hu>
+Date: Mon, 11 Jul 2016 12:27:49 +0200
+Subject: Use pkg-config for xmlsec
+
+---
+ configure.ac | 25 +------------------------
+ saml/Makefile.am | 2 ++
+ samltest/Makefile.am | 2 ++
+ 3 files changed, 5 insertions(+), 24 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index a608fd4..077a18c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -113,30 +113,7 @@ AC_COMPILE_IFELSE(
+ AX_RESTORE_FLAGS
+
+ # XML-Security settings
+-AC_ARG_WITH(xmlsec,
+- AS_HELP_STRING([--with-xmlsec=PATH],[where xmlsec is installed]),,
+- [with_xmlsec=/usr])
+-if test x_$with_xmlsec != x_/usr; then
+- CPPFLAGS="-I${with_xmlsec}/include $CPPFLAGS"
+- LIBS="-L${with_xmlsec}/lib -lxml-security-c $LIBS"
+-else
+- LIBS="-lxml-security-c $LIBS"
+-fi
+-AC_CHECK_HEADER([xsec/utils/XSECPlatformUtils.hpp],,AC_MSG_ERROR([unable to find xmlsec header files]))
+-AC_MSG_CHECKING([XML-Security version])
+-AC_PREPROC_IFELSE(
+- [AC_LANG_PROGRAM([#include <xsec/utils/XSECPlatformUtils.hpp>],
+- [#if XSEC_VERSION_MAJOR > 1 || (XSEC_VERSION_MAJOR == 1 && XSEC_VERSION_MEDIUM > 3)
+-int i = 0;
+-#else
+-#error need version 1.4.0 or later
+-#endif])],
+- [AC_MSG_RESULT(OK)],
+- [AC_MSG_FAILURE([XML-Security version 1.4.0 or greater is required.])])
+-AC_LINK_IFELSE(
+- [AC_LANG_PROGRAM([[#include <xsec/utils/XSECPlatformUtils.hpp>]],
+- [[XSECPlatformUtils::Initialise()]])],,
+- [AC_MSG_ERROR([unable to link with XML-Security])])
++AX_PKG_CHECK_MODULES([xmlsec],,[xml-security-c >= 1.4])
+
+ AX_PKG_CHECK_MODULES([xmltooling],,[xmltooling >= 1.4])
+ PKG_CHECK_VAR([DX_INCLUDE], [xmltooling], [includedir])
+diff --git a/saml/Makefile.am b/saml/Makefile.am
+index 4bf10b1..10da0b6 100644
+--- a/saml/Makefile.am
++++ b/saml/Makefile.am
+@@ -198,12 +198,14 @@ libsaml_la_CPPFLAGS = \
+ $(PTHREAD_CFLAGS) \
+ $(zlib_CFLAGS) \
+ $(xerces_CFLAGS) \
++ $(xmlsec_CFLAGS) \
+ $(xmltooling_CFLAGS) \
+ $(log4shib_CFLAGS) $(log4cpp_CFLAGS)
+ libsaml_la_LIBADD = \
+ $(PTHREAD_LIBS) \
+ $(zlib_LIBS) \
+ $(xerces_LIBS) \
++ $(xmlsec_LIBS) \
+ $(xmltooling_LIBS) \
+ $(log4shib_LIBS) $(log4cpp_LIBS)
+
+diff --git a/samltest/Makefile.am b/samltest/Makefile.am
+index d70dabc..a0c933e 100644
+--- a/samltest/Makefile.am
++++ b/samltest/Makefile.am
+@@ -123,9 +123,11 @@ $(nodist_samltest_SOURCES): %.cpp: %.h
+
+ samltest_CPPFLAGS = \
+ $(xerces_CFLAGS) \
++ $(xmlsec_CFLAGS) \
+ $(xmltooling_CFLAGS)
+ samltest_LDADD = $(top_builddir)/saml/libsaml.la \
+ $(xerces_LIBS) \
++ $(xmlsec_LIBS) \
+ $(xmltooling_LIBS)
+
+ EXTRA_DIST = data
diff --git a/debian/patches/Use-pkg-config-for-zlib-and-openssl.patch b/debian/patches/Use-pkg-config-for-zlib-and-openssl.patch
new file mode 100644
index 0000000..a27d933
--- /dev/null
+++ b/debian/patches/Use-pkg-config-for-zlib-and-openssl.patch
@@ -0,0 +1,102 @@
+From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi at niif.hu>
+Date: Mon, 11 Jul 2016 11:46:29 +0200
+Subject: Use pkg-config for zlib and openssl
+
+---
+ configure.ac | 61 ++------------------------------------------------------
+ saml/Makefile.am | 4 ++++
+ 2 files changed, 6 insertions(+), 59 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 16be5c8..803bed1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -76,67 +76,10 @@ ACX_PTHREAD(
+ [AC_MSG_ERROR([unable to find pthreads, currently this is required])])
+
+ # zlib settings
+-AC_ARG_WITH(zlib,
+- AS_HELP_STRING([--with-zlib=PATH],[where zlib is installed]),
+- [
+- if test -d "$withval" ; then
+- CPPFLAGS="${CPPFLAGS} -I$withval/include"
+- LDFLAGS="${LDFLAGS} -L$withval/lib"
+- fi
+- ]
+-)
+-
+-AC_ARG_WITH(zlib,
+- AS_HELP_STRING([--with-zlib=PATH],[where zlib is installed]),,
+- [with_zlib=/usr])
+-if test x_$with_zlib != x_/usr; then
+- CPPFLAGS="-I${with_zlib}/include $CPPFLAGS"
+- LIBS="-L${with_zlib}/lib -lz $LIBS"
+-else
+- LIBS="-lz $LIBS"
+-fi
+-
+-AC_CHECK_HEADER([zlib.h],,AC_MSG_ERROR([unable to find zlib header files]))
+-AC_LINK_IFELSE(
+- [AC_LANG_PROGRAM([[#include <zlib.h>]],
+- [[zlibVersion()]])],,
+- [AC_MSG_ERROR([unable to link with zlib])])
+-
++AX_PKG_CHECK_MODULES([zlib],,[zlib])
+
+ # OpenSSL settings
+-AC_ARG_WITH(openssl,
+- AS_HELP_STRING([--with-openssl=PATH],[where openssl is installed]),
+- [if test x_$with_openssl != x_/usr; then
+- SSLFLAGS="-I${with_openssl}/include"
+- SSLLIBS="-L${with_openssl}/lib -lcrypto -lssl"
+- else
+- SSLLIBS="-lcrypto -lssl"
+- fi])
+-
+-if test "x$with_openssl" = "x" ; then
+- AC_PATH_PROG(PKG_CONFIG, pkg-config)
+- if test "x$PKG_CONFIG" != x && test "x$PKG_CONFIG" != "xno" ; then
+- if pkg-config openssl ; then
+- SSLLIBS="`$PKG_CONFIG --libs openssl`"
+- SSLFLAGS="`$PKG_CONFIG --cflags openssl`"
+- else
+- AC_MSG_WARN([OpenSSL not supported by pkg-config, try --with-openssl instead])
+- fi
+- fi
+-fi
+-
+-if test "x$SSLLIBS" = "x" ; then
+- SSLLIBS="-lcrypto -lssl"
+-fi
+-
+-AC_MSG_CHECKING(for OpenSSL cflags)
+-AC_MSG_RESULT($SSLFLAGS)
+-CPPFLAGS="$SSLFLAGS $CPPFLAGS"
+-AC_MSG_CHECKING(for OpenSSL libraries)
+-AC_MSG_RESULT($SSLLIBS)
+-LIBS="$LIBS $SSLLIBS"
+-
+-AC_CHECK_HEADER([openssl/x509.h],,AC_MSG_ERROR([unable to find openssl header files]))
++AX_PKG_CHECK_MODULES([openssl],,[openssl])
+
+ AC_LANG([C++])
+
+diff --git a/saml/Makefile.am b/saml/Makefile.am
+index 9a137c2..77a63c5 100644
+--- a/saml/Makefile.am
++++ b/saml/Makefile.am
+@@ -196,10 +196,14 @@ libsaml_la_LDFLAGS = -version-info 9:0:0
+ libsaml_la_CPPFLAGS = \
+ $(BOOST_CPPFLAGS) \
+ $(PTHREAD_CFLAGS) \
++ $(zlib_CFLAGS) \
++ $(openssl_CFLAGS) \
+ $(xmltooling_CFLAGS) \
+ $(log4shib_CFLAGS) $(log4cpp_CFLAGS)
+ libsaml_la_LIBADD = \
+ $(PTHREAD_LIBS) \
++ $(zlib_LIBS) \
++ $(openssl_LIBS) \
+ $(xmltooling_LIBS) \
+ $(log4shib_LIBS) $(log4cpp_LIBS)
+
diff --git a/debian/patches/We-don-t-use-OpenSSL-directly.patch b/debian/patches/We-don-t-use-OpenSSL-directly.patch
new file mode 100644
index 0000000..961bda6
--- /dev/null
+++ b/debian/patches/We-don-t-use-OpenSSL-directly.patch
@@ -0,0 +1,41 @@
+From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi at niif.hu>
+Date: Mon, 11 Jul 2016 11:48:11 +0200
+Subject: We don't use OpenSSL directly
+
+---
+ configure.ac | 3 ---
+ saml/Makefile.am | 2 --
+ 2 files changed, 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 803bed1..cc32f7e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -78,9 +78,6 @@ ACX_PTHREAD(
+ # zlib settings
+ AX_PKG_CHECK_MODULES([zlib],,[zlib])
+
+-# OpenSSL settings
+-AX_PKG_CHECK_MODULES([openssl],,[openssl])
+-
+ AC_LANG([C++])
+
+ # C++ requirements
+diff --git a/saml/Makefile.am b/saml/Makefile.am
+index 77a63c5..11ca189 100644
+--- a/saml/Makefile.am
++++ b/saml/Makefile.am
+@@ -197,13 +197,11 @@ libsaml_la_CPPFLAGS = \
+ $(BOOST_CPPFLAGS) \
+ $(PTHREAD_CFLAGS) \
+ $(zlib_CFLAGS) \
+- $(openssl_CFLAGS) \
+ $(xmltooling_CFLAGS) \
+ $(log4shib_CFLAGS) $(log4cpp_CFLAGS)
+ libsaml_la_LIBADD = \
+ $(PTHREAD_LIBS) \
+ $(zlib_LIBS) \
+- $(openssl_LIBS) \
+ $(xmltooling_LIBS) \
+ $(log4shib_LIBS) $(log4cpp_LIBS)
+
diff --git a/debian/patches/series b/debian/patches/series
index 14813fe..e4c2d8a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,9 @@ Disable-forcing-of-libtool-silent.patch
Use-pkg-config-for-log4shib-log4cpp.patch
Use-pkg-config-for-xmltooling.patch
Use-readdir-for-portability-no-PATH_MAX.patch
+Propagate-requirements-into-our-pkg-config-file.patch
+Localize-Boost-and-pthread-library-flags.patch
+Use-pkg-config-for-zlib-and-openssl.patch
+We-don-t-use-OpenSSL-directly.patch
+Use-pkg-config-for-Xerces.patch
+Use-pkg-config-for-xmlsec.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/opensaml2.git
More information about the Pkg-shibboleth-devel
mailing list