diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-02-17 23:28:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-17 23:28:54 +0100 |
commit | 99a978b669cedb63e15b7df5b6ad81a9a63e9279 (patch) | |
tree | ee78fdee4a6e4c953734c27751073394dfc9f4e3 | |
parent | e23325f7c3b34d8950cf27e9ab23af362d0b341b (diff) | |
parent | e6086f597b64d86feb82ea222d61da78d596693e (diff) | |
download | monitoring-plugins-master.tar.gz |
Require snmpgetnext to build check_snmp
-rw-r--r-- | configure.ac | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac index ef3d26e2..204fc6e3 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1460,23 +1460,30 @@ AC_ARG_WITH(snmpget_command, | |||
1460 | ACX_HELP_STRING([--with-snmpget-command=PATH], | 1460 | ACX_HELP_STRING([--with-snmpget-command=PATH], |
1461 | [Path to snmpget command]), | 1461 | [Path to snmpget command]), |
1462 | PATH_TO_SNMPGET=$withval) | 1462 | PATH_TO_SNMPGET=$withval) |
1463 | if test -n "$PATH_TO_SNMPGET" | ||
1464 | then | ||
1465 | AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary]) | ||
1466 | EXTRAS="$EXTRAS check_hpjd check_snmp\$(EXEEXT)" | ||
1467 | else | ||
1468 | AC_MSG_WARN([Get snmpget from http://net-snmp.sourceforge.net to make check_hpjd and check_snmp plugins]) | ||
1469 | fi | ||
1470 | 1463 | ||
1471 | AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext) | 1464 | AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext) |
1472 | AC_ARG_WITH(snmpgetnext_command, | 1465 | AC_ARG_WITH(snmpgetnext_command, |
1473 | ACX_HELP_STRING([--with-snmpgetnext-command=PATH], | 1466 | ACX_HELP_STRING([--with-snmpgetnext-command=PATH], |
1474 | [Path to snmpgetnext command]), | 1467 | [Path to snmpgetnext command]), |
1475 | PATH_TO_SNMPGETNEXT=$withval) | 1468 | PATH_TO_SNMPGETNEXT=$withval) |
1476 | if test -n "$PATH_TO_SNMPGETNEXT" | 1469 | |
1477 | then | 1470 | AS_IF([test -n "$PATH_TO_SNMPGET"], [ |
1478 | AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT",[path to snmpgetnext binary]) | 1471 | AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary]) |
1479 | fi | 1472 | EXTRAS="$EXTRAS check_hpjd" |
1473 | |||
1474 | dnl PATH_TO_SNMPGETNEXT is used unconditionally in check_snmp: | ||
1475 | dnl | ||
1476 | dnl https://github.com/nagios-plugins/nagios-plugins/issues/788 | ||
1477 | dnl | ||
1478 | AS_IF([test -n "$PATH_TO_SNMPGETNEXT"], [ | ||
1479 | AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT",[path to snmpgetnext binary]) | ||
1480 | EXTRAS="$EXTRAS check_snmp\$(EXEEXT)" | ||
1481 | ], [ | ||
1482 | AC_MSG_WARN([Get snmpgetnext from https://net-snmp.sourceforge.io/ to build the check_snmp plugin]) | ||
1483 | ]) | ||
1484 | ], [ | ||
1485 | AC_MSG_WARN([Get snmpget from https://net-snmp.sourceforge.io/ to build the check_hpjd and check_snmp plugins]) | ||
1486 | ]) | ||
1480 | 1487 | ||
1481 | if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null ) | 1488 | if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null ) |
1482 | then | 1489 | then |