--- /dev/null
+Fix compile error when building with recent versions of libedit.
default completion display. */
rl_completion_display_matches_hook =
readlinestate_global->completion_display_matches_hook ?
-#if defined(_RL_FUNCTION_TYPEDEF)
+#if defined(HAVE_RL_COMPDISP_FUNC_T)
(rl_compdisp_func_t *)on_completion_display_matches_hook : 0;
#else
(VFunction *)on_completion_display_matches_hook : 0;
$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
+fi
+
+
+ # in readline as well as newer editline (April 2023)
+ ac_fn_c_check_type "$LINENO" "rl_compdisp_func_t" "ac_cv_type_rl_compdisp_func_t" "
+#include <stdio.h> /* Must be first for Gnu Readline */
+#ifdef WITH_EDITLINE
+# include <editline/readline.h>
+#else
+# include <readline/readline.h>
+#endif
+
+"
+if test "x$ac_cv_type_rl_compdisp_func_t" = xyes; then :
+
+$as_echo "#define HAVE_RL_COMPDISP_FUNC_T 1" >>confdefs.h
+
fi
fi
AC_CHECK_LIB($LIBREADLINE, append_history,
AC_DEFINE(HAVE_RL_APPEND_HISTORY, 1,
[Define if readline supports append_history]),,$READLINE_LIBS)
+
+ # in readline as well as newer editline (April 2023)
+ AC_CHECK_TYPE([rl_compdisp_func_t],
+ [AC_DEFINE([HAVE_RL_COMPDISP_FUNC_T], [1],
+ [Define if readline supports rl_compdisp_func_t])],
+ [],
+ [
+#include <stdio.h> /* Must be first for Gnu Readline */
+#ifdef WITH_EDITLINE
+# include <editline/readline.h>
+#else
+# include <readline/readline.h>
+#endif
+ ])
fi
# End of readline checks: restore LIBS
/* Define if you can turn off readline's signal handling. */
#undef HAVE_RL_CATCH_SIGNAL
+/* Define if readline supports rl_compdisp_func_t */
+#undef HAVE_RL_COMPDISP_FUNC_T
+
/* Define if you have readline 2.2 */
#undef HAVE_RL_COMPLETION_APPEND_CHARACTER