summaryrefslogtreecommitdiff
path: root/dev-libs/skalibs/files/skalibs-2.11.1.0-respect-user-provided-flags.patch
blob: 3092d86f3f6e281359284bb404542f6d8c5298d8 (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
30
31
32
33
From: Laurent Bercot <ska-skaware@skarnet.org>
Date: Mon, 24 Jan 2022 11:44:29 +0000
Subject: [PATCH]  Apply user-provided CPPFLAGS, CFLAGS and LDFLAGS during
 autodetection

Upstream-commit: d9f541c2b3af (" Apply user-provided CPPFLAGS, CFLAGS and LDFLAGS during autodetection")
See-also: http://skarnet.org/lists/skaware/1656.html
---
diff --git a/configure b/configure
index 1aa8fc7..430e57e 100755
--- a/configure
+++ b/configure
@@ -99,7 +99,7 @@ stripdir () {
 tryflag () {
   echo "Checking whether compiler accepts $2 ..."
   echo "typedef int x;" > "$tmpc"
-  if $CC_AUTO "$2" -c -o "$tmpo" "$tmpc" >/dev/null 2>&1 ; then
+  if $CC_AUTO $CPPFLAGS_POST $CFLAGS_POST "$2" -c -o "$tmpo" "$tmpc" >/dev/null 2>&1 ; then
     echo "  ... yes"
     eval "$1=\"\${$1} \$2\""
     eval "$1=\${$1# }"
@@ -113,7 +113,7 @@ tryflag () {
 tryldflag () {
   echo "Checking whether linker accepts $2 ..."
   echo "typedef int x;" > "$tmpc"
-  if $CC_AUTO -nostdlib "$2" -o "$tmpe" "$tmpc" >/dev/null 2>&1 ; then
+  if $CC_AUTO $CPPFLAGS_POST $CFLAGS_POST $LDFLAGS_POST -nostdlib "$2" -o "$tmpe" "$tmpc" >/dev/null 2>&1 ; then
     echo "  ... yes"
     eval "$1=\"\${$1} \$2\""
     eval "$1=\${$1# }"
-- 
2.34.1