build: Provide npth.pc, generated by configure.
authorNIIBE Yutaka <gniibe@fsij.org>
Wed, 24 Oct 2018 07:32:11 +0000 (16:32 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Wed, 24 Oct 2018 07:34:48 +0000 (16:34 +0900)
* configure.ac: Generate npth.pc.
* Makefile.am (pkgconfigdir, pkgconfig_DATA): New.
(EXTRA_DIST): Add npth.pc.in.
* npth-config.in: Use @PACKAGE_VERSION@.
* npth.pc.in: New.

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

index 9a4ee72..c87673a 100644 (file)
 
 ACLOCAL_AMFLAGS = -I m4
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = npth.pc
+
 EXTRA_DIST = npth-config.in npth.m4 npth.spec.in autogen.sh autogen.rc \
-             HACKING VERSION
+             HACKING VERSION npth.pc.in
 bin_SCRIPTS = npth-config
 m4datadir = $(datadir)/aclocal
 m4data_DATA = npth.m4
index d0084ac..32bf5ea 100644 (file)
@@ -357,6 +357,7 @@ fi
 # Write output
 #
 AC_CONFIG_FILES([Makefile
+npth.pc
 src/npth.h
 src/Makefile
 w32/Makefile
index c3acfe5..1f3a113 100644 (file)
@@ -71,7 +71,7 @@ while test $# -gt 0; do
            with_glib=yes
            ;;
         --version)
-            echo "@VERSION@"
+            echo "@PACKAGE_VERSION@"
            exit 0
            ;;
         --api-version)
diff --git a/npth.pc.in b/npth.pc.in
new file mode 100644 (file)
index 0000000..219fa71
--- /dev/null
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+api_version=@NPTH_CONFIG_API_VERSION@
+host=@NPTH_CONFIG_HOST@
+
+Name: npth
+Description: New GNU Portable Threads Library
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} @NPTH_CONFIG_LIBS@
+Cflags: -I${includedir} @NPTH_CONFIG_CFLAGS@
+URL: https://www.gnupg.org/software/npth/index.html