author | Marc Fournier <marc.fournier@camptocamp.com> | |
Fri, 11 Sep 2015 21:21:49 +0000 (23:21 +0200) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Fri, 11 Sep 2015 21:21:49 +0000 (23:21 +0200) |
configure.ac | patch | blob | history | |
src/snmp.c | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index dcaac3c762ca5f1ee7342d69cf94b894b9b65f14..690b449407e9f85fd3a19d640a40d484b1f66ee1 100644 (file)
--- a/configure.ac
+++ b/configure.ac
@@ -2691,7 +2691,7 @@ AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to
])
if test "x$with_libmysql" = "xyes"
then
- with_mysql_cflags=`$with_mysql_config --cflags 2>/dev/null`
+ with_mysql_cflags=`$with_mysql_config --include 2>/dev/null`
mysql_config_status=$?
if test $mysql_config_status -ne 0
then
with_libmysql="no ($with_mysql_config failed)"
else
- AC_CHECK_LIB(mysqlclient, mysql_init,
- [with_libmysql="yes"],
- [with_libmysql="no (symbol 'mysql_init' not found)"],
- [$with_mysql_libs])
-
- AC_CHECK_LIB(mysqlclient, mysql_get_server_version,
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_mysql_cflags"
+ SAVE_LIBS="$LIBS"
+ LIBS="$with_mysql_libs"
+ AC_SEARCH_LIBS([mysql_get_server_version],
+ [],
[with_libmysql="yes"],
[with_libmysql="no (symbol 'mysql_get_server_version' not found)"],
- [$with_mysql_libs])
+ [])
+ CPPFLAGS="$SAVE_CPPFLAGS"
+ LIBS="$SAVE_LIBS"
fi
fi
if test "x$with_libmysql" = "xyes"
diff --git a/src/snmp.c b/src/snmp.c
index 8564c681705669a9d71901a2051e329a1a792b06..cb0b70fa15275360feab4ac8df55b8b479c03f74 100644 (file)
--- a/src/snmp.c
+++ b/src/snmp.c
@@ -1671,7 +1671,7 @@ static int csnmp_read_value (host_definition_t *host, data_definition_t *data)
if (host->sess_handle == NULL)
{
- DEBUG ("snmp plugin: csnmp_read_table: host->sess_handle == NULL");
+ DEBUG ("snmp plugin: csnmp_read_value: host->sess_handle == NULL");
return (-1);
}