Commit 242aee01 authored by Karel Slaný's avatar Karel Slaný Committed by Daniel Salzman

Fixed conditional building of knotc.

Application knotc should be built together with the daemon. Static
utilities library is built together with daemon and/or the utilities.
parent f47096bd
......@@ -425,8 +425,7 @@ AS_IF([test "$enable_rosedb" = yes], [AC_DEFINE([HAVE_ROSEDB], [1], [Define to 1
AM_CONDITIONAL([HAVE_ROSEDB], [test "$enable_rosedb" = yes])
# libedit
AS_IF([test "$enable_utilities" = "yes"],[
# daemon enabled
AS_IF([test "$enable_daemon" = "yes" -o "$enable_utilities" = "yes"], [
PKG_CHECK_MODULES([libedit], [libedit], [with_libedit=yes], [
with_libedit=no
AC_CHECK_HEADER([histedit.h], [
......@@ -446,8 +445,7 @@ AS_IF([test "$enable_utilities" = "yes"],[
AS_IF([test "$with_libedit" != "yes"], [
AC_MSG_ERROR([libedit not found])
])
],[
# utilities disabled
], [
with_libedit=no
libedit_CFLAGS=
libedit_LIBS=
......
......@@ -194,18 +194,41 @@ libknot_la_CPPFLAGS += \
-I$(srcdir)/contrib/lmdb/
endif
# static: utilities shared
libknotus_la_SOURCES = \
utils/common/exec.c \
utils/common/exec.h \
utils/common/hex.c \
utils/common/hex.h \
utils/common/lookup.c \
utils/common/lookup.h \
utils/common/msg.c \
utils/common/msg.h \
utils/common/netio.c \
utils/common/netio.h \
utils/common/params.c \
utils/common/params.h \
utils/common/resolv.c \
utils/common/resolv.h \
utils/common/sign.c \
utils/common/sign.h \
utils/common/strtonum.h \
utils/common/token.c \
utils/common/token.h
libknotus_la_CPPFLAGS = $(AM_CPPFLAGS) $(libidn_CFLAGS) $(libedit_CFLAGS)
libknotus_la_LDFLAGS = $(AM_LDFLAGS) $(libidn_LIBS)
libknotus_la_LIBADD = libcontrib.la libknot.la
###################
# Knot DNS Daemon #
###################
if HAVE_DAEMON
sbin_PROGRAMS = knotd
if HAVE_UTILS
sbin_PROGRAMS += knotc
endif #HAVE_UTILS
sbin_PROGRAMS = knotc knotd
libexec_PROGRAMS = knot1to2
noinst_LTLIBRARIES += libknotd.la
noinst_LTLIBRARIES += libknotd.la libknotus.la
EXTRA_DIST += \
utils/knot1to2/cf-lex.l \
......@@ -441,32 +464,6 @@ knsupdate_SOURCES = \
utils/knsupdate/knsupdate_params.c \
utils/knsupdate/knsupdate_params.h
# static: utilities shared
libknotus_la_SOURCES = \
utils/common/exec.c \
utils/common/exec.h \
utils/common/hex.c \
utils/common/hex.h \
utils/common/lookup.c \
utils/common/lookup.h \
utils/common/msg.c \
utils/common/msg.h \
utils/common/netio.c \
utils/common/netio.h \
utils/common/params.c \
utils/common/params.h \
utils/common/resolv.c \
utils/common/resolv.h \
utils/common/sign.c \
utils/common/sign.h \
utils/common/strtonum.h \
utils/common/token.c \
utils/common/token.h
libknotus_la_CPPFLAGS = $(AM_CPPFLAGS) $(libidn_CFLAGS) $(libedit_CFLAGS)
libknotus_la_LDFLAGS = $(AM_LDFLAGS) $(libidn_LIBS)
libknotus_la_LIBADD = libcontrib.la libknot.la
# bin programs
kdig_LDADD = $(libidn_LIBS) libknotus.la
khost_LDADD = $(libidn_LIBS) libknotus.la
......
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