summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac39
1 files changed, 36 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index bd3de196..bec50cb4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1519,15 +1519,48 @@ then
1519fi 1519fi
1520 1520
1521AC_PATH_PROG(PATH_TO_FPING,fping) 1521AC_PATH_PROG(PATH_TO_FPING,fping)
1522AC_PATH_PROG(PATH_TO_FPING6,fping6)
1523 1522
1524AC_ARG_WITH(fping_command, 1523AC_ARG_WITH(fping_command,
1525 ACX_HELP_STRING([--with-fping-command=PATH], 1524 ACX_HELP_STRING([--with-fping-command=PATH],
1526 [Path to fping command]), PATH_TO_FPING=$withval) 1525 [Path to fping command]), PATH_TO_FPING=$withval)
1527if test -n "$PATH_TO_FPING" 1526if test -n "$PATH_TO_FPING"; then
1528then
1529 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])
1530 EXTRAS="$EXTRAS check_fping\$(EXEEXT)" 1528 EXTRAS="$EXTRAS check_fping\$(EXEEXT)"
1529
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
1563 fi
1531else 1564else
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])
1533fi 1566fi