summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Orlitzky <michael@orlitzky.com>2025-02-15 17:47:34 -0500
committerMichael Orlitzky <michael@orlitzky.com>2025-02-15 22:57:55 -0500
commitdf03c12a2b206465046805426f7368a8de90e85c (patch)
tree10f33bdc9934b8fd80517248e7fd6826ee71873b
parent69296300f651fa8da663e9769e3a03f9fd5fbce3 (diff)
downloadmonitoring-plugins-df03c12a2b206465046805426f7368a8de90e85c.tar.gz
configure.ac: use AS_IF in net-snmp tests
Not strictly required here, but the AS_IF macro is generally safer because it handles (often unintentional) AC_REQUIRE calls.
-rw-r--r--configure.ac12
1 files changed, 5 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 5141c652..e8ab77f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1460,23 +1460,21 @@ 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)
1463if test -n "$PATH_TO_SNMPGET" 1463AS_IF([test -n "$PATH_TO_SNMPGET"], [
1464then
1465 AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary]) 1464 AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary])
1466 EXTRAS="$EXTRAS check_hpjd check_snmp\$(EXEEXT)" 1465 EXTRAS="$EXTRAS check_hpjd check_snmp\$(EXEEXT)"
1467else 1466], [
1468 AC_MSG_WARN([Get snmpget from https://net-snmp.sourceforge.io/ to make check_hpjd and check_snmp plugins]) 1467 AC_MSG_WARN([Get snmpget from https://net-snmp.sourceforge.io/ to make check_hpjd and check_snmp plugins])
1469fi 1468])
1470 1469
1471AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext) 1470AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext)
1472AC_ARG_WITH(snmpgetnext_command, 1471AC_ARG_WITH(snmpgetnext_command,
1473 ACX_HELP_STRING([--with-snmpgetnext-command=PATH], 1472 ACX_HELP_STRING([--with-snmpgetnext-command=PATH],
1474 [Path to snmpgetnext command]), 1473 [Path to snmpgetnext command]),
1475 PATH_TO_SNMPGETNEXT=$withval) 1474 PATH_TO_SNMPGETNEXT=$withval)
1476if test -n "$PATH_TO_SNMPGETNEXT" 1475AS_IF([test -n "$PATH_TO_SNMPGETNEXT"], [
1477then
1478 AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT",[path to snmpgetnext binary]) 1476 AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT",[path to snmpgetnext binary])
1479fi 1477])
1480 1478
1481if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null ) 1479if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null )
1482then 1480then