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 ...@@ -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]) AM_CONDITIONAL([HAVE_ROSEDB], [test "$enable_rosedb" = yes])
# libedit # libedit
AS_IF([test "$enable_utilities" = "yes"],[ AS_IF([test "$enable_daemon" = "yes" -o "$enable_utilities" = "yes"], [
# daemon enabled
PKG_CHECK_MODULES([libedit], [libedit], [with_libedit=yes], [ PKG_CHECK_MODULES([libedit], [libedit], [with_libedit=yes], [
with_libedit=no with_libedit=no
AC_CHECK_HEADER([histedit.h], [ AC_CHECK_HEADER([histedit.h], [
...@@ -446,8 +445,7 @@ AS_IF([test "$enable_utilities" = "yes"],[ ...@@ -446,8 +445,7 @@ AS_IF([test "$enable_utilities" = "yes"],[
AS_IF([test "$with_libedit" != "yes"], [ AS_IF([test "$with_libedit" != "yes"], [
AC_MSG_ERROR([libedit not found]) AC_MSG_ERROR([libedit not found])
]) ])
],[ ], [
# utilities disabled
with_libedit=no with_libedit=no
libedit_CFLAGS= libedit_CFLAGS=
libedit_LIBS= libedit_LIBS=
......
...@@ -194,18 +194,41 @@ libknot_la_CPPFLAGS += \ ...@@ -194,18 +194,41 @@ libknot_la_CPPFLAGS += \
-I$(srcdir)/contrib/lmdb/ -I$(srcdir)/contrib/lmdb/
endif 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 # # Knot DNS Daemon #
################### ###################
if HAVE_DAEMON if HAVE_DAEMON
sbin_PROGRAMS = knotd sbin_PROGRAMS = knotc knotd
if HAVE_UTILS
sbin_PROGRAMS += knotc
endif #HAVE_UTILS
libexec_PROGRAMS = knot1to2 libexec_PROGRAMS = knot1to2
noinst_LTLIBRARIES += libknotd.la noinst_LTLIBRARIES += libknotd.la libknotus.la
EXTRA_DIST += \ EXTRA_DIST += \
utils/knot1to2/cf-lex.l \ utils/knot1to2/cf-lex.l \
...@@ -441,32 +464,6 @@ knsupdate_SOURCES = \ ...@@ -441,32 +464,6 @@ knsupdate_SOURCES = \
utils/knsupdate/knsupdate_params.c \ utils/knsupdate/knsupdate_params.c \
utils/knsupdate/knsupdate_params.h 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 # bin programs
kdig_LDADD = $(libidn_LIBS) libknotus.la kdig_LDADD = $(libidn_LIBS) libknotus.la
khost_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