2 from waflib import Logs, Options
4 Logs.info("Looking for ncurses features")
6 conf.find_program('ncurses5-config', var='NCURSES_CONFIG')
7 if not conf.env.NCURSES_CONFIG:
8 conf.find_program('ncurses6-config', var='NCURSES_CONFIG')
10 if conf.env.NCURSES_CONFIG:
11 conf.CHECK_CFG(path=conf.env.NCURSES_CONFIG, args="--cflags --libs",
12 package="", uselib_store="NCURSES")
14 conf.CHECK_HEADERS('ncurses.h menu.h panel.h form.h', lib='ncurses')
16 conf.CHECK_FUNCS_IN('initscr', 'ncurses')
17 conf.CHECK_FUNCS_IN('set_menu_items item_count', 'menu')
18 conf.CHECK_FUNCS_IN('new_panel show_panel', 'panel')
19 conf.CHECK_FUNCS_IN('new_field new_form', 'form')
21 if conf.CONFIG_SET('HAVE_NCURSES_H') and \
22 conf.CONFIG_SET('HAVE_MENU_H') and \
23 conf.CONFIG_SET('HAVE_PANEL_H') and \
24 conf.CONFIG_SET('HAVE_FORM_H'):
25 conf.DEFINE('HAVE_NCURSES', '1')
27 conf.undefine('HAVE_NCURSES')