Skip to content

Commit f01de61

Browse files
authored
bpo-29643: Fix check for --enable-optimizations (GH-869)
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 8cea592)
1 parent 5965062 commit f01de61

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Misc/NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ Library
6060
exception) to exception(s) raised in the dispatched methods.
6161
Patch by Petr Motejlek.
6262

63+
Build
64+
-----
65+
66+
- bpo-29643: Fix ``--enable-optimization`` didn't work.
67+
6368

6469
What's New in Python 3.6.1?
6570
===========================

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6521,7 +6521,7 @@ $as_echo_n "checking for --enable-optimizations... " >&6; }
65216521
# Check whether --enable-optimizations was given.
65226522
if test "${enable_optimizations+set}" = set; then :
65236523
enableval=$enable_optimizations;
6524-
if test "$withval" != no
6524+
if test "$enableval" != no
65256525
then
65266526
Py_OPT='true'
65276527
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,7 @@ Py_OPT='false'
12741274
AC_MSG_CHECKING(for --enable-optimizations)
12751275
AC_ARG_ENABLE(optimizations, AS_HELP_STRING([--enable-optimizations], [Enable expensive optimizations (PGO, etc). Disabled by default.]),
12761276
[
1277-
if test "$withval" != no
1277+
if test "$enableval" != no
12781278
then
12791279
Py_OPT='true'
12801280
AC_MSG_RESULT(yes);

0 commit comments

Comments
 (0)