Merge
This commit is contained in:
commit
083bc08074
@ -478,6 +478,15 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
|
|||||||
AUTOCONF_DIR=$TOPDIR/common/autoconf
|
AUTOCONF_DIR=$TOPDIR/common/autoconf
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# Evaluates platform specific overrides for devkit variables.
|
||||||
|
# $1: Name of variable
|
||||||
|
AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE],
|
||||||
|
[
|
||||||
|
if test "x[$]$1" = x; then
|
||||||
|
eval $1="\${$1_${OPENJDK_TARGET_CPU}}"
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
||||||
[
|
[
|
||||||
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
|
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
|
||||||
@ -487,12 +496,27 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
|||||||
DEVKIT_ROOT="$with_devkit"
|
DEVKIT_ROOT="$with_devkit"
|
||||||
# Check for a meta data info file in the root of the devkit
|
# Check for a meta data info file in the root of the devkit
|
||||||
if test -f "$DEVKIT_ROOT/devkit.info"; then
|
if test -f "$DEVKIT_ROOT/devkit.info"; then
|
||||||
# This potentially sets the following:
|
|
||||||
# DEVKIT_NAME: A descriptive name of the devkit
|
|
||||||
# DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
|
|
||||||
# DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
|
|
||||||
# DEVKIT_SYSROOT: Corresponds to --with-sysroot
|
|
||||||
. $DEVKIT_ROOT/devkit.info
|
. $DEVKIT_ROOT/devkit.info
|
||||||
|
# This potentially sets the following:
|
||||||
|
# A descriptive name of the devkit
|
||||||
|
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_NAME])
|
||||||
|
# Corresponds to --with-extra-path
|
||||||
|
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_EXTRA_PATH])
|
||||||
|
# Corresponds to --with-toolchain-path
|
||||||
|
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_TOOLCHAIN_PATH])
|
||||||
|
# Corresponds to --with-sysroot
|
||||||
|
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_SYSROOT])
|
||||||
|
|
||||||
|
# Identifies the Visual Studio version in the devkit
|
||||||
|
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_VERSION])
|
||||||
|
# The Visual Studio include environment variable
|
||||||
|
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_INCLUDE])
|
||||||
|
# The Visual Studio lib environment variable
|
||||||
|
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_LIB])
|
||||||
|
# Corresponds to --with-msvcr-dll
|
||||||
|
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCR_DLL])
|
||||||
|
# Corresponds to --with-msvcp-dll
|
||||||
|
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCP_DLL])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING([for devkit])
|
AC_MSG_CHECKING([for devkit])
|
||||||
@ -502,9 +526,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
|||||||
AC_MSG_RESULT([$DEVKIT_ROOT])
|
AC_MSG_RESULT([$DEVKIT_ROOT])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$DEVKIT_EXTRA_PATH" != x; then
|
BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH)
|
||||||
BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Fallback default of just /bin if DEVKIT_PATH is not defined
|
# Fallback default of just /bin if DEVKIT_PATH is not defined
|
||||||
if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
|
if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
|
||||||
@ -681,8 +703,12 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
|||||||
files_present=`$LS $OUTPUT_ROOT`
|
files_present=`$LS $OUTPUT_ROOT`
|
||||||
# Configure has already touched config.log and confdefs.h in the current dir when this check
|
# Configure has already touched config.log and confdefs.h in the current dir when this check
|
||||||
# is performed.
|
# is performed.
|
||||||
filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
|
filtered_files=`$ECHO "$files_present" \
|
||||||
| $TR -d '\n'`
|
| $SED -e 's/config.log//g' \
|
||||||
|
-e 's/confdefs.h//g' \
|
||||||
|
-e 's/fixpath.exe//g' \
|
||||||
|
-e 's/ //g' \
|
||||||
|
| $TR -d '\n'`
|
||||||
if test "x$filtered_files" != x; then
|
if test "x$filtered_files" != x; then
|
||||||
AC_MSG_NOTICE([Current directory is $CURDIR.])
|
AC_MSG_NOTICE([Current directory is $CURDIR.])
|
||||||
AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here])
|
AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here])
|
||||||
|
@ -66,7 +66,7 @@ AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN],
|
|||||||
# Going to short mode and back again did indeed matter. Since short mode is
|
# Going to short mode and back again did indeed matter. Since short mode is
|
||||||
# case insensitive, let's make it lowercase to improve readability.
|
# case insensitive, let's make it lowercase to improve readability.
|
||||||
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||||
# Now convert it back to Unix-stile (cygpath)
|
# Now convert it back to Unix-style (cygpath)
|
||||||
input_path=`$CYGPATH -u "$shortmode_path"`
|
input_path=`$CYGPATH -u "$shortmode_path"`
|
||||||
new_path="$input_path"
|
new_path="$input_path"
|
||||||
fi
|
fi
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -189,11 +189,15 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
|
|||||||
ORG_CFLAGS="$CFLAGS"
|
ORG_CFLAGS="$CFLAGS"
|
||||||
ORG_CXXFLAGS="$CXXFLAGS"
|
ORG_CXXFLAGS="$CXXFLAGS"
|
||||||
|
|
||||||
|
# autoconf magic only relies on PATH, so update it if tools dir is specified
|
||||||
|
OLD_PATH="$PATH"
|
||||||
|
|
||||||
# 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
|
# 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
|
# after toolchain detection is done, since the compiler (on x86) uses
|
||||||
# it for DLL resolution in runtime.
|
# 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
|
||||||
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
|
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
|
||||||
# Reset path to VS_PATH. It will include everything that was on PATH at the time we
|
# Reset path to VS_PATH. It will include everything that was on PATH at the time we
|
||||||
# ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
|
# ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
|
||||||
@ -203,9 +207,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
|
|||||||
export LIB="$VS_LIB"
|
export LIB="$VS_LIB"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# autoconf magic only relies on PATH, so update it if tools dir is specified
|
|
||||||
OLD_PATH="$PATH"
|
|
||||||
|
|
||||||
# For solaris we really need solaris tools, and not the GNU equivalent.
|
# For solaris we really need solaris tools, and not the GNU equivalent.
|
||||||
# The build tools on Solaris reside in /usr/ccs (C Compilation System),
|
# The build tools on Solaris reside in /usr/ccs (C Compilation System),
|
||||||
# so add that to path before starting to probe.
|
# so add that to path before starting to probe.
|
||||||
|
@ -210,6 +210,37 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
|
|||||||
done
|
done
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
elif test "x$DEVKIT_VS_VERSION" != x; then
|
||||||
|
VS_VERSION=$DEVKIT_VS_VERSION
|
||||||
|
TOOLCHAIN_VERSION=$VS_VERSION
|
||||||
|
eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
|
||||||
|
eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
|
||||||
|
eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
|
||||||
|
eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
|
||||||
|
eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
|
||||||
|
VS_PATH="$TOOLCHAIN_PATH:$PATH"
|
||||||
|
|
||||||
|
# Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
|
||||||
|
# can still be exported as INCLUDE for compiler invocations without
|
||||||
|
# SYSROOT_CFLAGS
|
||||||
|
OLDIFS="$IFS"
|
||||||
|
IFS=";"
|
||||||
|
for i in $DEVKIT_VS_INCLUDE; do
|
||||||
|
ipath=$i
|
||||||
|
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([ipath])
|
||||||
|
VS_INCLUDE="$VS_INCLUDE;$ipath"
|
||||||
|
done
|
||||||
|
# Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
|
||||||
|
# as LIB for compiler invocations without SYSROOT_LDFLAGS
|
||||||
|
for i in $DEVKIT_VS_LIB; do
|
||||||
|
libpath=$i
|
||||||
|
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([libpath])
|
||||||
|
VS_LIB="$VS_LIB;$libpath"
|
||||||
|
done
|
||||||
|
IFS="$OLDIFS"
|
||||||
|
|
||||||
|
AC_MSG_NOTICE([Found devkit $VS_DESCRIPTION])
|
||||||
|
|
||||||
elif test "x$with_toolchain_version" != x; then
|
elif test "x$with_toolchain_version" != x; then
|
||||||
# User override; check that it is valid
|
# User override; check that it is valid
|
||||||
if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
|
if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
|
||||||
@ -262,71 +293,81 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
|||||||
# First-hand choice is to locate and run the vsvars bat file.
|
# First-hand choice is to locate and run the vsvars bat file.
|
||||||
TOOLCHAIN_FIND_VISUAL_STUDIO
|
TOOLCHAIN_FIND_VISUAL_STUDIO
|
||||||
|
|
||||||
if test "x$VS_ENV_CMD" != x; then
|
# If we have a devkit, skip all of the below.
|
||||||
# We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
|
if test "x$DEVKIT_VS_VERSION" = x; then
|
||||||
BASIC_FIXUP_EXECUTABLE(VS_ENV_CMD)
|
if test "x$VS_ENV_CMD" != x; then
|
||||||
|
# We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
|
||||||
|
BASIC_FIXUP_EXECUTABLE(VS_ENV_CMD)
|
||||||
|
|
||||||
# Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
|
# Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
|
||||||
AC_MSG_NOTICE([Trying to extract Visual Studio environment variables])
|
AC_MSG_NOTICE([Trying to extract Visual Studio environment variables])
|
||||||
|
|
||||||
# We need to create a couple of temporary files.
|
# We need to create a couple of temporary files.
|
||||||
VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
|
VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
|
||||||
$MKDIR -p $VS_ENV_TMP_DIR
|
$MKDIR -p $VS_ENV_TMP_DIR
|
||||||
|
|
||||||
# Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
|
# Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
|
||||||
# Instead create a shell script which will set the relevant variables when run.
|
# Instead create a shell script which will set the relevant variables when run.
|
||||||
WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
|
WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
|
||||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_VS_ENV_CMD])
|
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_VS_ENV_CMD])
|
||||||
WINPATH_BASH="$BASH"
|
WINPATH_BASH="$BASH"
|
||||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_BASH])
|
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_BASH])
|
||||||
|
|
||||||
# Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
|
# Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
|
||||||
# script (executable by bash) that will setup the important variables.
|
# script (executable by bash) that will setup the important variables.
|
||||||
EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
|
EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
|
||||||
$ECHO "@echo off" > $EXTRACT_VC_ENV_BAT_FILE
|
$ECHO "@echo off" > $EXTRACT_VC_ENV_BAT_FILE
|
||||||
# This will end up something like:
|
# This will end up something like:
|
||||||
# call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
|
# call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
|
||||||
$ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
|
$ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
|
||||||
# These will end up something like:
|
# These will end up something like:
|
||||||
# C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
|
# C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
|
||||||
# The trailing space for everyone except PATH is no typo, but is needed due
|
# The trailing space for everyone except PATH is no typo, but is needed due
|
||||||
# to trailing \ in the Windows paths. These will be stripped later.
|
# to trailing \ in the Windows paths. These will be stripped later.
|
||||||
$ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
$ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
|
||||||
$ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||||
$ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
$ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
|
||||||
$ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||||
$ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
$ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
|
||||||
$ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
|
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||||
|
$ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
|
||||||
|
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||||
|
$ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
|
||||||
|
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||||
|
$ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
|
||||||
|
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||||
|
|
||||||
# Now execute the newly created bat file.
|
# Now execute the newly created bat file.
|
||||||
# The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
|
# The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
|
||||||
# Change directory so we don't need to mess with Windows paths in redirects.
|
# Change directory so we don't need to mess with Windows paths in redirects.
|
||||||
cd $VS_ENV_TMP_DIR
|
cd $VS_ENV_TMP_DIR
|
||||||
cmd /c extract-vs-env.bat | $CAT
|
cmd /c extract-vs-env.bat | $CAT
|
||||||
cd $CURDIR
|
cd $CURDIR
|
||||||
|
|
||||||
if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
|
if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
|
||||||
AC_MSG_NOTICE([Could not succesfully extract the envionment variables needed for the VS setup.])
|
AC_MSG_NOTICE([Could not succesfully extract the envionment variables needed for the VS setup.])
|
||||||
AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
|
AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
|
||||||
AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
|
AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
|
||||||
AC_MSG_ERROR([Cannot continue])
|
AC_MSG_ERROR([Cannot continue])
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Now set all paths and other env variables. This will allow the rest of
|
||||||
|
# the configure script to find and run the compiler in the proper way.
|
||||||
|
AC_MSG_NOTICE([Setting extracted environment variables])
|
||||||
|
. $VS_ENV_TMP_DIR/set-vs-env.sh
|
||||||
|
# Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
|
||||||
|
# also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
|
||||||
|
else
|
||||||
|
# We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
|
||||||
|
AC_MSG_NOTICE([Cannot locate a valid Visual Studio installation, checking current environment])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Now set all paths and other env variables. This will allow the rest of
|
|
||||||
# the configure script to find and run the compiler in the proper way.
|
|
||||||
AC_MSG_NOTICE([Setting extracted environment variables])
|
|
||||||
. $VS_ENV_TMP_DIR/set-vs-env.sh
|
|
||||||
# Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
|
|
||||||
# also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
|
|
||||||
else
|
|
||||||
# We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
|
|
||||||
AC_MSG_NOTICE([Cannot locate a valid Visual Studio installation, checking current environment])
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# At this point, we should have correct variables in the environment, or we can't continue.
|
# At this point, we should have correct variables in the environment, or we can't continue.
|
||||||
AC_MSG_CHECKING([for Visual Studio variables])
|
AC_MSG_CHECKING([for Visual Studio variables])
|
||||||
|
|
||||||
if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
|
if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
|
||||||
|
|| test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
|
||||||
if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
|
if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
|
||||||
AC_MSG_RESULT([present but broken])
|
AC_MSG_RESULT([present but broken])
|
||||||
AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.])
|
AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.])
|
||||||
@ -403,10 +444,10 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL],
|
|||||||
POSSIBLE_MSVC_DLL="$2"
|
POSSIBLE_MSVC_DLL="$2"
|
||||||
METHOD="$3"
|
METHOD="$3"
|
||||||
if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
|
if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
|
||||||
AC_MSG_NOTICE([Found $1 at $POSSIBLE_MSVC_DLL using $METHOD])
|
AC_MSG_NOTICE([Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD])
|
||||||
|
|
||||||
# Need to check if the found msvcr is correct architecture
|
# Need to check if the found msvcr is correct architecture
|
||||||
AC_MSG_CHECKING([found $1 architecture])
|
AC_MSG_CHECKING([found $DLL_NAME architecture])
|
||||||
MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
|
MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
|
||||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||||
# The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
|
# The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
|
||||||
@ -426,19 +467,19 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL],
|
|||||||
if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
|
if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
|
||||||
AC_MSG_RESULT([ok])
|
AC_MSG_RESULT([ok])
|
||||||
MSVC_DLL="$POSSIBLE_MSVC_DLL"
|
MSVC_DLL="$POSSIBLE_MSVC_DLL"
|
||||||
AC_MSG_CHECKING([for $1])
|
BASIC_FIXUP_PATH(MSVC_DLL)
|
||||||
|
AC_MSG_CHECKING([for $DLL_NAME])
|
||||||
AC_MSG_RESULT([$MSVC_DLL])
|
AC_MSG_RESULT([$MSVC_DLL])
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([incorrect, ignoring])
|
AC_MSG_RESULT([incorrect, ignoring])
|
||||||
AC_MSG_NOTICE([The file type of the located $1 is $MSVC_DLL_FILETYPE])
|
AC_MSG_NOTICE([The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
|
AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
|
||||||
[
|
[
|
||||||
VAR_NAME="$1"
|
DLL_NAME="$1"
|
||||||
DLL_NAME="$2"
|
|
||||||
MSVC_DLL=
|
MSVC_DLL=
|
||||||
|
|
||||||
if test "x$MSVC_DLL" = x; then
|
if test "x$MSVC_DLL" = x; then
|
||||||
@ -517,10 +558,6 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
|
|||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
AC_MSG_ERROR([Could not find $DLL_NAME. Please specify using --with-msvcr-dll.])
|
AC_MSG_ERROR([Could not find $DLL_NAME. Please specify using --with-msvcr-dll.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$1=$MSVC_DLL
|
|
||||||
BASIC_FIXUP_PATH($1)
|
|
||||||
AC_SUBST($1, [$]$1)
|
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
|
AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
|
||||||
@ -530,14 +567,22 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
|
|||||||
|
|
||||||
if test "x$with_msvcr_dll" != x; then
|
if test "x$with_msvcr_dll" != x; then
|
||||||
# If given explicitely by user, do not probe. If not present, fail directly.
|
# If given explicitely by user, do not probe. If not present, fail directly.
|
||||||
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$with_msvcr_dll],
|
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCR_NAME, [$with_msvcr_dll], [--with-msvcr-dll])
|
||||||
[--with-msvcr-dll])
|
|
||||||
if test "x$MSVC_DLL" = x; then
|
if test "x$MSVC_DLL" = x; then
|
||||||
AC_MSG_ERROR([Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll])
|
AC_MSG_ERROR([Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll])
|
||||||
fi
|
fi
|
||||||
|
MSVCR_DLL="$MSVC_DLL"
|
||||||
|
elif test "x$DEVKIT_MSVCR_DLL" != x; then
|
||||||
|
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCR_NAME, [$DEVKIT_MSVCR_DLL], [devkit])
|
||||||
|
if test "x$MSVC_DLL" = x; then
|
||||||
|
AC_MSG_ERROR([Could not find a proper $MSVCR_NAME as specified by devkit])
|
||||||
|
fi
|
||||||
|
MSVCR_DLL="$MSVC_DLL"
|
||||||
else
|
else
|
||||||
TOOLCHAIN_SETUP_MSVC_DLL([MSVCR_DLL], [${MSVCR_NAME}])
|
TOOLCHAIN_SETUP_MSVC_DLL([${MSVCR_NAME}])
|
||||||
|
MSVCR_DLL="$MSVC_DLL"
|
||||||
fi
|
fi
|
||||||
|
AC_SUBST(MSVCR_DLL)
|
||||||
|
|
||||||
AC_ARG_WITH(msvcp-dll, [AS_HELP_STRING([--with-msvcp-dll],
|
AC_ARG_WITH(msvcp-dll, [AS_HELP_STRING([--with-msvcp-dll],
|
||||||
[path to microsoft C++ runtime dll (msvcp*.dll) (Windows only) @<:@probed@:>@])])
|
[path to microsoft C++ runtime dll (msvcp*.dll) (Windows only) @<:@probed@:>@])])
|
||||||
@ -545,13 +590,21 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
|
|||||||
if test "x$MSVCP_NAME" != "x"; then
|
if test "x$MSVCP_NAME" != "x"; then
|
||||||
if test "x$with_msvcp_dll" != x; then
|
if test "x$with_msvcp_dll" != x; then
|
||||||
# If given explicitely by user, do not probe. If not present, fail directly.
|
# If given explicitely by user, do not probe. If not present, fail directly.
|
||||||
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$with_msvcp_dll],
|
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCP_NAME, [$with_msvcp_dll], [--with-msvcp-dll])
|
||||||
[--with-msvcp-dll])
|
|
||||||
if test "x$MSVC_DLL" = x; then
|
if test "x$MSVC_DLL" = x; then
|
||||||
AC_MSG_ERROR([Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll])
|
AC_MSG_ERROR([Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll])
|
||||||
fi
|
fi
|
||||||
|
MSVCP_DLL="$MSVC_DLL"
|
||||||
|
elif test "x$DEVKIT_MSVCP_DLL" != x; then
|
||||||
|
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCP_NAME, [$DEVKIT_MSVCP_DLL], [devkit])
|
||||||
|
if test "x$MSVC_DLL" = x; then
|
||||||
|
AC_MSG_ERROR([Could not find a proper $MSVCP_NAME as specified by devkit])
|
||||||
|
fi
|
||||||
|
MSVCP_DLL="$MSVC_DLL"
|
||||||
else
|
else
|
||||||
TOOLCHAIN_SETUP_MSVC_DLL([MSVCP_DLL], [${MSVCP_NAME}])
|
TOOLCHAIN_SETUP_MSVC_DLL([${MSVCP_NAME}])
|
||||||
|
MSVCP_DLL="$MSVC_DLL"
|
||||||
fi
|
fi
|
||||||
|
AC_SUBST(MSVCP_DLL)
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
Loading…
Reference in New Issue
Block a user