r18208: Mac OS X also doesn't have history_list()
[jelmer/samba4-debian.git] / source / lib / smbreadline / readline.m4
index 4eebd13b5a66057b6bcc16140fe2b7fb197256cc..29f7ac6e1a8594b91f39033526135d9dc70b5f69 100644 (file)
@@ -68,8 +68,12 @@ AC_CHECK_LIB(readline, rl_completion_matches,
             [],
             [$TERMLIBS])
 
-# not all readline libs have rl_event_hook
+# not all readline libs have rl_event_hook or history_list
 AC_CHECK_DECLS(rl_event_hook, [], [], [#include <readline/readline.h>])
+AC_CHECK_LIB(readline, history_list,
+            [AC_DEFINE(HAVE_HISTORY_LIST, 1, [Do we have history_list?])],
+            [],
+            [$TERMLIBS])
 
 AC_MSG_CHECKING(whether to use extern readline)
 if test x"$EXTERNAL_READLINE" = x"yes"; then