1 import Logs, Options, sys
3 Logs.info("Looking for ncurses features")
5 conf.find_program('ncurses5-config', var='NCURSES_CONFIG')
6 if not conf.env.NCURSES_CONFIG:
7 conf.find_program('ncurses6-config', var='NCURSES_CONFIG')
9 if conf.env.NCURSES_CONFIG:
10 conf.check_cfg(path=conf.env.NCURSES_CONFIG, args="--cflags --libs",
11 package="", uselib_store="NCURSES")
13 conf.CHECK_HEADERS('ncurses.h menu.h panel.h form.h', lib='ncurses')
15 conf.CHECK_FUNCS_IN('initscr', 'ncurses')
16 conf.CHECK_FUNCS_IN('set_menu_items item_count', 'menu')
17 conf.CHECK_FUNCS_IN('new_panel show_panel', 'panel')
18 conf.CHECK_FUNCS_IN('new_field new_form', 'form')
20 if conf.CONFIG_SET('HAVE_NCURSES_H') and \
21 conf.CONFIG_SET('HAVE_MENU_H') and \
22 conf.CONFIG_SET('HAVE_PANEL_H') and \
23 conf.CONFIG_SET('HAVE_FORM_H'):
24 conf.DEFINE('HAVE_NCURSES', '1')
26 conf.undefine('HAVE_NCURSES')