diff options
author | Gunnar Beutner <gunnar@beutner.name> | 2014-04-21 11:29:45 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-04-27 19:59:06 +0200 |
commit | e0af39d7e9fcd084cf7d2d8a57d07ab1f8038150 (patch) | |
tree | f6eee031831451476795e139b6ceb33298b1155d /configure.ac | |
parent | d00efeb872c968824879614c848cead71452cbfd (diff) | |
download | monitoring-plugins-e0af39d.tar.gz |
Make check_ping work on Windows.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
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` | |||
90 | ac_cv_uname_s=`uname -s` | 90 | ac_cv_uname_s=`uname -s` |
91 | ac_cv_uname_r=`uname -r` | 91 | ac_cv_uname_r=`uname -r` |
92 | ac_cv_uname_v=`uname -v` | 92 | ac_cv_uname_v=`uname -v` |
93 | ac_cv_uname_o=`uname -o` | ||
93 | 94 | ||
94 | PKG_ARCH=`uname -p` | 95 | PKG_ARCH=`uname -p` |
95 | REV_DATESTAMP=`date '+%Y.%m.%d.%H.%M'` | 96 | REV_DATESTAMP=`date '+%Y.%m.%d.%H.%M'` |
@@ -1011,6 +1012,13 @@ then | |||
1011 | ac_cv_ping_packets_first=yes | 1012 | ac_cv_ping_packets_first=yes |
1012 | fi | 1013 | fi |
1013 | 1014 | ||
1015 | elif [[ "z$ac_cv_uname_o" = "zCygwin" ]] | ||
1016 | then | ||
1017 | with_ping_command="$PATH_TO_PING -n %d -w %d000 %s" | ||
1018 | ac_cv_ping_packets_first=yes | ||
1019 | ac_cv_ping_has_timeout=yes | ||
1020 | AC_MSG_RESULT([$with_ping_command]) | ||
1021 | |||
1014 | elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ | 1022 | elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ |
1015 | $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ | 1023 | $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ |
1016 | egrep -i "^round-trip|^rtt" >/dev/null | 1024 | 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 | \ | |||
1024 | then | 1032 | then |
1025 | with_ping_command="$PATH_TO_PING -n -U -w %d -c %d %s" | 1033 | with_ping_command="$PATH_TO_PING -n -U -w %d -c %d %s" |
1026 | ac_cv_ping_packets_first=yes | 1034 | ac_cv_ping_packets_first=yes |
1027 | ac_cv_ping_has_timeout=yes | 1035 | ac_cv_ping_has_timeout=yes |
1028 | AC_MSG_RESULT([$with_ping_command]) | 1036 | AC_MSG_RESULT([$with_ping_command]) |
1029 | 1037 | ||
1030 | elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \ | 1038 | elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \ |
@@ -1121,7 +1129,11 @@ then | |||
1121 | then | 1129 | then |
1122 | ac_cv_ping6_packets_first=yes | 1130 | ac_cv_ping6_packets_first=yes |
1123 | fi | 1131 | fi |
1124 | 1132 | elif [[ "z$ac_cv_uname_o" = "zCygwin" -a "x$PATH_TO_PING" != "x" ]]; then | |
1133 | with_ping6_command="$PATH_TO_PING -6 -n %d -w %d000 %s" | ||
1134 | ac_cv_ping6_packets_first=yes | ||
1135 | ac_cv_ping_has_timeout=yes | ||
1136 | AC_MSG_RESULT([$with_ping6_command]) | ||
1125 | elif test "x$PATH_TO_PING6" != "x"; then | 1137 | elif test "x$PATH_TO_PING6" != "x"; then |
1126 | if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ | 1138 | if [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ |
1127 | $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \ | 1139 | $PATH_TO_PING6 -n -s ::1 56 1 2>/dev/null | \ |