diff options
author | Marc-André Lemburg <mal@egenix.com> | 2010-04-30 17:20:14 (GMT) |
---|---|---|
committer | Marc-André Lemburg <mal@egenix.com> | 2010-04-30 17:20:14 (GMT) |
commit | 6d5e579cc5e349fe7e8185a821434d718db2c6ea (patch) | |
tree | 5a1822f2e99a1ca092c4851b506f54d746df21ad /configure | |
parent | 9663ddaa74800581efd3f008bac1735d43c07d81 (diff) | |
download | cpython-6d5e579cc5e349fe7e8185a821434d718db2c6ea.zip cpython-6d5e579cc5e349fe7e8185a821434d718db2c6ea.tar.gz cpython-6d5e579cc5e349fe7e8185a821434d718db2c6ea.tar.bz2 |
[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')
-rwxr-xr-x | configure | 41 |
1 files changed, 23 insertions, 18 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 80574 . +# From configure.in Revision: 80647 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 2.7. # @@ -2407,7 +2407,9 @@ echo "$as_me: error: cached CC is different -- throw away $cache_file { (exit 1); exit 1; }; } fi -save_CFLAGS=$CFLAGS +# If the user set CFLAGS, use this instead of the automatically +# determined setting +preset_cflags="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3327,7 +3329,10 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -CFLAGS=$save_CFLAGS +if test ! -z "$preset_cflags" +then + CFLAGS=$preset_cflags +fi @@ -3938,7 +3943,7 @@ else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi -rm -f -r conftest* +rm -f conftest* @@ -5510,7 +5515,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | else ac_cv_header_stdc=no fi -rm -f -r conftest* +rm -f conftest* fi @@ -5531,7 +5536,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | else ac_cv_header_stdc=no fi -rm -f -r conftest* +rm -f conftest* fi @@ -6631,7 +6636,7 @@ _ACEOF fi -rm -f -r conftest* +rm -f conftest* { echo "$as_me:$LINENO: result: $was_it_defined" >&5 echo "${ECHO_T}$was_it_defined" >&6; } @@ -7168,7 +7173,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | else ac_cv_type_uid_t=no fi -rm -f -r conftest* +rm -f conftest* fi { echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 @@ -15991,7 +15996,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | else unistd_defines_pthreads=no fi -rm -f -r conftest* +rm -f conftest* { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5 echo "${ECHO_T}$unistd_defines_pthreads" >&6; } @@ -17605,7 +17610,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then ipv6type=$i fi -rm -f -r conftest* +rm -f conftest* ;; kame) @@ -17628,7 +17633,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ipv6libdir=/usr/local/v6/lib ipv6trylibc=yes fi -rm -f -r conftest* +rm -f conftest* ;; linux-glibc) @@ -17649,7 +17654,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ipv6type=$i; ipv6trylibc=yes fi -rm -f -r conftest* +rm -f conftest* ;; linux-inet6) @@ -17687,7 +17692,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -f -r conftest* +rm -f conftest* ;; v6d) @@ -17710,7 +17715,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ipv6libdir=/usr/local/v6/lib; BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS" fi -rm -f -r conftest* +rm -f conftest* ;; zeta) @@ -17732,7 +17737,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -f -r conftest* +rm -f conftest* ;; esac @@ -26278,7 +26283,7 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -rm -f -r conftest* +rm -f conftest* cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26297,7 +26302,7 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -rm -f -r conftest* +rm -f conftest* fi @@ -26567,7 +26572,7 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi -rm -f -r conftest* +rm -f conftest* fi |