]> granicus.if.org Git - python/commitdiff
bpo-29643: Fix check for --enable-optimizations (GH-871)
authorINADA Naoki <methane@users.noreply.github.com>
Tue, 28 Mar 2017 15:26:29 +0000 (00:26 +0900)
committerGitHub <noreply@github.com>
Tue, 28 Mar 2017 15:26:29 +0000 (00:26 +0900)
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)

Misc/NEWS
configure
configure.ac

index f541504e0cdc5fd0d4c13434efe6412bdbf67453..1b0c1c092c8dfab1a68cda233aa0d7ff0d6df7a2 100644 (file)
--- 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
 -----
 
index 0f7484231a38ce6d2333d7862e1fd459c900611b..c84a8ec9e04a1a5d64ed2ef4046c7be9271d9187 100755 (executable)
--- 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
index 0eca886aebdc69a5afc649995903abbeb584470a..779fe3764c7f5ab76286fa64605b6fcc9a9fce0f 100644 (file)
@@ -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);