summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorINADA Naoki <methane@users.noreply.github.com>2017-03-28 15:26:29 (GMT)
committerGitHub <noreply@github.com>2017-03-28 15:26:29 (GMT)
commite6a49531568561fe5aaf662259ecb7b4bc2426be (patch)
tree5f2369e116d6670c97b4bece21c46f2bf33ea9d5
parent8994f36287b068e8ea9a9230fc90eda72bf5fff0 (diff)
downloadcpython-e6a49531568561fe5aaf662259ecb7b4bc2426be.zip
cpython-e6a49531568561fe5aaf662259ecb7b4bc2426be.tar.gz
cpython-e6a49531568561fe5aaf662259ecb7b4bc2426be.tar.bz2
bpo-29643: Fix check for --enable-optimizations (GH-871)
The presence of the ``--enable-optimizations`` flag is indicated by the value of ``$enableval``, but the configure script was checking ``$withval``, resulting in the ``--enable-optimizations`` flag being effectively ignored. (cherry picked from commit 8cea5929f52801b0ce5928b46ef836e99a24321a)
-rw-r--r--Misc/NEWS5
-rwxr-xr-xconfigure2
-rw-r--r--configure.ac2
3 files changed, 7 insertions, 2 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index f541504..1b0c1c0 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -157,6 +157,11 @@ Documentation
- Issue #29349: Fix Python 2 syntax in code for building the documentation.
+Build
+-----
+
+- bpo-29643: Fix ``--enable-optimization`` didn't work.
+
Tests
-----
diff --git a/configure b/configure
index 0f74842..c84a8ec 100755
--- a/configure
+++ b/configure
@@ -6548,7 +6548,7 @@ $as_echo_n "checking for --enable-optimizations... " >&6; }
# Check whether --enable-optimizations was given.
if test "${enable_optimizations+set}" = set; then :
enableval=$enable_optimizations;
-if test "$withval" != no
+if test "$enableval" != no
then
Py_OPT='true'
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
diff --git a/configure.ac b/configure.ac
index 0eca886..779fe37 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1237,7 +1237,7 @@ Py_OPT='false'
AC_MSG_CHECKING(for --enable-optimizations)
AC_ARG_ENABLE(optimizations, AS_HELP_STRING([--enable-optimizations], [Enable expensive optimizations (PGO, maybe LTO, etc). Disabled by default.]),
[
-if test "$withval" != no
+if test "$enableval" != no
then
Py_OPT='true'
AC_MSG_RESULT(yes);