about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2022-01-24 11:44:29 +0000
committerLaurent Bercot <ska@appnovation.com>2022-01-24 11:44:29 +0000
commitd9f541c2b3af552232eb55c114aaefda31b80f8d (patch)
tree33a32d67ca0f7593c1a0eec3d5cfdbdbfdaae3cf
parent36224a4bbef03c097dfdb25bca731512fedba340 (diff)
downloadskalibs-d9f541c2b3af552232eb55c114aaefda31b80f8d.tar.gz
skalibs-d9f541c2b3af552232eb55c114aaefda31b80f8d.tar.xz
skalibs-d9f541c2b3af552232eb55c114aaefda31b80f8d.zip
Apply user-provided CPPFLAGS, CFLAGS and LDFLAGS during autodetection
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r--AUTHORS1
-rwxr-xr-xconfigure4
2 files changed, 3 insertions, 2 deletions
diff --git a/AUTHORS b/AUTHORS
index 73de78c..c0410d2 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -12,6 +12,7 @@ Contributors:
   John Regan <john@jrjrtech.com>
   Shengjing Zhu <zhsj@debian.org>
   Colin Booth <colin@heliocat.net>
+  Petr Vaněk <arkamar@atlas.cz>
 
 Thanks to:
   Jean Marot <jean.marot@skarnet.org>
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# }"