---
bgpd/Makefile.am | 1 +
configure.ac | 6 ++++--
lib/Makefile.am | 13 +++++++++++--
ospf6d/Makefile.am | 2 +-
ospfd/Makefile.am | 2 +-
ripd/Makefile.am | 2 +-
zebra/Makefile.am | 2 +-
7 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/bgpd/Makefile.am b/bgpd/Makefile.am
index e8bd218..8c142d1 100644
--- a/bgpd/Makefile.am
+++ b/bgpd/Makefile.am
@@ -38,6 +38,7 @@ lib_LTLIBRARIES = bgp_snmp.la
bgp_snmp_la_SOURCES = bgp_snmp.c
bgp_snmp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+bgp_snmp_la_LIBADD = $(top_builddir)/lib/libquaggasnmp.la
examplesdir = $(exampledir)
dist_examples_DATA = bgpd.conf.sample bgpd.conf.sample2
diff --git a/configure.ac b/configure.ac
index 5f8e8d3..ccea389 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1229,8 +1229,8 @@ if test "${enable_snmp}" != ""; then
if test x"$NETSNMP_CONFIG" = x"no"; then
AC_MSG_ERROR([--enable-snmp given but unable to find net-snmp-config])
fi
- LIBS="$LIBS `${NETSNMP_CONFIG} --agent-libs`"
- CFLAGS="`${NETSNMP_CONFIG} --base-cflags` $CFLAGS"
+ SNMP_LIBS="`${NETSNMP_CONFIG} --agent-libs`"
+ SNMP_CFLAGS="`${NETSNMP_CONFIG} --base-cflags`"
AC_MSG_CHECKING([whether we can link to Net-SNMP])
AC_LINK_IFELSE([AC_LANG_PROGRAM([
int main(void);
@@ -1258,6 +1258,8 @@ int main(void);
AH_TEMPLATE([SNMP_AGENTX], [Use SNMP AgentX to interface with snmpd])
AC_DEFINE_UNQUOTED(AS_TR_CPP(SNMP_${SNMP_METHOD}),,SNMP method to interface
with snmpd)
fi
+AC_SUBST(SNMP_LIBS)
+AC_SUBST(SNMP_CFLAGS)
dnl ---------------------------
dnl sockaddr and netinet checks
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 6ba1724..44b3b0e 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -4,7 +4,7 @@ AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib
-I$(top_builddir)/lib
AM_CFLAGS = $(WERROR)
DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
-lib_LTLIBRARIES = libzebra.la
+lib_LTLIBRARIES = libzebra.la libquaggasnmp.la
libzebra_la_LDFLAGS = -version-info 0:0:0
libzebra_la_SOURCES = \
@@ -12,7 +12,7 @@ libzebra_la_SOURCES = \
checksum.c vector.c linklist.c vty.c command.c \
sockunion.c prefix.c thread.c if.c buffer.c table.c hash.c \
filter.c routemap.c distribute.c stream.c str.c log.c plist.c \
- zclient.c sockopt.c smux.c agentx.c snmp.c md5.c if_rmap.c keychain.c
privs.c \
+ zclient.c sockopt.c md5.c if_rmap.c keychain.c privs.c \
sigevent.c pqueue.c jhash.c workqueue.c vrf.c \
memory.c \
memory_vty.c \
@@ -26,6 +26,15 @@ libzebra_la_DEPENDENCIES = @LIB_REGEX@
libzebra_la_LIBADD = -ldl @LIB_REGEX@ @LIBCAP@
+libquaggasnmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS)
+libquaggasnmp_la_LDFLAGS = -version-info 0:0:0
+libquaggasnmp_la_LIBADD = libzebra.la $(SNMP_LIBS)
+libquaggasnmp_la_SOURCES = \
+ agentx.c \
+ smux.c \
+ snmp.c \
+ #end
+
pkginclude_HEADERS = \
buffer.h checksum.h command.h filter.h getopt.h hash.h \
if.h linklist.h log.h \
diff --git a/ospf6d/Makefile.am b/ospf6d/Makefile.am
index d988ae9..636835b 100644
--- a/ospf6d/Makefile.am
+++ b/ospf6d/Makefile.am
@@ -28,7 +28,7 @@ noinst_HEADERS = \
ospf6d_SOURCES = \
ospf6_main.c $(libospf6_a_SOURCES)
-ospf6d_LDADD = ../lib/libzebra.la @LIBCAP@
+ospf6d_LDADD = ../lib/libzebra.la ../lib/libquaggasnmp.la @LIBCAP@
examplesdir = $(exampledir)
dist_examples_DATA = ospf6d.conf.sample
diff --git a/ospfd/Makefile.am b/ospfd/Makefile.am
index 7055ea5..550183c 100644
--- a/ospfd/Makefile.am
+++ b/ospfd/Makefile.am
@@ -7,7 +7,7 @@ INSTALL_SDATA=@INSTALL@ -m 600
lib_LTLIBRARIES = libospf.la
libospf_la_LDFLAGS = -version-info 0:0:0
-libospf_la_LIBADD = ../lib/libzebra.la
+libospf_la_LIBADD = ../lib/libzebra.la ../lib/libquaggasnmp.la
sbin_PROGRAMS = ospfd
diff --git a/ripd/Makefile.am b/ripd/Makefile.am
index e7073a7..0c8c6ea 100644
--- a/ripd/Makefile.am
+++ b/ripd/Makefile.am
@@ -21,7 +21,7 @@ noinst_HEADERS = \
ripd_SOURCES = \
rip_main.c $(librip_a_SOURCES)
-ripd_LDADD = ../lib/libzebra.la @LIBCAP@
+ripd_LDADD = ../lib/libzebra.la ../lib/libquaggasnmp.la @LIBCAP@
examplesdir = $(exampledir)
dist_examples_DATA = ripd.conf.sample
diff --git a/zebra/Makefile.am b/zebra/Makefile.am
index 63d0376..cacdc91 100644
--- a/zebra/Makefile.am
+++ b/zebra/Makefile.am
@@ -46,7 +46,7 @@ noinst_HEADERS = \
rt_netlink.h zebra_fpm.h zebra_fpm_private.h \
ioctl_solaris.h
-zebra_LDADD = $(otherobj) ../lib/libzebra.la $(LIBCAP)
+zebra_LDADD = $(otherobj) ../lib/libzebra.la ../lib/libquaggasnmp.la $(LIBCAP)
testzebra_LDADD = ../lib/libzebra.la $(LIBCAP)
--
2.7.3
_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev