]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
4494. [bug] Look for <editline/readline.h>. [RT #43429]
authorMark Andrews <marka@isc.org>
Thu, 27 Oct 2016 04:48:51 +0000 (15:48 +1100)
committerMark Andrews <marka@isc.org>
Thu, 27 Oct 2016 04:48:51 +0000 (15:48 +1100)
CHANGES
bin/dig/nslookup.c
bin/nsupdate/nsupdate.c
config.h.in
configure
configure.in

diff --git a/CHANGES b/CHANGES
index 4f461c13da2ba3fa125304b3577e299dbcf804fb..47cf3f3285d29cdc52ad52fd46b21a77d8ad0e7b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+4494.  [bug]           Look for <editline/readline.h>. [RT #43429]
+
 4493.  [bug]           bin/tests/system/dyndb/driver/Makefile.in should use
                        SO_TARGETS. [RT# 43336]
 
index f00ab4558ee4b4bfb6fc378db729c1a59f6611c2..b4e4979764ebb574cf781e00ee5d5b9e4a51a9d0 100644 (file)
 #include <dig/dig.h>
 
 #if defined(HAVE_READLINE)
+#if defined(HAVE_EDITLINE_READLINE_H)
+#include <editline/readline.h>
+#elif defined(HAVE_READLINE_READLINE_H)
 #include <readline/readline.h>
+#if defined (HAVE_READLINE_HISTORY_H)
 #include <readline/history.h>
 #endif
+#endif
+#endif
 
 static isc_boolean_t short_form = ISC_TRUE,
        tcpmode = ISC_FALSE,
index 395985963e9a73950161b8408d6e50bf692f7d61..c0e12414fb80d8e7737cfaf2cdba66846304c0ba 100644 (file)
 #include <bind9/getaddresses.h>
 
 #if defined(HAVE_READLINE)
+#if defined(HAVE_EDITLINE_READLINE_H)
+#include <editline/readline.h>
+#else
 #include <readline/readline.h>
 #include <readline/history.h>
 #endif
+#endif
 
 #ifdef HAVE_ADDRINFO
 #ifdef HAVE_GETADDRINFO
index a733fae8f683200856add194a9b4f82f6ee693f3..d45c18a6fb1dcc2c84aa9d1c7226c536fd085123 100644 (file)
@@ -215,6 +215,9 @@ int sigwait(const unsigned int *set, int *sig);
 /* Define to 1 to enable dnstap support */
 #undef HAVE_DNSTAP
 
+/* Define to 1 if you have the <editline/readline.h> header file. */
+#undef HAVE_EDITLINE_READLINE_H
+
 /* Define to 1 if you have the `EVP_sha256' function. */
 #undef HAVE_EVP_SHA256
 
@@ -377,6 +380,12 @@ int sigwait(const unsigned int *set, int *sig);
 /* Define to 1 if you have the `readline' function. */
 #undef HAVE_READLINE
 
+/* Define to 1 if you have the <readline/history.h> header file. */
+#undef HAVE_READLINE_HISTORY_H
+
+/* Define to 1 if you have the <readline/readline.h> header file. */
+#undef HAVE_READLINE_READLINE_H
+
 /* Define to 1 if you have the <regex.h> header file. */
 #undef HAVE_REGEX_H
 
index 90f8465fcaa20513a178bbfd96a077f645a4a50c..0ea01af4d40a00fa37904fe1f031e9687d1a7e28 100755 (executable)
--- a/configure
+++ b/configure
@@ -19161,6 +19161,49 @@ done
        LIBS="$saved_LIBS"
        ;;
 esac
+if test yes = "$ac_cv_func_readline"
+then
+       case "$READLINE_LIB" in
+       *edit*)
+               for ac_header in editline/readline.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
+if test "x$ac_cv_header_editline_readline_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_EDITLINE_READLINE_H 1
+_ACEOF
+
+fi
+
+done
+
+               ;;
+       esac
+       for ac_header in readline/readline.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
+if test "x$ac_cv_header_readline_readline_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_READLINE_READLINE_H 1
+_ACEOF
+
+fi
+
+done
+
+       for ac_header in readline/history.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
+if test "x$ac_cv_header_readline_history_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_READLINE_HISTORY_H 1
+_ACEOF
+
+fi
+
+done
+
+fi
 
 ISC_PRINT_OBJS=
 ISC_PRINT_SRCS=
index 49ab0d1cde40b02150b39acec9a294d620e87b44..82480b592763bd0c5019d6e87028028a5d362359 100644 (file)
@@ -3497,6 +3497,16 @@ no)      ;;
        LIBS="$saved_LIBS"
        ;;
 esac
+if test yes = "$ac_cv_func_readline"
+then
+       case "$READLINE_LIB" in
+       *edit*)
+               AC_CHECK_HEADERS(editline/readline.h)
+               ;;
+       esac
+       AC_CHECK_HEADERS(readline/readline.h)
+       AC_CHECK_HEADERS(readline/history.h)
+fi
 
 ISC_PRINT_OBJS=
 ISC_PRINT_SRCS=