diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-28 13:16:02 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-28 13:16:02 +0000 |
commit | 16d4429147e5c7480deec742d07cb34126ef1fa4 (patch) | |
tree | 61c8fe54c3b9a7d7dbda53053d2fdabf6c9c900e /configure.ac | |
parent | bd6a67d38e042cca09ff41872dda874ba71c2e80 (diff) | |
download | rsyslog-16d4429147e5c7480deec742d07cb34126ef1fa4.tar.gz rsyslog-16d4429147e5c7480deec742d07cb34126ef1fa4.tar.xz rsyslog-16d4429147e5c7480deec742d07cb34126ef1fa4.zip |
add Michael Biebl's autoconf patch for netsnmp - thks!
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/configure.ac b/configure.ac index 63787560..3845da08 100644 --- a/configure.ac +++ b/configure.ac @@ -388,28 +388,20 @@ AC_ARG_ENABLE(snmp, esac], [enable_snmp=no] ) -#if test "x$enable_snmp" = "xyes"; then -# I think we can delete that part -- rgerhards, 2008-01-22 -# AC_CHECK_PROG( -# [HAVE_PGSQL_CONFIG], -# [pg_config], -# [yes],,, -# ) -# if test "x${HAVE_PGSQL_CONFIG}" != "xyes"; then -# AC_MSG_FAILURE([pg_config not found in PATH]) -# fi -# END to-be-deleted -# here must go the check for netsnmp -# AC_CHECK_LIB( -# [pq], -# [PQconnectdb], -# [snmp_cflags="" -# snmp_libs="" -# ], -# [AC_MSG_FAILURE([netsnmp library is missing])], -# [-L`pg_config --libdir`] -# ) -#fi +if test "x$enable_snmp" = "xyes"; then + AC_CHECK_HEADERS( + [net-snmp/net-snmp-config.h],, + [AC_MSG_FAILURE([Net-SNMP is missing])] + ) + AC_CHECK_LIB( + [netsnmp], + [snmp_timeout], + [snmp_cflags="" + snmp_libs="-lnetsnmp" + ], + [AC_MSG_FAILURE([Net-SNMP library is missing])] + ) +fi AM_CONDITIONAL(ENABLE_SNMP, test x$enable_snmp = xyes) AC_SUBST(snmp_cflags) AC_SUBST(snmp_libs) |