aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/mozilla/fennec/cross-config.patch
blob: 7eaba89c45f1f9c3d472fa8e539ed5e830269679 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
We need to override setting variables so we check if the vars are already
set then we do not reset them here

-Khem

Index: mozilla-central/build/autoconf/pkg.m4
===================================================================
--- mozilla-central.orig/build/autoconf/pkg.m4
+++ mozilla-central/build/autoconf/pkg.m4
@@ -23,12 +23,16 @@ AC_DEFUN([PKG_CHECK_MODULES],
             succeeded=yes
 
             AC_MSG_CHECKING($1_CFLAGS)
-            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
+            if test -z "$$1_CFLAGS"; then
+                $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
+            fi
             AC_MSG_RESULT($$1_CFLAGS)
 
             AC_MSG_CHECKING($1_LIBS)
-            ## Remove evil flags like -Wl,--export-dynamic
-            $1_LIBS="`$PKG_CONFIG --libs \"$2\" |sed s/-Wl,--export-dynamic//g`"
+            if test -z "$$1_LIBS"; then
+                ## Remove evil flags like -Wl,--export-dynamic
+                $1_LIBS="`$PKG_CONFIG --libs \"$2\" |sed s/-Wl,--export-dynamic//g`"
+            fi
             AC_MSG_RESULT($$1_LIBS)
         else
             $1_CFLAGS=""