[4.0] a716ea3 Fix readline finding on FreeBSD -current

Lasse Karstensen lkarsten at varnish-software.com
Mon Sep 22 16:38:24 CEST 2014


commit a716ea33147eb465904139e6ccbfb03c0349212d
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Aug 27 11:29:50 2014 +0000

    Fix readline finding on FreeBSD -current

diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c
index 26019a5..a17961d 100644
--- a/bin/varnishadm/varnishadm.c
+++ b/bin/varnishadm/varnishadm.c
@@ -34,9 +34,11 @@
 
 #include <stdio.h>
 
-#ifdef HAVE_LIBEDIT
+#if defined(HAVE_EDIT_READLINE_READLINE_H)
+#  include <edit/readline/readline.h>
+#elif defined(HAVE_LIBEDIT)
 #  include <editline/readline.h>
-#elif HAVE_READLINE_READLINE_H
+#elif defined (HAVE_READLINE_READLINE_H)
 #  include <readline/readline.h>
 #  ifdef HAVE_READLINE_HISTORY_H
 #    include <readline/history.h>
diff --git a/configure.ac b/configure.ac
index c8a36f5..d4f5c5b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -164,6 +164,7 @@ PKG_CHECK_MODULES([LIBEDIT], [libedit],
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
 AC_HEADER_TIME
+AC_CHECK_HEADERS([edit/readline/readline.h])
 AC_CHECK_HEADERS([sys/param.h])
 AC_CHECK_HEADERS([sys/types.h])
 AC_CHECK_HEADERS([sys/endian.h])



More information about the varnish-commit mailing list