From 3eac6335229fabfe3c985d0b206faa5d65ad1ce7 Mon Sep 17 00:00:00 2001 From: James Peach Date: Thu, 18 Mar 2010 19:30:54 -0700 Subject: libreplace: Fix readline build with libedit. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit libedit on MAc OSX 10.5 does not have the rl_completion_t typedef, but uses a internal typedef names CPPFunction. Signed-off-by: Günther Deschner --- source4/lib/smbreadline/wscript_configure | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'source4/lib/smbreadline/wscript_configure') diff --git a/source4/lib/smbreadline/wscript_configure b/source4/lib/smbreadline/wscript_configure index 76273ddc23..cec6526898 100644 --- a/source4/lib/smbreadline/wscript_configure +++ b/source4/lib/smbreadline/wscript_configure @@ -7,6 +7,44 @@ for termlib in ['ncurses', 'curses', 'termcap', 'terminfo', 'termlib', 'tinfo']: conf.env['READLINE_TERMLIB'] = termlib break +conf.CHECK_CODE(''' +#ifdef HAVE_READLINE_READLINE_H +# include +# ifdef HAVE_READLINE_HISTORY_H +# include +# endif +#else +# ifdef HAVE_READLINE_H +# include +# ifdef HAVE_HISTORY_H +# include +# endif +# endif +#endif +int main(void) {rl_completion_t f; return 0;} +''', +'HAVE_RL_COMPLETION_FUNC_T', execute=False, addmain=False, +msg='Checking for rl_completion_t') + +conf.CHECK_CODE(''' +#ifdef HAVE_READLINE_READLINE_H +# include +# ifdef HAVE_READLINE_HISTORY_H +# include +# endif +#else +# ifdef HAVE_READLINE_H +# include +# ifdef HAVE_HISTORY_H +# include +# endif +# endif +#endif +int main(void) {CPPFunction f; return 0;} +''', +'HAVE_CPPFUNCTION', execute=False, addmain=False, +msg='Checking for CPPFunction') + if conf.CHECK_FUNCS_IN('rl_completion_matches', 'readline'): conf.DEFINE('HAVE_NEW_LIBREADLINE', 1) -- cgit