summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2010-03-18 19:30:54 -0700
committerGünther Deschner <gd@samba.org>2010-06-03 16:33:43 +0200
commit3eac6335229fabfe3c985d0b206faa5d65ad1ce7 (patch)
tree733c37214765d46e4749abbfd11f79d7fc8d2f08 /source4
parent30a9ddccff5b1bd1694a1a9f0e5ceebdee316d79 (diff)
downloadsamba-3eac6335229fabfe3c985d0b206faa5d65ad1ce7.tar.gz
samba-3eac6335229fabfe3c985d0b206faa5d65ad1ce7.tar.bz2
samba-3eac6335229fabfe3c985d0b206faa5d65ad1ce7.zip
libreplace: Fix readline build with libedit.
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 <gd@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/smbreadline/wscript_configure38
1 files changed, 38 insertions, 0 deletions
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 <readline/readline.h>
+# ifdef HAVE_READLINE_HISTORY_H
+# include <readline/history.h>
+# endif
+#else
+# ifdef HAVE_READLINE_H
+# include <readline.h>
+# ifdef HAVE_HISTORY_H
+# include <history.h>
+# 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 <readline/readline.h>
+# ifdef HAVE_READLINE_HISTORY_H
+# include <readline/history.h>
+# endif
+#else
+# ifdef HAVE_READLINE_H
+# include <readline.h>
+# ifdef HAVE_HISTORY_H
+# include <history.h>
+# 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)