diff options
| author | Sven Nierlein <sven@consol.de> | 2026-06-19 11:12:08 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-19 11:12:08 +0200 |
| commit | 1c84da06be317a00c667cb7d7f0c24b7e8feb89d (patch) | |
| tree | 95146c5762c6b6675d07aac55fe18cb8cc0a371f /configure.ac | |
| parent | 167be08c4be309b46a783f7b7172421437fafc6a (diff) | |
| download | monitoring-plugins-1c84da06be317a00c667cb7d7f0c24b7e8feb89d.tar.gz | |
this will fix the build error on check_snmp when net-snmp-config is not available.
```
CC check_snmp-check_snmp.o
/bin/bash: line 1: net-snmp-config: command not found
In file included from check_snmp.d/check_snmp_helpers.h:3,
from check_snmp.c:42:
check_snmp.d/./config.h:16:10: fatal error: net-snmp/net-snmp-config.h: No such file or directory
16 | #include <net-snmp/net-snmp-config.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile:3353: check_snmp-check_snmp.o] Error 1
make[3]: Leaving directory '/opt/projects/git/monitoring-plugins/plugins'
```
Signed-off-by: Sven Nierlein <sven@consol.de>
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 4facfca2..41b39c7b 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -1445,6 +1445,19 @@ else | |||
| 1445 | AC_MSG_WARN([Get smbclient from Samba.org to monitor SMB shares]) | 1445 | AC_MSG_WARN([Get smbclient from Samba.org to monitor SMB shares]) |
| 1446 | fi | 1446 | fi |
| 1447 | 1447 | ||
| 1448 | AC_PATH_PROG(PATH_TO_NETSNMPCONFIG,net-snmp-config) | ||
| 1449 | AC_ARG_WITH(netsnmpconfig_command, | ||
| 1450 | ACX_HELP_STRING([--with-net-snmp-config-command=PATH], | ||
| 1451 | [sets path to net-snmp-config]), | ||
| 1452 | PATH_TO_NETSNMPCONFIG=$withval) | ||
| 1453 | if test -n "$PATH_TO_NETSNMPCONFIG" | ||
| 1454 | then | ||
| 1455 | AC_DEFINE_UNQUOTED(PATH_TO_NETSNMPCONFIG,"$PATH_TO_NETSNMPCONFIG",[path to net-snmp-config binary]) | ||
| 1456 | EXTRAS="$EXTRAS check_snmp" | ||
| 1457 | else | ||
| 1458 | AC_MSG_WARN([Install net-snmp-config to build check_snmp]) | ||
| 1459 | fi | ||
| 1460 | |||
| 1448 | AC_PATH_PROG(PATH_TO_SNMPGET,snmpget) | 1461 | AC_PATH_PROG(PATH_TO_SNMPGET,snmpget) |
| 1449 | AC_ARG_WITH(snmpget_command, | 1462 | AC_ARG_WITH(snmpget_command, |
| 1450 | ACX_HELP_STRING([--with-snmpget-command=PATH], | 1463 | ACX_HELP_STRING([--with-snmpget-command=PATH], |
