rl_event_hook detection
authorTimur I. Bakeyev <timur@com.bat.ru>
Sun, 7 Jun 2009 12:00:22 +0000 (12:00 +0000)
committerStefan Metzmacher <metze@samba.org>
Mon, 8 Jun 2009 11:20:51 +0000 (13:20 +0200)
This patch is relevant for Samba4 source mostly. The way, how readline
compiled under FreeBSD makes it require stdio.h to get all the necessary
declarations. Without this addition rl_event_hook is not properly detected.

With regards,
Timur Bakeyev.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
source4/lib/smbreadline/readline.m4

index 86e2fb19d65708bb3fd869be54738a23b5fc0c93..df154409aded750d8419e30eeb56460220b6707a 100644 (file)
@@ -69,7 +69,10 @@ AC_CHECK_LIB(readline, rl_completion_matches,
             [$TERMLIBS])
 
 # not all readline libs have rl_event_hook or history_list
-AC_CHECK_DECLS(rl_event_hook, [], [], [#include <readline/readline.h>])
+AC_CHECK_DECLS(rl_event_hook, [], [], [
+    #include <stdio.h>
+    #include <readline/readline.h>
+])
 AC_CHECK_LIB(readline, history_list,
             [AC_DEFINE(HAVE_HISTORY_LIST, 1, [Do we have history_list?])],
             [],