aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar Gunnar Beutner <gunnar@beutner.name> 2014-04-21 11:29:45 +0200
committerGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2014-04-27 19:59:06 +0200
commite0af39d7e9fcd084cf7d2d8a57d07ab1f8038150 (patch)
treef6eee031831451476795e139b6ceb33298b1155d /configure.ac
parentd00efeb872c968824879614c848cead71452cbfd (diff)
downloadmonitoring-plugins-e0af39d7e9fcd084cf7d2d8a57d07ab1f8038150.tar.gz
Make check_ping work on Windows.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 14 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index d73ac545..f405cce7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,6 +90,7 @@ ac_cv_uname_m=`uname -m`
ac_cv_uname_s=`uname -s`
ac_cv_uname_r=`uname -r`
ac_cv_uname_v=`uname -v`
+ac_cv_uname_o=`uname -o`
PKG_ARCH=`uname -p`
REV_DATESTAMP=`date '+%Y.%m.%d.%H.%M'`
@@ -1011,6 +1012,13 @@ then
ac_cv_ping_packets_first=yes
fi
+elif [[ "z$ac_cv_uname_o" = "zCygwin" ]]
+then
+ with_ping_command="$PATH_TO_PING -n %d -w %d000 %s"
+ ac_cv_ping_packets_first=yes
+ ac_cv_ping_has_timeout=yes
+ AC_MSG_RESULT([$with_ping_command])
+
elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
$PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \
egrep -i "^round-trip|^rtt" >/dev/null
@@ -1024,7 +1032,7 @@ elif $PATH_TO_PING -n -U -w 10 -c 1 127.0.0.1 2>/dev/null | \
then
with_ping_command="$PATH_TO_PING -n -U -w %d -c %d %s"
ac_cv_ping_packets_first=yes
- ac_cv_ping_has_timeout=yes
+ ac_cv_ping_has_timeout=yes
AC_MSG_RESULT([$with_ping_command])
elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \
@@ -1121,7 +1129,11 @@ then
then
ac_cv_ping6_packets_first=yes
fi
-
+elif [[ "z$ac_cv_uname_o" = "zCygwin" -a "x$PATH_TO_PING" != "x" ]]; then
+ with_ping6_command="$PATH_TO_PING -6 -n %d -w %d000 %s"
+ ac_cv_ping6_packets_first=yes
+ ac_cv_ping_has_timeout=yes
+ AC_MSG_RESULT([$with_ping6_command])
elif test "x$PATH_TO_PING6" != "x"; then
if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
$PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \