diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 67 |
1 files changed, 46 insertions, 21 deletions
diff --git a/configure.ac b/configure.ac index fdc9b699..705183a2 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -796,7 +796,7 @@ elif ps axwo 'stat comm vsz rss user uid pid ppid etime args' 2>/dev/null | \ | |||
796 | then | 796 | then |
797 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]" | 797 | ac_cv_ps_varlist="[procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos]" |
798 | ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu etime comm args'" | 798 | ac_cv_ps_command="$PATH_TO_PS axwo 'stat uid pid ppid vsz rss pcpu etime comm args'" |
799 | ac_cv_ps_format="%s %d %d %d %d %d %f %s %s %n" | 799 | ac_cv_ps_format="%s %u %d %d %d %d %f %s %s %n" |
800 | ac_cv_ps_cols=10 | 800 | ac_cv_ps_cols=10 |
801 | AC_MSG_RESULT([$ac_cv_ps_command]) | 801 | AC_MSG_RESULT([$ac_cv_ps_command]) |
802 | 802 | ||
@@ -1470,17 +1470,6 @@ AC_ARG_WITH(snmpgetnext_command, | |||
1470 | AS_IF([test -n "$PATH_TO_SNMPGET"], [ | 1470 | AS_IF([test -n "$PATH_TO_SNMPGET"], [ |
1471 | AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary]) | 1471 | AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary]) |
1472 | EXTRAS="$EXTRAS check_hpjd" | 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 | ], [ | 1473 | ], [ |
1485 | AC_MSG_WARN([Get snmpget from https://net-snmp.sourceforge.io/ to build the check_hpjd and check_snmp plugins]) | 1474 | AC_MSG_WARN([Get snmpget from https://net-snmp.sourceforge.io/ to build the check_hpjd and check_snmp plugins]) |
1486 | ]) | 1475 | ]) |
@@ -1493,6 +1482,16 @@ else | |||
1493 | AC_MSG_WARN([Tried $PERL - install Net::SNMP perl module if you want to use the perl snmp plugins]) | 1482 | AC_MSG_WARN([Tried $PERL - install Net::SNMP perl module if you want to use the perl snmp plugins]) |
1494 | fi | 1483 | fi |
1495 | 1484 | ||
1485 | dnl Check whether DES encryption is available (might not on RHEL) | ||
1486 | AC_COMPILE_IFELSE( | ||
1487 | [AC_LANG_PROGRAM( | ||
1488 | [[#include <net-snmp/net-snmp-config.h> | ||
1489 | #include <net-snmp/net-snmp-includes.h>]], [[oid *foo = usmDESPrivProtocol;]] | ||
1490 | )], | ||
1491 | [AC_DEFINE(HAVE_USM_DES_PRIV_PROTOCOL,1,Define whether we have DES Privacy Protocol)], | ||
1492 | [] | ||
1493 | ) | ||
1494 | |||
1496 | AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat) | 1495 | AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat) |
1497 | AC_PATH_PROG(PATH_TO_QSTAT,qstat) | 1496 | AC_PATH_PROG(PATH_TO_QSTAT,qstat) |
1498 | AC_ARG_WITH(qstat_command, | 1497 | AC_ARG_WITH(qstat_command, |
@@ -1519,21 +1518,47 @@ then | |||
1519 | fi | 1518 | fi |
1520 | 1519 | ||
1521 | AC_PATH_PROG(PATH_TO_FPING,fping) | 1520 | AC_PATH_PROG(PATH_TO_FPING,fping) |
1522 | AC_PATH_PROG(PATH_TO_FPING6,fping6) | ||
1523 | 1521 | ||
1524 | AC_ARG_WITH(fping_command, | 1522 | AC_ARG_WITH(fping_command, |
1525 | ACX_HELP_STRING([--with-fping-command=PATH], | 1523 | ACX_HELP_STRING([--with-fping-command=PATH], |
1526 | [Path to fping command]), PATH_TO_FPING=$withval) | 1524 | [Path to fping command]), PATH_TO_FPING=$withval) |
1527 | AC_ARG_WITH(fping6_command, | 1525 | if test -n "$PATH_TO_FPING"; then |
1528 | ACX_HELP_STRING([--with-fping6-command=PATH], | ||
1529 | [Path to fping6 command]), PATH_TO_FPING6=$withval) | ||
1530 | |||
1531 | if test -n "$PATH_TO_FPING" | ||
1532 | then | ||
1533 | AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping]) | 1526 | AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping]) |
1534 | EXTRAS="$EXTRAS check_fping\$(EXEEXT)" | 1527 | EXTRAS="$EXTRAS check_fping\$(EXEEXT)" |
1535 | if test x"$with_ipv6" != xno && test -n "$PATH_TO_FPING6"; then | 1528 | |
1536 | AC_DEFINE_UNQUOTED(PATH_TO_FPING6,"$PATH_TO_FPING6",[path to fping6]) | 1529 | if test -z "$($PATH_TO_FPING --version)" ; then |
1530 | AC_MSG_NOTICE([failed to get version of fping]) | ||
1531 | else | ||
1532 | FPING_MAJOR_VERSION="$($PATH_TO_FPING --version | sed 's/.*fping: Version //' | sed 's/\..*//')" | ||
1533 | FPING_MINOR_VERSION="$($PATH_TO_FPING --version | sed 's/.*fping: Version //' | sed 's/.*\.//')" | ||
1534 | |||
1535 | if test $FPING_MAJOR_VERSION -eq 5 ; then | ||
1536 | if test $FPING_MINOR_VERSION -ge 3 ; then | ||
1537 | AC_DEFINE(FPING_VERSION_5_3_OR_HIGHER, "true", [fping is of version 5.3 or higher]) | ||
1538 | AC_MSG_NOTICE([fping is of version 5.3 or higher]) | ||
1539 | AC_DEFINE(FPING_VERSION_5_2_OR_HIGHER, "true", [fping is of version 5.2 or higher]) | ||
1540 | AC_MSG_NOTICE([fping is of version 5.2 or higher]) | ||
1541 | elif test $FPING_MINOR_VERSION -ge 2 ; then | ||
1542 | AC_DEFINE(FPING_VERSION_5_2_OR_HIGHER, "true", [fping is of version 5.2 or higher]) | ||
1543 | AC_MSG_NOTICE([fping is of version 5.2 or higher]) | ||
1544 | else | ||
1545 | AC_MSG_NOTICE([fping is of a version lower then 5.2]) | ||
1546 | fi | ||
1547 | |||
1548 | elif $FPING_MAJOR_VERSION > 5 ; then | ||
1549 | AC_DEFINE(FPING_VERSION_5_2_OR_HIGHER, "true", [fping is of version 5.2 or higher]) | ||
1550 | AC_MSG_NOTICE([fping is of version 5.2 or higher]) | ||
1551 | AC_DEFINE(FPING_VERSION_5_3_OR_HIGHER, "true", [fping is of version 5.2 or higher]) | ||
1552 | AC_MSG_NOTICE([fping is of version 5.3 or higher]) | ||
1553 | fi | ||
1554 | |||
1555 | if test "`fping --version | sed 's/.*fping: Version //'`" = "5.2" ; then | ||
1556 | AC_DEFINE(FPING_VERSION, "5.2", [the version of fping available]) | ||
1557 | AC_MSG_NOTICE([fping version: 5.2]) | ||
1558 | elif test "`fping --version | sed 's/.*fping: Version //'`" = "5.3"; then | ||
1559 | AC_DEFINE(FPING_VERSION, "5.3", [the version of fping available]) | ||
1560 | AC_MSG_NOTICE([fping version: 5.3]) | ||
1561 | fi | ||
1537 | fi | 1562 | fi |
1538 | else | 1563 | else |
1539 | AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin]) | 1564 | AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin]) |