# HG changeset patch
# User Hugh McMaster <hugh.mcmaster@outlook.com>
# Date 1565271962 -36000
#      Thu Aug 08 23:46:02 2019 +1000
# Node ID 93c8fcc2cab4b76df8ff1876cba662aab34a564e
# Parent  bc1bba5df9bf22eeef380988868b2ce046f60f89
Generate and install a pkg-config file for the gmp library

diff -r bc1bba5df9bf -r 93c8fcc2cab4 Makefile.am
--- a/Makefile.am	Thu Aug 08 12:15:59 2019 +0200
+++ b/Makefile.am	Thu Aug 08 23:46:02 2019 +1000
@@ -115,6 +115,9 @@
 EXTRA_DIST = configfsf.guess configfsf.sub .gdbinit INSTALL.autoconf \
 	     COPYING.LESSERv3 COPYINGv2 COPYINGv3
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = gmp.pc
+
 # Put asl.h here for now.
 EXTRA_DIST += asl.h
 
diff -r bc1bba5df9bf -r 93c8fcc2cab4 configure.ac
--- a/configure.ac	Thu Aug 08 12:15:59 2019 +0200
+++ b/configure.ac	Thu Aug 08 23:46:02 2019 +1000
@@ -3960,7 +3960,7 @@
   tests/cxx/Makefile							\
   doc/Makefile tune/Makefile						\
   demos/Makefile demos/calc/Makefile demos/expr/Makefile		\
-  gmp.h:gmp-h.in)
+  gmp.h:gmp-h.in gmp.pc:gmp.pc.in)
 
 AC_MSG_NOTICE([summary of build options:
 
diff -r bc1bba5df9bf -r 93c8fcc2cab4 gmp.pc.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gmp.pc.in	Thu Aug 08 23:46:02 2019 +1000
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+includedir=@includedir@
+libdir=@libdir@
+
+Name: @PACKAGE_NAME@
+Description: GNU Multiple Precision Arithmetic Library
+URL: https://gmplib.org
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lgmp
