From b79def59c1f2857e73e6b6e33c748c1da051be91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Tue, 9 Feb 2016 17:40:50 +0100
Subject: [PATCH] Build [Gmp]: Try using pkg-config to find gmp and mpfr.

Solaris 11 installs the header files for gmp and mpfr in sub-
directories of /usr/include/, but it also installs corresponding
pkg-config files. Use pkg-config to adjust the search paths so
that the following configure tests can find the header files.
---
 src/configure.in | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/configure.in b/src/configure.in
index 673034aba4..57e75c1790 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -594,7 +594,12 @@ if test "x$pike_cv_sys_os" = xWindows_NT; then
   PIKE_FUNCS_NEED_DECLS(yes)
 fi
 
-AC_CHECK_HEADERS(stdlib.h string.h unistd.h sys/stat.h sys/types.h sys/errno.h)
+# NB: We need to have gmp.h in the search path for the entirety of Pike,
+#     since gmp.h is included by bignum.h, which in turn is included
+#     by much of Pike.
+PIKE_PKG_CONFIG(libgmp)
+
+AC_CHECK_HEADERS(gmp.h stdlib.h string.h unistd.h sys/stat.h sys/types.h sys/errno.h)
 
 if test "$GCC" = "yes"; then :; else
 #
-- 
GitLab