summaryrefslogtreecommitdiff
path: root/source3/wscript_configure_system_ncurses
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2012-08-02 11:29:10 +0200
committerMichael Adam <obnox@samba.org>2013-04-29 13:05:59 +0200
commit86f88ee7b074fc8193a445e0c8ece58c3058b6c3 (patch)
tree118ae8646ba54ec6b2d39f164a11bd505f2f2c75 /source3/wscript_configure_system_ncurses
parent5e0f4be8e2123ccf9f6beece95b187cd2676ff24 (diff)
downloadsamba-86f88ee7b074fc8193a445e0c8ece58c3058b6c3.tar.gz
samba-86f88ee7b074fc8193a445e0c8ece58c3058b6c3.tar.bz2
samba-86f88ee7b074fc8193a445e0c8ece58c3058b6c3.zip
waf: Create a better wscript for finding ncurses.
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/wscript_configure_system_ncurses')
-rw-r--r--source3/wscript_configure_system_ncurses23
1 files changed, 23 insertions, 0 deletions
diff --git a/source3/wscript_configure_system_ncurses b/source3/wscript_configure_system_ncurses
new file mode 100644
index 0000000000..f61e49c039
--- /dev/null
+++ b/source3/wscript_configure_system_ncurses
@@ -0,0 +1,23 @@
+import Logs, Options, sys
+
+Logs.info("Looking for ncurses features")
+
+if isinstance(Options.options.with_regedit, list):
+ path_ncurses_config = [x+'/bin' for x in Options.options.with_regedit]
+else:
+ path_ncurses_config = None
+
+conf.find_program('ncurses5-config', path_list=path_ncurses_config, var='NCURSES_CONFIG')
+if not conf.env.NCURSES_CONFIG:
+ conf.find_program('ncurses6-config', path_list=path_ncurses_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.env.build_regedit = True
+
+conf.CHECK_HEADERS('ncurses.h menu.h panel.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')