bind9/lib/ns/Makefile.am
Michał Kępień 4ac4640c40 Fix loading plugins using just their filenames
BIND 9 plugins are installed using Automake's pkglib_LTLIBRARIES stanza,
which causes the relevant shared objects to be placed in the
$(libdir)/@PACKAGE@/ directory, where @PACKAGE@ is expanded to the
lowercase form of the first argument passed to AC_INIT(), i.e. "bind".
Meanwhile, NAMED_PLUGINDIR - the preprocessor macro that the
ns_plugin_expandpath() function uses for determining the absolute path
to a plugin for which only a filename has been provided (rather than a
path) - is set to $(libdir)/named.  This discrepancy breaks loading
plugins using just their filenames.  Fix the issue (and also prevent it
from reoccurring) by setting NAMED_PLUGINDIR to $(pkglibdir).

(cherry picked from commit 5065c4686e)
2022-04-22 13:29:10 +02:00

61 lines
1.1 KiB
Makefile

include $(top_srcdir)/Makefile.top
AM_CPPFLAGS += \
-DNAMED_PLUGINDIR=\"$(pkglibdir)\"
lib_LTLIBRARIES = libns.la
libns_ladir = $(includedir)/ns
libns_la_HEADERS = \
include/ns/client.h \
include/ns/events.h \
include/ns/hooks.h \
include/ns/interfacemgr.h \
include/ns/listenlist.h \
include/ns/log.h \
include/ns/notify.h \
include/ns/query.h \
include/ns/server.h \
include/ns/sortlist.h \
include/ns/stats.h \
include/ns/types.h \
include/ns/update.h \
include/ns/xfrout.h
libns_la_SOURCES = \
$(libns_la_HEADERS) \
client.c \
hooks.c \
interfacemgr.c \
listenlist.c \
log.c \
notify.c \
query.c \
server.c \
sortlist.c \
stats.c \
update.c \
xfrout.c
libns_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(LIBDNS_CFLAGS) \
$(LIBISC_CFLAGS) \
$(LIBNS_CFLAGS) \
$(LIBUV_CFLAGS) \
$(OPENSSL_CFLAGS)
libns_la_LIBADD = \
$(LIBDNS_LIBS) \
$(LIBISC_LIBS) \
$(LIBUV_LIBS) \
$(OPENSSL_LIBS)
libns_la_LDFLAGS = \
$(AM_LDFLAGS) \
-release "$(PACKAGE_VERSION)"
if HAVE_CMOCKA
SUBDIRS = tests
endif