diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 77 |
1 files changed, 55 insertions, 22 deletions
diff --git a/configure.ac b/configure.ac index ef3d26e2..bec50cb4 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -181,10 +181,10 @@ fi | |||
181 | 181 | ||
182 | # Finally, define tests if we use libtap | 182 | # Finally, define tests if we use libtap |
183 | if test "$enable_libtap" = "yes" ; then | 183 | if test "$enable_libtap" = "yes" ; then |
184 | EXTRA_TEST="test_utils test_disk test_tcp test_cmd test_base64" | 184 | EXTRA_TEST="test_utils test_tcp test_cmd test_base64" |
185 | AC_SUBST(EXTRA_TEST) | 185 | AC_SUBST(EXTRA_TEST) |
186 | 186 | ||
187 | EXTRA_PLUGIN_TESTS="tests/test_check_swap" | 187 | EXTRA_PLUGIN_TESTS="tests/test_check_swap tests/test_check_disk" |
188 | AC_SUBST(EXTRA_PLUGIN_TESTS) | 188 | AC_SUBST(EXTRA_PLUGIN_TESTS) |
189 | fi | 189 | fi |
190 | 190 | ||
@@ -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 |
@@ -1512,21 +1519,47 @@ then | |||
1512 | fi | 1519 | fi |
1513 | 1520 | ||
1514 | AC_PATH_PROG(PATH_TO_FPING,fping) | 1521 | AC_PATH_PROG(PATH_TO_FPING,fping) |
1515 | AC_PATH_PROG(PATH_TO_FPING6,fping6) | ||
1516 | 1522 | ||
1517 | AC_ARG_WITH(fping_command, | 1523 | AC_ARG_WITH(fping_command, |
1518 | ACX_HELP_STRING([--with-fping-command=PATH], | 1524 | ACX_HELP_STRING([--with-fping-command=PATH], |
1519 | [Path to fping command]), PATH_TO_FPING=$withval) | 1525 | [Path to fping command]), PATH_TO_FPING=$withval) |
1520 | AC_ARG_WITH(fping6_command, | 1526 | if test -n "$PATH_TO_FPING"; then |
1521 | ACX_HELP_STRING([--with-fping6-command=PATH], | ||
1522 | [Path to fping6 command]), PATH_TO_FPING6=$withval) | ||
1523 | |||
1524 | if test -n "$PATH_TO_FPING" | ||
1525 | then | ||
1526 | AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping]) | 1527 | AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping]) |
1527 | EXTRAS="$EXTRAS check_fping\$(EXEEXT)" | 1528 | EXTRAS="$EXTRAS check_fping\$(EXEEXT)" |
1528 | if test x"$with_ipv6" != xno && test -n "$PATH_TO_FPING6"; then | 1529 | |
1529 | AC_DEFINE_UNQUOTED(PATH_TO_FPING6,"$PATH_TO_FPING6",[path to fping6]) | 1530 | if test -z "$($PATH_TO_FPING --version)" ; then |
1531 | AC_MSG_NOTICE([failed to get version of fping]) | ||
1532 | else | ||
1533 | FPING_MAJOR_VERSION="$($PATH_TO_FPING --version | sed 's/.*fping: Version //' | sed 's/\..*//')" | ||
1534 | FPING_MINOR_VERSION="$($PATH_TO_FPING --version | sed 's/.*fping: Version //' | sed 's/.*\.//')" | ||
1535 | |||
1536 | if test $FPING_MAJOR_VERSION -eq 5 ; then | ||
1537 | if test $FPING_MINOR_VERSION -ge 3 ; then | ||
1538 | AC_DEFINE(FPING_VERSION_5_3_OR_HIGHER, "true", [fping is of version 5.3 or higher]) | ||
1539 | AC_MSG_NOTICE([fping is of version 5.3 or higher]) | ||
1540 | AC_DEFINE(FPING_VERSION_5_2_OR_HIGHER, "true", [fping is of version 5.2 or higher]) | ||
1541 | AC_MSG_NOTICE([fping is of version 5.2 or higher]) | ||
1542 | elif test $FPING_MINOR_VERSION -ge 2 ; then | ||
1543 | AC_DEFINE(FPING_VERSION_5_2_OR_HIGHER, "true", [fping is of version 5.2 or higher]) | ||
1544 | AC_MSG_NOTICE([fping is of version 5.2 or higher]) | ||
1545 | else | ||
1546 | AC_MSG_NOTICE([fping is of a version lower then 5.2]) | ||
1547 | fi | ||
1548 | |||
1549 | elif $FPING_MAJOR_VERSION > 5 ; then | ||
1550 | AC_DEFINE(FPING_VERSION_5_2_OR_HIGHER, "true", [fping is of version 5.2 or higher]) | ||
1551 | AC_MSG_NOTICE([fping is of version 5.2 or higher]) | ||
1552 | AC_DEFINE(FPING_VERSION_5_3_OR_HIGHER, "true", [fping is of version 5.2 or higher]) | ||
1553 | AC_MSG_NOTICE([fping is of version 5.3 or higher]) | ||
1554 | fi | ||
1555 | |||
1556 | if test "`fping --version | sed 's/.*fping: Version //'`" = "5.2" ; then | ||
1557 | AC_DEFINE(FPING_VERSION, "5.2", [the version of fping available]) | ||
1558 | AC_MSG_NOTICE([fping version: 5.2]) | ||
1559 | elif test "`fping --version | sed 's/.*fping: Version //'`" = "5.3"; then | ||
1560 | AC_DEFINE(FPING_VERSION, "5.3", [the version of fping available]) | ||
1561 | AC_MSG_NOTICE([fping version: 5.3]) | ||
1562 | fi | ||
1530 | fi | 1563 | fi |
1531 | else | 1564 | else |
1532 | AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin]) | 1565 | AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin]) |