s3-printing: fix broken print_job_get_name() return
[Samba/gebeck_regimport.git] / libcli / smbreadline / wscript_configure
blobb4d1be2b43477405bf0cd99eaa9d4594d0f2a48a
1 #!/usr/bin/env python
4 conf.CHECK_HEADERS('readline.h history.h readline/readline.h readline/history.h')
5 for termlib in ['ncurses', 'curses', 'termcap', 'terminfo', 'termlib', 'tinfo']:
6 if conf.CHECK_FUNCS_IN('tgetent', termlib):
7 conf.env['READLINE_TERMLIB'] = termlib
8 break
10 conf.CHECK_CODE('''
11 #ifdef HAVE_READLINE_READLINE_H
12 # include <readline/readline.h>
13 # ifdef HAVE_READLINE_HISTORY_H
14 # include <readline/history.h>
15 # endif
16 #else
17 # ifdef HAVE_READLINE_H
18 # include <readline.h>
19 # ifdef HAVE_HISTORY_H
20 # include <history.h>
21 # endif
22 # endif
23 #endif
24 int main(void) {rl_completion_t f; return 0;}
25 ''',
26 'HAVE_RL_COMPLETION_FUNC_T', execute=False, addmain=False,
27 msg='Checking for rl_completion_t')
29 conf.CHECK_CODE('''
30 #ifdef HAVE_READLINE_READLINE_H
31 # include <readline/readline.h>
32 # ifdef HAVE_READLINE_HISTORY_H
33 # include <readline/history.h>
34 # endif
35 #else
36 # ifdef HAVE_READLINE_H
37 # include <readline.h>
38 # ifdef HAVE_HISTORY_H
39 # include <history.h>
40 # endif
41 # endif
42 #endif
43 int main(void) {CPPFunction f; return 0;}
44 ''',
45 'HAVE_CPPFUNCTION', execute=False, addmain=False,
46 msg='Checking for CPPFunction')
48 if conf.CHECK_FUNCS_IN('rl_completion_matches', 'readline'):
49 conf.DEFINE('HAVE_NEW_LIBREADLINE', 1)
51 if conf.CHECK_FUNCS_IN('history_list', 'readline'):
52 conf.DEFINE('HAVE_HISTORY_LIST', 1)