Some systems contain static libraries in the output of `net-snmp-config
--agent-libs`. It is not possible to build a convenience library with a
static library. Therefore, we just link with the appropriate libs in the
last step. This should fix #57.
priv-bsd.c
endif
+## lldpd
+lldpd_SOURCES = main.c
+lldpd_LDADD = liblldpd.la @LIBEVENT_LDFLAGS@
+
# Add SNMP support if needed
if USE_SNMP
liblldpd_la_SOURCES += agent.c agent_priv.c agent.h
liblldpd_la_CFLAGS += @NETSNMP_CFLAGS@
-liblldpd_la_LIBADD += @NETSNMP_LIBS@
+lldpd_LDADD += @NETSNMP_LIBS@
endif
# seccomp support
liblldpd_la_LIBADD += @SECCOMP_LIBS@
endif
-## lldpd
-lldpd_SOURCES = main.c
-lldpd_LDADD = liblldpd.la @LIBEVENT_LDFLAGS@
-
## Systemtap/DTrace
EXTRA_DIST = dtrace2systemtap.awk
if ENABLE_SYSTEMTAP
check_snmp_SOURCES = check_snmp.c \
$(top_srcdir)/src/daemon/lldpd.h \
$(top_srcdir)/src/daemon/agent.h
+LDADD += @NETSNMP_LIBS@
endif
check_PROGRAMS = $(TESTS)