forked from smbecker/samba
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
waf: Create a better wscript for finding ncurses.
Signed-off-by: Andreas Schneider <[email protected]> Reviewed-by: Michael Adam <[email protected]>
- Loading branch information
1 parent
5e0f4be
commit 86f88ee
Showing
2 changed files
with
24 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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') |