From f22c47ec12b8c3987d8f1d674e7b2283b64151ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Tue, 4 Mar 2008 20:10:55 +0100
Subject: [PATCH] Bundles may now use pkgconfig.

Rev: src/configure.in:1.1046
---
 src/configure.in | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/configure.in b/src/configure.in
index bb74d68143..b413fe6078 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -1,4 +1,4 @@
-AC_REVISION("$Id: configure.in,v 1.1045 2008/03/04 18:34:32 grubba Exp $")
+AC_REVISION("$Id: configure.in,v 1.1046 2008/03/04 19:10:55 grubba Exp $")
 AC_INIT(interpret.c)
 AC_CONFIG_HEADER(machine.h)
 
@@ -2361,7 +2361,7 @@ if test "x$PIKE_PATH_TRANSLATE" = "x"; then
     # MinGW system.
     cat <<\EOF
 #!/bin/sh
-# Automatically generated by $Id: configure.in,v 1.1045 2008/03/04 18:34:32 grubba Exp $.
+# Automatically generated by $Id: configure.in,v 1.1046 2008/03/04 19:10:55 grubba Exp $.
 # MinGW-version. Do NOT edit.
 posix_name="`cat`"
 posix_prefix="/"
@@ -2399,7 +2399,7 @@ EOF
     # Native POSIX system.
   cat <<\EOF
 #!/bin/sh
-# Automatically generated by $Id: configure.in,v 1.1045 2008/03/04 18:34:32 grubba Exp $.
+# Automatically generated by $Id: configure.in,v 1.1046 2008/03/04 19:10:55 grubba Exp $.
 # POSIX-version. Do NOT edit.
 cat
 EOF
@@ -2408,7 +2408,7 @@ else
   # rntcl-style
   cat <<\EOF
 #!/bin/sh
-# Automatically generated by $Id: configure.in,v 1.1045 2008/03/04 18:34:32 grubba Exp $.
+# Automatically generated by $Id: configure.in,v 1.1046 2008/03/04 19:10:55 grubba Exp $.
 # RNTCL-version. Do NOT edit.
 sed -e "$PIKE_PATH_TRANSLATE"
 EOF
@@ -8475,6 +8475,14 @@ $bundle_info])
       fi
       $RANLIB $f
     done
+    # Update with flags from pkgconfig.
+    pc="${pike_bundle_prefix}/lib/pkgconfig/$bundle.pc"
+    if test -f "$pc"; then
+      echo "Updating CPPFLAGS with stuff from pkgconfig."
+      CPPFLAGS="$CPPFLAGS `for x in \`sed -e '/^$/q' < "$pc"\`; do eval $x; done; eval \`sed -ne 's/^Cflags: /echo /p' < "$pc"\``"
+    else
+      :
+    fi
     # Clear the caches.
     echo Clearing cached variables related to the bundles.
     for varname in `cat $bundle_info|sed -e 's/^[[ 	]]*//'|sort|uniq` no; do
-- 
GitLab