# # The Net-SNMP libraries are built without -zdefs and are missing a large # number of dependency specifications (DT_NEEDED). This makes it # impossible to build plugin modules against these libraries using # -zdefs, which should work. One such example is FMA in ON gate. # Solaris-specific; not suitable for upstream # --- net-snmp-5.9.4/agent/Makefile.in.orig +++ net-snmp-5.9.4/agent/Makefile.in @@ -280,9 +280,13 @@ FTOBJS = $(LLIBAGENTFTS) $(FTMIBOBJS) $(FTAGENTOBJS) \ mib_modules.ft auto_nlist.ft +LIB_LD_ADD_AGENT =-lnetsnmp -lnetsnmphelpers + +LIB_LD_ADD_PATH_MIBS =-Lhelpers -L../snmplib + FEATUREFILE = $(top_builddir)/include/net-snmp/agent/features.h -all: agentlib subdirs miblib $(INSTALLBINPROGS) $(INSTALLSBINPROGS) +all: agentlib subdirs miblib relinklib $(INSTALLBINPROGS) $(INSTALLSBINPROGS) # # build stuff targets @@ -312,6 +316,10 @@ agentlib: $(AGENTLIB) +relinklib: ${LLIBAGENTOBJS} $(USELIBS) + $(LIB_LD_CMD) $(AGENTLIB) $(LIB_LD_ADD_PATH_MIBS) ${LLIBAGENTOBJS} $(USELIBS) ${LAGENTLIBS} $(LDFLAGS) $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) $(LIB_LD_ADD_AGENT) + $(RANLIB) $(AGENTLIB) $(LIB_LD_ADD_AGENT) + miblib: $(MIBLIB) libs: $(AGENTLIB) $(MIBLIB) --- net-snmp-5.9.4/agent/helpers/Makefile.in.orig +++ net-snmp-5.9.4/agent/helpers/Makefile.in @@ -29,8 +29,11 @@ LOBJS = dummy.lo +LIB_LD_ADD =-lnetsnmp +LIB_LD_ADD_PATH =-L../../snmplib + all: standardall libnetsnmphelpers.$(LIB_EXTENSION)$(LIB_VERSION): $(LOBJS) - $(LIB_LD_CMD) $@ $(LOBJS) $(LDFLAGS) - $(RANLIB) $@ + $(LIB_LD_CMD) $@ $(LIB_LD_ADD_PATH) $(LOBJS) $(LDFLAGS) $(LIB_LD_LIBS) $(LIB_LD_ADD) + $(RANLIB) $@ $(LIB_LD_ADD) --- net-snmp-5.9.4/snmplib/Makefile.in.orig +++ net-snmp-5.9.4/snmplib/Makefile.in @@ -221,6 +221,9 @@ # just in case someone wants to remove libtool, change this to OBJS. TOBJS=$(LOBJS) +# To satisfy -zdefs +LIB_LD_ADD =-lnsl -lsocket -L$(libdir) + FEATUREFILE = $(top_builddir)/include/net-snmp/library/features.h #