1From d843bceff915b2a50b36a9db8552e0db5bd90f6d Mon Sep 17 00:00:00 2001 2From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 3Date: Wed, 22 Feb 2017 17:31:51 -0800 4Subject: [PATCH] Add an option to disable the curses module 5 6Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 7Signed-off-by: Samuel Martin <s.martin49@gmail.com> 8[ Andrey Smirnov: ported to Python 3.6 ] 9Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> 10[ Adam Duskett: ported to Python 3.10.0 ] 11Signed-off-by: Adam Duskett <aduskett@gmail.com> 12--- 13 Makefile.pre.in | 4 +++- 14 configure.ac | 9 +++++++++ 15 2 files changed, 12 insertions(+), 1 deletion(-) 16 17diff --git a/Makefile.pre.in b/Makefile.pre.in 18index 6ab184fe5f8..09408c3471f 100644 19--- a/Makefile.pre.in 20+++ b/Makefile.pre.in 21@@ -1918,7 +1918,6 @@ LIBSUBDIRS= asyncio \ 22 concurrent concurrent/futures \ 23 csv \ 24 ctypes ctypes/macholib \ 25- curses \ 26 dbm \ 27 distutils distutils/command \ 28 email email/mime \ 29@@ -2084,6 +2083,9 @@ TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \ 30 tkinter/test/test_ttk 31 endif 32 33+ifeq (@CURSES@,yes) 34+LIBSUBDIRS += curses 35+endif 36 37 TEST_MODULES=@TEST_MODULES@ 38 libinstall: all $(srcdir)/Modules/xxmodule.c 39diff --git a/configure.ac b/configure.ac 40index 342b295bcdd..5d52c813ba6 100644 41--- a/configure.ac 42+++ b/configure.ac 43@@ -4240,6 +4240,15 @@ if test "$TK" = "no"; then 44 DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter" 45 fi 46 47+AC_SUBST(CURSES) 48+AC_ARG_ENABLE(curses, 49+ AS_HELP_STRING([--disable-curses], [disable curses]), 50+ [ CURSES="${enableval}" ], [ CURSES=yes ]) 51+ 52+if test "$CURSES" = "no"; then 53+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel" 54+fi 55+ 56 AC_SUBST(PYDOC) 57 58 AC_ARG_ENABLE(pydoc, 59-- 602.44.0 61 62