[Python-checkins] r80665 - in python/trunk: configure configure.in
marc-andre.lemburg
python-checkins at python.org
Fri Apr 30 19:20:14 CEST 2010
Author: marc-andre.lemburg
Date: Fri Apr 30 19:20:14 2010
New Revision: 80665
Log:
[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.
Modified:
python/trunk/configure
python/trunk/configure.in
Modified: python/trunk/configure
==============================================================================
--- python/trunk/configure (original)
+++ python/trunk/configure Fri Apr 30 19:20:14 2010
@@ -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 @@
{ (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_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 @@
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
-rm -f -r conftest*
+rm -f conftest*
@@ -5510,7 +5515,7 @@
else
ac_cv_header_stdc=no
fi
-rm -f -r conftest*
+rm -f conftest*
fi
@@ -5531,7 +5536,7 @@
else
ac_cv_header_stdc=no
fi
-rm -f -r conftest*
+rm -f conftest*
fi
@@ -6631,7 +6636,7 @@
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 @@
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 @@
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 @@
$EGREP "yes" >/dev/null 2>&1; then
ipv6type=$i
fi
-rm -f -r conftest*
+rm -f conftest*
;;
kame)
@@ -17628,7 +17633,7 @@
ipv6libdir=/usr/local/v6/lib
ipv6trylibc=yes
fi
-rm -f -r conftest*
+rm -f conftest*
;;
linux-glibc)
@@ -17649,7 +17654,7 @@
ipv6type=$i;
ipv6trylibc=yes
fi
-rm -f -r conftest*
+rm -f conftest*
;;
linux-inet6)
@@ -17687,7 +17692,7 @@
ipv6lib=inet6;
ipv6libdir=/usr/local/v6/lib
fi
-rm -f -r conftest*
+rm -f conftest*
;;
v6d)
@@ -17710,7 +17715,7 @@
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 @@
ipv6lib=inet6;
ipv6libdir=/usr/local/v6/lib
fi
-rm -f -r conftest*
+rm -f conftest*
;;
esac
@@ -26278,7 +26283,7 @@
_ACEOF
fi
-rm -f -r conftest*
+rm -f conftest*
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -26297,7 +26302,7 @@
_ACEOF
fi
-rm -f -r conftest*
+rm -f conftest*
fi
@@ -26567,7 +26572,7 @@
_ACEOF
fi
-rm -f -r conftest*
+rm -f conftest*
fi
Modified: python/trunk/configure.in
==============================================================================
--- python/trunk/configure.in (original)
+++ python/trunk/configure.in Fri Apr 30 19:20:14 2010
@@ -531,9 +531,14 @@
(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)
More information about the Python-checkins
mailing list