# autoconf magic only relies on PATH, so update it if tools dir is specified
OLD_PATH="$PATH"
# Before we locate the compilers, we need to sanitize the Xcode build environment
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
# determine path to Xcode developer directory
# can be empty in which case all the tools will rely on a sane Xcode 4 installation
SET_DEVELOPER_DIR=
if test -n "$XCODE_PATH"; then
DEVELOPER_DIR="$XCODE_PATH"/Contents/Developer
fi
# DEVELOPER_DIR could also be provided directly
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining if we need to set DEVELOPER_DIR" >&5
$as_echo_n "checking Determining if we need to set DEVELOPER_DIR... " >&6; }
if test -n "$DEVELOPER_DIR"; then
if test ! -d "$DEVELOPER_DIR"; then
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
fi
if test ! -f "$DEVELOPER_DIR"/usr/bin/xcodebuild; then
as_fn_error $? "Xcode Developer path is not valid: $DEVELOPER_DIR, it must point to Contents/Developer inside an Xcode application bundle" "$LINENO" 5
as_fn_error $? "The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X" "$LINENO" 5
fi
# Fail-fast: verify we're building on Xcode 4, we cannot build with Xcode 5 or later
XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
if test ! "${XC_VERSION_PARTS[0]}" = "4"; then
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
fi
# Some versions of Xcode 5 command line tools install gcc and g++ as symlinks to
# clang and clang++, which will break the build. So handle that here if we need to.
if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then
# use xcrun to find the real gcc and add it's directory to PATH
# then autoconf magic will find it
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&5
$as_echo "$as_me: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&6;}
XCODE_BIN_PATH=$(dirname `xcrun -find gcc`)
PATH="$XCODE_BIN_PATH":$PATH
fi
# Determine appropriate SDKPATH, don't use SDKROOT as it interferes with the stub tools
# For solaris we really need solaris tools, and not the GNU equivalent.
# The build tools on Solaris reside in /usr/ccs (C Compilation System),
# so add that to path before starting to probe.
# FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
if test "x$OPENJDK_BUILD_OS" = xsolaris; then
PATH="/usr/ccs/bin:$PATH"
fi
# On Windows, we need to detect the visual studio installation first.
# On Windows, we need to detect the visual studio installation first.
# This will change the PATH, but we need to keep that new PATH even
# after toolchain detection is done, since the compiler (on x86) uses
# it for DLL resolution in runtime.
if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
# Store path to cygwin link.exe to help excluding it when searching for
# Store path to cygwin link.exe to help excluding it when searching for
...
@@ -25877,6 +25742,144 @@ $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run c
...
@@ -25877,6 +25742,144 @@ $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run c
fi
fi
# autoconf magic only relies on PATH, so update it if tools dir is specified
OLD_PATH="$PATH"
# Before we locate the compilers, we need to sanitize the Xcode build environment
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
# determine path to Xcode developer directory
# can be empty in which case all the tools will rely on a sane Xcode 4 installation
SET_DEVELOPER_DIR=
if test -n "$XCODE_PATH"; then
DEVELOPER_DIR="$XCODE_PATH"/Contents/Developer
fi
# DEVELOPER_DIR could also be provided directly
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining if we need to set DEVELOPER_DIR" >&5
$as_echo_n "checking Determining if we need to set DEVELOPER_DIR... " >&6; }
if test -n "$DEVELOPER_DIR"; then
if test ! -d "$DEVELOPER_DIR"; then
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
fi
if test ! -f "$DEVELOPER_DIR"/usr/bin/xcodebuild; then
as_fn_error $? "Xcode Developer path is not valid: $DEVELOPER_DIR, it must point to Contents/Developer inside an Xcode application bundle" "$LINENO" 5
as_fn_error $? "The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X" "$LINENO" 5
fi
# Fail-fast: verify we're building on Xcode 4, we cannot build with Xcode 5 or later
XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
if test ! "${XC_VERSION_PARTS[0]}" = "4"; then
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
fi
# Some versions of Xcode 5 command line tools install gcc and g++ as symlinks to
# clang and clang++, which will break the build. So handle that here if we need to.
if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then
# use xcrun to find the real gcc and add it's directory to PATH
# then autoconf magic will find it
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&5
$as_echo "$as_me: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&6;}
XCODE_BIN_PATH=$(dirname `xcrun -find gcc`)
PATH="$XCODE_BIN_PATH":$PATH
fi
# Determine appropriate SDKPATH, don't use SDKROOT as it interferes with the stub tools