summaryrefslogtreecommitdiffstats
path: root/pyconfig.h.in
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend@python.org>2024-07-01 08:10:03 (GMT)
committerGitHub <noreply@github.com>2024-07-01 08:10:03 (GMT)
commitf80376b129ad947263a6b03a6c3a874e9f8706e6 (patch)
tree3544f2d954f5a817aae4f6514cf449af2c7e63db /pyconfig.h.in
parentbd473aa598c5161521a7018896dc124728214a6c (diff)
downloadcpython-f80376b129ad947263a6b03a6c3a874e9f8706e6.zip
cpython-f80376b129ad947263a6b03a6c3a874e9f8706e6.tar.gz
cpython-f80376b129ad947263a6b03a6c3a874e9f8706e6.tar.bz2
gh-113565: Improve and harden detection of curses dependencies (#119816)
1. Use pkg-config to check for ncursesw/panelw. If that fails, use pkg-config to check for ncurses/panel. 2. Regardless of pkg-config output, search for curses/panel headers, so we're sure we have all defines in pyconfig.h. 3. Regardless of pkg-config output, check if libncurses or libncursesw contains the 'initscr' symbol; if it does _and_ pkg-config failed earlier, add the resulting -llib linker option to CURSES_LIBS. Ditto for 'update_panels' and PANEL_LIBS. 4. Wrap the rest of the checks with WITH_SAVE_ENV and make sure we're using updated LIBS and CPPFLAGS for those. Add the PY_CHECK_CURSES convenience macro.
Diffstat (limited to 'pyconfig.h.in')
-rw-r--r--pyconfig.h.in29
1 files changed, 28 insertions, 1 deletions
diff --git a/pyconfig.h.in b/pyconfig.h.in
index a90f936..10980c9 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -829,12 +829,33 @@
/* Define to 1 if you have the `nanosleep' function. */
#undef HAVE_NANOSLEEP
-/* Define to 1 if you have the `ncursesw' library. */
+/* Define if you have the 'ncurses' library */
+#undef HAVE_NCURSES
+
+/* Define if you have the 'ncursesw' library */
#undef HAVE_NCURSESW
+/* Define to 1 if you have the <ncursesw/curses.h> header file. */
+#undef HAVE_NCURSESW_CURSES_H
+
+/* Define to 1 if you have the <ncursesw/ncurses.h> header file. */
+#undef HAVE_NCURSESW_NCURSES_H
+
+/* Define to 1 if you have the <ncursesw/panel.h> header file. */
+#undef HAVE_NCURSESW_PANEL_H
+
+/* Define to 1 if you have the <ncurses/curses.h> header file. */
+#undef HAVE_NCURSES_CURSES_H
+
/* Define to 1 if you have the <ncurses.h> header file. */
#undef HAVE_NCURSES_H
+/* Define to 1 if you have the <ncurses/ncurses.h> header file. */
+#undef HAVE_NCURSES_NCURSES_H
+
+/* Define to 1 if you have the <ncurses/panel.h> header file. */
+#undef HAVE_NCURSES_PANEL_H
+
/* Define to 1 if you have the <ndbm.h> header file. */
#undef HAVE_NDBM_H
@@ -878,6 +899,12 @@
/* Define to 1 if you have the `openpty' function. */
#undef HAVE_OPENPTY
+/* Define if you have the 'panel' library */
+#undef HAVE_PANEL
+
+/* Define if you have the 'panelw' library */
+#undef HAVE_PANELW
+
/* Define to 1 if you have the <panel.h> header file. */
#undef HAVE_PANEL_H