mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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.
This commit is contained in:
parent
bd473aa598
commit
f80376b129
7 changed files with 630 additions and 796 deletions
|
@ -128,7 +128,7 @@ static const char PyCursesVersion[] = "2.2";
|
|||
#include <langinfo.h>
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_NCURSES_H) && (defined(sgi) || defined(__sun) || defined(SCO5))
|
||||
#if !defined(NCURSES_VERSION) && (defined(sgi) || defined(__sun) || defined(SCO5))
|
||||
#define STRICT_SYSV_CURSES /* Don't use ncurses extensions */
|
||||
typedef chtype attr_t; /* No attr_t type is available */
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue