Commit cb9ebd9a authored by Daniel Salzman's avatar Daniel Salzman
Browse files

Merge branch 'libknot-unified' into 'master'

libknot unified

This MR removes extra shared libknot-* libraries from distribution.

There are now only three libraries visible to the public:
libknot
libdnssec
libzscanner

Due to the cross-use of libknot-internal from libknotd and libknotus, some code might be linked twice, but it's inevitable unless we want to expose volatile API/ABI to the outside world.

The few more things:
- Removed all _public_ declarations from internal/* and yparser/*
- Add #include libknot/internal/macros.h to internal/* and yparser/* (as a side effect from playing with symbol visibility)
- Fixed library versioning and bumped libknot from SOVERSION 0 to 1, since some symbols have disappered since (due to visibility)

See merge request !379
parents edc125bc a72d361d
......@@ -56,9 +56,7 @@
/m4/ltversion.m4
/m4/lt~obsolete.m4
/src/dnssec/libdnssec.pc
/src/libknot-int.pc
/src/libknot.pc
/src/libknot-yparser.pc
# dnstap
/src/dnstap/Makefile
......
......@@ -88,3 +88,4 @@ code-coverage-clean:
endif
.PHONY: check-code-coverage code-coverage-initial code-coverage-capture code-coverage-html code-coverage-summary code-coverage-clean singlehtml install-singlehtml
.NOTPARALLEL: clean
......@@ -9,7 +9,32 @@ AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_USE_SYSTEM_EXTENSIONS([_GNU_SOURCE])
AC_CANONICAL_HOST
AX_SET_VERSION_INFO
# Here are a set of rules to help you update your library version
# information:
#
# 1. Start with version information of ‘0:0:0’ for each libtool library.
#
# 2. Update the version information only immediately before a public
# release of your software. More frequent updates are unnecessary,
# and only guarantee that the current interface number gets larger
# faster.
#
# 3. If the library source code has changed at all since the last
# update, then increment revision (‘c:r:a’ becomes ‘c:r+1:a’).
#
# 4. If any interfaces have been added, removed, or changed since the
# last update, increment current, and set revision to 0.
#
# 5. If any interfaces have been added since the last public release,
# then increment age.
#
# 6. If any interfaces have been removed or changed since the last
# public release, then set age to 0.
AC_SUBST([libknot_VERSION_INFO],["-version-info 1:0:0"])
AC_SUBST([libdnssec_VERSION_INFO],["-version-info 0:0:0"])
AC_SUBST([libzscanner_VERSION_INFO],["-version-info 0:1:0"])
# Automatically update release date based on configure.ac date
release_date=$(sed -n 's/^Knot DNS .* (\(.*\))/\1/p;q;' ${srcdir}/NEWS)
......@@ -33,9 +58,9 @@ LT_INIT
# Use pkg-config
m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], [AC_SUBST([pkgconfigdir], ['${libdir}/pkgconfig'])])
AC_CONFIG_FILES([src/libknot.pc
src/libknot-int.pc
src/libknot-yparser.pc
src/dnssec/libdnssec.pc])
src/dnssec/libdnssec.pc
src/zscanner/libzscanner.pc
])
# Build Knot DNS daemon
AC_ARG_ENABLE([daemon],
......@@ -202,8 +227,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
......@@ -225,6 +248,7 @@ AS_IF([test "$with_urcu" != "no"], [
AC_SEARCH_LIBS([rcu_set_pointer_sym], [urcu], [
with_urcu=yes
liburcu_LIBS="$liburcu_LIBS -lurcu"
AC_SUBST([liburcu_CFLAGS])
AC_SUBST([liburcu_LIBS])
break
......@@ -236,6 +260,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,9 +276,9 @@ 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])
AC_SUBST(DNSTAP_CFLAGS)
AC_SUBST(DNSTAP_LIBS)
])
])
......@@ -287,7 +313,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 +325,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"],[
......@@ -373,9 +401,8 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread_np.h>]], [[cpuset_t set; CPU
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sched.h>]], [[cpuset_t* set = cpuset_create(); cpuset_destroy(set);]])],
[AC_DEFINE(HAVE_CPUSET_NETBSD, 1, [Define if cpuset_t and cpuset(3) exists.])])
# Hide all exported symbols by default
# Prepare CFLAG_VISIBILITY to be used where needed
gl_VISIBILITY()
CPPFLAGS="$CPPFLAGS $CFLAG_VISIBILITY"
# Add code coverage macro
AX_CODE_COVERAGE
......@@ -421,8 +448,11 @@ AC_MSG_RESULT([
Target: $host_os $host_cpu
Compiler: ${CC}
CFLAGS: ${CFLAGS} ${CPPFLAGS}
LDFLAGS: ${LDFLAGS}
LIBS: ${LIBS}
LIBS: ${LIBS} ${LDFLAGS}
LibURCU: ${liburcu_LIBS} ${liburcu_CFLAGS}
GnuTLS: ${gnutls_LIBS} ${gnutls_CFLAGS}
Jansson: ${jansson_LIBS} ${jansson_CFLAGS}
LMDB: ${enable_lmdb} ${lmdb_LIBS} ${lmdb_CFLAGS}
Prefix: ${prefix}
Run dir: ${run_dir}
......@@ -434,14 +464,11 @@ AC_MSG_RESULT([
Knot DNS utils: ${enable_utilities}
Knot DNS documentation: ${enable_documentation}
Fast zone parser: ${enable_fastparser}
Utilities with IDN: ${with_libidn}
Systemd integration: ${enable_systemd}
GnuTLS: ${gnutls_CFLAGS} ${gnutls_LIBS}
Jansson: ${jansson_CFLAGS} ${jansson_LIBS}
Dnstap support: ${opt_dnstap}
Code coverage: ${enable_code_coverage}
LMDB support: ${enable_lmdb}
Fast zone parser: ${enable_fastparser}
Utilities with IDN: ${with_libidn}
Systemd integration: ${enable_systemd}
Dnstap support: ${opt_dnstap}
Code coverage: ${enable_code_coverage}
Continue with 'make' command
])
dnl @synopsis AX_SET_VERSION_INFO [(VERSION [,PREFIX])]
dnl @synopsis default $1 = $PACKAGE_VERSION
dnl @synopsis default $2 = <none>
dnl
dnl This macro is the successor of AC_SET_RELEASEINFO_VERSIONINFO but
dnl it can be used in parallel because it uses all different variables.
dnl
dnl check the $VERSION number and cut the two last digit-sequences off
dnl which will form a -version-info in a @VERSION_INFO@ ac_subst while
dnl the rest is going to the -release name in a @RELEASE_INFO@
dnl ac_subst.
dnl
dnl you should keep these two seperate - the release-name may contain
dnl alpha-characters and can be modified later with extra release-hints
dnl e.g. RELEASE_INFO="$RELEASE_INFO-debug" for a debug version of your
dnl lib. The $VERSION_INFO however should not be touched.
dnl
dnl example: a VERSION="2.4.18" will be transformed into
dnl
dnl RELEASE_INFO = -release 2
dnl VERSION_INFO = -versioninfo 4:18
dnl
dnl then use these two variables and push them to your libtool linker
dnl
dnl libtest_la_LIBADD = @RELEASE_INFO@ @VERSION_INFO@
dnl
dnl and for a linux-target this will tell libtool to install the lib as
dnl
dnl libmy.so libmy.la libmy.a libmy-2.so.4 libmy-2.so.4.0.18
dnl
dnl and executables will get link-resolve-infos for libmy-2.so.4 -
dnl therefore the patch-level is ignored during ldso linking, and ldso
dnl will use the one with the highest patchlevel. Using just "-release
dnl $(VERSION)" during libtool-linking would not do that - omitting the
dnl -version-info will libtool install libmy.so libmy.la libmy.a
dnl libmy-2.4.18.so and executables would get hardlinked with the
dnl 2.4.18 version of your lib.
dnl
dnl This background does also explain the default dll name for a win32
dnl target : libtool will choose to make up libmy-2-4.dll for this
dnl version spec.
dnl
dnl this macro does also set the usual three parts of a version spec
dnl $MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION but does not ac_subst
dnl for the plain AX_SET_VERSION_INFO macro. Use instead one of the
dnl numbered macros AX_SET_VERSION_INFO1 (use first number for release
dnl part) or that AX_SET_VERSION_INFO2 (use the first two numbers for
dnl release part).
dnl
dnl You may add sublevel parts like "1.4.2-ac5" where the sublevel is
dnl just killed from these version/release substvars. That allows to
dnl grab the version off a .spec file like with AX_SPEC_PACKAGE_VERSION
dnl where the $VERSION is used to name a tarball or distpack like
dnl mylib-2.2.9pre4
dnl
dnl Unlike earlier macros, you can use this one to break up different
dnl VERSIONs and put them into different variables, just hint with
dnl PREFIX-setting - i.e. _VERSION(2.4.5,TEST) will set variables named
dnl TEST_MAJOR_VERSION=2... and of course $TEST_RELEASE_INFO etc. (for
dnl the moment, it needs to be a literal prefix *sigh*)
dnl
dnl @category Misc
dnl @author Guido U. Draheim <guidod@gmx.de>
dnl @version 2006-10-13
dnl @license GPLWithACException
AC_DEFUN([AX_SET_VERSION_INFO1],[dnl
AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl
AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl
AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl
AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl
AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl
AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl
test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION"
AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl
ifelse($1,,$PACKAGE_VERSION,$1) )
MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )`
MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'`
MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'`
MICRO="$MINOR"
MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'`
MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'`
PATCH="$MICRO"
MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'`
PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/^[[-.]]//'`
if test "_$MICRO" = "_" ; then MICRO="0" ; fi
if test "_$MINOR" = "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi
MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'`
LTREL="-release $MAJOR"
LTVER="-version-info $MINOR:$MICRO"
AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)])
AC_SUBST(MAJOR)
AC_SUBST(MINOR)
AC_SUBST(MICRO)
AC_SUBST(PATCH)
AC_SUBST(LTREL)
AC_SUBST(LTVER)
AS_VAR_POPDEF([LTVER])dnl
AS_VAR_POPDEF([LTREL])dnl
AS_VAR_POPDEF([PATCH])dnl
AS_VAR_POPDEF([MICRO])dnl
AS_VAR_POPDEF([MINOR])dnl
AS_VAR_POPDEF([MAJOR])dnl
])
AC_DEFUN([AX_SET_VERSION_INFO2],[dnl
AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl
AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl
AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl
AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl
AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl
AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl
test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION"
AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl
ifelse($1,,$PACKAGE_VERSION,$1) )
MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )`
MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'`
MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'`
MICRO="$MINOR"
MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'`
MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'`
PATCH="$MICRO"
MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'`
PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/^[[-.]]//'`
test "_$MICRO" != "_" || MICRO="0"
if test "_$MINOR" != "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi
MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'`
LTREL="-release $MAJOR.$MINOR"
LTVER="-version-info 0:$MICRO"
AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)])
AC_SUBST(MAJOR)
AC_SUBST(MINOR)
AC_SUBST(MICRO)
AC_SUBST(PATCH)
AC_SUBST(LTREL)
AC_SUBST(LTVER)
AS_VAR_POPDEF([LTVER])dnl
AS_VAR_POPDEF([LTREL])dnl
AS_VAR_POPDEF([PATCH])dnl
AS_VAR_POPDEF([MICRO])dnl
AS_VAR_POPDEF([MINOR])dnl
AS_VAR_POPDEF([MAJOR])dnl
])
AC_DEFUN([AX_SET_VERSION_INFO],[dnl
AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl
AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl
AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl
AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl
AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl
AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl
test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION"
AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl
ifelse($1,,$PACKAGE_VERSION,$1) )
MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )`
MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'`
MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'`
MICRO="$MINOR"
MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'`
MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'`
PATCH="$MICRO"
MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'`
PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/[[-.]]//'`
if test "_$MICRO" = "_" ; then MICRO="0" ; fi
if test "_$MINOR" = "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi
MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'`
LTREL="-release $MAJOR"
LTVER="-version-info $MINOR:$MICRO"
AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)])
AC_SUBST(LTREL)
AC_SUBST(LTVER)
AS_VAR_POPDEF([LTVER])dnl
AS_VAR_POPDEF([LTREL])dnl
AS_VAR_POPDEF([PATCH])dnl
AS_VAR_POPDEF([MICRO])dnl
AS_VAR_POPDEF([MINOR])dnl
AS_VAR_POPDEF([MAJOR])dnl
])
......@@ -2,10 +2,10 @@ ACLOCAL_AMFLAGS = -I $(top_srcdir)/m4
SUBDIRS = zscanner dnssec dnstap .
lib_LTLIBRARIES = \
libknot-int.la \
libknot.la \
libknot.la
noinst_LTLIBRARIES = \
libknot-internal.la \
libknot-yparser.la
noinst_LTLIBRARIES =
AM_CPPFLAGS = \
-include $(top_builddir)/src/config.h \
......@@ -21,77 +21,6 @@ AM_LDFLAGS = $(CODE_COVERAGE_LDFLAGS)
# Knot DNS Libraries #
######################
# dynamic: libknot internal headers
libknot_int_ladir = $(includedir)
nobase_libknot_int_la_HEADERS = \
libknot/internal/array-sort.h \
libknot/internal/base32hex.h \
libknot/internal/base64.h \
libknot/internal/binsearch.h \
libknot/internal/consts.h \
libknot/internal/endian.h \
libknot/internal/errcode.h \
libknot/internal/getline.h \
libknot/internal/heap.h \
libknot/internal/hhash.h \
libknot/internal/lists.h \
libknot/internal/macros.h \
libknot/internal/mem.h \
libknot/internal/mempattern.h \
libknot/internal/mempool.h \
libknot/internal/namedb/namedb.h \
libknot/internal/namedb/namedb_lmdb.h \
libknot/internal/namedb/namedb_trie.h \
libknot/internal/net.h \
libknot/internal/print.h \
libknot/internal/sockaddr.h \
libknot/internal/strlcat.h \
libknot/internal/strlcpy.h \
libknot/internal/tolower.h \
libknot/internal/trie/hat-trie.h \
libknot/internal/trie/murmurhash3.h \
libknot/internal/utils.h
libknot_yparser_ladir = $(includedir)
nobase_libknot_yparser_la_HEADERS = \
libknot/yparser/yparser.h \
libknot/yparser/ypformat.h \
libknot/yparser/ypscheme.h \
libknot/yparser/yptrafo.h
# dynamic: libknot internal sources
libknot_int_la_SOURCES = \
libknot/internal/base32hex.c \
libknot/internal/base64.c \
libknot/internal/errcode.c \
libknot/internal/getline.c \
libknot/internal/heap.c \
libknot/internal/hhash.c \
libknot/internal/lists.c \
libknot/internal/mem.c \
libknot/internal/mempattern.c \
libknot/internal/mempool.c \
libknot/internal/namedb/namedb_lmdb.c \
libknot/internal/namedb/namedb_trie.c \
libknot/internal/net.c \
libknot/internal/print.c \
libknot/internal/sockaddr.c \
libknot/internal/strlcat.c \
libknot/internal/strlcpy.c \
libknot/internal/tolower.c \
libknot/internal/trie/hat-trie.c \
libknot/internal/trie/murmurhash3.c \
libknot/internal/utils.c \
$(nobase_libknot_int_la_HEADERS)
libknot_yparser_la_SOURCES = \
libknot/yparser/yparser.c \
libknot/yparser/ypbody.c \
libknot/yparser/ypformat.c \
libknot/yparser/ypscheme.c \
libknot/yparser/yptrafo.c \
$(nobase_libknot_yparser_la_HEADERS)
# dynamic: libknot headers
libknot_ladir = $(includedir)
nobase_libknot_la_HEADERS = \
......@@ -126,6 +55,43 @@ nobase_libknot_la_HEADERS = \
libknot/rrtype/tsig.h \
libknot/tsig-op.h
libknot_yparser_ladir = $(includedir)
libknot_yparser_la_HEADERS = \
libknot/yparser/yparser.h \
libknot/yparser/ypformat.h \
libknot/yparser/ypscheme.h \
libknot/yparser/yptrafo.h
libknot_internal_ladir = $(includedir)
libknot_internal_la_HEADERS = \
libknot/internal/array-sort.h \
libknot/internal/base32hex.h \
libknot/internal/base64.h \
libknot/internal/binsearch.h \
libknot/internal/consts.h \
libknot/internal/endian.h \
libknot/internal/errcode.h \
libknot/internal/getline.h \
libknot/internal/heap.h \
libknot/internal/hhash.h \
libknot/internal/lists.h \
libknot/internal/macros.h \
libknot/internal/mem.h \
libknot/internal/mempattern.h \
libknot/internal/mempool.h \
libknot/internal/namedb/namedb.h \
libknot/internal/namedb/namedb_lmdb.h \
libknot/internal/namedb/namedb_trie.h \
libknot/internal/net.h \
libknot/internal/print.h \
libknot/internal/sockaddr.h \
libknot/internal/strlcat.h \
libknot/internal/strlcpy.h \
libknot/internal/tolower.h \
libknot/internal/trie/hat-trie.h \
libknot/internal/trie/murmurhash3.h \
libknot/internal/utils.h
# dynamic: libknot sources
libknot_la_SOURCES = \
libknot/binary.c \
......@@ -151,29 +117,56 @@ libknot_la_SOURCES = \
libknot/tsig-op.c \
$(nobase_libknot_la_HEADERS)
libknot_int_la_CPPFLAGS = $(AM_CPPFLAGS) $(lmdb_CFLAGS)
libknot_int_la_CFLAGS = $(AM_CFLAGS) -fvisibility=default
libknot_int_la_LDFLAGS = $(AM_LDFLAGS) $(RELEASE_INFO) $(VERSION_INFO) $(lmdb_LIBS)
libknot_yparser_la_SOURCES = \
libknot/yparser/yparser.c \
libknot/yparser/ypbody.c \
libknot/yparser/ypformat.c \
libknot/yparser/ypscheme.c \
libknot/yparser/yptrafo.c \
$(libknot_yparser_la_HEADERS)
libknot_internal_la_SOURCES = \
libknot/internal/base32hex.c \
libknot/internal/base64.c \
libknot/internal/errcode.c \
libknot/internal/getline.c \
libknot/internal/heap.c \
libknot/internal/hhash.c \
libknot/internal/lists.c \
libknot/internal/mem.c \
libknot/internal/mempattern.c \
libknot/internal/mempool.c \
libknot/internal/namedb/namedb_lmdb.c \
libknot/internal/namedb/namedb_trie.c \
libknot/internal/net.c \
libknot/internal/print.c \
libknot/internal/sockaddr.c \
libknot/internal/strlcat.c \
libknot/internal/strlcpy.c \
libknot/internal/tolower.c \
libknot/internal/trie/hat-trie.c \
libknot/internal/trie/murmurhash3.c \
libknot/internal/utils.c \
$(libknot_internal_la_HEADERS)
libknot_yparser_la_CPPFLAGS = $(AM_CPPFLAGS) $(lmdb_CFLAGS)
libknot_yparser_la_CFLAGS = $(AM_CFLAGS)
libknot_yparser_la_LDFLAGS = $(AM_LDFLAGS) $(RELEASE_INFO) $(VERSION_INFO)
libknot_yparser_la_LIBADD = libknot-int.la libknot.la
libknot_internal_la_CPPFLAGS = $(AM_CPPFLAGS) $(lmdb_CFLAGS)
libknot_internal_la_CFLAGS = $(AM_CFLAGS)
libknot_la_CPPFLAGS = $(AM_CPPFLAGS)
libknot_la_LDFLAGS = $(AM_LDFLAGS) $(RELEASE_INFO) $(VERSION_INFO)
libknot_la_LIBADD = libknot-int.la dnssec/libdnssec.la zscanner/libzscanner.la
libknot_la_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAG_VISIBILITY) $(lmdb_CFLAGS)
libknot_la_CFLAGS = $(AM_CFLAGS)
libknot_la_LDFLAGS = $(AM_LDFLAGS) $(libknot_VERSION_INFO) $(lmdb_LIBS)
libknot_la_LIBADD = dnssec/libdnssec.la libknot-internal.la
# pkg-config
pkgconfig_DATA = libknot.pc libknot-int.pc libknot-yparser.pc
pkgconfig_DATA = libknot.pc
if !HAVE_LMDB
libknot_int_la_SOURCES += \
libknot_internal_la_SOURCES += \
libknot/internal/namedb/mdb.c \
libknot/internal/namedb/midl.c \
libknot/internal/namedb/lmdb.h \
libknot/internal/namedb/midl.h
libknot_int_la_CPPFLAGS += \
libknot_internal_la_CPPFLAGS += \
-I$(srcdir)/libknot/internal/namedb/
endif
......@@ -338,13 +331,14 @@ 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_LIBADD = libknot.la
libknotd_la_CPPFLAGS = $(AM_CPPFLAGS) $(systemd_CFLAGS) $(liburcu_CFLAGS)
libknotd_la_LDFLAGS = $(AM_LDFLAGS) $(systemd_LIBS) $(liburcu_LIBS)
libknotd_la_LIBADD = libknot.la libknot-yparser.la libknot-internal.la zscanner/libzscanner.la $(liburcu_LIBS)
knotd_LDADD = libknotd.la libknot-yparser.la
knotc_LDADD = libknotd.la libknot-yparser.la
knot1to2_LDADD = libknot-int.la
knotd_CPPFLAGS = $(AM_CPPFLAGS) $(liburcu_CFLAGS)
knotd_LDADD = libknotd.la libknot.la $(liburcu_LIBS)
knotc_LDADD = libknotd.la libknot.la
knot1to2_LDADD = libknotd.la libknot.la
####################################
# Optional Knot DNS Daemon modules #
......@@ -354,14 +348,14 @@ 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
libknotd_la_SOURCES += \
knot/modules/rosedb.c \
knot/modules/rosedb.h
libknotd_la_LIBADD += libknot-yparser.la
endif # HAVE_ROSEDB
# Create storage and run-time directories
......@@ -424,7 +418,7 @@ libknotus_la_SOURCES = \
libknotus_la_CPPFLAGS = $(AM_CPPFLAGS) $(libidn_CFLAGS)
libknotus_la_LDFLAGS = $(AM_LDFLAGS) $(libidn_LIBS)
libknotus_la_LIBADD = libknot-int.la libknot.la
libknotus_la_LIBADD = libknot.la libknot-internal.la
# bin programs
kdig_LDADD = $(libidn_LIBS) libknotus.la
......@@ -436,14 +430,14 @@ knsupdate_LDADD = zscanner/libzscanner.la libknotus.la
#######################################
if HAVE_DNSTAP
kdig_LDADD += dnstap/libdnstap.la
khost_LDADD += dnstap/libdnstap.la
kdig_LDADD += $(DNSTAP_LIBS) dnstap/libdnstap.la
khost_LDADD += $(DNSTAP_LIBS) dnstap/libdnstap.la
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
......@@ -42,12 +42,12 @@ libshared_la_SOURCES = \
libdnssec_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
-fvisibility=hidden
$(CFLAG_VISIBILITY)
libdnssec_la_LDFLAGS = \
$(gnutls_LIBS) \
$(jansson_LIBS) \
$(VERSION_INFO)
$(libdnssec_VERSION_INFO)
libdnssec_la_LIBADD = \
libshared.la
......
......@@ -4,10 +4,10 @@ libdir=@libdir@
includedir=@includedir@
Name: libdnssec
Description: Knot DNSSEC library
Description: Knot DNS DNSSEC library
URL: https://www.knot-dns.cz
Version: @PACKAGE_VERSION@
Requires: gnutls >= 3.0
Requires.private: nettle, jansson
Requires.private: gnutls >= 3.0, jansson
Libs: -L${libdir} -ldnssec
Libs.private: -lm
Cflags: -I${includedir}
prefix=@prefix@
exec_prefix=@prefix@
libdir=@libdir@
includedir=@includedir@
Name: libknot-int
Description: Knot DNS library (common data structures)
URL: https://www.knot-dns.cz
Version: @PACKAGE_VERSION@
Libs: -L${libdir}
Libs.private: @lmdb_LIBS@
Cflags: -I${includedir} @lmdb_CFLAGS@
......@@ -7,8 +7,7 @@ Name: libknot
Description: Knot DNS library
URL: https://www.knot-dns.cz
Version: @PACKAGE_VERSION@
Requires: libknot-int = @PACKAGE_VERSION@, libdnssec = @PACKAGE_VERSION@