1 Add an option to disable decimal
3 This patch replaces the existing --with-system-libmpdec option with a
4 --with-libmpdec={system,builtin,none} option, which allows to tell
5 Python whether we want to use the system libmpdec (already installed),
6 the libmpdec builtin the Python sources, or no libmpdec at all.
8 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
12 ===================================================================
15 @@ -2405,13 +2405,20 @@
16 AC_MSG_RESULT($with_system_ffi)
18 # Check for use of the system libmpdec library
19 -AC_MSG_CHECKING(for --with-system-libmpdec)
20 -AC_ARG_WITH(system_libmpdec,
21 - AS_HELP_STRING([--with-system-libmpdec], [build _decimal module using an installed libmpdec library]),
22 +AC_MSG_CHECKING(for --with-libmpdec)
23 +AC_ARG_WITH(libmpdec,
24 + AS_HELP_STRING([--with-libmpdec], [select which libmpdec version to use: system, builtin, none]),
26 - [with_system_libmpdec="no"])
27 + [with_libmpdec="builtin"])
29 -AC_MSG_RESULT($with_system_libmpdec)
30 +AC_MSG_RESULT($with_libmpdec)
31 +if test "$with_libmpdec" != "none"; then
34 + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _decimal"
39 # Check for support for loadable sqlite extensions
40 AC_MSG_CHECKING(for --enable-loadable-sqlite-extensions)
42 ===================================================================
46 def _decimal_ext(self):
47 extra_compile_args = []
49 - if '--with-system-libmpdec' in sysconfig.get_config_var("CONFIG_ARGS"):
50 + if '--with-libmpdec=system' in sysconfig.get_config_var("CONFIG_ARGS"):
52 libraries = [':libmpdec.so.2']
53 sources = ['_decimal/_decimal.c']