summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac78
1 files changed, 55 insertions, 23 deletions
diff --git a/configure.ac b/configure.ac
index ef3d26e2..705183a2 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
183if test "$enable_libtap" = "yes" ; then 183if 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)
189fi 189fi
190 190
@@ -796,7 +796,7 @@ elif ps axwo 'stat comm vsz rss user uid pid ppid etime args' 2>/dev/null | \
796then 796then
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
@@ -1460,23 +1460,19 @@ 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"
1464then
1465 AC_DEFINE_UNQUOTED(PATH_TO_SNMPGET,"$PATH_TO_SNMPGET",[path to snmpget binary])
1466 EXTRAS="$EXTRAS check_hpjd check_snmp\$(EXEEXT)"
1467else
1468 AC_MSG_WARN([Get snmpget from http://net-snmp.sourceforge.net to make check_hpjd and check_snmp plugins])
1469fi
1470 1463
1471AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext) 1464AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext)
1472AC_ARG_WITH(snmpgetnext_command, 1465AC_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)
1476if test -n "$PATH_TO_SNMPGETNEXT" 1469
1477then 1470AS_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])
1479fi 1472 EXTRAS="$EXTRAS check_hpjd"
1473], [
1474 AC_MSG_WARN([Get snmpget from https://net-snmp.sourceforge.io/ to build the check_hpjd and check_snmp plugins])
1475])
1480 1476
1481if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null ) 1477if ( $PERL -M"Net::SNMP 3.6" -e 'exit' 2>/dev/null )
1482then 1478then
@@ -1486,6 +1482,16 @@ else
1486 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])
1487fi 1483fi
1488 1484
1485dnl Check whether DES encryption is available (might not on RHEL)
1486AC_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
1489AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat) 1495AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat)
1490AC_PATH_PROG(PATH_TO_QSTAT,qstat) 1496AC_PATH_PROG(PATH_TO_QSTAT,qstat)
1491AC_ARG_WITH(qstat_command, 1497AC_ARG_WITH(qstat_command,
@@ -1512,21 +1518,47 @@ then
1512fi 1518fi
1513 1519
1514AC_PATH_PROG(PATH_TO_FPING,fping) 1520AC_PATH_PROG(PATH_TO_FPING,fping)
1515AC_PATH_PROG(PATH_TO_FPING6,fping6)
1516 1521
1517AC_ARG_WITH(fping_command, 1522AC_ARG_WITH(fping_command,
1518 ACX_HELP_STRING([--with-fping-command=PATH], 1523 ACX_HELP_STRING([--with-fping-command=PATH],
1519 [Path to fping command]), PATH_TO_FPING=$withval) 1524 [Path to fping command]), PATH_TO_FPING=$withval)
1520AC_ARG_WITH(fping6_command, 1525if test -n "$PATH_TO_FPING"; then
1521 ACX_HELP_STRING([--with-fping6-command=PATH],
1522 [Path to fping6 command]), PATH_TO_FPING6=$withval)
1523
1524if test -n "$PATH_TO_FPING"
1525then
1526 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])
1527 EXTRAS="$EXTRAS check_fping\$(EXEEXT)" 1527 EXTRAS="$EXTRAS check_fping\$(EXEEXT)"
1528 if test x"$with_ipv6" != xno && test -n "$PATH_TO_FPING6"; then 1528
1529 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
1530 fi 1562 fi
1531else 1563else
1532 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])