8001901: build-infra: Fix "misbehaving" which command on Solaris

Tue, 18 Dec 2012 17:54:39 +0100

author
erikj
date
Tue, 18 Dec 2012 17:54:39 +0100
changeset 539
51d3b65b8093
parent 538
8e36a0fabf58
child 540
6ee8080a6efe

8001901: build-infra: Fix "misbehaving" which command on Solaris
Summary: Removed all uses of which in configure on solaris.
Reviewed-by: ohair

common/autoconf/basics.m4 file | annotate | diff | comparison | revisions
common/autoconf/generated-configure.sh file | annotate | diff | comparison | revisions
     1.1 --- a/common/autoconf/basics.m4	Tue Dec 18 09:57:01 2012 +0100
     1.2 +++ b/common/autoconf/basics.m4	Tue Dec 18 17:54:39 2012 +0100
     1.3 @@ -90,13 +90,25 @@
     1.4      tmp="$complete EOL"
     1.5      arguments="${tmp#* }"
     1.6  
     1.7 -    new_path=`$WHICH $path 2> /dev/null`
     1.8 +    # Cannot rely on the command "which" here since it doesn't always work.
     1.9 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    1.10 +    if test -z "$is_absolute_path"; then
    1.11 +      # Path to executable is not absolute. Find it.
    1.12 +      IFS_save="$IFS"
    1.13 +      IFS=:
    1.14 +      for p in $PATH; do
    1.15 +        if test -f "$p/$path" && test -x "$p/$path"; then
    1.16 +          new_path="$p/$path"
    1.17 +          break
    1.18 +        fi
    1.19 +      done
    1.20 +      IFS="$IFS_save"
    1.21 +    else
    1.22 +      AC_MSG_NOTICE([Resolving $1 (as $path) failed, using $path directly.])
    1.23 +      new_path="$path"
    1.24 +    fi
    1.25 +    
    1.26      if test "x$new_path" = x; then
    1.27 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
    1.28 -      if test "x$is_absolute_path" != x; then
    1.29 -        AC_MSG_NOTICE([Resolving $1 (as $path) with 'which' failed, using $path directly.])
    1.30 -        new_path="$path"
    1.31 -      else
    1.32          AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
    1.33          has_space=`$ECHO "$complete" | $GREP " "`
    1.34          if test "x$has_space" != x; then
    1.35 @@ -104,20 +116,19 @@
    1.36          fi
    1.37          AC_MSG_ERROR([Cannot locate the the path of $1])
    1.38        fi
    1.39 -    fi
    1.40    fi
    1.41  
    1.42 -  # Now join together the path and the arguments once again
    1.43 -  if test "x$arguments" != xEOL; then
    1.44 -      new_complete="$new_path ${arguments% *}"
    1.45 -  else
    1.46 -      new_complete="$new_path"
    1.47 -  fi
    1.48 +      # Now join together the path and the arguments once again
    1.49 +      if test "x$arguments" != xEOL; then
    1.50 +        new_complete="$new_path ${arguments% *}"
    1.51 +      else
    1.52 +        new_complete="$new_path"
    1.53 +      fi
    1.54  
    1.55    if test "x$complete" != "x$new_complete"; then
    1.56 -    $1="$new_complete"
    1.57 -    AC_MSG_NOTICE([Rewriting $1 to "$new_complete"])
    1.58 -  fi
    1.59 +      $1="$new_complete"
    1.60 +      AC_MSG_NOTICE([Rewriting $1 to "$new_complete"])
    1.61 +    fi
    1.62  ])
    1.63  
    1.64  AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS],
     2.1 --- a/common/autoconf/generated-configure.sh	Tue Dec 18 09:57:01 2012 +0100
     2.2 +++ b/common/autoconf/generated-configure.sh	Tue Dec 18 17:54:39 2012 +0100
     2.3 @@ -3674,7 +3674,7 @@
     2.4  #CUSTOM_AUTOCONF_INCLUDE
     2.5  
     2.6  # Do not change or remove the following line, it is needed for consistency checks:
     2.7 -DATE_WHEN_GENERATED=1355221914
     2.8 +DATE_WHEN_GENERATED=1355849613
     2.9  
    2.10  ###############################################################################
    2.11  #
    2.12 @@ -8165,14 +8165,26 @@
    2.13      tmp="$complete EOL"
    2.14      arguments="${tmp#* }"
    2.15  
    2.16 -    new_path=`$WHICH $path 2> /dev/null`
    2.17 -    if test "x$new_path" = x; then
    2.18 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
    2.19 -      if test "x$is_absolute_path" != x; then
    2.20 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
    2.21 -$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
    2.22 -        new_path="$path"
    2.23 -      else
    2.24 +    # Cannot rely on the command "which" here since it doesn't always work.
    2.25 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    2.26 +    if test -z "$is_absolute_path"; then
    2.27 +      # Path to executable is not absolute. Find it.
    2.28 +      IFS_save="$IFS"
    2.29 +      IFS=:
    2.30 +      for p in $PATH; do
    2.31 +        if test -f "$p/$path" && test -x "$p/$path"; then
    2.32 +          new_path="$p/$path"
    2.33 +          break
    2.34 +        fi
    2.35 +      done
    2.36 +      IFS="$IFS_save"
    2.37 +    else
    2.38 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
    2.39 +$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
    2.40 +      new_path="$path"
    2.41 +    fi
    2.42 +
    2.43 +    if test "x$new_path" = x; then
    2.44          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
    2.45  $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
    2.46          has_space=`$ECHO "$complete" | $GREP " "`
    2.47 @@ -8182,21 +8194,20 @@
    2.48          fi
    2.49          as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
    2.50        fi
    2.51 -    fi
    2.52 -  fi
    2.53 -
    2.54 -  # Now join together the path and the arguments once again
    2.55 -  if test "x$arguments" != xEOL; then
    2.56 -      new_complete="$new_path ${arguments% *}"
    2.57 -  else
    2.58 -      new_complete="$new_path"
    2.59 -  fi
    2.60 +  fi
    2.61 +
    2.62 +      # Now join together the path and the arguments once again
    2.63 +      if test "x$arguments" != xEOL; then
    2.64 +        new_complete="$new_path ${arguments% *}"
    2.65 +      else
    2.66 +        new_complete="$new_path"
    2.67 +      fi
    2.68  
    2.69    if test "x$complete" != "x$new_complete"; then
    2.70 -    FOUND_MAKE="$new_complete"
    2.71 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
    2.72 +      FOUND_MAKE="$new_complete"
    2.73 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
    2.74  $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
    2.75 -  fi
    2.76 +    fi
    2.77  
    2.78          fi
    2.79        fi
    2.80 @@ -8511,14 +8522,26 @@
    2.81      tmp="$complete EOL"
    2.82      arguments="${tmp#* }"
    2.83  
    2.84 -    new_path=`$WHICH $path 2> /dev/null`
    2.85 -    if test "x$new_path" = x; then
    2.86 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
    2.87 -      if test "x$is_absolute_path" != x; then
    2.88 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
    2.89 -$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
    2.90 -        new_path="$path"
    2.91 -      else
    2.92 +    # Cannot rely on the command "which" here since it doesn't always work.
    2.93 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
    2.94 +    if test -z "$is_absolute_path"; then
    2.95 +      # Path to executable is not absolute. Find it.
    2.96 +      IFS_save="$IFS"
    2.97 +      IFS=:
    2.98 +      for p in $PATH; do
    2.99 +        if test -f "$p/$path" && test -x "$p/$path"; then
   2.100 +          new_path="$p/$path"
   2.101 +          break
   2.102 +        fi
   2.103 +      done
   2.104 +      IFS="$IFS_save"
   2.105 +    else
   2.106 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
   2.107 +$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
   2.108 +      new_path="$path"
   2.109 +    fi
   2.110 +
   2.111 +    if test "x$new_path" = x; then
   2.112          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
   2.113  $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
   2.114          has_space=`$ECHO "$complete" | $GREP " "`
   2.115 @@ -8528,21 +8551,20 @@
   2.116          fi
   2.117          as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
   2.118        fi
   2.119 -    fi
   2.120 -  fi
   2.121 -
   2.122 -  # Now join together the path and the arguments once again
   2.123 -  if test "x$arguments" != xEOL; then
   2.124 -      new_complete="$new_path ${arguments% *}"
   2.125 -  else
   2.126 -      new_complete="$new_path"
   2.127 -  fi
   2.128 +  fi
   2.129 +
   2.130 +      # Now join together the path and the arguments once again
   2.131 +      if test "x$arguments" != xEOL; then
   2.132 +        new_complete="$new_path ${arguments% *}"
   2.133 +      else
   2.134 +        new_complete="$new_path"
   2.135 +      fi
   2.136  
   2.137    if test "x$complete" != "x$new_complete"; then
   2.138 -    FOUND_MAKE="$new_complete"
   2.139 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
   2.140 +      FOUND_MAKE="$new_complete"
   2.141 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
   2.142  $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
   2.143 -  fi
   2.144 +    fi
   2.145  
   2.146          fi
   2.147        fi
   2.148 @@ -8854,14 +8876,26 @@
   2.149      tmp="$complete EOL"
   2.150      arguments="${tmp#* }"
   2.151  
   2.152 -    new_path=`$WHICH $path 2> /dev/null`
   2.153 -    if test "x$new_path" = x; then
   2.154 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.155 -      if test "x$is_absolute_path" != x; then
   2.156 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
   2.157 -$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
   2.158 -        new_path="$path"
   2.159 -      else
   2.160 +    # Cannot rely on the command "which" here since it doesn't always work.
   2.161 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.162 +    if test -z "$is_absolute_path"; then
   2.163 +      # Path to executable is not absolute. Find it.
   2.164 +      IFS_save="$IFS"
   2.165 +      IFS=:
   2.166 +      for p in $PATH; do
   2.167 +        if test -f "$p/$path" && test -x "$p/$path"; then
   2.168 +          new_path="$p/$path"
   2.169 +          break
   2.170 +        fi
   2.171 +      done
   2.172 +      IFS="$IFS_save"
   2.173 +    else
   2.174 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
   2.175 +$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
   2.176 +      new_path="$path"
   2.177 +    fi
   2.178 +
   2.179 +    if test "x$new_path" = x; then
   2.180          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
   2.181  $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
   2.182          has_space=`$ECHO "$complete" | $GREP " "`
   2.183 @@ -8871,21 +8905,20 @@
   2.184          fi
   2.185          as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
   2.186        fi
   2.187 -    fi
   2.188 -  fi
   2.189 -
   2.190 -  # Now join together the path and the arguments once again
   2.191 -  if test "x$arguments" != xEOL; then
   2.192 -      new_complete="$new_path ${arguments% *}"
   2.193 -  else
   2.194 -      new_complete="$new_path"
   2.195 -  fi
   2.196 +  fi
   2.197 +
   2.198 +      # Now join together the path and the arguments once again
   2.199 +      if test "x$arguments" != xEOL; then
   2.200 +        new_complete="$new_path ${arguments% *}"
   2.201 +      else
   2.202 +        new_complete="$new_path"
   2.203 +      fi
   2.204  
   2.205    if test "x$complete" != "x$new_complete"; then
   2.206 -    FOUND_MAKE="$new_complete"
   2.207 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
   2.208 +      FOUND_MAKE="$new_complete"
   2.209 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
   2.210  $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
   2.211 -  fi
   2.212 +    fi
   2.213  
   2.214          fi
   2.215        fi
   2.216 @@ -9202,14 +9235,26 @@
   2.217      tmp="$complete EOL"
   2.218      arguments="${tmp#* }"
   2.219  
   2.220 -    new_path=`$WHICH $path 2> /dev/null`
   2.221 -    if test "x$new_path" = x; then
   2.222 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.223 -      if test "x$is_absolute_path" != x; then
   2.224 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
   2.225 -$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
   2.226 -        new_path="$path"
   2.227 -      else
   2.228 +    # Cannot rely on the command "which" here since it doesn't always work.
   2.229 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.230 +    if test -z "$is_absolute_path"; then
   2.231 +      # Path to executable is not absolute. Find it.
   2.232 +      IFS_save="$IFS"
   2.233 +      IFS=:
   2.234 +      for p in $PATH; do
   2.235 +        if test -f "$p/$path" && test -x "$p/$path"; then
   2.236 +          new_path="$p/$path"
   2.237 +          break
   2.238 +        fi
   2.239 +      done
   2.240 +      IFS="$IFS_save"
   2.241 +    else
   2.242 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
   2.243 +$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
   2.244 +      new_path="$path"
   2.245 +    fi
   2.246 +
   2.247 +    if test "x$new_path" = x; then
   2.248          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
   2.249  $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
   2.250          has_space=`$ECHO "$complete" | $GREP " "`
   2.251 @@ -9219,21 +9264,20 @@
   2.252          fi
   2.253          as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
   2.254        fi
   2.255 -    fi
   2.256 -  fi
   2.257 -
   2.258 -  # Now join together the path and the arguments once again
   2.259 -  if test "x$arguments" != xEOL; then
   2.260 -      new_complete="$new_path ${arguments% *}"
   2.261 -  else
   2.262 -      new_complete="$new_path"
   2.263 -  fi
   2.264 +  fi
   2.265 +
   2.266 +      # Now join together the path and the arguments once again
   2.267 +      if test "x$arguments" != xEOL; then
   2.268 +        new_complete="$new_path ${arguments% *}"
   2.269 +      else
   2.270 +        new_complete="$new_path"
   2.271 +      fi
   2.272  
   2.273    if test "x$complete" != "x$new_complete"; then
   2.274 -    FOUND_MAKE="$new_complete"
   2.275 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
   2.276 +      FOUND_MAKE="$new_complete"
   2.277 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
   2.278  $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
   2.279 -  fi
   2.280 +    fi
   2.281  
   2.282          fi
   2.283        fi
   2.284 @@ -9544,14 +9588,26 @@
   2.285      tmp="$complete EOL"
   2.286      arguments="${tmp#* }"
   2.287  
   2.288 -    new_path=`$WHICH $path 2> /dev/null`
   2.289 -    if test "x$new_path" = x; then
   2.290 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.291 -      if test "x$is_absolute_path" != x; then
   2.292 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
   2.293 -$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
   2.294 -        new_path="$path"
   2.295 -      else
   2.296 +    # Cannot rely on the command "which" here since it doesn't always work.
   2.297 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.298 +    if test -z "$is_absolute_path"; then
   2.299 +      # Path to executable is not absolute. Find it.
   2.300 +      IFS_save="$IFS"
   2.301 +      IFS=:
   2.302 +      for p in $PATH; do
   2.303 +        if test -f "$p/$path" && test -x "$p/$path"; then
   2.304 +          new_path="$p/$path"
   2.305 +          break
   2.306 +        fi
   2.307 +      done
   2.308 +      IFS="$IFS_save"
   2.309 +    else
   2.310 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
   2.311 +$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
   2.312 +      new_path="$path"
   2.313 +    fi
   2.314 +
   2.315 +    if test "x$new_path" = x; then
   2.316          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
   2.317  $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
   2.318          has_space=`$ECHO "$complete" | $GREP " "`
   2.319 @@ -9561,21 +9617,20 @@
   2.320          fi
   2.321          as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
   2.322        fi
   2.323 -    fi
   2.324 -  fi
   2.325 -
   2.326 -  # Now join together the path and the arguments once again
   2.327 -  if test "x$arguments" != xEOL; then
   2.328 -      new_complete="$new_path ${arguments% *}"
   2.329 -  else
   2.330 -      new_complete="$new_path"
   2.331 -  fi
   2.332 +  fi
   2.333 +
   2.334 +      # Now join together the path and the arguments once again
   2.335 +      if test "x$arguments" != xEOL; then
   2.336 +        new_complete="$new_path ${arguments% *}"
   2.337 +      else
   2.338 +        new_complete="$new_path"
   2.339 +      fi
   2.340  
   2.341    if test "x$complete" != "x$new_complete"; then
   2.342 -    FOUND_MAKE="$new_complete"
   2.343 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
   2.344 +      FOUND_MAKE="$new_complete"
   2.345 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
   2.346  $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
   2.347 -  fi
   2.348 +    fi
   2.349  
   2.350          fi
   2.351        fi
   2.352 @@ -16373,14 +16428,26 @@
   2.353      tmp="$complete EOL"
   2.354      arguments="${tmp#* }"
   2.355  
   2.356 -    new_path=`$WHICH $path 2> /dev/null`
   2.357 -    if test "x$new_path" = x; then
   2.358 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.359 -      if test "x$is_absolute_path" != x; then
   2.360 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&5
   2.361 -$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&6;}
   2.362 -        new_path="$path"
   2.363 -      else
   2.364 +    # Cannot rely on the command "which" here since it doesn't always work.
   2.365 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.366 +    if test -z "$is_absolute_path"; then
   2.367 +      # Path to executable is not absolute. Find it.
   2.368 +      IFS_save="$IFS"
   2.369 +      IFS=:
   2.370 +      for p in $PATH; do
   2.371 +        if test -f "$p/$path" && test -x "$p/$path"; then
   2.372 +          new_path="$p/$path"
   2.373 +          break
   2.374 +        fi
   2.375 +      done
   2.376 +      IFS="$IFS_save"
   2.377 +    else
   2.378 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
   2.379 +$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
   2.380 +      new_path="$path"
   2.381 +    fi
   2.382 +
   2.383 +    if test "x$new_path" = x; then
   2.384          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
   2.385  $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
   2.386          has_space=`$ECHO "$complete" | $GREP " "`
   2.387 @@ -16390,21 +16457,20 @@
   2.388          fi
   2.389          as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
   2.390        fi
   2.391 -    fi
   2.392 -  fi
   2.393 -
   2.394 -  # Now join together the path and the arguments once again
   2.395 -  if test "x$arguments" != xEOL; then
   2.396 -      new_complete="$new_path ${arguments% *}"
   2.397 -  else
   2.398 -      new_complete="$new_path"
   2.399 -  fi
   2.400 +  fi
   2.401 +
   2.402 +      # Now join together the path and the arguments once again
   2.403 +      if test "x$arguments" != xEOL; then
   2.404 +        new_complete="$new_path ${arguments% *}"
   2.405 +      else
   2.406 +        new_complete="$new_path"
   2.407 +      fi
   2.408  
   2.409    if test "x$complete" != "x$new_complete"; then
   2.410 -    VS_ENV_CMD="$new_complete"
   2.411 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
   2.412 +      VS_ENV_CMD="$new_complete"
   2.413 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
   2.414  $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
   2.415 -  fi
   2.416 +    fi
   2.417  
   2.418  
   2.419      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
   2.420 @@ -16962,14 +17028,26 @@
   2.421      tmp="$complete EOL"
   2.422      arguments="${tmp#* }"
   2.423  
   2.424 -    new_path=`$WHICH $path 2> /dev/null`
   2.425 -    if test "x$new_path" = x; then
   2.426 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.427 -      if test "x$is_absolute_path" != x; then
   2.428 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&5
   2.429 -$as_echo "$as_me: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&6;}
   2.430 -        new_path="$path"
   2.431 -      else
   2.432 +    # Cannot rely on the command "which" here since it doesn't always work.
   2.433 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.434 +    if test -z "$is_absolute_path"; then
   2.435 +      # Path to executable is not absolute. Find it.
   2.436 +      IFS_save="$IFS"
   2.437 +      IFS=:
   2.438 +      for p in $PATH; do
   2.439 +        if test -f "$p/$path" && test -x "$p/$path"; then
   2.440 +          new_path="$p/$path"
   2.441 +          break
   2.442 +        fi
   2.443 +      done
   2.444 +      IFS="$IFS_save"
   2.445 +    else
   2.446 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
   2.447 +$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
   2.448 +      new_path="$path"
   2.449 +    fi
   2.450 +
   2.451 +    if test "x$new_path" = x; then
   2.452          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
   2.453  $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
   2.454          has_space=`$ECHO "$complete" | $GREP " "`
   2.455 @@ -16979,21 +17057,20 @@
   2.456          fi
   2.457          as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
   2.458        fi
   2.459 -    fi
   2.460 -  fi
   2.461 -
   2.462 -  # Now join together the path and the arguments once again
   2.463 -  if test "x$arguments" != xEOL; then
   2.464 -      new_complete="$new_path ${arguments% *}"
   2.465 -  else
   2.466 -      new_complete="$new_path"
   2.467 -  fi
   2.468 +  fi
   2.469 +
   2.470 +      # Now join together the path and the arguments once again
   2.471 +      if test "x$arguments" != xEOL; then
   2.472 +        new_complete="$new_path ${arguments% *}"
   2.473 +      else
   2.474 +        new_complete="$new_path"
   2.475 +      fi
   2.476  
   2.477    if test "x$complete" != "x$new_complete"; then
   2.478 -    BUILD_CC="$new_complete"
   2.479 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
   2.480 +      BUILD_CC="$new_complete"
   2.481 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
   2.482  $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
   2.483 -  fi
   2.484 +    fi
   2.485  
   2.486      for ac_prog in cl CC g++
   2.487  do
   2.488 @@ -17262,14 +17339,26 @@
   2.489      tmp="$complete EOL"
   2.490      arguments="${tmp#* }"
   2.491  
   2.492 -    new_path=`$WHICH $path 2> /dev/null`
   2.493 -    if test "x$new_path" = x; then
   2.494 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.495 -      if test "x$is_absolute_path" != x; then
   2.496 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&5
   2.497 -$as_echo "$as_me: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&6;}
   2.498 -        new_path="$path"
   2.499 -      else
   2.500 +    # Cannot rely on the command "which" here since it doesn't always work.
   2.501 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.502 +    if test -z "$is_absolute_path"; then
   2.503 +      # Path to executable is not absolute. Find it.
   2.504 +      IFS_save="$IFS"
   2.505 +      IFS=:
   2.506 +      for p in $PATH; do
   2.507 +        if test -f "$p/$path" && test -x "$p/$path"; then
   2.508 +          new_path="$p/$path"
   2.509 +          break
   2.510 +        fi
   2.511 +      done
   2.512 +      IFS="$IFS_save"
   2.513 +    else
   2.514 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
   2.515 +$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
   2.516 +      new_path="$path"
   2.517 +    fi
   2.518 +
   2.519 +    if test "x$new_path" = x; then
   2.520          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
   2.521  $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
   2.522          has_space=`$ECHO "$complete" | $GREP " "`
   2.523 @@ -17279,21 +17368,20 @@
   2.524          fi
   2.525          as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
   2.526        fi
   2.527 -    fi
   2.528 -  fi
   2.529 -
   2.530 -  # Now join together the path and the arguments once again
   2.531 -  if test "x$arguments" != xEOL; then
   2.532 -      new_complete="$new_path ${arguments% *}"
   2.533 -  else
   2.534 -      new_complete="$new_path"
   2.535 -  fi
   2.536 +  fi
   2.537 +
   2.538 +      # Now join together the path and the arguments once again
   2.539 +      if test "x$arguments" != xEOL; then
   2.540 +        new_complete="$new_path ${arguments% *}"
   2.541 +      else
   2.542 +        new_complete="$new_path"
   2.543 +      fi
   2.544  
   2.545    if test "x$complete" != "x$new_complete"; then
   2.546 -    BUILD_CXX="$new_complete"
   2.547 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
   2.548 +      BUILD_CXX="$new_complete"
   2.549 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
   2.550  $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
   2.551 -  fi
   2.552 +    fi
   2.553  
   2.554      # Extract the first word of "ld", so it can be a program name with args.
   2.555  set dummy ld; ac_word=$2
   2.556 @@ -17557,14 +17645,26 @@
   2.557      tmp="$complete EOL"
   2.558      arguments="${tmp#* }"
   2.559  
   2.560 -    new_path=`$WHICH $path 2> /dev/null`
   2.561 -    if test "x$new_path" = x; then
   2.562 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.563 -      if test "x$is_absolute_path" != x; then
   2.564 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&5
   2.565 -$as_echo "$as_me: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&6;}
   2.566 -        new_path="$path"
   2.567 -      else
   2.568 +    # Cannot rely on the command "which" here since it doesn't always work.
   2.569 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.570 +    if test -z "$is_absolute_path"; then
   2.571 +      # Path to executable is not absolute. Find it.
   2.572 +      IFS_save="$IFS"
   2.573 +      IFS=:
   2.574 +      for p in $PATH; do
   2.575 +        if test -f "$p/$path" && test -x "$p/$path"; then
   2.576 +          new_path="$p/$path"
   2.577 +          break
   2.578 +        fi
   2.579 +      done
   2.580 +      IFS="$IFS_save"
   2.581 +    else
   2.582 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
   2.583 +$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
   2.584 +      new_path="$path"
   2.585 +    fi
   2.586 +
   2.587 +    if test "x$new_path" = x; then
   2.588          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
   2.589  $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
   2.590          has_space=`$ECHO "$complete" | $GREP " "`
   2.591 @@ -17574,21 +17674,20 @@
   2.592          fi
   2.593          as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
   2.594        fi
   2.595 -    fi
   2.596 -  fi
   2.597 -
   2.598 -  # Now join together the path and the arguments once again
   2.599 -  if test "x$arguments" != xEOL; then
   2.600 -      new_complete="$new_path ${arguments% *}"
   2.601 -  else
   2.602 -      new_complete="$new_path"
   2.603 -  fi
   2.604 +  fi
   2.605 +
   2.606 +      # Now join together the path and the arguments once again
   2.607 +      if test "x$arguments" != xEOL; then
   2.608 +        new_complete="$new_path ${arguments% *}"
   2.609 +      else
   2.610 +        new_complete="$new_path"
   2.611 +      fi
   2.612  
   2.613    if test "x$complete" != "x$new_complete"; then
   2.614 -    BUILD_LD="$new_complete"
   2.615 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
   2.616 +      BUILD_LD="$new_complete"
   2.617 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
   2.618  $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
   2.619 -  fi
   2.620 +    fi
   2.621  
   2.622  fi
   2.623  
   2.624 @@ -18144,14 +18243,26 @@
   2.625      tmp="$complete EOL"
   2.626      arguments="${tmp#* }"
   2.627  
   2.628 -    new_path=`$WHICH $path 2> /dev/null`
   2.629 -    if test "x$new_path" = x; then
   2.630 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.631 -      if test "x$is_absolute_path" != x; then
   2.632 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) with 'which' failed, using $path directly." >&5
   2.633 -$as_echo "$as_me: Resolving CC (as $path) with 'which' failed, using $path directly." >&6;}
   2.634 -        new_path="$path"
   2.635 -      else
   2.636 +    # Cannot rely on the command "which" here since it doesn't always work.
   2.637 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.638 +    if test -z "$is_absolute_path"; then
   2.639 +      # Path to executable is not absolute. Find it.
   2.640 +      IFS_save="$IFS"
   2.641 +      IFS=:
   2.642 +      for p in $PATH; do
   2.643 +        if test -f "$p/$path" && test -x "$p/$path"; then
   2.644 +          new_path="$p/$path"
   2.645 +          break
   2.646 +        fi
   2.647 +      done
   2.648 +      IFS="$IFS_save"
   2.649 +    else
   2.650 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
   2.651 +$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
   2.652 +      new_path="$path"
   2.653 +    fi
   2.654 +
   2.655 +    if test "x$new_path" = x; then
   2.656          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
   2.657  $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
   2.658          has_space=`$ECHO "$complete" | $GREP " "`
   2.659 @@ -18161,21 +18272,20 @@
   2.660          fi
   2.661          as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
   2.662        fi
   2.663 -    fi
   2.664 -  fi
   2.665 -
   2.666 -  # Now join together the path and the arguments once again
   2.667 -  if test "x$arguments" != xEOL; then
   2.668 -      new_complete="$new_path ${arguments% *}"
   2.669 -  else
   2.670 -      new_complete="$new_path"
   2.671 -  fi
   2.672 +  fi
   2.673 +
   2.674 +      # Now join together the path and the arguments once again
   2.675 +      if test "x$arguments" != xEOL; then
   2.676 +        new_complete="$new_path ${arguments% *}"
   2.677 +      else
   2.678 +        new_complete="$new_path"
   2.679 +      fi
   2.680  
   2.681    if test "x$complete" != "x$new_complete"; then
   2.682 -    CC="$new_complete"
   2.683 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
   2.684 +      CC="$new_complete"
   2.685 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
   2.686  $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
   2.687 -  fi
   2.688 +    fi
   2.689  
   2.690    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
   2.691  $as_echo_n "checking resolved symbolic links for CC... " >&6; }
   2.692 @@ -18569,14 +18679,26 @@
   2.693      tmp="$complete EOL"
   2.694      arguments="${tmp#* }"
   2.695  
   2.696 -    new_path=`$WHICH $path 2> /dev/null`
   2.697 -    if test "x$new_path" = x; then
   2.698 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.699 -      if test "x$is_absolute_path" != x; then
   2.700 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&5
   2.701 -$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&6;}
   2.702 -        new_path="$path"
   2.703 -      else
   2.704 +    # Cannot rely on the command "which" here since it doesn't always work.
   2.705 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.706 +    if test -z "$is_absolute_path"; then
   2.707 +      # Path to executable is not absolute. Find it.
   2.708 +      IFS_save="$IFS"
   2.709 +      IFS=:
   2.710 +      for p in $PATH; do
   2.711 +        if test -f "$p/$path" && test -x "$p/$path"; then
   2.712 +          new_path="$p/$path"
   2.713 +          break
   2.714 +        fi
   2.715 +      done
   2.716 +      IFS="$IFS_save"
   2.717 +    else
   2.718 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
   2.719 +$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
   2.720 +      new_path="$path"
   2.721 +    fi
   2.722 +
   2.723 +    if test "x$new_path" = x; then
   2.724          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
   2.725  $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
   2.726          has_space=`$ECHO "$complete" | $GREP " "`
   2.727 @@ -18586,21 +18708,20 @@
   2.728          fi
   2.729          as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
   2.730        fi
   2.731 -    fi
   2.732 -  fi
   2.733 -
   2.734 -  # Now join together the path and the arguments once again
   2.735 -  if test "x$arguments" != xEOL; then
   2.736 -      new_complete="$new_path ${arguments% *}"
   2.737 -  else
   2.738 -      new_complete="$new_path"
   2.739 -  fi
   2.740 +  fi
   2.741 +
   2.742 +      # Now join together the path and the arguments once again
   2.743 +      if test "x$arguments" != xEOL; then
   2.744 +        new_complete="$new_path ${arguments% *}"
   2.745 +      else
   2.746 +        new_complete="$new_path"
   2.747 +      fi
   2.748  
   2.749    if test "x$complete" != "x$new_complete"; then
   2.750 -    PROPER_COMPILER_CC="$new_complete"
   2.751 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
   2.752 +      PROPER_COMPILER_CC="$new_complete"
   2.753 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
   2.754  $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
   2.755 -  fi
   2.756 +    fi
   2.757  
   2.758      PATH="$RETRY_COMPILER_SAVED_PATH"
   2.759  
   2.760 @@ -19691,14 +19812,26 @@
   2.761      tmp="$complete EOL"
   2.762      arguments="${tmp#* }"
   2.763  
   2.764 -    new_path=`$WHICH $path 2> /dev/null`
   2.765 -    if test "x$new_path" = x; then
   2.766 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.767 -      if test "x$is_absolute_path" != x; then
   2.768 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) with 'which' failed, using $path directly." >&5
   2.769 -$as_echo "$as_me: Resolving CXX (as $path) with 'which' failed, using $path directly." >&6;}
   2.770 -        new_path="$path"
   2.771 -      else
   2.772 +    # Cannot rely on the command "which" here since it doesn't always work.
   2.773 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.774 +    if test -z "$is_absolute_path"; then
   2.775 +      # Path to executable is not absolute. Find it.
   2.776 +      IFS_save="$IFS"
   2.777 +      IFS=:
   2.778 +      for p in $PATH; do
   2.779 +        if test -f "$p/$path" && test -x "$p/$path"; then
   2.780 +          new_path="$p/$path"
   2.781 +          break
   2.782 +        fi
   2.783 +      done
   2.784 +      IFS="$IFS_save"
   2.785 +    else
   2.786 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
   2.787 +$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
   2.788 +      new_path="$path"
   2.789 +    fi
   2.790 +
   2.791 +    if test "x$new_path" = x; then
   2.792          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
   2.793  $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
   2.794          has_space=`$ECHO "$complete" | $GREP " "`
   2.795 @@ -19708,21 +19841,20 @@
   2.796          fi
   2.797          as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
   2.798        fi
   2.799 -    fi
   2.800 -  fi
   2.801 -
   2.802 -  # Now join together the path and the arguments once again
   2.803 -  if test "x$arguments" != xEOL; then
   2.804 -      new_complete="$new_path ${arguments% *}"
   2.805 -  else
   2.806 -      new_complete="$new_path"
   2.807 -  fi
   2.808 +  fi
   2.809 +
   2.810 +      # Now join together the path and the arguments once again
   2.811 +      if test "x$arguments" != xEOL; then
   2.812 +        new_complete="$new_path ${arguments% *}"
   2.813 +      else
   2.814 +        new_complete="$new_path"
   2.815 +      fi
   2.816  
   2.817    if test "x$complete" != "x$new_complete"; then
   2.818 -    CXX="$new_complete"
   2.819 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
   2.820 +      CXX="$new_complete"
   2.821 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
   2.822  $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
   2.823 -  fi
   2.824 +    fi
   2.825  
   2.826    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
   2.827  $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
   2.828 @@ -20116,14 +20248,26 @@
   2.829      tmp="$complete EOL"
   2.830      arguments="${tmp#* }"
   2.831  
   2.832 -    new_path=`$WHICH $path 2> /dev/null`
   2.833 -    if test "x$new_path" = x; then
   2.834 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.835 -      if test "x$is_absolute_path" != x; then
   2.836 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&5
   2.837 -$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&6;}
   2.838 -        new_path="$path"
   2.839 -      else
   2.840 +    # Cannot rely on the command "which" here since it doesn't always work.
   2.841 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.842 +    if test -z "$is_absolute_path"; then
   2.843 +      # Path to executable is not absolute. Find it.
   2.844 +      IFS_save="$IFS"
   2.845 +      IFS=:
   2.846 +      for p in $PATH; do
   2.847 +        if test -f "$p/$path" && test -x "$p/$path"; then
   2.848 +          new_path="$p/$path"
   2.849 +          break
   2.850 +        fi
   2.851 +      done
   2.852 +      IFS="$IFS_save"
   2.853 +    else
   2.854 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
   2.855 +$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
   2.856 +      new_path="$path"
   2.857 +    fi
   2.858 +
   2.859 +    if test "x$new_path" = x; then
   2.860          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
   2.861  $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
   2.862          has_space=`$ECHO "$complete" | $GREP " "`
   2.863 @@ -20133,21 +20277,20 @@
   2.864          fi
   2.865          as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
   2.866        fi
   2.867 -    fi
   2.868 -  fi
   2.869 -
   2.870 -  # Now join together the path and the arguments once again
   2.871 -  if test "x$arguments" != xEOL; then
   2.872 -      new_complete="$new_path ${arguments% *}"
   2.873 -  else
   2.874 -      new_complete="$new_path"
   2.875 -  fi
   2.876 +  fi
   2.877 +
   2.878 +      # Now join together the path and the arguments once again
   2.879 +      if test "x$arguments" != xEOL; then
   2.880 +        new_complete="$new_path ${arguments% *}"
   2.881 +      else
   2.882 +        new_complete="$new_path"
   2.883 +      fi
   2.884  
   2.885    if test "x$complete" != "x$new_complete"; then
   2.886 -    PROPER_COMPILER_CXX="$new_complete"
   2.887 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
   2.888 +      PROPER_COMPILER_CXX="$new_complete"
   2.889 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
   2.890  $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
   2.891 -  fi
   2.892 +    fi
   2.893  
   2.894      PATH="$RETRY_COMPILER_SAVED_PATH"
   2.895  
   2.896 @@ -21006,14 +21149,26 @@
   2.897      tmp="$complete EOL"
   2.898      arguments="${tmp#* }"
   2.899  
   2.900 -    new_path=`$WHICH $path 2> /dev/null`
   2.901 -    if test "x$new_path" = x; then
   2.902 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.903 -      if test "x$is_absolute_path" != x; then
   2.904 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&5
   2.905 -$as_echo "$as_me: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&6;}
   2.906 -        new_path="$path"
   2.907 -      else
   2.908 +    # Cannot rely on the command "which" here since it doesn't always work.
   2.909 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.910 +    if test -z "$is_absolute_path"; then
   2.911 +      # Path to executable is not absolute. Find it.
   2.912 +      IFS_save="$IFS"
   2.913 +      IFS=:
   2.914 +      for p in $PATH; do
   2.915 +        if test -f "$p/$path" && test -x "$p/$path"; then
   2.916 +          new_path="$p/$path"
   2.917 +          break
   2.918 +        fi
   2.919 +      done
   2.920 +      IFS="$IFS_save"
   2.921 +    else
   2.922 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
   2.923 +$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
   2.924 +      new_path="$path"
   2.925 +    fi
   2.926 +
   2.927 +    if test "x$new_path" = x; then
   2.928          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
   2.929  $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
   2.930          has_space=`$ECHO "$complete" | $GREP " "`
   2.931 @@ -21023,21 +21178,20 @@
   2.932          fi
   2.933          as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
   2.934        fi
   2.935 -    fi
   2.936 -  fi
   2.937 -
   2.938 -  # Now join together the path and the arguments once again
   2.939 -  if test "x$arguments" != xEOL; then
   2.940 -      new_complete="$new_path ${arguments% *}"
   2.941 -  else
   2.942 -      new_complete="$new_path"
   2.943 -  fi
   2.944 +  fi
   2.945 +
   2.946 +      # Now join together the path and the arguments once again
   2.947 +      if test "x$arguments" != xEOL; then
   2.948 +        new_complete="$new_path ${arguments% *}"
   2.949 +      else
   2.950 +        new_complete="$new_path"
   2.951 +      fi
   2.952  
   2.953    if test "x$complete" != "x$new_complete"; then
   2.954 -    OBJC="$new_complete"
   2.955 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
   2.956 +      OBJC="$new_complete"
   2.957 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
   2.958  $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
   2.959 -  fi
   2.960 +    fi
   2.961  
   2.962  else
   2.963      OBJC=
   2.964 @@ -21376,14 +21530,26 @@
   2.965      tmp="$complete EOL"
   2.966      arguments="${tmp#* }"
   2.967  
   2.968 -    new_path=`$WHICH $path 2> /dev/null`
   2.969 -    if test "x$new_path" = x; then
   2.970 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.971 -      if test "x$is_absolute_path" != x; then
   2.972 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) with 'which' failed, using $path directly." >&5
   2.973 -$as_echo "$as_me: Resolving AR (as $path) with 'which' failed, using $path directly." >&6;}
   2.974 -        new_path="$path"
   2.975 -      else
   2.976 +    # Cannot rely on the command "which" here since it doesn't always work.
   2.977 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
   2.978 +    if test -z "$is_absolute_path"; then
   2.979 +      # Path to executable is not absolute. Find it.
   2.980 +      IFS_save="$IFS"
   2.981 +      IFS=:
   2.982 +      for p in $PATH; do
   2.983 +        if test -f "$p/$path" && test -x "$p/$path"; then
   2.984 +          new_path="$p/$path"
   2.985 +          break
   2.986 +        fi
   2.987 +      done
   2.988 +      IFS="$IFS_save"
   2.989 +    else
   2.990 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
   2.991 +$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
   2.992 +      new_path="$path"
   2.993 +    fi
   2.994 +
   2.995 +    if test "x$new_path" = x; then
   2.996          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
   2.997  $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
   2.998          has_space=`$ECHO "$complete" | $GREP " "`
   2.999 @@ -21393,21 +21559,20 @@
  2.1000          fi
  2.1001          as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
  2.1002        fi
  2.1003 -    fi
  2.1004 -  fi
  2.1005 -
  2.1006 -  # Now join together the path and the arguments once again
  2.1007 -  if test "x$arguments" != xEOL; then
  2.1008 -      new_complete="$new_path ${arguments% *}"
  2.1009 -  else
  2.1010 -      new_complete="$new_path"
  2.1011 -  fi
  2.1012 +  fi
  2.1013 +
  2.1014 +      # Now join together the path and the arguments once again
  2.1015 +      if test "x$arguments" != xEOL; then
  2.1016 +        new_complete="$new_path ${arguments% *}"
  2.1017 +      else
  2.1018 +        new_complete="$new_path"
  2.1019 +      fi
  2.1020  
  2.1021    if test "x$complete" != "x$new_complete"; then
  2.1022 -    AR="$new_complete"
  2.1023 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
  2.1024 +      AR="$new_complete"
  2.1025 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
  2.1026  $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
  2.1027 -  fi
  2.1028 +    fi
  2.1029  
  2.1030  fi
  2.1031  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
  2.1032 @@ -21712,14 +21877,26 @@
  2.1033      tmp="$complete EOL"
  2.1034      arguments="${tmp#* }"
  2.1035  
  2.1036 -    new_path=`$WHICH $path 2> /dev/null`
  2.1037 -    if test "x$new_path" = x; then
  2.1038 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1039 -      if test "x$is_absolute_path" != x; then
  2.1040 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&5
  2.1041 -$as_echo "$as_me: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&6;}
  2.1042 -        new_path="$path"
  2.1043 -      else
  2.1044 +    # Cannot rely on the command "which" here since it doesn't always work.
  2.1045 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1046 +    if test -z "$is_absolute_path"; then
  2.1047 +      # Path to executable is not absolute. Find it.
  2.1048 +      IFS_save="$IFS"
  2.1049 +      IFS=:
  2.1050 +      for p in $PATH; do
  2.1051 +        if test -f "$p/$path" && test -x "$p/$path"; then
  2.1052 +          new_path="$p/$path"
  2.1053 +          break
  2.1054 +        fi
  2.1055 +      done
  2.1056 +      IFS="$IFS_save"
  2.1057 +    else
  2.1058 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
  2.1059 +$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
  2.1060 +      new_path="$path"
  2.1061 +    fi
  2.1062 +
  2.1063 +    if test "x$new_path" = x; then
  2.1064          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
  2.1065  $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
  2.1066          has_space=`$ECHO "$complete" | $GREP " "`
  2.1067 @@ -21729,21 +21906,20 @@
  2.1068          fi
  2.1069          as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
  2.1070        fi
  2.1071 -    fi
  2.1072 -  fi
  2.1073 -
  2.1074 -  # Now join together the path and the arguments once again
  2.1075 -  if test "x$arguments" != xEOL; then
  2.1076 -      new_complete="$new_path ${arguments% *}"
  2.1077 -  else
  2.1078 -      new_complete="$new_path"
  2.1079 -  fi
  2.1080 +  fi
  2.1081 +
  2.1082 +      # Now join together the path and the arguments once again
  2.1083 +      if test "x$arguments" != xEOL; then
  2.1084 +        new_complete="$new_path ${arguments% *}"
  2.1085 +      else
  2.1086 +        new_complete="$new_path"
  2.1087 +      fi
  2.1088  
  2.1089    if test "x$complete" != "x$new_complete"; then
  2.1090 -    WINLD="$new_complete"
  2.1091 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
  2.1092 +      WINLD="$new_complete"
  2.1093 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
  2.1094  $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
  2.1095 -  fi
  2.1096 +    fi
  2.1097  
  2.1098      printf "Windows linker was found at $WINLD\n"
  2.1099      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
  2.1100 @@ -22038,14 +22214,26 @@
  2.1101      tmp="$complete EOL"
  2.1102      arguments="${tmp#* }"
  2.1103  
  2.1104 -    new_path=`$WHICH $path 2> /dev/null`
  2.1105 -    if test "x$new_path" = x; then
  2.1106 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1107 -      if test "x$is_absolute_path" != x; then
  2.1108 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) with 'which' failed, using $path directly." >&5
  2.1109 -$as_echo "$as_me: Resolving MT (as $path) with 'which' failed, using $path directly." >&6;}
  2.1110 -        new_path="$path"
  2.1111 -      else
  2.1112 +    # Cannot rely on the command "which" here since it doesn't always work.
  2.1113 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1114 +    if test -z "$is_absolute_path"; then
  2.1115 +      # Path to executable is not absolute. Find it.
  2.1116 +      IFS_save="$IFS"
  2.1117 +      IFS=:
  2.1118 +      for p in $PATH; do
  2.1119 +        if test -f "$p/$path" && test -x "$p/$path"; then
  2.1120 +          new_path="$p/$path"
  2.1121 +          break
  2.1122 +        fi
  2.1123 +      done
  2.1124 +      IFS="$IFS_save"
  2.1125 +    else
  2.1126 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
  2.1127 +$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
  2.1128 +      new_path="$path"
  2.1129 +    fi
  2.1130 +
  2.1131 +    if test "x$new_path" = x; then
  2.1132          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
  2.1133  $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
  2.1134          has_space=`$ECHO "$complete" | $GREP " "`
  2.1135 @@ -22055,21 +22243,20 @@
  2.1136          fi
  2.1137          as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
  2.1138        fi
  2.1139 -    fi
  2.1140 -  fi
  2.1141 -
  2.1142 -  # Now join together the path and the arguments once again
  2.1143 -  if test "x$arguments" != xEOL; then
  2.1144 -      new_complete="$new_path ${arguments% *}"
  2.1145 -  else
  2.1146 -      new_complete="$new_path"
  2.1147 -  fi
  2.1148 +  fi
  2.1149 +
  2.1150 +      # Now join together the path and the arguments once again
  2.1151 +      if test "x$arguments" != xEOL; then
  2.1152 +        new_complete="$new_path ${arguments% *}"
  2.1153 +      else
  2.1154 +        new_complete="$new_path"
  2.1155 +      fi
  2.1156  
  2.1157    if test "x$complete" != "x$new_complete"; then
  2.1158 -    MT="$new_complete"
  2.1159 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
  2.1160 +      MT="$new_complete"
  2.1161 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
  2.1162  $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
  2.1163 -  fi
  2.1164 +    fi
  2.1165  
  2.1166      # The resource compiler
  2.1167      # Extract the first word of "rc", so it can be a program name with args.
  2.1168 @@ -22348,14 +22535,26 @@
  2.1169      tmp="$complete EOL"
  2.1170      arguments="${tmp#* }"
  2.1171  
  2.1172 -    new_path=`$WHICH $path 2> /dev/null`
  2.1173 -    if test "x$new_path" = x; then
  2.1174 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1175 -      if test "x$is_absolute_path" != x; then
  2.1176 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) with 'which' failed, using $path directly." >&5
  2.1177 -$as_echo "$as_me: Resolving RC (as $path) with 'which' failed, using $path directly." >&6;}
  2.1178 -        new_path="$path"
  2.1179 -      else
  2.1180 +    # Cannot rely on the command "which" here since it doesn't always work.
  2.1181 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1182 +    if test -z "$is_absolute_path"; then
  2.1183 +      # Path to executable is not absolute. Find it.
  2.1184 +      IFS_save="$IFS"
  2.1185 +      IFS=:
  2.1186 +      for p in $PATH; do
  2.1187 +        if test -f "$p/$path" && test -x "$p/$path"; then
  2.1188 +          new_path="$p/$path"
  2.1189 +          break
  2.1190 +        fi
  2.1191 +      done
  2.1192 +      IFS="$IFS_save"
  2.1193 +    else
  2.1194 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
  2.1195 +$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
  2.1196 +      new_path="$path"
  2.1197 +    fi
  2.1198 +
  2.1199 +    if test "x$new_path" = x; then
  2.1200          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
  2.1201  $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
  2.1202          has_space=`$ECHO "$complete" | $GREP " "`
  2.1203 @@ -22365,21 +22564,20 @@
  2.1204          fi
  2.1205          as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
  2.1206        fi
  2.1207 -    fi
  2.1208 -  fi
  2.1209 -
  2.1210 -  # Now join together the path and the arguments once again
  2.1211 -  if test "x$arguments" != xEOL; then
  2.1212 -      new_complete="$new_path ${arguments% *}"
  2.1213 -  else
  2.1214 -      new_complete="$new_path"
  2.1215 -  fi
  2.1216 +  fi
  2.1217 +
  2.1218 +      # Now join together the path and the arguments once again
  2.1219 +      if test "x$arguments" != xEOL; then
  2.1220 +        new_complete="$new_path ${arguments% *}"
  2.1221 +      else
  2.1222 +        new_complete="$new_path"
  2.1223 +      fi
  2.1224  
  2.1225    if test "x$complete" != "x$new_complete"; then
  2.1226 -    RC="$new_complete"
  2.1227 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
  2.1228 +      RC="$new_complete"
  2.1229 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
  2.1230  $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
  2.1231 -  fi
  2.1232 +    fi
  2.1233  
  2.1234  
  2.1235      # For hotspot, we need these in Windows mixed path,
  2.1236 @@ -22711,14 +22909,26 @@
  2.1237      tmp="$complete EOL"
  2.1238      arguments="${tmp#* }"
  2.1239  
  2.1240 -    new_path=`$WHICH $path 2> /dev/null`
  2.1241 -    if test "x$new_path" = x; then
  2.1242 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1243 -      if test "x$is_absolute_path" != x; then
  2.1244 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&5
  2.1245 -$as_echo "$as_me: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&6;}
  2.1246 -        new_path="$path"
  2.1247 -      else
  2.1248 +    # Cannot rely on the command "which" here since it doesn't always work.
  2.1249 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1250 +    if test -z "$is_absolute_path"; then
  2.1251 +      # Path to executable is not absolute. Find it.
  2.1252 +      IFS_save="$IFS"
  2.1253 +      IFS=:
  2.1254 +      for p in $PATH; do
  2.1255 +        if test -f "$p/$path" && test -x "$p/$path"; then
  2.1256 +          new_path="$p/$path"
  2.1257 +          break
  2.1258 +        fi
  2.1259 +      done
  2.1260 +      IFS="$IFS_save"
  2.1261 +    else
  2.1262 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
  2.1263 +$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
  2.1264 +      new_path="$path"
  2.1265 +    fi
  2.1266 +
  2.1267 +    if test "x$new_path" = x; then
  2.1268          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
  2.1269  $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
  2.1270          has_space=`$ECHO "$complete" | $GREP " "`
  2.1271 @@ -22728,21 +22938,20 @@
  2.1272          fi
  2.1273          as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
  2.1274        fi
  2.1275 -    fi
  2.1276 -  fi
  2.1277 -
  2.1278 -  # Now join together the path and the arguments once again
  2.1279 -  if test "x$arguments" != xEOL; then
  2.1280 -      new_complete="$new_path ${arguments% *}"
  2.1281 -  else
  2.1282 -      new_complete="$new_path"
  2.1283 -  fi
  2.1284 +  fi
  2.1285 +
  2.1286 +      # Now join together the path and the arguments once again
  2.1287 +      if test "x$arguments" != xEOL; then
  2.1288 +        new_complete="$new_path ${arguments% *}"
  2.1289 +      else
  2.1290 +        new_complete="$new_path"
  2.1291 +      fi
  2.1292  
  2.1293    if test "x$complete" != "x$new_complete"; then
  2.1294 -    WINAR="$new_complete"
  2.1295 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
  2.1296 +      WINAR="$new_complete"
  2.1297 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
  2.1298  $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
  2.1299 -  fi
  2.1300 +    fi
  2.1301  
  2.1302      AR="$WINAR"
  2.1303      ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
  2.1304 @@ -23006,14 +23215,26 @@
  2.1305      tmp="$complete EOL"
  2.1306      arguments="${tmp#* }"
  2.1307  
  2.1308 -    new_path=`$WHICH $path 2> /dev/null`
  2.1309 -    if test "x$new_path" = x; then
  2.1310 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1311 -      if test "x$is_absolute_path" != x; then
  2.1312 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&5
  2.1313 -$as_echo "$as_me: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&6;}
  2.1314 -        new_path="$path"
  2.1315 -      else
  2.1316 +    # Cannot rely on the command "which" here since it doesn't always work.
  2.1317 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1318 +    if test -z "$is_absolute_path"; then
  2.1319 +      # Path to executable is not absolute. Find it.
  2.1320 +      IFS_save="$IFS"
  2.1321 +      IFS=:
  2.1322 +      for p in $PATH; do
  2.1323 +        if test -f "$p/$path" && test -x "$p/$path"; then
  2.1324 +          new_path="$p/$path"
  2.1325 +          break
  2.1326 +        fi
  2.1327 +      done
  2.1328 +      IFS="$IFS_save"
  2.1329 +    else
  2.1330 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
  2.1331 +$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
  2.1332 +      new_path="$path"
  2.1333 +    fi
  2.1334 +
  2.1335 +    if test "x$new_path" = x; then
  2.1336          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
  2.1337  $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
  2.1338          has_space=`$ECHO "$complete" | $GREP " "`
  2.1339 @@ -23023,21 +23244,20 @@
  2.1340          fi
  2.1341          as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
  2.1342        fi
  2.1343 -    fi
  2.1344 -  fi
  2.1345 -
  2.1346 -  # Now join together the path and the arguments once again
  2.1347 -  if test "x$arguments" != xEOL; then
  2.1348 -      new_complete="$new_path ${arguments% *}"
  2.1349 -  else
  2.1350 -      new_complete="$new_path"
  2.1351 -  fi
  2.1352 +  fi
  2.1353 +
  2.1354 +      # Now join together the path and the arguments once again
  2.1355 +      if test "x$arguments" != xEOL; then
  2.1356 +        new_complete="$new_path ${arguments% *}"
  2.1357 +      else
  2.1358 +        new_complete="$new_path"
  2.1359 +      fi
  2.1360  
  2.1361    if test "x$complete" != "x$new_complete"; then
  2.1362 -    DUMPBIN="$new_complete"
  2.1363 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
  2.1364 +      DUMPBIN="$new_complete"
  2.1365 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
  2.1366  $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
  2.1367 -  fi
  2.1368 +    fi
  2.1369  
  2.1370  
  2.1371      COMPILER_TYPE=CL
  2.1372 @@ -23406,14 +23626,26 @@
  2.1373      tmp="$complete EOL"
  2.1374      arguments="${tmp#* }"
  2.1375  
  2.1376 -    new_path=`$WHICH $path 2> /dev/null`
  2.1377 -    if test "x$new_path" = x; then
  2.1378 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1379 -      if test "x$is_absolute_path" != x; then
  2.1380 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) with 'which' failed, using $path directly." >&5
  2.1381 -$as_echo "$as_me: Resolving CPP (as $path) with 'which' failed, using $path directly." >&6;}
  2.1382 -        new_path="$path"
  2.1383 -      else
  2.1384 +    # Cannot rely on the command "which" here since it doesn't always work.
  2.1385 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1386 +    if test -z "$is_absolute_path"; then
  2.1387 +      # Path to executable is not absolute. Find it.
  2.1388 +      IFS_save="$IFS"
  2.1389 +      IFS=:
  2.1390 +      for p in $PATH; do
  2.1391 +        if test -f "$p/$path" && test -x "$p/$path"; then
  2.1392 +          new_path="$p/$path"
  2.1393 +          break
  2.1394 +        fi
  2.1395 +      done
  2.1396 +      IFS="$IFS_save"
  2.1397 +    else
  2.1398 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
  2.1399 +$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
  2.1400 +      new_path="$path"
  2.1401 +    fi
  2.1402 +
  2.1403 +    if test "x$new_path" = x; then
  2.1404          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
  2.1405  $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
  2.1406          has_space=`$ECHO "$complete" | $GREP " "`
  2.1407 @@ -23423,21 +23655,20 @@
  2.1408          fi
  2.1409          as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
  2.1410        fi
  2.1411 -    fi
  2.1412 -  fi
  2.1413 -
  2.1414 -  # Now join together the path and the arguments once again
  2.1415 -  if test "x$arguments" != xEOL; then
  2.1416 -      new_complete="$new_path ${arguments% *}"
  2.1417 -  else
  2.1418 -      new_complete="$new_path"
  2.1419 -  fi
  2.1420 +  fi
  2.1421 +
  2.1422 +      # Now join together the path and the arguments once again
  2.1423 +      if test "x$arguments" != xEOL; then
  2.1424 +        new_complete="$new_path ${arguments% *}"
  2.1425 +      else
  2.1426 +        new_complete="$new_path"
  2.1427 +      fi
  2.1428  
  2.1429    if test "x$complete" != "x$new_complete"; then
  2.1430 -    CPP="$new_complete"
  2.1431 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
  2.1432 +      CPP="$new_complete"
  2.1433 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
  2.1434  $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
  2.1435 -  fi
  2.1436 +    fi
  2.1437  
  2.1438  
  2.1439  ac_ext=cpp
  2.1440 @@ -23795,14 +24026,26 @@
  2.1441      tmp="$complete EOL"
  2.1442      arguments="${tmp#* }"
  2.1443  
  2.1444 -    new_path=`$WHICH $path 2> /dev/null`
  2.1445 -    if test "x$new_path" = x; then
  2.1446 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1447 -      if test "x$is_absolute_path" != x; then
  2.1448 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&5
  2.1449 -$as_echo "$as_me: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&6;}
  2.1450 -        new_path="$path"
  2.1451 -      else
  2.1452 +    # Cannot rely on the command "which" here since it doesn't always work.
  2.1453 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1454 +    if test -z "$is_absolute_path"; then
  2.1455 +      # Path to executable is not absolute. Find it.
  2.1456 +      IFS_save="$IFS"
  2.1457 +      IFS=:
  2.1458 +      for p in $PATH; do
  2.1459 +        if test -f "$p/$path" && test -x "$p/$path"; then
  2.1460 +          new_path="$p/$path"
  2.1461 +          break
  2.1462 +        fi
  2.1463 +      done
  2.1464 +      IFS="$IFS_save"
  2.1465 +    else
  2.1466 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
  2.1467 +$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
  2.1468 +      new_path="$path"
  2.1469 +    fi
  2.1470 +
  2.1471 +    if test "x$new_path" = x; then
  2.1472          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
  2.1473  $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
  2.1474          has_space=`$ECHO "$complete" | $GREP " "`
  2.1475 @@ -23812,21 +24055,20 @@
  2.1476          fi
  2.1477          as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
  2.1478        fi
  2.1479 -    fi
  2.1480 -  fi
  2.1481 -
  2.1482 -  # Now join together the path and the arguments once again
  2.1483 -  if test "x$arguments" != xEOL; then
  2.1484 -      new_complete="$new_path ${arguments% *}"
  2.1485 -  else
  2.1486 -      new_complete="$new_path"
  2.1487 -  fi
  2.1488 +  fi
  2.1489 +
  2.1490 +      # Now join together the path and the arguments once again
  2.1491 +      if test "x$arguments" != xEOL; then
  2.1492 +        new_complete="$new_path ${arguments% *}"
  2.1493 +      else
  2.1494 +        new_complete="$new_path"
  2.1495 +      fi
  2.1496  
  2.1497    if test "x$complete" != "x$new_complete"; then
  2.1498 -    CXXCPP="$new_complete"
  2.1499 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
  2.1500 +      CXXCPP="$new_complete"
  2.1501 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
  2.1502  $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
  2.1503 -  fi
  2.1504 +    fi
  2.1505  
  2.1506  
  2.1507  if test "x$COMPILE_TYPE" != "xcross"; then
  2.1508 @@ -24113,14 +24355,26 @@
  2.1509      tmp="$complete EOL"
  2.1510      arguments="${tmp#* }"
  2.1511  
  2.1512 -    new_path=`$WHICH $path 2> /dev/null`
  2.1513 -    if test "x$new_path" = x; then
  2.1514 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1515 -      if test "x$is_absolute_path" != x; then
  2.1516 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) with 'which' failed, using $path directly." >&5
  2.1517 -$as_echo "$as_me: Resolving AS (as $path) with 'which' failed, using $path directly." >&6;}
  2.1518 -        new_path="$path"
  2.1519 -      else
  2.1520 +    # Cannot rely on the command "which" here since it doesn't always work.
  2.1521 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1522 +    if test -z "$is_absolute_path"; then
  2.1523 +      # Path to executable is not absolute. Find it.
  2.1524 +      IFS_save="$IFS"
  2.1525 +      IFS=:
  2.1526 +      for p in $PATH; do
  2.1527 +        if test -f "$p/$path" && test -x "$p/$path"; then
  2.1528 +          new_path="$p/$path"
  2.1529 +          break
  2.1530 +        fi
  2.1531 +      done
  2.1532 +      IFS="$IFS_save"
  2.1533 +    else
  2.1534 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
  2.1535 +$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
  2.1536 +      new_path="$path"
  2.1537 +    fi
  2.1538 +
  2.1539 +    if test "x$new_path" = x; then
  2.1540          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
  2.1541  $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
  2.1542          has_space=`$ECHO "$complete" | $GREP " "`
  2.1543 @@ -24130,21 +24384,20 @@
  2.1544          fi
  2.1545          as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
  2.1546        fi
  2.1547 -    fi
  2.1548 -  fi
  2.1549 -
  2.1550 -  # Now join together the path and the arguments once again
  2.1551 -  if test "x$arguments" != xEOL; then
  2.1552 -      new_complete="$new_path ${arguments% *}"
  2.1553 -  else
  2.1554 -      new_complete="$new_path"
  2.1555 -  fi
  2.1556 +  fi
  2.1557 +
  2.1558 +      # Now join together the path and the arguments once again
  2.1559 +      if test "x$arguments" != xEOL; then
  2.1560 +        new_complete="$new_path ${arguments% *}"
  2.1561 +      else
  2.1562 +        new_complete="$new_path"
  2.1563 +      fi
  2.1564  
  2.1565    if test "x$complete" != "x$new_complete"; then
  2.1566 -    AS="$new_complete"
  2.1567 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
  2.1568 +      AS="$new_complete"
  2.1569 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
  2.1570  $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
  2.1571 -  fi
  2.1572 +    fi
  2.1573  
  2.1574  else
  2.1575      AS="$CC -c"
  2.1576 @@ -24419,14 +24672,26 @@
  2.1577      tmp="$complete EOL"
  2.1578      arguments="${tmp#* }"
  2.1579  
  2.1580 -    new_path=`$WHICH $path 2> /dev/null`
  2.1581 -    if test "x$new_path" = x; then
  2.1582 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1583 -      if test "x$is_absolute_path" != x; then
  2.1584 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
  2.1585 -$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
  2.1586 -        new_path="$path"
  2.1587 -      else
  2.1588 +    # Cannot rely on the command "which" here since it doesn't always work.
  2.1589 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1590 +    if test -z "$is_absolute_path"; then
  2.1591 +      # Path to executable is not absolute. Find it.
  2.1592 +      IFS_save="$IFS"
  2.1593 +      IFS=:
  2.1594 +      for p in $PATH; do
  2.1595 +        if test -f "$p/$path" && test -x "$p/$path"; then
  2.1596 +          new_path="$p/$path"
  2.1597 +          break
  2.1598 +        fi
  2.1599 +      done
  2.1600 +      IFS="$IFS_save"
  2.1601 +    else
  2.1602 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
  2.1603 +$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
  2.1604 +      new_path="$path"
  2.1605 +    fi
  2.1606 +
  2.1607 +    if test "x$new_path" = x; then
  2.1608          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
  2.1609  $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
  2.1610          has_space=`$ECHO "$complete" | $GREP " "`
  2.1611 @@ -24436,21 +24701,20 @@
  2.1612          fi
  2.1613          as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
  2.1614        fi
  2.1615 -    fi
  2.1616 -  fi
  2.1617 -
  2.1618 -  # Now join together the path and the arguments once again
  2.1619 -  if test "x$arguments" != xEOL; then
  2.1620 -      new_complete="$new_path ${arguments% *}"
  2.1621 -  else
  2.1622 -      new_complete="$new_path"
  2.1623 -  fi
  2.1624 +  fi
  2.1625 +
  2.1626 +      # Now join together the path and the arguments once again
  2.1627 +      if test "x$arguments" != xEOL; then
  2.1628 +        new_complete="$new_path ${arguments% *}"
  2.1629 +      else
  2.1630 +        new_complete="$new_path"
  2.1631 +      fi
  2.1632  
  2.1633    if test "x$complete" != "x$new_complete"; then
  2.1634 -    NM="$new_complete"
  2.1635 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
  2.1636 +      NM="$new_complete"
  2.1637 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
  2.1638  $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
  2.1639 -  fi
  2.1640 +    fi
  2.1641  
  2.1642      # Extract the first word of "strip", so it can be a program name with args.
  2.1643  set dummy strip; ac_word=$2
  2.1644 @@ -24714,14 +24978,26 @@
  2.1645      tmp="$complete EOL"
  2.1646      arguments="${tmp#* }"
  2.1647  
  2.1648 -    new_path=`$WHICH $path 2> /dev/null`
  2.1649 -    if test "x$new_path" = x; then
  2.1650 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1651 -      if test "x$is_absolute_path" != x; then
  2.1652 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
  2.1653 -$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
  2.1654 -        new_path="$path"
  2.1655 -      else
  2.1656 +    # Cannot rely on the command "which" here since it doesn't always work.
  2.1657 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1658 +    if test -z "$is_absolute_path"; then
  2.1659 +      # Path to executable is not absolute. Find it.
  2.1660 +      IFS_save="$IFS"
  2.1661 +      IFS=:
  2.1662 +      for p in $PATH; do
  2.1663 +        if test -f "$p/$path" && test -x "$p/$path"; then
  2.1664 +          new_path="$p/$path"
  2.1665 +          break
  2.1666 +        fi
  2.1667 +      done
  2.1668 +      IFS="$IFS_save"
  2.1669 +    else
  2.1670 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
  2.1671 +$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
  2.1672 +      new_path="$path"
  2.1673 +    fi
  2.1674 +
  2.1675 +    if test "x$new_path" = x; then
  2.1676          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
  2.1677  $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
  2.1678          has_space=`$ECHO "$complete" | $GREP " "`
  2.1679 @@ -24731,21 +25007,20 @@
  2.1680          fi
  2.1681          as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
  2.1682        fi
  2.1683 -    fi
  2.1684 -  fi
  2.1685 -
  2.1686 -  # Now join together the path and the arguments once again
  2.1687 -  if test "x$arguments" != xEOL; then
  2.1688 -      new_complete="$new_path ${arguments% *}"
  2.1689 -  else
  2.1690 -      new_complete="$new_path"
  2.1691 -  fi
  2.1692 +  fi
  2.1693 +
  2.1694 +      # Now join together the path and the arguments once again
  2.1695 +      if test "x$arguments" != xEOL; then
  2.1696 +        new_complete="$new_path ${arguments% *}"
  2.1697 +      else
  2.1698 +        new_complete="$new_path"
  2.1699 +      fi
  2.1700  
  2.1701    if test "x$complete" != "x$new_complete"; then
  2.1702 -    STRIP="$new_complete"
  2.1703 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
  2.1704 +      STRIP="$new_complete"
  2.1705 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
  2.1706  $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
  2.1707 -  fi
  2.1708 +    fi
  2.1709  
  2.1710      # Extract the first word of "mcs", so it can be a program name with args.
  2.1711  set dummy mcs; ac_word=$2
  2.1712 @@ -25009,14 +25284,26 @@
  2.1713      tmp="$complete EOL"
  2.1714      arguments="${tmp#* }"
  2.1715  
  2.1716 -    new_path=`$WHICH $path 2> /dev/null`
  2.1717 -    if test "x$new_path" = x; then
  2.1718 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1719 -      if test "x$is_absolute_path" != x; then
  2.1720 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) with 'which' failed, using $path directly." >&5
  2.1721 -$as_echo "$as_me: Resolving MCS (as $path) with 'which' failed, using $path directly." >&6;}
  2.1722 -        new_path="$path"
  2.1723 -      else
  2.1724 +    # Cannot rely on the command "which" here since it doesn't always work.
  2.1725 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1726 +    if test -z "$is_absolute_path"; then
  2.1727 +      # Path to executable is not absolute. Find it.
  2.1728 +      IFS_save="$IFS"
  2.1729 +      IFS=:
  2.1730 +      for p in $PATH; do
  2.1731 +        if test -f "$p/$path" && test -x "$p/$path"; then
  2.1732 +          new_path="$p/$path"
  2.1733 +          break
  2.1734 +        fi
  2.1735 +      done
  2.1736 +      IFS="$IFS_save"
  2.1737 +    else
  2.1738 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
  2.1739 +$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
  2.1740 +      new_path="$path"
  2.1741 +    fi
  2.1742 +
  2.1743 +    if test "x$new_path" = x; then
  2.1744          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
  2.1745  $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
  2.1746          has_space=`$ECHO "$complete" | $GREP " "`
  2.1747 @@ -25026,21 +25313,20 @@
  2.1748          fi
  2.1749          as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
  2.1750        fi
  2.1751 -    fi
  2.1752 -  fi
  2.1753 -
  2.1754 -  # Now join together the path and the arguments once again
  2.1755 -  if test "x$arguments" != xEOL; then
  2.1756 -      new_complete="$new_path ${arguments% *}"
  2.1757 -  else
  2.1758 -      new_complete="$new_path"
  2.1759 -  fi
  2.1760 +  fi
  2.1761 +
  2.1762 +      # Now join together the path and the arguments once again
  2.1763 +      if test "x$arguments" != xEOL; then
  2.1764 +        new_complete="$new_path ${arguments% *}"
  2.1765 +      else
  2.1766 +        new_complete="$new_path"
  2.1767 +      fi
  2.1768  
  2.1769    if test "x$complete" != "x$new_complete"; then
  2.1770 -    MCS="$new_complete"
  2.1771 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
  2.1772 +      MCS="$new_complete"
  2.1773 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
  2.1774  $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
  2.1775 -  fi
  2.1776 +    fi
  2.1777  
  2.1778  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
  2.1779      if test -n "$ac_tool_prefix"; then
  2.1780 @@ -25357,14 +25643,26 @@
  2.1781      tmp="$complete EOL"
  2.1782      arguments="${tmp#* }"
  2.1783  
  2.1784 -    new_path=`$WHICH $path 2> /dev/null`
  2.1785 -    if test "x$new_path" = x; then
  2.1786 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1787 -      if test "x$is_absolute_path" != x; then
  2.1788 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
  2.1789 -$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
  2.1790 -        new_path="$path"
  2.1791 -      else
  2.1792 +    # Cannot rely on the command "which" here since it doesn't always work.
  2.1793 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1794 +    if test -z "$is_absolute_path"; then
  2.1795 +      # Path to executable is not absolute. Find it.
  2.1796 +      IFS_save="$IFS"
  2.1797 +      IFS=:
  2.1798 +      for p in $PATH; do
  2.1799 +        if test -f "$p/$path" && test -x "$p/$path"; then
  2.1800 +          new_path="$p/$path"
  2.1801 +          break
  2.1802 +        fi
  2.1803 +      done
  2.1804 +      IFS="$IFS_save"
  2.1805 +    else
  2.1806 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
  2.1807 +$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
  2.1808 +      new_path="$path"
  2.1809 +    fi
  2.1810 +
  2.1811 +    if test "x$new_path" = x; then
  2.1812          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
  2.1813  $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
  2.1814          has_space=`$ECHO "$complete" | $GREP " "`
  2.1815 @@ -25374,21 +25672,20 @@
  2.1816          fi
  2.1817          as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
  2.1818        fi
  2.1819 -    fi
  2.1820 -  fi
  2.1821 -
  2.1822 -  # Now join together the path and the arguments once again
  2.1823 -  if test "x$arguments" != xEOL; then
  2.1824 -      new_complete="$new_path ${arguments% *}"
  2.1825 -  else
  2.1826 -      new_complete="$new_path"
  2.1827 -  fi
  2.1828 +  fi
  2.1829 +
  2.1830 +      # Now join together the path and the arguments once again
  2.1831 +      if test "x$arguments" != xEOL; then
  2.1832 +        new_complete="$new_path ${arguments% *}"
  2.1833 +      else
  2.1834 +        new_complete="$new_path"
  2.1835 +      fi
  2.1836  
  2.1837    if test "x$complete" != "x$new_complete"; then
  2.1838 -    NM="$new_complete"
  2.1839 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
  2.1840 +      NM="$new_complete"
  2.1841 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
  2.1842  $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
  2.1843 -  fi
  2.1844 +    fi
  2.1845  
  2.1846      if test -n "$ac_tool_prefix"; then
  2.1847    # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
  2.1848 @@ -25704,14 +26001,26 @@
  2.1849      tmp="$complete EOL"
  2.1850      arguments="${tmp#* }"
  2.1851  
  2.1852 -    new_path=`$WHICH $path 2> /dev/null`
  2.1853 -    if test "x$new_path" = x; then
  2.1854 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1855 -      if test "x$is_absolute_path" != x; then
  2.1856 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
  2.1857 -$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
  2.1858 -        new_path="$path"
  2.1859 -      else
  2.1860 +    # Cannot rely on the command "which" here since it doesn't always work.
  2.1861 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1862 +    if test -z "$is_absolute_path"; then
  2.1863 +      # Path to executable is not absolute. Find it.
  2.1864 +      IFS_save="$IFS"
  2.1865 +      IFS=:
  2.1866 +      for p in $PATH; do
  2.1867 +        if test -f "$p/$path" && test -x "$p/$path"; then
  2.1868 +          new_path="$p/$path"
  2.1869 +          break
  2.1870 +        fi
  2.1871 +      done
  2.1872 +      IFS="$IFS_save"
  2.1873 +    else
  2.1874 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
  2.1875 +$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
  2.1876 +      new_path="$path"
  2.1877 +    fi
  2.1878 +
  2.1879 +    if test "x$new_path" = x; then
  2.1880          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
  2.1881  $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
  2.1882          has_space=`$ECHO "$complete" | $GREP " "`
  2.1883 @@ -25721,21 +26030,20 @@
  2.1884          fi
  2.1885          as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
  2.1886        fi
  2.1887 -    fi
  2.1888 -  fi
  2.1889 -
  2.1890 -  # Now join together the path and the arguments once again
  2.1891 -  if test "x$arguments" != xEOL; then
  2.1892 -      new_complete="$new_path ${arguments% *}"
  2.1893 -  else
  2.1894 -      new_complete="$new_path"
  2.1895 -  fi
  2.1896 +  fi
  2.1897 +
  2.1898 +      # Now join together the path and the arguments once again
  2.1899 +      if test "x$arguments" != xEOL; then
  2.1900 +        new_complete="$new_path ${arguments% *}"
  2.1901 +      else
  2.1902 +        new_complete="$new_path"
  2.1903 +      fi
  2.1904  
  2.1905    if test "x$complete" != "x$new_complete"; then
  2.1906 -    STRIP="$new_complete"
  2.1907 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
  2.1908 +      STRIP="$new_complete"
  2.1909 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
  2.1910  $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
  2.1911 -  fi
  2.1912 +    fi
  2.1913  
  2.1914  fi
  2.1915  
  2.1916 @@ -26066,14 +26374,26 @@
  2.1917      tmp="$complete EOL"
  2.1918      arguments="${tmp#* }"
  2.1919  
  2.1920 -    new_path=`$WHICH $path 2> /dev/null`
  2.1921 -    if test "x$new_path" = x; then
  2.1922 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1923 -      if test "x$is_absolute_path" != x; then
  2.1924 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&5
  2.1925 -$as_echo "$as_me: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&6;}
  2.1926 -        new_path="$path"
  2.1927 -      else
  2.1928 +    # Cannot rely on the command "which" here since it doesn't always work.
  2.1929 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1930 +    if test -z "$is_absolute_path"; then
  2.1931 +      # Path to executable is not absolute. Find it.
  2.1932 +      IFS_save="$IFS"
  2.1933 +      IFS=:
  2.1934 +      for p in $PATH; do
  2.1935 +        if test -f "$p/$path" && test -x "$p/$path"; then
  2.1936 +          new_path="$p/$path"
  2.1937 +          break
  2.1938 +        fi
  2.1939 +      done
  2.1940 +      IFS="$IFS_save"
  2.1941 +    else
  2.1942 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
  2.1943 +$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
  2.1944 +      new_path="$path"
  2.1945 +    fi
  2.1946 +
  2.1947 +    if test "x$new_path" = x; then
  2.1948          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
  2.1949  $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
  2.1950          has_space=`$ECHO "$complete" | $GREP " "`
  2.1951 @@ -26083,21 +26403,20 @@
  2.1952          fi
  2.1953          as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
  2.1954        fi
  2.1955 -    fi
  2.1956 -  fi
  2.1957 -
  2.1958 -  # Now join together the path and the arguments once again
  2.1959 -  if test "x$arguments" != xEOL; then
  2.1960 -      new_complete="$new_path ${arguments% *}"
  2.1961 -  else
  2.1962 -      new_complete="$new_path"
  2.1963 -  fi
  2.1964 +  fi
  2.1965 +
  2.1966 +      # Now join together the path and the arguments once again
  2.1967 +      if test "x$arguments" != xEOL; then
  2.1968 +        new_complete="$new_path ${arguments% *}"
  2.1969 +      else
  2.1970 +        new_complete="$new_path"
  2.1971 +      fi
  2.1972  
  2.1973    if test "x$complete" != "x$new_complete"; then
  2.1974 -    OBJCOPY="$new_complete"
  2.1975 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
  2.1976 +      OBJCOPY="$new_complete"
  2.1977 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
  2.1978  $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
  2.1979 -  fi
  2.1980 +    fi
  2.1981  
  2.1982      fi
  2.1983  fi
  2.1984 @@ -26426,14 +26745,26 @@
  2.1985      tmp="$complete EOL"
  2.1986      arguments="${tmp#* }"
  2.1987  
  2.1988 -    new_path=`$WHICH $path 2> /dev/null`
  2.1989 -    if test "x$new_path" = x; then
  2.1990 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1991 -      if test "x$is_absolute_path" != x; then
  2.1992 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&5
  2.1993 -$as_echo "$as_me: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&6;}
  2.1994 -        new_path="$path"
  2.1995 -      else
  2.1996 +    # Cannot rely on the command "which" here since it doesn't always work.
  2.1997 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.1998 +    if test -z "$is_absolute_path"; then
  2.1999 +      # Path to executable is not absolute. Find it.
  2.2000 +      IFS_save="$IFS"
  2.2001 +      IFS=:
  2.2002 +      for p in $PATH; do
  2.2003 +        if test -f "$p/$path" && test -x "$p/$path"; then
  2.2004 +          new_path="$p/$path"
  2.2005 +          break
  2.2006 +        fi
  2.2007 +      done
  2.2008 +      IFS="$IFS_save"
  2.2009 +    else
  2.2010 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
  2.2011 +$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
  2.2012 +      new_path="$path"
  2.2013 +    fi
  2.2014 +
  2.2015 +    if test "x$new_path" = x; then
  2.2016          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
  2.2017  $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
  2.2018          has_space=`$ECHO "$complete" | $GREP " "`
  2.2019 @@ -26443,21 +26774,20 @@
  2.2020          fi
  2.2021          as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
  2.2022        fi
  2.2023 -    fi
  2.2024 -  fi
  2.2025 -
  2.2026 -  # Now join together the path and the arguments once again
  2.2027 -  if test "x$arguments" != xEOL; then
  2.2028 -      new_complete="$new_path ${arguments% *}"
  2.2029 -  else
  2.2030 -      new_complete="$new_path"
  2.2031 -  fi
  2.2032 +  fi
  2.2033 +
  2.2034 +      # Now join together the path and the arguments once again
  2.2035 +      if test "x$arguments" != xEOL; then
  2.2036 +        new_complete="$new_path ${arguments% *}"
  2.2037 +      else
  2.2038 +        new_complete="$new_path"
  2.2039 +      fi
  2.2040  
  2.2041    if test "x$complete" != "x$new_complete"; then
  2.2042 -    OBJDUMP="$new_complete"
  2.2043 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
  2.2044 +      OBJDUMP="$new_complete"
  2.2045 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
  2.2046  $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
  2.2047 -  fi
  2.2048 +    fi
  2.2049  
  2.2050  fi
  2.2051  
  2.2052 @@ -26724,14 +27054,26 @@
  2.2053      tmp="$complete EOL"
  2.2054      arguments="${tmp#* }"
  2.2055  
  2.2056 -    new_path=`$WHICH $path 2> /dev/null`
  2.2057 -    if test "x$new_path" = x; then
  2.2058 -      is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.2059 -      if test "x$is_absolute_path" != x; then
  2.2060 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&5
  2.2061 -$as_echo "$as_me: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&6;}
  2.2062 -        new_path="$path"
  2.2063 -      else
  2.2064 +    # Cannot rely on the command "which" here since it doesn't always work.
  2.2065 +    is_absolute_path=`$ECHO "$path" | $GREP ^/`
  2.2066 +    if test -z "$is_absolute_path"; then
  2.2067 +      # Path to executable is not absolute. Find it.
  2.2068 +      IFS_save="$IFS"
  2.2069 +      IFS=:
  2.2070 +      for p in $PATH; do
  2.2071 +        if test -f "$p/$path" && test -x "$p/$path"; then
  2.2072 +          new_path="$p/$path"
  2.2073 +          break
  2.2074 +        fi
  2.2075 +      done
  2.2076 +      IFS="$IFS_save"
  2.2077 +    else
  2.2078 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
  2.2079 +$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
  2.2080 +      new_path="$path"
  2.2081 +    fi
  2.2082 +
  2.2083 +    if test "x$new_path" = x; then
  2.2084          { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
  2.2085  $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
  2.2086          has_space=`$ECHO "$complete" | $GREP " "`
  2.2087 @@ -26741,21 +27083,20 @@
  2.2088          fi
  2.2089          as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
  2.2090        fi
  2.2091 -    fi
  2.2092 -  fi
  2.2093 -
  2.2094 -  # Now join together the path and the arguments once again
  2.2095 -  if test "x$arguments" != xEOL; then
  2.2096 -      new_complete="$new_path ${arguments% *}"
  2.2097 -  else
  2.2098 -      new_complete="$new_path"
  2.2099 -  fi
  2.2100 +  fi
  2.2101 +
  2.2102 +      # Now join together the path and the arguments once again
  2.2103 +      if test "x$arguments" != xEOL; then
  2.2104 +        new_complete="$new_path ${arguments% *}"
  2.2105 +      else
  2.2106 +        new_complete="$new_path"
  2.2107 +      fi
  2.2108  
  2.2109    if test "x$complete" != "x$new_complete"; then
  2.2110 -    LIPO="$new_complete"
  2.2111 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
  2.2112 +      LIPO="$new_complete"
  2.2113 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
  2.2114  $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
  2.2115 -  fi
  2.2116 +    fi
  2.2117  
  2.2118  fi
  2.2119  

mercurial