From 0a6c1772bb39c06805de8fe9b1d9a72815a573b4 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 4 May 2024 14:58:06 +0200 Subject: [PATCH] build: also test for editline/readline.h --- m4/ax_lib_readline.m4 | 4 ++-- src/client/client.h | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/m4/ax_lib_readline.m4 b/m4/ax_lib_readline.m4 index 352c55af..269bb125 100644 --- a/m4/ax_lib_readline.m4 +++ b/m4/ax_lib_readline.m4 @@ -107,7 +107,7 @@ AC_DEFUN([AX_LIB_READLINE_LLDPD], [ LIBS="$LIBS $READLINE_LIBS" AC_DEFINE(HAVE_LIBREADLINE, 1, [Define if you have a readline compatible library]) - AC_CHECK_HEADERS(readline.h readline/readline.h) + AC_CHECK_HEADERS(readline.h readline/readline.h editline/readline.h) AC_CACHE_CHECK([whether readline supports history], ax_cv_lib_readline_history, [ ax_cv_lib_readline_history="no" @@ -116,7 +116,7 @@ AC_DEFUN([AX_LIB_READLINE_LLDPD], [ if test "$ax_cv_lib_readline_history" = "yes"; then AC_DEFINE(HAVE_READLINE_HISTORY, 1, [Define if your readline library has \`add_history']) - AC_CHECK_HEADERS(history.h readline/history.h) + AC_CHECK_HEADERS(history.h readline/history.h editline/history.h) fi LIBS="$_save_LIBS" diff --git a/src/client/client.h b/src/client/client.h index dd4e104c..900ff405 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -40,6 +40,8 @@ #ifdef HAVE_LIBREADLINE # if defined(HAVE_READLINE_READLINE_H) # include +# if defined(HAVE_EDITLINE_READLINE_H) +# include # elif defined(HAVE_READLINE_H) # include # else @@ -54,6 +56,8 @@ extern void rl_forced_update_display(void); #ifdef HAVE_READLINE_HISTORY # if defined(HAVE_READLINE_HISTORY_H) # include +# if defined(HAVE_EDITLINE_HISTORY_H) +# include # elif defined(HAVE_HISTORY_H) # include # else -- 2.39.5