1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-29 11:21:54 +03:00
samba-mirror/source3/wscript_configure_system_ncurses
Alexander Bokovoy 8b5ad021b4 source3/wscript_configure_system_ncurses: update to handle waf 2.0.4
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-09-05 06:37:24 +02:00

28 lines
905 B
Plaintext

import sys
from waflib import Logs, Options
Logs.info("Looking for ncurses features")
conf.find_program('ncurses5-config', var='NCURSES_CONFIG')
if not conf.env.NCURSES_CONFIG:
conf.find_program('ncurses6-config', var='NCURSES_CONFIG')
if conf.env.NCURSES_CONFIG:
conf.CHECK_CFG(path=conf.env.NCURSES_CONFIG, args="--cflags --libs",
package="", uselib_store="NCURSES")
conf.CHECK_HEADERS('ncurses.h menu.h panel.h form.h', lib='ncurses')
conf.CHECK_FUNCS_IN('initscr', 'ncurses')
conf.CHECK_FUNCS_IN('set_menu_items item_count', 'menu')
conf.CHECK_FUNCS_IN('new_panel show_panel', 'panel')
conf.CHECK_FUNCS_IN('new_field new_form', 'form')
if conf.CONFIG_SET('HAVE_NCURSES_H') and \
conf.CONFIG_SET('HAVE_MENU_H') and \
conf.CONFIG_SET('HAVE_PANEL_H') and \
conf.CONFIG_SET('HAVE_FORM_H'):
conf.DEFINE('HAVE_NCURSES', '1')
else:
conf.undefine('HAVE_NCURSES')