]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
build: also test for editline/readline.h
authorVincent Bernat <vincent@bernat.ch>
Sat, 4 May 2024 12:58:06 +0000 (14:58 +0200)
committerVincent Bernat <vincent@bernat.ch>
Sat, 4 May 2024 12:58:06 +0000 (14:58 +0200)
m4/ax_lib_readline.m4
src/client/client.h

index 352c55af0045d348ddb4a387a34073e57f5cd0cd..269bb125a735e5ae6dd077211c2529fc45030bf8 100644 (file)
@@ -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"
index dd4e104c61a2c72e6cbf844a732cc3b18273da61..900ff4052e749889bbadb0f80797539f27417545 100644 (file)
@@ -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
@@ -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