19245 OLD_PATH="$PATH" |
19216 OLD_PATH="$PATH" |
19246 if test "x$TOOLS_DIR" != x; then |
19217 if test "x$TOOLS_DIR" != x; then |
19247 PATH=$TOOLS_DIR:$PATH |
19218 PATH=$TOOLS_DIR:$PATH |
19248 fi |
19219 fi |
19249 |
19220 |
|
19221 # Before we locate the compilers, we need to sanitize the Xcode build environment |
|
19222 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then |
|
19223 # determine path to Xcode developer directory |
|
19224 # can be empty in which case all the tools will rely on a sane Xcode 4 installation |
|
19225 SET_DEVELOPER_DIR= |
|
19226 |
|
19227 if test -n "$XCODE_PATH"; then |
|
19228 DEVELOPER_DIR="$XCODE_PATH"/Contents/Developer |
|
19229 fi |
|
19230 |
|
19231 # DEVELOPER_DIR could also be provided directly |
|
19232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining if we need to set DEVELOPER_DIR" >&5 |
|
19233 $as_echo_n "checking Determining if we need to set DEVELOPER_DIR... " >&6; } |
|
19234 if test -n "$DEVELOPER_DIR"; then |
|
19235 if test ! -d "$DEVELOPER_DIR"; then |
|
19236 as_fn_error $? "Xcode Developer path does not exist: $DEVELOPER_DIR, please provide a path to the Xcode 4 application bundle using --with-xcode-path" "$LINENO" 5 |
|
19237 fi |
|
19238 if test ! -f "$DEVELOPER_DIR"/usr/bin/xcodebuild; then |
|
19239 as_fn_error $? "Xcode Developer path is not valid: $DEVELOPER_DIR, it must point to Contents/Developer inside an Xcode application bundle" "$LINENO" 5 |
|
19240 fi |
|
19241 # make it visible to all the tools immediately |
|
19242 export DEVELOPER_DIR |
|
19243 SET_DEVELOPER_DIR="export DEVELOPER_DIR := $DEVELOPER_DIR" |
|
19244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEVELOPER_DIR)" >&5 |
|
19245 $as_echo "yes ($DEVELOPER_DIR)" >&6; } |
|
19246 else |
|
19247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
|
19248 $as_echo "no" >&6; } |
|
19249 fi |
|
19250 |
|
19251 |
|
19252 # Extract the first word of "xcodebuild", so it can be a program name with args. |
|
19253 set dummy xcodebuild; ac_word=$2 |
|
19254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
|
19255 $as_echo_n "checking for $ac_word... " >&6; } |
|
19256 if ${ac_cv_path_XCODEBUILD+:} false; then : |
|
19257 $as_echo_n "(cached) " >&6 |
|
19258 else |
|
19259 case $XCODEBUILD in |
|
19260 [\\/]* | ?:[\\/]*) |
|
19261 ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path. |
|
19262 ;; |
|
19263 *) |
|
19264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
|
19265 for as_dir in $PATH |
|
19266 do |
|
19267 IFS=$as_save_IFS |
|
19268 test -z "$as_dir" && as_dir=. |
|
19269 for ac_exec_ext in '' $ac_executable_extensions; do |
|
19270 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
|
19271 ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext" |
|
19272 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
|
19273 break 2 |
|
19274 fi |
|
19275 done |
|
19276 done |
|
19277 IFS=$as_save_IFS |
|
19278 |
|
19279 ;; |
|
19280 esac |
|
19281 fi |
|
19282 XCODEBUILD=$ac_cv_path_XCODEBUILD |
|
19283 if test -n "$XCODEBUILD"; then |
|
19284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5 |
|
19285 $as_echo "$XCODEBUILD" >&6; } |
|
19286 else |
|
19287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
|
19288 $as_echo "no" >&6; } |
|
19289 fi |
|
19290 |
|
19291 |
|
19292 if test -z "$XCODEBUILD"; then |
|
19293 as_fn_error $? "The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X" "$LINENO" 5 |
|
19294 fi |
|
19295 |
|
19296 # Fail-fast: verify we're building on Xcode 4, we cannot build with Xcode 5 or later |
|
19297 XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'` |
|
19298 XC_VERSION_PARTS=( ${XCODE_VERSION//./ } ) |
|
19299 if test ! "${XC_VERSION_PARTS[0]}" = "4"; then |
|
19300 as_fn_error $? "Xcode 4 is required to build JDK 8, the version found was $XCODE_VERSION. Use --with-xcode-path to specify the location of Xcode 4 or make Xcode 4 active by using xcode-select." "$LINENO" 5 |
|
19301 fi |
|
19302 |
|
19303 # Some versions of Xcode 5 command line tools install gcc and g++ as symlinks to |
|
19304 # clang and clang++, which will break the build. So handle that here if we need to. |
|
19305 if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then |
|
19306 # use xcrun to find the real gcc and add it's directory to PATH |
|
19307 # then autoconf magic will find it |
|
19308 { $as_echo "$as_me:${as_lineno-$LINENO}: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&5 |
|
19309 $as_echo "$as_me: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&6;} |
|
19310 XCODE_BIN_PATH=$(dirname `xcrun -find gcc`) |
|
19311 PATH="$XCODE_BIN_PATH":$PATH |
|
19312 fi |
|
19313 |
|
19314 # Determine appropriate SDKPATH, don't use SDKROOT as it interferes with the stub tools |
|
19315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining Xcode SDK path" >&5 |
|
19316 $as_echo_n "checking Determining Xcode SDK path... " >&6; } |
|
19317 # allow SDKNAME to be set to override the default SDK selection |
|
19318 SDKPATH=`"$XCODEBUILD" -sdk ${SDKNAME:-macosx} -version | grep '^Path: ' | sed 's/Path: //'` |
|
19319 if test -n "$SDKPATH"; then |
|
19320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKPATH" >&5 |
|
19321 $as_echo "$SDKPATH" >&6; } |
|
19322 else |
|
19323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none, will use system headers and frameworks)" >&5 |
|
19324 $as_echo "(none, will use system headers and frameworks)" >&6; } |
|
19325 fi |
|
19326 |
|
19327 |
|
19328 # Perform a basic sanity test |
|
19329 if test ! -f "$SDKPATH/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then |
|
19330 as_fn_error $? "Unable to find required framework headers, provide a valid path to Xcode 4 using --with-xcode-path" "$LINENO" 5 |
|
19331 fi |
|
19332 |
|
19333 # if SDKPATH is non-empty then we need to add -isysroot and -iframework for gcc and g++ |
|
19334 if test -n "$SDKPATH"; then |
|
19335 # We need -isysroot <path> and -iframework<path>/System/Library/Frameworks |
|
19336 CFLAGS_JDK="${CFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\"" |
|
19337 CXXFLAGS_JDK="${CXXFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\"" |
|
19338 LDFLAGS_JDK="${LDFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\"" |
|
19339 fi |
|
19340 |
|
19341 # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework |
|
19342 # setting this here means it doesn't have to be peppered throughout the forest |
|
19343 CFLAGS_JDK="$CFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\"" |
|
19344 CXXFLAGS_JDK="$CXXFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\"" |
|
19345 LDFLAGS_JDK="$LDFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\"" |
|
19346 fi |
19250 |
19347 |
19251 ### Locate C compiler (CC) |
19348 ### Locate C compiler (CC) |
19252 |
19349 |
19253 # On windows, only cl.exe is supported. |
19350 # On windows, only cl.exe is supported. |
19254 # On Solaris, cc is preferred to gcc. |
19351 # On Solaris, cc is preferred to gcc. |
28524 |
28664 |
28525 if test "x$complete" != "x$new_complete"; then |
28665 if test "x$complete" != "x$new_complete"; then |
28526 OBJDUMP="$new_complete" |
28666 OBJDUMP="$new_complete" |
28527 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5 |
28667 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5 |
28528 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;} |
28668 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;} |
28529 fi |
|
28530 |
|
28531 fi |
|
28532 |
|
28533 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then |
|
28534 # Extract the first word of "lipo", so it can be a program name with args. |
|
28535 set dummy lipo; ac_word=$2 |
|
28536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
|
28537 $as_echo_n "checking for $ac_word... " >&6; } |
|
28538 if ${ac_cv_path_LIPO+:} false; then : |
|
28539 $as_echo_n "(cached) " >&6 |
|
28540 else |
|
28541 case $LIPO in |
|
28542 [\\/]* | ?:[\\/]*) |
|
28543 ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path. |
|
28544 ;; |
|
28545 *) |
|
28546 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
|
28547 for as_dir in $PATH |
|
28548 do |
|
28549 IFS=$as_save_IFS |
|
28550 test -z "$as_dir" && as_dir=. |
|
28551 for ac_exec_ext in '' $ac_executable_extensions; do |
|
28552 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
|
28553 ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext" |
|
28554 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
|
28555 break 2 |
|
28556 fi |
|
28557 done |
|
28558 done |
|
28559 IFS=$as_save_IFS |
|
28560 |
|
28561 ;; |
|
28562 esac |
|
28563 fi |
|
28564 LIPO=$ac_cv_path_LIPO |
|
28565 if test -n "$LIPO"; then |
|
28566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 |
|
28567 $as_echo "$LIPO" >&6; } |
|
28568 else |
|
28569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
|
28570 $as_echo "no" >&6; } |
|
28571 fi |
|
28572 |
|
28573 |
|
28574 |
|
28575 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then |
|
28576 |
|
28577 # First separate the path from the arguments. This will split at the first |
|
28578 # space. |
|
28579 complete="$LIPO" |
|
28580 path="${complete%% *}" |
|
28581 tmp="$complete EOL" |
|
28582 arguments="${tmp#* }" |
|
28583 |
|
28584 # Input might be given as Windows format, start by converting to |
|
28585 # unix format. |
|
28586 new_path=`$CYGPATH -u "$path"` |
|
28587 |
|
28588 # Now try to locate executable using which |
|
28589 new_path=`$WHICH "$new_path" 2> /dev/null` |
|
28590 # bat and cmd files are not always considered executable in cygwin causing which |
|
28591 # to not find them |
|
28592 if test "x$new_path" = x \ |
|
28593 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ |
|
28594 && test "x`$LS \"$path\" 2>/dev/null`" != x; then |
|
28595 new_path=`$CYGPATH -u "$path"` |
|
28596 fi |
|
28597 if test "x$new_path" = x; then |
|
28598 # Oops. Which didn't find the executable. |
|
28599 # The splitting of arguments from the executable at a space might have been incorrect, |
|
28600 # since paths with space are more likely in Windows. Give it another try with the whole |
|
28601 # argument. |
|
28602 path="$complete" |
|
28603 arguments="EOL" |
|
28604 new_path=`$CYGPATH -u "$path"` |
|
28605 new_path=`$WHICH "$new_path" 2> /dev/null` |
|
28606 # bat and cmd files are not always considered executable in cygwin causing which |
|
28607 # to not find them |
|
28608 if test "x$new_path" = x \ |
|
28609 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ |
|
28610 && test "x`$LS \"$path\" 2>/dev/null`" != x; then |
|
28611 new_path=`$CYGPATH -u "$path"` |
|
28612 fi |
|
28613 if test "x$new_path" = x; then |
|
28614 # It's still not found. Now this is an unrecoverable error. |
|
28615 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 |
|
28616 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} |
|
28617 has_space=`$ECHO "$complete" | $GREP " "` |
|
28618 if test "x$has_space" != x; then |
|
28619 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 |
|
28620 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} |
|
28621 fi |
|
28622 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 |
|
28623 fi |
|
28624 fi |
|
28625 |
|
28626 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are |
|
28627 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered |
|
28628 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then |
|
28629 # "foo.exe" is OK but "foo" is an error. |
|
28630 # |
|
28631 # This test is therefore slightly more accurate than "test -f" to check for file presence. |
|
28632 # It is also a way to make sure we got the proper file name for the real test later on. |
|
28633 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` |
|
28634 if test "x$test_shortpath" = x; then |
|
28635 # Short path failed, file does not exist as specified. |
|
28636 # Try adding .exe or .cmd |
|
28637 if test -f "${new_path}.exe"; then |
|
28638 input_to_shortpath="${new_path}.exe" |
|
28639 elif test -f "${new_path}.cmd"; then |
|
28640 input_to_shortpath="${new_path}.cmd" |
|
28641 else |
|
28642 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5 |
|
28643 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;} |
|
28644 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 |
|
28645 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} |
|
28646 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 |
|
28647 fi |
|
28648 else |
|
28649 input_to_shortpath="$new_path" |
|
28650 fi |
|
28651 |
|
28652 # Call helper function which possibly converts this using DOS-style short mode. |
|
28653 # If so, the updated path is stored in $new_path. |
|
28654 new_path="$input_to_shortpath" |
|
28655 |
|
28656 input_path="$input_to_shortpath" |
|
28657 # Check if we need to convert this using DOS-style short mode. If the path |
|
28658 # contains just simple characters, use it. Otherwise (spaces, weird characters), |
|
28659 # take no chances and rewrite it. |
|
28660 # Note: m4 eats our [], so we need to use [ and ] instead. |
|
28661 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` |
|
28662 if test "x$has_forbidden_chars" != x; then |
|
28663 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) |
|
28664 shortmode_path=`$CYGPATH -s -m -a "$input_path"` |
|
28665 path_after_shortmode=`$CYGPATH -u "$shortmode_path"` |
|
28666 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then |
|
28667 # Going to short mode and back again did indeed matter. Since short mode is |
|
28668 # case insensitive, let's make it lowercase to improve readability. |
|
28669 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
|
28670 # Now convert it back to Unix-stile (cygpath) |
|
28671 input_path=`$CYGPATH -u "$shortmode_path"` |
|
28672 new_path="$input_path" |
|
28673 fi |
|
28674 fi |
|
28675 |
|
28676 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` |
|
28677 if test "x$test_cygdrive_prefix" = x; then |
|
28678 # As a simple fix, exclude /usr/bin since it's not a real path. |
|
28679 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then |
|
28680 # The path is in a Cygwin special directory (e.g. /home). We need this converted to |
|
28681 # a path prefixed by /cygdrive for fixpath to work. |
|
28682 new_path="$CYGWIN_ROOT_PATH$input_path" |
|
28683 fi |
|
28684 fi |
|
28685 |
|
28686 # remove trailing .exe if any |
|
28687 new_path="${new_path/%.exe/}" |
|
28688 |
|
28689 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then |
|
28690 |
|
28691 # First separate the path from the arguments. This will split at the first |
|
28692 # space. |
|
28693 complete="$LIPO" |
|
28694 path="${complete%% *}" |
|
28695 tmp="$complete EOL" |
|
28696 arguments="${tmp#* }" |
|
28697 |
|
28698 # Input might be given as Windows format, start by converting to |
|
28699 # unix format. |
|
28700 new_path="$path" |
|
28701 |
|
28702 windows_path="$new_path" |
|
28703 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then |
|
28704 unix_path=`$CYGPATH -u "$windows_path"` |
|
28705 new_path="$unix_path" |
|
28706 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then |
|
28707 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` |
|
28708 new_path="$unix_path" |
|
28709 fi |
|
28710 |
|
28711 |
|
28712 # Now try to locate executable using which |
|
28713 new_path=`$WHICH "$new_path" 2> /dev/null` |
|
28714 |
|
28715 if test "x$new_path" = x; then |
|
28716 # Oops. Which didn't find the executable. |
|
28717 # The splitting of arguments from the executable at a space might have been incorrect, |
|
28718 # since paths with space are more likely in Windows. Give it another try with the whole |
|
28719 # argument. |
|
28720 path="$complete" |
|
28721 arguments="EOL" |
|
28722 new_path="$path" |
|
28723 |
|
28724 windows_path="$new_path" |
|
28725 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then |
|
28726 unix_path=`$CYGPATH -u "$windows_path"` |
|
28727 new_path="$unix_path" |
|
28728 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then |
|
28729 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` |
|
28730 new_path="$unix_path" |
|
28731 fi |
|
28732 |
|
28733 |
|
28734 new_path=`$WHICH "$new_path" 2> /dev/null` |
|
28735 |
|
28736 if test "x$new_path" = x; then |
|
28737 # It's still not found. Now this is an unrecoverable error. |
|
28738 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 |
|
28739 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} |
|
28740 has_space=`$ECHO "$complete" | $GREP " "` |
|
28741 if test "x$has_space" != x; then |
|
28742 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 |
|
28743 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} |
|
28744 fi |
|
28745 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 |
|
28746 fi |
|
28747 fi |
|
28748 |
|
28749 # Now new_path has a complete unix path to the binary |
|
28750 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then |
|
28751 # Keep paths in /bin as-is, but remove trailing .exe if any |
|
28752 new_path="${new_path/%.exe/}" |
|
28753 # Do not save /bin paths to all_fixpath_prefixes! |
|
28754 else |
|
28755 # Not in mixed or Windows style, start by that. |
|
28756 new_path=`cmd //c echo $new_path` |
|
28757 |
|
28758 input_path="$new_path" |
|
28759 # Check if we need to convert this using DOS-style short mode. If the path |
|
28760 # contains just simple characters, use it. Otherwise (spaces, weird characters), |
|
28761 # take no chances and rewrite it. |
|
28762 # Note: m4 eats our [], so we need to use [ and ] instead. |
|
28763 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` |
|
28764 if test "x$has_forbidden_chars" != x; then |
|
28765 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) |
|
28766 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
|
28767 fi |
|
28768 |
|
28769 # Output is in $new_path |
|
28770 |
|
28771 windows_path="$new_path" |
|
28772 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then |
|
28773 unix_path=`$CYGPATH -u "$windows_path"` |
|
28774 new_path="$unix_path" |
|
28775 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then |
|
28776 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` |
|
28777 new_path="$unix_path" |
|
28778 fi |
|
28779 |
|
28780 # remove trailing .exe if any |
|
28781 new_path="${new_path/%.exe/}" |
|
28782 |
|
28783 # Save the first 10 bytes of this path to the storage, so fixpath can work. |
|
28784 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") |
|
28785 fi |
|
28786 |
|
28787 else |
|
28788 # We're on a posix platform. Hooray! :) |
|
28789 # First separate the path from the arguments. This will split at the first |
|
28790 # space. |
|
28791 complete="$LIPO" |
|
28792 path="${complete%% *}" |
|
28793 tmp="$complete EOL" |
|
28794 arguments="${tmp#* }" |
|
28795 |
|
28796 # Cannot rely on the command "which" here since it doesn't always work. |
|
28797 is_absolute_path=`$ECHO "$path" | $GREP ^/` |
|
28798 if test -z "$is_absolute_path"; then |
|
28799 # Path to executable is not absolute. Find it. |
|
28800 IFS_save="$IFS" |
|
28801 IFS=: |
|
28802 for p in $PATH; do |
|
28803 if test -f "$p/$path" && test -x "$p/$path"; then |
|
28804 new_path="$p/$path" |
|
28805 break |
|
28806 fi |
|
28807 done |
|
28808 IFS="$IFS_save" |
|
28809 else |
|
28810 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5 |
|
28811 $as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;} |
|
28812 new_path="$path" |
|
28813 fi |
|
28814 |
|
28815 if test "x$new_path" = x; then |
|
28816 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 |
|
28817 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} |
|
28818 has_space=`$ECHO "$complete" | $GREP " "` |
|
28819 if test "x$has_space" != x; then |
|
28820 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 |
|
28821 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} |
|
28822 fi |
|
28823 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 |
|
28824 fi |
|
28825 fi |
|
28826 |
|
28827 # Now join together the path and the arguments once again |
|
28828 if test "x$arguments" != xEOL; then |
|
28829 new_complete="$new_path ${arguments% *}" |
|
28830 else |
|
28831 new_complete="$new_path" |
|
28832 fi |
|
28833 |
|
28834 if test "x$complete" != "x$new_complete"; then |
|
28835 LIPO="$new_complete" |
|
28836 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5 |
|
28837 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;} |
|
28838 fi |
28669 fi |
28839 |
28670 |
28840 fi |
28671 fi |
28841 |
28672 |
28842 |
28673 |