]> granicus.if.org Git - python/commitdiff
bpo-29643: Fix check for --enable-optimizations (GH-129)
authorAlex Wang <aw1621107@gmail.com>
Tue, 28 Mar 2017 12:50:51 +0000 (08:50 -0400)
committerINADA Naoki <methane@users.noreply.github.com>
Tue, 28 Mar 2017 12:50:51 +0000 (21:50 +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.

Misc/NEWS
configure
configure.ac

index 260538b74023f547a21e2db86a3a3a2125b010d8..b41fd8d79f552f30a6f881cf45af5b366219d08b 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -991,6 +991,11 @@ Tools/Demos
 - Issue #28102: The zipfile module CLI now prints usage to stderr.
   Patch by Stephen J. Turnbull.
 
+Build
+-----
+
+- bpo-29643: Fix ``--enable-optimization`` didn't work.
+
 Tests
 -----
 
index 26b4a052711b400c47167834dbb8e17de1d314f5..87504d206837baf5a5781b6e1cc44dcce7138af9 100755 (executable)
--- a/configure
+++ b/configure
@@ -6521,7 +6521,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 8ab1c03ed891924a0252d271bf7c84c44653afc4..f9bd92ce3da29ea7674a32bd5fe511b1fc4c4d0a 100644 (file)
@@ -1274,7 +1274,7 @@ Py_OPT='false'
 AC_MSG_CHECKING(for --enable-optimizations)
 AC_ARG_ENABLE(optimizations, AS_HELP_STRING([--enable-optimizations], [Enable expensive optimizations (PGO, etc).  Disabled by default.]),
 [
-if test "$withval" != no
+if test "$enableval" != no
 then
   Py_OPT='true'
   AC_MSG_RESULT(yes);