1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00
freebsd-ports/www/varnish/files/patch-configure.ac
2013-09-04 21:03:18 +00:00

29 lines
892 B
Plaintext

--- 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