Skip to content

Commit

Permalink
build: also test for editline/readline.h
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentbernat committed May 4, 2024
1 parent 009406a commit 0a6c177
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions m4/ax_lib_readline.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions src/client/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
#ifdef HAVE_LIBREADLINE
# if defined(HAVE_READLINE_READLINE_H)
# include <readline/readline.h>
# if defined(HAVE_EDITLINE_READLINE_H)
# include <editline/readline.h>
# elif defined(HAVE_READLINE_H)
# include <readline.h>
# else
Expand All @@ -54,6 +56,8 @@ extern void rl_forced_update_display(void);
#ifdef HAVE_READLINE_HISTORY
# if defined(HAVE_READLINE_HISTORY_H)
# include <readline/history.h>
# if defined(HAVE_EDITLINE_HISTORY_H)
# include <editline/history.h>
# elif defined(HAVE_HISTORY_H)
# include <history.h>
# else
Expand Down

0 comments on commit 0a6c177

Please sign in to comment.