You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
41 lines
1.1 KiB
15 years ago
|
AC_ARG_WITH(snmp,
|
||
|
[AC_HELP_STRING(--with-snmp,
|
||
|
[enable support for SNMP @<:@default=check@:>@])],
|
||
|
[], with_snmp=check)
|
||
|
|
||
|
enable_snmp=no
|
||
|
if test "x$with_snmp" != xno; then
|
||
|
KDE_CHECK_HEADER( net-snmp/library/snmp_api.h,
|
||
|
[ have_netsnmp_h=yes ], [ have_netsnmp_h=no ],
|
||
|
[ #include <net-snmp/net-snmp-config.h>
|
||
|
#include <net-snmp/types.h>
|
||
|
]
|
||
|
)
|
||
|
|
||
|
if test "$have_netsnmp_h" = yes; then
|
||
|
KDE_CHECK_LIB( netsnmp, snmp_sess_init, [
|
||
|
AC_SUBST( LIBSNMP, "-lnetsnmp" )
|
||
|
enable_snmp=yes
|
||
|
], [], [] )
|
||
|
fi
|
||
|
|
||
|
if test "$enable_snmp" != yes; then
|
||
|
AC_MSG_CHECKING([if libnetsnmp needs -lcrypto])
|
||
|
|
||
|
dnl use a different symbol to prevent autoconf from caching
|
||
|
KDE_CHECK_LIB( netsnmp, snmp_open, [
|
||
|
AC_SUBST( LIBSNMP, "-lnetsnmp -lcrypto" )
|
||
|
enable_snmp=yes
|
||
|
AC_MSG_RESULT(yes)
|
||
|
], [
|
||
|
AC_MSG_RESULT(no)
|
||
|
], [-lcrypto] )
|
||
|
fi
|
||
|
|
||
|
if test "x$with_snmp" != xcheck && test "x$enable_snmp" != xyes; then
|
||
|
AC_MSG_ERROR([--with-snmp was given, but test for net-snmp failed])
|
||
|
fi
|
||
|
fi
|
||
|
|
||
|
AM_CONDITIONAL(include_ksim_monitors_snmp, test "x$enable_snmp" = xyes)
|