[cpp-sp] 04/17: Add pkg-config files for libshibsp and libshibsp-lite
Scott Cantor
cantor.2 at osu.edu
Wed Jun 27 20:35:45 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=42e696ecffb7d0f4dba641e07f5af8124de28851
commit 42e696ecffb7d0f4dba641e07f5af8124de28851
Author: Ferenc Wágner <wferi at niif.hu>
AuthorDate: Thu Jul 14 14:23:33 2016 +0200
Add pkg-config files for libshibsp and libshibsp-lite
---
Makefile.am | 2 ++
configure.ac | 3 +-
m4/ax_pkg_check_modules.m4 | 69 ++++++++++++++++++++++++++++++++++++++++++++++
shibsp-lite.pc.in | 13 +++++++++
shibsp.pc.in | 13 +++++++++
5 files changed, 99 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 671961c..50c3652 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,6 +32,8 @@ else
all-local:
endif
+pkgconfig_DATA = shibsp.pc shibsp-lite.pc
+
GENFILES = @PACKAGE_NAME at .spec
EXTRA_DIST = $(DX_CONFIG) \
diff --git a/configure.ac b/configure.ac
index f5e13b6..6aea6da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,6 +6,7 @@ AC_CONFIG_MACRO_DIR(m4)
AM_INIT_AUTOMAKE
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
+PKG_INSTALLDIR
# Docygen features
DX_HTML_FEATURE(ON)
@@ -32,7 +33,7 @@ else
fi
AC_CONFIG_HEADERS([config.h shibsp/config_pub.h])
-AC_CONFIG_FILES([shibboleth.spec])
+AC_CONFIG_FILES([shibsp.pc shibsp-lite.pc shibboleth.spec])
AC_PROG_CC([gcc gcc3 cc])
AC_PROG_CXX([g++ g++3 c++ CC])
diff --git a/m4/ax_pkg_check_modules.m4 b/m4/ax_pkg_check_modules.m4
new file mode 100644
index 0000000..0ddaad8
--- /dev/null
+++ b/m4/ax_pkg_check_modules.m4
@@ -0,0 +1,69 @@
+# ===========================================================================
+# https://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 4 (changed as https://bugs.freedesktop.org/show_bug.cgi?id=87154)
+
+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 m4_normalize($2)"
+ ax_package_requires_private="$[]ax_package_requires_private m4_normalize($3)"
+ $4],[$5])
+
+ # Substitute output.
+ AC_SUBST(ax_package_requires)
+ AC_SUBST(ax_package_requires_private)
+])dnl AX_PKG_CHECK_MODULES
diff --git a/shibsp-lite.pc.in b/shibsp-lite.pc.in
new file mode 100644
index 0000000..40f53bc
--- /dev/null
+++ b/shibsp-lite.pc.in
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: @PACKAGE_NAME@ (lite version)
+Description: Shibboleth Service Provider library (lite version)
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lshibsp-lite
+Libs.private: @PTHREAD_LIBS@
+Cflags: -I${includedir} @BOOST_CPPFLAGS@ @PTHREAD_CFLAGS@
+Requires: @SHIBSP_LITE_REQUIRES@
+Requires.private: @SHIBSP_LITE_REQUIRES_PRIVATE@
diff --git a/shibsp.pc.in b/shibsp.pc.in
new file mode 100644
index 0000000..236557b
--- /dev/null
+++ b/shibsp.pc.in
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: @PACKAGE_NAME@
+Description: Shibboleth Service Provider library
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lshibsp
+Libs.private: @PTHREAD_LIBS@
+Cflags: -I${includedir} @BOOST_CPPFLAGS@ @PTHREAD_CFLAGS@
+Requires: @SHIBSP_REQUIRES@ @SHIBSP_LITE_REQUIRES@
+Requires.private: @SHIBSP_REQUIRES_PRIVATE@ @SHIBSP_LITE_REQUIRES_PRIVATE@
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list