build: Provide libgcrypt.pc, generated by configure.
authorNIIBE Yutaka <gniibe@fsij.org>
Wed, 24 Oct 2018 05:57:53 +0000 (14:57 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Wed, 24 Oct 2018 05:59:33 +0000 (14:59 +0900)
* configure.ac: Generate src/libgcrypt.pc.
* src/Makefile.am (pkgconfigdir, pkgconfig_DATA): New.
(EXTRA_DIST): Add libgcrypt.pc.in.
* src/libgcrypt-config.in: Use @PACKAGE_VERSION@.
* src/libgcrypt.pc.in: New.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
configure.ac
src/Makefile.am
src/libgcrypt-config.in
src/libgcrypt.pc.in [new file with mode: 0644]

index 7658f6c..cdce339 100644 (file)
@@ -2670,6 +2670,7 @@ doc/Makefile
 src/Makefile
 src/gcrypt.h
 src/libgcrypt-config
+src/libgcrypt.pc
 src/versioninfo.rc
 tests/Makefile
 ])
index 3cc4a55..82d6e8a 100644 (file)
 
 ## Process this file with automake to produce Makefile.in
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libgcrypt.pc
+
 EXTRA_DIST = libgcrypt-config.in libgcrypt.m4 libgcrypt.vers \
-             gcrypt.h.in libgcrypt.def
+             gcrypt.h.in libgcrypt.def libgcrypt.pc.in
 
 bin_SCRIPTS = libgcrypt-config
 m4datadir = $(datadir)/aclocal
index c052638..f7a13af 100644 (file)
@@ -14,7 +14,7 @@
 # General.
 prefix="@prefix@"
 exec_prefix="@exec_prefix@"
-version="@VERSION@"
+version="@PACKAGE_VERSION@"
 includedir="@includedir@"
 libdir="@libdir@"
 gpg_error_libs="@GPG_ERROR_LIBS@"
diff --git a/src/libgcrypt.pc.in b/src/libgcrypt.pc.in
new file mode 100644 (file)
index 0000000..5472da5
--- /dev/null
@@ -0,0 +1,17 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+includedir=@includedir@
+libdir=@libdir@
+host=@LIBGCRYPT_CONFIG_HOST@
+api_version=@LIBGCRYPT_CONFIG_API_VERSION@
+symmetric_ciphers="@LIBGCRYPT_CIPHERS@"
+asymmetric_ciphers="@LIBGCRYPT_PUBKEY_CIPHERS@"
+digests="@LIBGCRYPT_DIGESTS@"
+
+Name: libgcrypt
+Description: General purpose cryptographic library
+Requires: gpg-error
+Version: @PACKAGE_VERSION@
+Cflags: @LIBGCRYPT_CONFIG_CFLAGS@
+Libs: @LIBGCRYPT_CONFIG_LIB@
+URL: https://www.gnupg.org/software/libgcrypt/index.html