Commit 0ad28e69 authored by Jan Včelák's avatar Jan Včelák 🚀

build: no libedit detection without daemon

parent 20899900
......@@ -424,6 +424,35 @@ AC_ARG_ENABLE([rosedb],
AS_IF([test "$enable_rosedb" = yes], [AC_DEFINE([HAVE_ROSEDB], [1], [Define to 1 to enable static RR query module.])])
AM_CONDITIONAL([HAVE_ROSEDB], [test "$enable_rosedb" = yes])
# libedit
AS_IF([test "$enable_daemon" = "yes"],[
# daemon enabled
PKG_CHECK_MODULES([libedit], [libedit], [with_libedit=yes], [
with_libedit=no
AC_CHECK_HEADER([histedit.h], [
# workaround for OpenBSD
AS_CASE([$host_os],
[openbsd*], [libedit_deps=-lcurses],
[libedit_deps=]
)
AC_CHECK_LIB([edit], [el_init], [
with_libedit=yes
libedit_CFLAGS=
libedit_LIBS="-ledit $libedit_deps"
], [], [$libedit_deps]
)
])
])
AS_IF([test "$with_libedit" != "yes"], [
AC_MSG_ERROR([libedit not found])
])
],[
# daemon disabled
with_libedit=no
libedit_CFLAGS=
libedit_LIBS=
])
############################################
# Dependencies needed for Knot DNS utilities
############################################
......@@ -447,27 +476,6 @@ AS_IF([test "$with_libidn" != "no"],[
]) # Knot DNS utilities dependencies
# libedit
PKG_CHECK_MODULES([libedit], [libedit], [with_libedit=yes], [
with_libedit=no
AC_CHECK_HEADER([histedit.h], [
# workaround for OpenBSD
AS_CASE([$host_os],
[openbsd*], [libedit_deps=-lcurses],
[libedit_deps=]
)
AC_CHECK_LIB([edit], [el_init], [
with_libedit=yes
libedit_CFLAGS=
libedit_LIBS="-ledit $libedit_deps"
], [], [$libedit_deps]
)
])
])
AS_IF([test "$with_libedit" != "yes"], [
AC_MSG_ERROR([libedit not found])
])
# Bash completions
AC_ARG_WITH([bash-completions],
AC_HELP_STRING([--with-bash-completions=[DIR]], [Bash completions directory [default=no]]),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment