build: Provide ntbtls.pc, generated by configure.
authorNIIBE Yutaka <gniibe@fsij.org>
Wed, 24 Oct 2018 07:06:38 +0000 (16:06 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Wed, 24 Oct 2018 07:06:38 +0000 (16:06 +0900)
* configure.ac (PACKAGE, VERSION): Remove.
Generate src/ntbtls.pc.
* src/Makefile.am (pkgconfigdir, pkgconfig_DATA): New.
(EXTRA_DIST): Add ntbtls.pc.in.
* src/ntbtls-config.in: Use @PACKAGE_VERSION@.
* src/ntbtls.pc.in: New.

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

index d149c62..af15467 100644 (file)
@@ -72,9 +72,6 @@ NEED_KSBA_VERSION=1.2.0
 
 # End of config section
 
-PACKAGE=$PACKAGE_NAME
-VERSION=$PACKAGE_VERSION
-
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_SRCDIR([src/ntbtls.h.in])
 AC_CONFIG_HEADER([config.h])
@@ -91,20 +88,12 @@ use_zip=yes
 AC_SUBST(LIBNTBTLS_LT_CURRENT)
 AC_SUBST(LIBNTBTLS_LT_AGE)
 AC_SUBST(LIBNTBTLS_LT_REVISION)
-AC_SUBST(PACKAGE)
-AC_SUBST(PACKAGE_GT)
-AC_SUBST(VERSION)
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package])
-AC_DEFINE_UNQUOTED(PACKAGE_GT, "$PACKAGE_GT",
-                                [Name of this package for gettext])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
+
 VERSION_NUMBER=m4_esyscmd(printf "0x%02x%02x%02x" mym4_major \
                           mym4_minor mym4_micro)
 AC_SUBST(VERSION_NUMBER)
 
 
-AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "$PACKAGE_BUGREPORT",
-                                        [Bug report address])
 AC_DEFINE_UNQUOTED(NEED_LIBGCRYPT_VERSION, "$NEED_LIBGCRYPT_VERSION",
                                        [Required version of Libgcrypt])
 AC_DEFINE_UNQUOTED(NEED_KSBA_VERSION, "$NEED_KSBA_VERSION",
@@ -682,6 +671,7 @@ m4/Makefile
 src/Makefile
 src/ntbtls.h
 src/ntbtls-config
+src/ntbtls.pc
 src/versioninfo.rc
 ])
 AC_CONFIG_COMMANDS([ntbtls-conf],[[
index 8e8b63d..73262ba 100644 (file)
 
 ## Process this file with automake to produce Makefile.in
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = ntbtls.pc
+
 EXTRA_DIST = ntbtls.h.in ntbtls.m4 libntbtls.vers libntbtls.def \
-             versioninfo.rc.in
+             versioninfo.rc.in ntbtls.pc.in
 bin_SCRIPTS = ntbtls-config
 include_HEADERS = ntbtls.h
 lib_LTLIBRARIES = libntbtls.la
index a9510a4..c29586c 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/ntbtls.pc.in b/src/ntbtls.pc.in
new file mode 100644 (file)
index 0000000..89ab645
--- /dev/null
@@ -0,0 +1,14 @@
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+includedir="@includedir@"
+libdir="@libdir@"
+host="@NTBTLS_CONFIG_HOST@"
+api_version="@NTBTLS_CONFIG_API_VERSION@"
+
+Name: ntbtls
+Description: The Not Too Bad TLS Library
+Requires: gpg-error
+Version: @PACKAGE_VERSION@
+Cflags: @NTBTLS_CONFIG_CFLAGS@
+Libs: @NTBTLS_CONFIG_LIBS@
+URL: https://www.gnupg.org/software/ntbtls/index.html