From 74416b1d4849ef77ef31de5344dd75f03094434b Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Sun, 14 Jan 2018 14:29:32 +0100 Subject: [PATCH] m4: Check for rl_completion_quote_character Apparently we can't assume that people run readline recent enough to have rl_completion_quote_character (added in readline-5.0 released in 2011). However, we can't compile without it. So if not present, disable readline. Signed-off-by: Michal Privoznik Reviewed-by: Andrea Bolognani --- m4/virt-readline.m4 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/m4/virt-readline.m4 b/m4/virt-readline.m4 index 9fba5148af..34b3ff3c4a 100644 --- a/m4/virt-readline.m4 +++ b/m4/virt-readline.m4 @@ -38,6 +38,19 @@ AC_DEFUN([LIBVIRT_CHECK_READLINE],[ LIBS="$lv_saved_libs $extra_LIBS" fi + AC_CHECK_DECLS([rl_completion_quote_character], + [], [], + [[#include + #include ]]) + + if test "$ac_cv_have_decl_rl_completion_quote_character" = "no" ; then + if test "$with_readline" = "yes" ; then + AC_MSG_ERROR([readline is missing rl_completion_quote_character]) + else + with_readline=no; + fi + fi + # The normal library check... LIBVIRT_CHECK_LIB([READLINE], [readline], [readline], [readline/readline.h])