From 2bda8f7717adf28da4af0d34fb82f63d2868c31d Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: 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 --- ksim/monitors/snmp/configure.in.in | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 ksim/monitors/snmp/configure.in.in (limited to 'ksim/monitors/snmp/configure.in.in') 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 + #include + ] + ) + + 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) -- cgit v1.2.1