# HG changeset patch # User katleman # Date 1355952981 28800 # Node ID 0798861b89036171ae97f2270dc4b830f66e11b3 # Parent e1ae69a77a66ffb5d59cbf13ecf8c388377263c8# Parent ee810661e3d1fa294c3e82f1d8e805ad9a6c9beb Merge diff -r e1ae69a77a66 -r 0798861b8903 common/autoconf/basics.m4 --- a/common/autoconf/basics.m4 Fri Dec 14 11:22:54 2012 -0800 +++ b/common/autoconf/basics.m4 Wed Dec 19 13:36:21 2012 -0800 @@ -90,13 +90,25 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + AC_MSG_NOTICE([Resolving $1 (as $path) failed, using $path directly.]) + new_path="$path" + fi + if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - AC_MSG_NOTICE([Resolving $1 (as $path) with 'which' failed, using $path directly.]) - new_path="$path" - else AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.]) has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then @@ -104,20 +116,19 @@ fi AC_MSG_ERROR([Cannot locate the the path of $1]) fi - fi fi - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - $1="$new_complete" - AC_MSG_NOTICE([Rewriting $1 to "$new_complete"]) - fi + $1="$new_complete" + AC_MSG_NOTICE([Rewriting $1 to "$new_complete"]) + fi ]) AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS], diff -r e1ae69a77a66 -r 0798861b8903 common/autoconf/generated-configure.sh --- a/common/autoconf/generated-configure.sh Fri Dec 14 11:22:54 2012 -0800 +++ b/common/autoconf/generated-configure.sh Wed Dec 19 13:36:21 2012 -0800 @@ -3674,7 +3674,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1355221914 +DATE_WHEN_GENERATED=1355849613 ############################################################################### # @@ -8165,14 +8165,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -8182,21 +8194,20 @@ fi as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - FOUND_MAKE="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 + FOUND_MAKE="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} - fi + fi fi fi @@ -8511,14 +8522,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -8528,21 +8551,20 @@ fi as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - FOUND_MAKE="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 + FOUND_MAKE="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} - fi + fi fi fi @@ -8854,14 +8876,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -8871,21 +8905,20 @@ fi as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - FOUND_MAKE="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 + FOUND_MAKE="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} - fi + fi fi fi @@ -9202,14 +9235,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -9219,21 +9264,20 @@ fi as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - FOUND_MAKE="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 + FOUND_MAKE="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} - fi + fi fi fi @@ -9544,14 +9588,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -9561,21 +9617,20 @@ fi as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - FOUND_MAKE="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 + FOUND_MAKE="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;} - fi + fi fi fi @@ -16373,14 +16428,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -16390,21 +16457,20 @@ fi as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - VS_ENV_CMD="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5 + VS_ENV_CMD="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;} - fi + fi # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat @@ -16962,14 +17028,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -16979,21 +17057,20 @@ fi as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - BUILD_CC="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5 + BUILD_CC="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;} - fi + fi for ac_prog in cl CC g++ do @@ -17262,14 +17339,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -17279,21 +17368,20 @@ fi as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - BUILD_CXX="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5 + BUILD_CXX="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;} - fi + fi # Extract the first word of "ld", so it can be a program name with args. set dummy ld; ac_word=$2 @@ -17557,14 +17645,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -17574,21 +17674,20 @@ fi as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - BUILD_LD="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5 + BUILD_LD="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;} - fi + fi fi @@ -18144,14 +18243,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving CC (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -18161,21 +18272,20 @@ fi as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - CC="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5 + CC="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;} - fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5 $as_echo_n "checking resolved symbolic links for CC... " >&6; } @@ -18569,14 +18679,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -18586,21 +18708,20 @@ fi as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - PROPER_COMPILER_CC="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5 + PROPER_COMPILER_CC="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;} - fi + fi PATH="$RETRY_COMPILER_SAVED_PATH" @@ -19691,14 +19812,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving CXX (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -19708,21 +19841,20 @@ fi as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - CXX="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5 + CXX="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;} - fi + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5 $as_echo_n "checking resolved symbolic links for CXX... " >&6; } @@ -20116,14 +20248,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -20133,21 +20277,20 @@ fi as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - PROPER_COMPILER_CXX="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5 + PROPER_COMPILER_CXX="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;} - fi + fi PATH="$RETRY_COMPILER_SAVED_PATH" @@ -21006,14 +21149,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -21023,21 +21178,20 @@ fi as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - OBJC="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5 + OBJC="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;} - fi + fi else OBJC= @@ -21376,14 +21530,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving AR (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -21393,21 +21559,20 @@ fi as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - AR="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5 + AR="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;} - fi + fi fi if test "x$OPENJDK_TARGET_OS" = xmacosx; then @@ -21712,14 +21877,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -21729,21 +21906,20 @@ fi as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - WINLD="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5 + WINLD="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;} - fi + fi printf "Windows linker was found at $WINLD\n" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5 @@ -22038,14 +22214,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving MT (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -22055,21 +22243,20 @@ fi as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - MT="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5 + MT="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;} - fi + fi # The resource compiler # Extract the first word of "rc", so it can be a program name with args. @@ -22348,14 +22535,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving RC (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -22365,21 +22564,20 @@ fi as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - RC="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5 + RC="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;} - fi + fi # For hotspot, we need these in Windows mixed path, @@ -22711,14 +22909,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -22728,21 +22938,20 @@ fi as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - WINAR="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5 + WINAR="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;} - fi + fi AR="$WINAR" ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT" @@ -23006,14 +23215,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -23023,21 +23244,20 @@ fi as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - DUMPBIN="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5 + DUMPBIN="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;} - fi + fi COMPILER_TYPE=CL @@ -23406,14 +23626,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving CPP (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -23423,21 +23655,20 @@ fi as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - CPP="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5 + CPP="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;} - fi + fi ac_ext=cpp @@ -23795,14 +24026,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -23812,21 +24055,20 @@ fi as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - CXXCPP="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5 + CXXCPP="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;} - fi + fi if test "x$COMPILE_TYPE" != "xcross"; then @@ -24113,14 +24355,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving AS (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -24130,21 +24384,20 @@ fi as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - AS="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5 + AS="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;} - fi + fi else AS="$CC -c" @@ -24419,14 +24672,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -24436,21 +24701,20 @@ fi as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - NM="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5 + NM="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;} - fi + fi # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 @@ -24714,14 +24978,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -24731,21 +25007,20 @@ fi as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - STRIP="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5 + STRIP="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;} - fi + fi # Extract the first word of "mcs", so it can be a program name with args. set dummy mcs; ac_word=$2 @@ -25009,14 +25284,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving MCS (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -25026,21 +25313,20 @@ fi as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - MCS="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5 + MCS="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;} - fi + fi elif test "x$OPENJDK_TARGET_OS" != xwindows; then if test -n "$ac_tool_prefix"; then @@ -25357,14 +25643,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -25374,21 +25672,20 @@ fi as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - NM="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5 + NM="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;} - fi + fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. @@ -25704,14 +26001,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -25721,21 +26030,20 @@ fi as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - STRIP="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5 + STRIP="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;} - fi + fi fi @@ -26066,14 +26374,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -26083,21 +26403,20 @@ fi as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - OBJCOPY="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5 + OBJCOPY="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;} - fi + fi fi fi @@ -26426,14 +26745,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -26443,21 +26774,20 @@ fi as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - OBJDUMP="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5 + OBJDUMP="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;} - fi + fi fi @@ -26724,14 +27054,26 @@ tmp="$complete EOL" arguments="${tmp#* }" - new_path=`$WHICH $path 2> /dev/null` - if test "x$new_path" = x; then - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test "x$is_absolute_path" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&5 -$as_echo "$as_me: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&6;} - new_path="$path" - else + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5 +$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;} + new_path="$path" + fi + + if test "x$new_path" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` @@ -26741,21 +27083,20 @@ fi as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 fi - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi if test "x$complete" != "x$new_complete"; then - LIPO="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5 + LIPO="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;} - fi + fi fi diff -r e1ae69a77a66 -r 0798861b8903 common/bin/hgforest.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common/bin/hgforest.sh Wed Dec 19 13:36:21 2012 -0800 @@ -0,0 +1,194 @@ +#!/bin/sh + +# +# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Shell script for a fast parallel forest command +command="$1" +pull_extra_base="$2" + +# Python always buffers stdout significantly, thus we will not see any output from hg clone jdk, +# until a lot of time has passed! By passing -u to python, we get incremental updates +# on stdout. Much nicer. +whichhg="`which hg`" + +if [ "${whichhg}" = "" ] ; then + echo Cannot find hg! + exit 1 +fi + +if [ "" = "$command" ] ; then + echo No command to hg supplied! + exit 1 +fi + +has_hash_bang="`head -n 1 "${whichhg}" | cut -b 1-2`" +python="" +bpython="" + +if [ "#!" = "$has_hash_bang" ] ; then + python="`head -n 1 ${whichhg} | cut -b 3-`" + bpython="`basename "$python"`" +fi + +if [ "python" = "$bpython" -a -x "$python" ] ; then + hg="${python} -u ${whichhg}" +else + echo Cannot find python from hg launcher. Running plain hg, which probably has buffered stdout. + hg="hg" +fi + +# Clean out the temporary directory that stores the pid files. +tmp=/tmp/forest.$$ +rm -f -r ${tmp} +mkdir -p ${tmp} + +safe_interrupt () { + if [ -d ${tmp} ]; then + if [ "`ls ${tmp}`" != "" ]; then + echo "Waiting for processes ( `cat ${tmp}/* | tr '\n' ' '`) to terminate nicely!" + sleep 1 + # Pipe stderr to dev/null to silence kill, that complains when trying to kill + # a subprocess that has already exited. + kill -TERM `cat ${tmp}/* | tr '\n' ' '` 2> /dev/null + wait + echo Interrupt complete! + fi + fi + rm -f -r ${tmp} + exit 1 +} + +nice_exit () { + if [ -d ${tmp} ]; then + if [ "`ls ${tmp}`" != "" ]; then + wait + fi + fi + rm -f -r ${tmp} +} + +trap 'safe_interrupt' INT QUIT +trap 'nice_exit' EXIT + +# Only look in specific locations for possible forests (avoids long searches) +pull_default="" +repos="" +repos_extra="" +if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then + subrepos="corba jaxp jaxws langtools jdk hotspot" + if [ -f .hg/hgrc ] ; then + pull_default=`hg paths default` + if [ "${pull_default}" = "" ] ; then + echo "ERROR: Need initial clone with 'hg paths default' defined" + exit 1 + fi + fi + if [ "${pull_default}" = "" ] ; then + echo "ERROR: Need initial repository to use this script" + exit 1 + fi + for i in ${subrepos} ; do + if [ ! -f ${i}/.hg/hgrc ] ; then + repos="${repos} ${i}" + fi + done + if [ "${pull_extra_base}" != "" ] ; then + subrepos_extra="jdk/src/closed jdk/make/closed jdk/test/closed hotspot/make/closed hotspot/src/closed hotspot/test/closed deploy install sponsors pubs" + pull_default_tail=`echo ${pull_default} | sed -e 's@^.*://[^/]*/\(.*\)@\1@'` + pull_extra="${pull_extra_base}/${pull_default_tail}" + for i in ${subrepos_extra} ; do + if [ ! -f ${i}/.hg/hgrc ] ; then + repos_extra="${repos_extra} ${i}" + fi + done + fi + at_a_time=2 + # Any repos to deal with? + if [ "${repos}" = "" -a "${repos_extra}" = "" ] ; then + exit + fi +else + hgdirs=`ls -d ./.hg ./*/.hg ./*/*/.hg ./*/*/*/.hg ./*/*/*/*/.hg 2>/dev/null` + # Derive repository names from the .hg directory locations + for i in ${hgdirs} ; do + repos="${repos} `echo ${i} | sed -e 's@/.hg$@@'`" + done + for i in ${repos} ; do + if [ -h ${i}/.hg/store/lock -o -f ${i}/.hg/store/lock ] ; then + locked="${i} ${locked}" + fi + done + at_a_time=8 + # Any repos to deal with? + if [ "${repos}" = "" ] ; then + echo "No repositories to process." + exit + fi + if [ "${locked}" != "" ] ; then + echo "These repositories are locked: ${locked}" + exit + fi +fi + +# Echo out what repositories we do a command on. +echo "# Repositories: ${repos} ${repos_extra}" +echo + +# Run the supplied command on all repos in parallel. +n=0 +for i in ${repos} ${repos_extra} ; do + n=`expr ${n} '+' 1` + repopidfile=`echo ${i} | sed -e 's@./@@' -e 's@/@_@g'` + reponame=`echo ${i} | sed -e :a -e 's/^.\{1,20\}$/ &/;ta'` + pull_base="${pull_default}" + for j in $repos_extra ; do + if [ "$i" = "$j" ] ; then + pull_base="${pull_extra}" + fi + done + ( + ( + if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then + pull_newrepo="`echo ${pull_base}/${i} | sed -e 's@\([^:]/\)//*@\1@g'`" + echo ${hg} clone ${pull_newrepo} ${i} + ${hg} clone ${pull_newrepo} ${i} & + else + echo "cd ${i} && ${hg} $*" + cd ${i} && ${hg} "$@" & + fi + echo $! > ${tmp}/${repopidfile}.pid + ) 2>&1 | sed -e "s@^@${reponame}: @") & + + if [ `expr ${n} '%' ${at_a_time}` -eq 0 ] ; then + sleep 2 + echo Waiting 5 secs before spawning next background command. + sleep 3 + fi +done +# Wait for all hg commands to complete +wait + +# Terminate with exit 0 all the time (hard to know when to say "failed") +exit 0 + diff -r e1ae69a77a66 -r 0798861b8903 get_source.sh --- a/get_source.sh Fri Dec 14 11:22:54 2012 -0800 +++ b/get_source.sh Wed Dec 19 13:36:21 2012 -0800 @@ -26,8 +26,8 @@ # # Get clones of all nested repositories -sh ./make/scripts/hgforest.sh clone $* +sh ./common/bin/hgforest.sh clone "$@" # Update all existing repositories to the latest sources -sh ./make/scripts/hgforest.sh pull -u +sh ./common/bin/hgforest.sh pull -u