Skip to content

Commit 6a04ef7

Browse files
authored
bpo-29643: Fix check for --enable-optimizations (GH-873)
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 d665407 commit 6a04ef7

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ Documentation
118118
Build
119119
-----
120120

121+
- bpo-29643: Fix ``--enable-optimization`` configure option didn't work.
122+
121123
- bpo-29572: Update Windows build and OS X installers to use OpenSSL 1.0.2k.
122124

123125
- Issue #28768: Fix implicit declaration of function _setmode. Patch by

configure

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,6 @@ infodir
770770
docdir
771771
oldincludedir
772772
includedir
773-
runstatedir
774773
localstatedir
775774
sharedstatedir
776775
sysconfdir
@@ -882,7 +881,6 @@ datadir='${datarootdir}'
882881
sysconfdir='${prefix}/etc'
883882
sharedstatedir='${prefix}/com'
884883
localstatedir='${prefix}/var'
885-
runstatedir='${localstatedir}/run'
886884
includedir='${prefix}/include'
887885
oldincludedir='/usr/include'
888886
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1135,15 +1133,6 @@ do
11351133
| -silent | --silent | --silen | --sile | --sil)
11361134
silent=yes ;;
11371135

1138-
-runstatedir | --runstatedir | --runstatedi | --runstated \
1139-
| --runstate | --runstat | --runsta | --runst | --runs \
1140-
| --run | --ru | --r)
1141-
ac_prev=runstatedir ;;
1142-
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1143-
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1144-
| --run=* | --ru=* | --r=*)
1145-
runstatedir=$ac_optarg ;;
1146-
11471136
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
11481137
ac_prev=sbindir ;;
11491138
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1281,7 +1270,7 @@ fi
12811270
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
12821271
datadir sysconfdir sharedstatedir localstatedir includedir \
12831272
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1284-
libdir localedir mandir runstatedir
1273+
libdir localedir mandir
12851274
do
12861275
eval ac_val=\$$ac_var
12871276
# Remove trailing slashes.
@@ -1434,7 +1423,6 @@ Fine tuning of the installation directories:
14341423
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
14351424
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
14361425
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
1437-
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
14381426
--libdir=DIR object code libraries [EPREFIX/lib]
14391427
--includedir=DIR C header files [PREFIX/include]
14401428
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -6391,7 +6379,7 @@ $as_echo_n "checking for --enable-optimizations... " >&6; }
63916379
# Check whether --enable-optimizations was given.
63926380
if test "${enable_optimizations+set}" = set; then :
63936381
enableval=$enable_optimizations;
6394-
if test "$withval" != no
6382+
if test "$enableval" != no
63956383
then
63966384
Py_OPT='true'
63976385
{ $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
@@ -1373,7 +1373,7 @@ Py_OPT='false'
13731373
AC_MSG_CHECKING(for --enable-optimizations)
13741374
AC_ARG_ENABLE(optimizations, AS_HELP_STRING([--enable-optimizations], [Enable expensive optimizations (PGO, maybe LTO, etc). Disabled by default.]),
13751375
[
1376-
if test "$withval" != no
1376+
if test "$enableval" != no
13771377
then
13781378
Py_OPT='true'
13791379
AC_MSG_RESULT(yes);

0 commit comments

Comments
 (0)