summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/Setup.stdlib.in6
-rwxr-xr-xconfigure76
-rw-r--r--configure.ac4
-rw-r--r--setup.py10
4 files changed, 90 insertions, 6 deletions
diff --git a/Modules/Setup.stdlib.in b/Modules/Setup.stdlib.in
index 42755c9..b22a956 100644
--- a/Modules/Setup.stdlib.in
+++ b/Modules/Setup.stdlib.in
@@ -28,6 +28,12 @@
############################################################################
# Modules that should always be present (POSIX and Windows):
+@MODULE_ARRAY_TRUE@array arraymodule.c
+@MODULE__CONTEXTVARS_TRUE@_contextvars _contextvarsmodule.c
+
+# needs libm
+@MODULE_MATH_TRUE@math mathmodule.c
+@MODULE_CMATH_TRUE@cmath cmathmodule.c
# needs libm and on some platforms librt
@MODULE__DATETIME_TRUE@_datetime _datetimemodule.c
diff --git a/configure b/configure
index fd75c52..72285a6 100755
--- a/configure
+++ b/configure
@@ -688,8 +688,16 @@ MODULE_OSSAUDIODEV_FALSE
MODULE_OSSAUDIODEV_TRUE
MODULE_GRP_FALSE
MODULE_GRP_TRUE
+MODULE_CMATH_FALSE
+MODULE_CMATH_TRUE
+MODULE_MATH_FALSE
+MODULE_MATH_TRUE
MODULE__DATETIME_FALSE
MODULE__DATETIME_TRUE
+MODULE__CONTEXTVARS_FALSE
+MODULE__CONTEXTVARS_TRUE
+MODULE_ARRAY_FALSE
+MODULE_ARRAY_TRUE
MODULE_TIME_FALSE
MODULE_TIME_TRUE
MODULE__IO_FALSE
@@ -19567,6 +19575,30 @@ fi
if true; then
+ MODULE_ARRAY_TRUE=
+ MODULE_ARRAY_FALSE='#'
+else
+ MODULE_ARRAY_TRUE='#'
+ MODULE_ARRAY_FALSE=
+fi
+
+
+
+
+
+ if true; then
+ MODULE__CONTEXTVARS_TRUE=
+ MODULE__CONTEXTVARS_FALSE='#'
+else
+ MODULE__CONTEXTVARS_TRUE='#'
+ MODULE__CONTEXTVARS_FALSE=
+fi
+
+
+
+
+
+ if true; then
MODULE__DATETIME_TRUE=
MODULE__DATETIME_FALSE='#'
else
@@ -19580,6 +19612,34 @@ fi
+ if true; then
+ MODULE_MATH_TRUE=
+ MODULE_MATH_FALSE='#'
+else
+ MODULE_MATH_TRUE='#'
+ MODULE_MATH_FALSE=
+fi
+
+
+
+ as_fn_append MODULE_BLOCK "MODULE_MATH_LDFLAGS=$LIBM$as_nl"
+
+
+
+ if true; then
+ MODULE_CMATH_TRUE=
+ MODULE_CMATH_FALSE='#'
+else
+ MODULE_CMATH_TRUE='#'
+ MODULE_CMATH_FALSE=
+fi
+
+
+
+ as_fn_append MODULE_BLOCK "MODULE_CMATH_LDFLAGS=$LIBM$as_nl"
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module grp" >&5
$as_echo_n "checking for stdlib extension module grp... " >&6; }
@@ -20745,10 +20805,26 @@ if test -z "${MODULE_TIME_TRUE}" && test -z "${MODULE_TIME_FALSE}"; then
as_fn_error $? "conditional \"MODULE_TIME\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${MODULE_ARRAY_TRUE}" && test -z "${MODULE_ARRAY_FALSE}"; then
+ as_fn_error $? "conditional \"MODULE_ARRAY\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${MODULE__CONTEXTVARS_TRUE}" && test -z "${MODULE__CONTEXTVARS_FALSE}"; then
+ as_fn_error $? "conditional \"MODULE__CONTEXTVARS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${MODULE__DATETIME_TRUE}" && test -z "${MODULE__DATETIME_FALSE}"; then
as_fn_error $? "conditional \"MODULE__DATETIME\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${MODULE_MATH_TRUE}" && test -z "${MODULE_MATH_FALSE}"; then
+ as_fn_error $? "conditional \"MODULE_MATH\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${MODULE_CMATH_TRUE}" && test -z "${MODULE_CMATH_FALSE}"; then
+ as_fn_error $? "conditional \"MODULE_CMATH\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${MODULE_GRP_TRUE}" && test -z "${MODULE_GRP_FALSE}"; then
as_fn_error $? "conditional \"MODULE_GRP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/configure.ac b/configure.ac
index 63df518..e0013c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6075,7 +6075,11 @@ PY_STDLIB_MOD_SIMPLE([_io], [-I\$(srcdir)/Modules/_io], [])
PY_STDLIB_MOD_SIMPLE([time], [], [$TIMEMODULE_LIB])
dnl always enabled extension modules
+PY_STDLIB_MOD_SIMPLE([array])
+PY_STDLIB_MOD_SIMPLE([_contextvars])
PY_STDLIB_MOD_SIMPLE([_datetime], [], [$TIMEMODULE_LIB $LIBM])
+PY_STDLIB_MOD_SIMPLE([math], [], [$LIBM])
+PY_STDLIB_MOD_SIMPLE([cmath], [], [$LIBM])
dnl platform specific extensions
PY_STDLIB_MOD([grp], [], [test "$ac_cv_func_getgrgid" = yes -o "$ac_cv_func_getgrgid_r" = yes])
diff --git a/setup.py b/setup.py
index 13ed636..b2a3f4e 100644
--- a/setup.py
+++ b/setup.py
@@ -984,18 +984,16 @@ class PyBuildExt(build_ext):
#
# array objects
- self.add(Extension('array', ['arraymodule.c']))
+ self.addext(Extension('array', ['arraymodule.c']))
# Context Variables
- self.add(Extension('_contextvars', ['_contextvarsmodule.c']))
+ self.addext(Extension('_contextvars', ['_contextvarsmodule.c']))
# math library functions, e.g. sin()
- self.add(Extension('math', ['mathmodule.c'],
- libraries=['m']))
+ self.addext(Extension('math', ['mathmodule.c']))
# complex math library functions
- self.add(Extension('cmath', ['cmathmodule.c'],
- libraries=['m']))
+ self.addext(Extension('cmath', ['cmathmodule.c']))
# time libraries: librt may be needed for clock_gettime()
time_libs = []