Providing that during ./configure Py_DEBUG can either be set or not, but there is no third state, which third state would justify calling ./configure --with-pydebug=lambda, --with-pydebug shall be renamed to --enable-pydebug .
Likewise for --with-pymalloc , but it is more tricky. Currently ./configure --help emits "--with(out)-pymalloc disable/enable specialized mallocs". Usually from the output of ./configure --help one shall be able to conclude, whether a switch is on or off by default, if it is not provided. E.g. if it is by default off, then "--enable-X enable feature X" is printed; and "--disable-Y disable feature-Y" is printed when by default the feature is on.
The code says, that if pymalloc is enabled implicitly, if neither --with-pymalloc nor --without-pymalloc is provided. Let's update the AS_HELP_STRING to show the default and also shorten the code, which makes it also easier to understand (for me at least)
which makes it also easier to understand (for me at least):
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -3290,12 +3290,7 @@ AC_MSG_RESULT($with_doc_strings)
# Check for Python-specific malloc support
AC_MSG_CHECKING(for --with-pymalloc)
AC_ARG_WITH(pymalloc,
- AS_HELP_STRING([--with(out)-pymalloc], [disable/enable specialized mallocs]))
-
-if test -z "$with_pymalloc"
-then
- with_pymalloc="yes"
-fi
+ AS_HELP_STRING([--without-pymalloc], [disable specialized mallocs]),,with_pymalloc=yes)
if test "$with_pymalloc" != "no"
then
AC_DEFINE(WITH_PYMALLOC, 1,
configure.ac:4629 mentions "# * --with-wide-unicode (adds a 'u')", but since commit d63a3b8beb4a0841cb59fb3515347ccaab34b733 "Implement PEP 393", one cannot pass --with-wide-unicode to ./configure.
|