Commit 88c2441b authored by Ondřej Surý's avatar Ondřej Surý

Link urcu and lmdb only where needed

parent 5d0f3cfc
......@@ -202,8 +202,6 @@ AS_IF([test "$enable_daemon" = "yes"],[
AS_IF([test "$with_urcu" != "no"], [
PKG_CHECK_MODULES([liburcu], liburcu, [
CPPFLAGS="$CPPFLAGS $liburcu_CFLAGS"
LIBS="$LIBS $liburcu_LIBS"
liburcu_PKGCONFIG="liburcu >= 0.4.0"
AC_SUBST([liburcu_PKGCONFIG])
with_urcu=yes
......@@ -236,6 +234,8 @@ AS_IF([test "$with_urcu" != "no"], [
unset ac_cv_search_rcu_set_pointer_sym
])
done
CPPFLAGS="$save_CPPFLAGS"
LIBS="$save_LIBS"
AS_IF([test "$with_urcu" = "no"],[
AC_MSG_ERROR([liburcu is required])
......@@ -250,8 +250,6 @@ opt_dnstap=no
AS_IF([test "$enable_daemon" = "yes"],[
dnl Check for dnstap.
dt_DNSTAP([
LIBS="$LIBS $DNSTAP_LIBS"
CPPFLAGS="$CPPFLAGS $DNSTAP_CFLAGS"
AC_DEFINE([USE_DNSTAP], [1], [Define to 1 to enable dnstap support])
])
])
......@@ -287,7 +285,7 @@ AS_IF([test "$with_lmdb" != "no"],[
AC_SEARCH_LIBS([mdb_env_open], [lmdb], [
AC_CHECK_HEADERS([lmdb.h], [], [
AC_ERROR([lmdb headers not found in `$try_lmdb', is your installation complete?])])
lmdb_LIBS="-llmdb"
lmdb_LIBS="$lmdb_LIBS -llmdb"
have_lmdb=yes
break
],[
......@@ -299,6 +297,8 @@ AS_IF([test "$with_lmdb" != "no"],[
CPPFLAGS="$save_CPPFLAGS"
LIBS="$save_LIBS"
done
CPPFLAGS="$save_CPPFLAGS"
LIBS="$save_LIBS"
])
AS_IF([test "$have_lmdb" != "no"],[
......
......@@ -338,8 +338,8 @@ libknotd_la_SOURCES = \
knot/zone/zonefile.c \
knot/zone/zonefile.h
libknotd_la_CPPFLAGS = $(AM_CPPFLAGS) $(systemd_CFLAGS)
libknotd_la_LDFLAGS = $(AM_LDFLAGS) $(systemd_LIBS)
libknotd_la_CPPFLAGS = $(AM_CPPFLAGS) $(systemd_CFLAGS) $(liburcu_CFLAGS)
libknotd_la_LDFLAGS = $(AM_LDFLAGS) $(systemd_LIBS) $(liburcu_LIBS)
libknotd_la_LIBADD = libknot.la
knotd_LDADD = libknotd.la libknot-yparser.la
......@@ -354,7 +354,8 @@ if HAVE_DNSTAP
libknotd_la_SOURCES += \
knot/modules/dnstap.c \
knot/modules/dnstap.h
libknotd_la_LIBADD += dnstap/libdnstap.la
libknotd_la_CPPFLAGS += $(DNSTAP_CFLAGS)
libknotd_la_LIBADD += $(DNSTAP_LIBS) dnstap/libdnstap.la
endif # HAVE_DNSTAP
if HAVE_ROSEDB
......@@ -443,7 +444,7 @@ endif # HAVE_DNSTAP
if HAVE_ROSEDB
bin_PROGRAMS += rosedb_tool
rosedb_tool_SOURCES = knot/modules/rosedb_tool.c
rosedb_tool_LDADD = $(libknot_LIBS) libknotd.la
rosedb_tool_LDADD = libknotd.la
endif # HAVE_ROSEDB
endif # HAVE_UTILS
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