summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2010-04-30 17:20:14 +0000
committerMarc-André Lemburg <mal@egenix.com>2010-04-30 17:20:14 +0000
commit91f4938d6a8ef477c545b708c614833de22542a7 (patch)
tree15e41de64cd9d876502d960c19000f3b7eb41c07 /configure.in
parent320ccc165c655ae4e0b5758a2a5d2fc2db2d21d5 (diff)
downloadcpython-91f4938d6a8ef477c545b708c614833de22542a7.tar.gz
[issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS
Only override the AC_PROG_CC determined CFLAGS if they were set by the user. This restores the default behavior in the common case of not having CFLAGS defined when running configure.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in9
1 files changed, 7 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 8e19ec23e0..4def2d42b8 100644
--- a/configure.in
+++ b/configure.in
@@ -531,9 +531,14 @@ then
(it is also a good idea to do 'make clean' before compiling)])
fi
-save_CFLAGS=$CFLAGS
+# If the user set CFLAGS, use this instead of the automatically
+# determined setting
+preset_cflags="$CFLAGS"
AC_PROG_CC
-CFLAGS=$save_CFLAGS
+if test ! -z "$preset_cflags"
+then
+ CFLAGS=$preset_cflags
+fi
AC_SUBST(CXX)
AC_SUBST(MAINCC)