summaryrefslogtreecommitdiffstats
path: root/ksim/monitors/snmp/configure.in.in
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit2bda8f7717adf28da4af0d34fb82f63d2868c31d (patch)
tree8d927b7b47a90c4adb646482a52613f58acd6f8c /ksim/monitors/snmp/configure.in.in
downloadtdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.tar.gz
tdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksim/monitors/snmp/configure.in.in')
-rw-r--r--ksim/monitors/snmp/configure.in.in40
1 files changed, 40 insertions, 0 deletions
diff --git a/ksim/monitors/snmp/configure.in.in b/ksim/monitors/snmp/configure.in.in
new file mode 100644
index 0000000..2d266d7
--- /dev/null
+++ b/ksim/monitors/snmp/configure.in.in
@@ -0,0 +1,40 @@
+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)