Skip to content

Commit e6a4953

Browse files
authored
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 8cea592)
1 parent 8994f36 commit e6a4953

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
@@ -157,6 +157,11 @@ Documentation
157157

158158
- Issue #29349: Fix Python 2 syntax in code for building the documentation.
159159

160+
Build
161+
-----
162+
163+
- bpo-29643: Fix ``--enable-optimization`` didn't work.
164+
160165
Tests
161166
-----
162167

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6548,7 +6548,7 @@ $as_echo_n "checking for --enable-optimizations... " >&6; }
65486548
# Check whether --enable-optimizations was given.
65496549
if test "${enable_optimizations+set}" = set; then :
65506550
enableval=$enable_optimizations;
6551-
if test "$withval" != no
6551+
if test "$enableval" != no
65526552
then
65536553
Py_OPT='true'
65546554
{ $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
@@ -1237,7 +1237,7 @@ Py_OPT='false'
12371237
AC_MSG_CHECKING(for --enable-optimizations)
12381238
AC_ARG_ENABLE(optimizations, AS_HELP_STRING([--enable-optimizations], [Enable expensive optimizations (PGO, maybe LTO, etc). Disabled by default.]),
12391239
[
1240-
if test "$withval" != no
1240+
if test "$enableval" != no
12411241
then
12421242
Py_OPT='true'
12431243
AC_MSG_RESULT(yes);

0 commit comments

Comments
 (0)