[3.0] da6775e Fix libedit detection on *BSD OS's
Tollef Fog Heen
tfheen at varnish-cache.org
Thu May 24 14:51:11 CEST 2012
commit da6775ef0f4bbc474e2f74e2824743ee91d92f32
Author: Brad <brad at comstyle.com>
Date: Mon Jan 2 14:03:46 2012 -0500
Fix libedit detection on *BSD OS's
The following patch allows the autoconf script to detect the presence of
libedit when there isn't a pkg-config file present and thus allowing
Varnish to detect libedit on OpenBSD/FreeBSD/NetBSD/DragonFly.
Fixes: #1003
diff --git a/configure.ac b/configure.ac
index 41ddf24..55b2281 100644
--- a/configure.ac
+++ b/configure.ac
@@ -149,7 +149,14 @@ AC_SUBST(PCRE_LIBS)
PKG_CHECK_MODULES([LIBEDIT], [libedit],
[AC_DEFINE([HAVE_LIBEDIT], [1], [Define we have libedit])],
- [AC_MSG_WARN([libedit not found, disabling libedit support])])
+ [AC_CHECK_HEADERS([readline/readline.h])
+ AC_CHECK_LIB(edit, el_init,
+ [ AC_DEFINE([HAVE_LIBEDIT], [1], [Define we have libedit])
+ LIBEDIT_CFLAGS=""
+ LIBEDIT_LIBS="-ledit ${CURSES_LIBS}"
+ ],
+ [AC_MSG_WARN([libedit not found, disabling libedit support])],
+ [${CURSES_LIBS}])])
# Checks for header files.
AC_HEADER_STDC
More information about the varnish-commit
mailing list