summaryrefslogtreecommitdiff
path: root/www/varnish/files/patch-configure.ac
blob: 2f70bdd2028ab76a1f2d55bd66bb7fc988ea95d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- configure.ac.orig	2013-06-14 10:39:32.000000000 +0200
+++ configure.ac	2013-09-04 22:58:56.000000000 +0200
@@ -147,9 +147,22 @@
 AC_SUBST(PCRE_CFLAGS)
 AC_SUBST(PCRE_LIBS)
 
-PKG_CHECK_MODULES([LIBEDIT], [libedit], 
-	[AC_DEFINE([HAVE_LIBEDIT], [1], [Define we have libedit])],
-	[AX_LIB_READLINE])
+case $target in
+*-*-freebsd*)
+	AC_CHECK_LIB(edit, el_init,
+		[ AC_DEFINE([HAVE_LIBEDIT], [1], [Define we have libedit])
+		  AC_DEFINE([HAVE_READLINE_READLINE_H], [1], [Define if we have readline.h])
+		  LIBEDIT_CFLAGS=""
+		  LIBEDIT_LIBS="-lreadline ${CURSES_LIBS}"
+		],
+		[AC_MSG_WARN([libedit not found, disabling libedit support])])
+	;;
+*)
+	PKG_CHECK_MODULES([LIBEDIT], [libedit], 
+		[AC_DEFINE([HAVE_LIBEDIT], [1], [Define we have libedit])],
+		[AX_LIB_READLINE])
+	;;
+esac
 if test "$ac_cv_have_readline" = no; then
   AC_MSG_ERROR([libedit or readline not found])
 fi