even more better way to disable snmp

This commit is contained in:
whottgen 2004-11-05 09:28:12 +00:00
parent 2d4e3ffaf6
commit ce4f26b134
6 changed files with 15 additions and 15 deletions

View File

@ -1,5 +1,8 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* enable Net-SNMP */
#undef ENABLE_NETSNMP
/* enable stats */
#undef ENABLE_STATS
@ -51,9 +54,6 @@
/* Define to 1 if you have the `resolv' library (-lresolv). */
#undef HAVE_LIBRESOLV
/* have libsnmp */
#undef HAVE_LIBSNMP
/* Define to 1 if you have the `socket' library (-lsocket). */
#undef HAVE_LIBSOCKET

6
smmapdfw/configure vendored
View File

@ -19430,11 +19430,11 @@ fi
fi
HAVE_LIBSNMP=0
ENABLE_NETSNMP=0
if test "x$WITHOUT_NETSNMP" = "x0"; then
NETSNMP_LIBS=`net-snmp-config --netsnmp-agent-libs`
LIBS="$LIBS $NETSNMP_LIBS"
HAVE_LIBSNMP=1
ENABLE_NETSNMP=1
fi
@ -21427,7 +21427,7 @@ _ACEOF
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSNMP ${HAVE_LIBSNMP}
#define ENABLE_NETSNMP ${ENABLE_NETSNMP}
_ACEOF

View File

@ -197,11 +197,11 @@ if test "x$WITHOUT_DJBDNS" = "x0"; then
AC_CHECK_LIB([djbdns], [dns_transmit_start])
fi
HAVE_LIBSNMP=0
ENABLE_NETSNMP=0
if test "x$WITHOUT_NETSNMP" = "x0"; then
NETSNMP_LIBS=`net-snmp-config --netsnmp-agent-libs`
LIBS="$LIBS $NETSNMP_LIBS"
HAVE_LIBSNMP=1
ENABLE_NETSNMP=1
fi
@ -256,7 +256,7 @@ fi
AC_DEFINE_UNQUOTED(ENABLE_VERIFY_CACHE, ${ENABLE_VERIFY_CACHE}, [enable verify cache])
AC_DEFINE_UNQUOTED(ENABLE_STATS, ${ENABLE_STATS}, [enable stats])
AC_DEFINE_UNQUOTED(HAVE_LIBSNMP, ${HAVE_LIBSNMP}, [have libsnmp])
AC_DEFINE_UNQUOTED(ENABLE_NETSNMP, ${ENABLE_NETSNMP}, [enable Net-SNMP])

View File

@ -101,7 +101,7 @@ pthread_t cleanerThread;
pthread_t statsThread;
#endif
#if HAVE_LIBSNMP==1
#if ENABLE_NETSNMP==1
pthread_t snmpThread;
#endif
count_t thread_counter;
@ -120,7 +120,7 @@ void * statser(void * arg) {
}
#endif
#if HAVE_LIBSNMP==1
#if ENABLE_NETSNMP==1
void * snmper(void * arg) {
snmp_subagent_main();
}
@ -307,13 +307,13 @@ int server() {
}
#endif /* ENABLE_STATS */
#if HAVE_LIBSNMP==1
#if ENABLE_NETSNMP==1
enableSnmp = atoi(findcfgx(cfg, "global", "enable_snmp", "0"));
if (enableSnmp) {
syslog(LOG_INFO, "server: starting snmp subagent thread");
pthread_create(&snmpThread, NULL, &snmper, NULL);
}
#endif /* HAVE_LIBSNMP */
#endif /* ENABLE_NETSNMP */
while (1) {
syslog(LOG_DEBUG, "server: Waiting for connection");

View File

@ -1,6 +1,6 @@
#include "config.h"
#ifdef HAVE_LIBSNMP
#if ENABLE_NETSNMP==1
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>

View File

@ -25,7 +25,7 @@
#include "config.h"
#ifdef HAVE_LIBSNMP
#if ENABLE_NETSNMP==1
void snmp_subagent_main();
#endif