diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index dfc37b5e..5e2a0b38 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1079,6 +1079,7 @@ AC_ARG_WITH(ping_command, | |||
1079 | AC_MSG_CHECKING(for ICMP ping syntax) | 1079 | AC_MSG_CHECKING(for ICMP ping syntax) |
1080 | ac_cv_ping_packets_first=no | 1080 | ac_cv_ping_packets_first=no |
1081 | ac_cv_ping_has_timeout=no | 1081 | ac_cv_ping_has_timeout=no |
1082 | ac_cv_ping_has_packetsize=no | ||
1082 | if test -n "$with_ping_command" | 1083 | if test -n "$with_ping_command" |
1083 | then | 1084 | then |
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 | ||
1105 | elif [[ "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 | |||
1115 | elif $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 |
1108 | then | 1117 | then |
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 | ||
1113 | elif $PATH_TO_PING -4 -n -U -w 10 -c 1 127.0.0.1 2>/dev/null | \ | 1124 | elif $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 | ||
1140 | elif $PATH_TO_PING -n -U -c 1 -s 56 127.0.0.1 2>/dev/null | \ | ||
1141 | egrep -i "^round-trip|^rtt" >/dev/null | ||
1142 | then | ||
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 | |||
1129 | elif $PATH_TO_PING -n -U -c 1 127.0.0.1 2>/dev/null | \ | 1148 | elif $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 |
1131 | then | 1150 | then |
@@ -1155,13 +1174,15 @@ then | |||
1155 | elif $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ | 1174 | elif $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 |
1157 | then | 1176 | then |
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 | ||
1161 | elif $PATH_TO_PING -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | \ | 1181 | elif $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 |
1163 | then | 1183 | then |
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 | ||
1167 | elif $PATH_TO_PING -n -s 56 -c 1 127.0.0.1 2>/dev/null | \ | 1188 | elif $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]) |
1198 | fi | 1219 | fi |
1199 | 1220 | ||
1221 | if test "x$ac_cv_ping_has_packetsize" != "xno" | ||
1222 | then | ||
1223 | AC_DEFINE(PING_HAS_PACKETSIZE,1, | ||
1224 | [Define if ping has an option for custom packet size]) | ||
1225 | fi | ||
1226 | |||
1200 | AC_ARG_WITH(ping6_command, | 1227 | AC_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]), |