summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac37
1 files changed, 32 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index dfc37b5..5e2a0b3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1079,6 +1079,7 @@ AC_ARG_WITH(ping_command,
1079AC_MSG_CHECKING(for ICMP ping syntax) 1079AC_MSG_CHECKING(for ICMP ping syntax)
1080ac_cv_ping_packets_first=no 1080ac_cv_ping_packets_first=no
1081ac_cv_ping_has_timeout=no 1081ac_cv_ping_has_timeout=no
1082ac_cv_ping_has_packetsize=no
1082if test -n "$with_ping_command" 1083if test -n "$with_ping_command"
1083then 1084then
1084 AC_MSG_RESULT([(command-line) $with_ping_command]) 1085 AC_MSG_RESULT([(command-line) $with_ping_command])
@@ -1102,12 +1103,22 @@ then
1102 ac_cv_ping_has_timeout=yes 1103 ac_cv_ping_has_timeout=yes
1103 AC_MSG_RESULT([$with_ping_command]) 1104 AC_MSG_RESULT([$with_ping_command])
1104 1105
1105elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \ 1106# XXX with_ping_command not same like if condition
1106 $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ 1107#elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && \
1108# $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \
1109# egrep -i "^round-trip|^rtt" >/dev/null
1110#then
1111# with_ping_command="$PATH_TO_PING -n -U -c %d %s"
1112# ac_cv_ping_packets_first=yes
1113# AC_MSG_RESULT([$with_ping_command])
1114
1115elif $PATH_TO_PING -n -U -w 10 -c 1 -s 56 127.0.0.1 2>/dev/null | \
1107 egrep -i "^round-trip|^rtt" >/dev/null 1116 egrep -i "^round-trip|^rtt" >/dev/null
1108then 1117then
1109 with_ping_command="$PATH_TO_PING -n -U -c %d %s" 1118 with_ping_command="$PATH_TO_PING -n -U -w %d -c %d -s %d %s"
1110 ac_cv_ping_packets_first=yes 1119 ac_cv_ping_packets_first=yes
1120 ac_cv_ping_has_timeout=yes
1121 ac_cv_ping_has_packetsize=yes
1111 AC_MSG_RESULT([$with_ping_command]) 1122 AC_MSG_RESULT([$with_ping_command])
1112 1123
1113elif $PATH_TO_PING -4 -n -U -w 10 -c 1 127.0.0.1 2>/dev/null | \ 1124elif $PATH_TO_PING -4 -n -U -w 10 -c 1 127.0.0.1 2>/dev/null | \
@@ -1126,6 +1137,14 @@ then
1126 ac_cv_ping_has_timeout=yes 1137 ac_cv_ping_has_timeout=yes
1127 AC_MSG_RESULT([$with_ping_command]) 1138 AC_MSG_RESULT([$with_ping_command])
1128 1139
1140elif $PATH_TO_PING -n -U -c 1 -s 56 127.0.0.1 2>/dev/null | \
1141 egrep -i "^round-trip|^rtt" >/dev/null
1142then
1143 with_ping_command="$PATH_TO_PING -n -U -c %d -s %d %s"
1144 ac_cv_ping_packets_first=yes
1145 ac_cv_ping_has_packetsize=yes
1146 AC_MSG_RESULT([$with_ping_command])
1147
1129elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \ 1148elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \
1130 egrep -i "^round-trip|^rtt" >/dev/null 1149 egrep -i "^round-trip|^rtt" >/dev/null
1131then 1150then
@@ -1155,13 +1174,15 @@ then
1155elif $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ 1174elif $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \
1156 egrep -i "^round-trip|^rtt" >/dev/null 1175 egrep -i "^round-trip|^rtt" >/dev/null
1157then 1176then
1158 with_ping_command="$PATH_TO_PING -n -s %s 56 %d" 1177 with_ping_command="$PATH_TO_PING -n -s %s %d %d"
1178 ac_cv_ping_has_packetsize=yes
1159 AC_MSG_RESULT([$with_ping_command]) 1179 AC_MSG_RESULT([$with_ping_command])
1160 1180
1161elif $PATH_TO_PING -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | \ 1181elif $PATH_TO_PING -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | \
1162 egrep -i "^round-trip|^rtt" >/dev/null 1182 egrep -i "^round-trip|^rtt" >/dev/null
1163then 1183then
1164 with_ping_command="$PATH_TO_PING -n -h %s -s 56 -c %d" 1184 with_ping_command="$PATH_TO_PING -n -h %s -s %d -c %d"
1185 ac_cv_ping_has_packetsize=yes
1165 AC_MSG_RESULT([$with_ping_command]) 1186 AC_MSG_RESULT([$with_ping_command])
1166 1187
1167elif $PATH_TO_PING -n -s 56 -c 1 127.0.0.1 2>/dev/null | \ 1188elif $PATH_TO_PING -n -s 56 -c 1 127.0.0.1 2>/dev/null | \
@@ -1197,6 +1218,12 @@ then
1197 [Define if ping has its own timeout option that should be set]) 1218 [Define if ping has its own timeout option that should be set])
1198fi 1219fi
1199 1220
1221if test "x$ac_cv_ping_has_packetsize" != "xno"
1222then
1223 AC_DEFINE(PING_HAS_PACKETSIZE,1,
1224 [Define if ping has an option for custom packet size])
1225fi
1226
1200AC_ARG_WITH(ping6_command, 1227AC_ARG_WITH(ping6_command,
1201 ACX_HELP_STRING([--with-ping6-command=SYNTAX], 1228 ACX_HELP_STRING([--with-ping6-command=SYNTAX],
1202 [sets syntax for ICMPv6 ping]), 1229 [sets syntax for ICMPv6 ping]),