Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8
提交
82f0c958
D
dragonwell8
项目概览
openanolis
/
dragonwell8
通知
5
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
82f0c958
编写于
10月 18, 2013
作者:
I
ihse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8001912: Improve detection of msvcr100.dll
Reviewed-by: erikj
上级
83757e8b
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
370 addition
and
64 deletion
+370
-64
common/autoconf/generated-configure.sh
common/autoconf/generated-configure.sh
+279
-35
common/autoconf/toolchain.m4
common/autoconf/toolchain.m4
+1
-0
common/autoconf/toolchain_windows.m4
common/autoconf/toolchain_windows.m4
+90
-29
未找到文件。
common/autoconf/generated-configure.sh
浏览文件 @
82f0c958
...
...
@@ -3812,13 +3812,17 @@ fi
# This line needs to be here, verbatim, after all includes and the dummy hook
# definitions. It is replaced with custom functionality when building
# custom sources.
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=138
1407169
DATE_WHEN_GENERATED=138
2084973
###############################################################################
#
...
...
@@ -17415,63 +17419,303 @@ $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run c
as_fn_error $? "Cannot continue" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
$as_echo_n "checking for msvcr100.dll... " >&6; }
# Check whether --with-msvcr-dll was given.
if test "${with_msvcr_dll+set}" = set; then :
withval=$with_msvcr_dll;
fi
if test "x$with_msvcr_dll" != x; then
MSVCR_DLL="$with_msvcr_dll"
# If given explicitely by user, do not probe. If not present, fail directly.
POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
METHOD="--with-msvcr-dll"
if test -e "$POSSIBLE_MSVCR_DLL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
# Need to check if the found msvcr is correct architecture
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
CORRECT_MSVCR_ARCH=386
else
CORRECT_MSVCR_ARCH=x86-64
fi
if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
$as_echo_n "checking for msvcr100.dll... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
$as_echo "$MSVCR_DLL" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
$as_echo "incorrect, ignoring" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
fi
fi
if test "x$MSVCR_DLL" = x; then
as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
fi
fi
if test "x$MSVCR_DLL" = x; then
# Probe: Using well-known location from Visual Studio 10.0
if test "x$VCINSTALLDIR" != x; then
CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
windows_path="$CYGWIN_VC_INSTALL_DIR"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
CYGWIN_VC_INSTALL_DIR="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
CYGWIN_VC_INSTALL_DIR="$unix_path"
fi
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
else
MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
fi
POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
METHOD="well-known location in VCINSTALLDIR"
if test -e "$POSSIBLE_MSVCR_DLL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
# Need to check if the found msvcr is correct architecture
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
CORRECT_MSVCR_ARCH=386
else
CORRECT_MSVCR_ARCH=x86-64
fi
if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
$as_echo_n "checking for msvcr100.dll... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
$as_echo "$MSVCR_DLL" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
$as_echo "incorrect, ignoring" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
fi
fi
fi
fi
if test "x$MSVCR_DLL" = x; then
MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
# Probe: Check in the Boot JDK directory.
POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
METHOD="well-known location in Boot JDK"
if test -e "$POSSIBLE_MSVCR_DLL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
# Need to check if the found msvcr is correct architecture
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
CORRECT_MSVCR_ARCH=386
else
CORRECT_MSVCR_ARCH=x86-64
fi
if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
$as_echo_n "checking for msvcr100.dll... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
$as_echo "$MSVCR_DLL" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
$as_echo "incorrect, ignoring" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
fi
fi
if test "x$MSVCR_DLL" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
fi
if test "x$MSVCR_DLL" = x; then
# Probe: Look in the Windows system32 directory
CYGWIN_SYSTEMROOT="$SYSTEMROOT"
windows_path="$CYGWIN_SYSTEMROOT"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
CYGWIN_SYSTEMROOT="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
CYGWIN_SYSTEMROOT="$unix_path"
fi
POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
METHOD="well-known location in SYSTEMROOT"
if test -e "$POSSIBLE_MSVCR_DLL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
# Need to check if the found msvcr is correct architecture
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
CORRECT_MSVCR_ARCH=386
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
CORRECT_MSVCR_ARCH=x86-64
fi
if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
$as_echo_n "checking for msvcr100.dll... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
$as_echo "$MSVCR_DLL" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
$as_echo "incorrect, ignoring" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
fi
# Try some fallback alternatives
fi
fi
if test "x$MSVCR_DLL" = x; then
# If visual studio e
xpress is installed, there is usually one with the debugger
# Probe: If Visual Studio E
xpress is installed, there is usually one with the debugger
if test "x$VS100COMNTOOLS" != x; then
CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
windows_path="$CYGWIN_VS_TOOLS_DIR"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
CYGWIN_VS_TOOLS_DIR="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
CYGWIN_VS_TOOLS_DIR="$unix_path"
fi
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
{ $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
else
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
fi
POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
METHOD="search of VS100COMNTOOLS"
if test -e "$POSSIBLE_MSVCR_DLL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
# Need to check if the found msvcr is correct architecture
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
CORRECT_MSVCR_ARCH=386
else
CORRECT_MSVCR_ARCH=x86-64
fi
if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
$as_echo_n "checking for msvcr100.dll... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
$as_echo "$MSVCR_DLL" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
$as_echo "incorrect, ignoring" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
fi
fi
fi
fi
if test "x$MSVCR_DLL" = x; then
# Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
# (This was the original behaviour; kept since it might turn up something)
if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
else
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
if test "x$POSSIBLE_MSVCR_DLL" = x; then
# We're grasping at straws now...
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
fi
fi
POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
METHOD="search of VCINSTALLDIR"
if test -e "$POSSIBLE_MSVCR_DLL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
# Need to check if the found msvcr is correct architecture
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
# Fallback for 32bit builds, look in the windows directory.
if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
CORRECT_MSVCR_ARCH=386
else
CORRECT_MSVCR_ARCH=x86-64
fi
if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
$as_echo_n "checking for msvcr100.dll... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
$as_echo "$MSVCR_DLL" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
$as_echo "incorrect, ignoring" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
fi
fi
fi
fi
if test "x$MSVCR_DLL" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
$as_echo_n "checking for msvcr100.dll... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "Could not find msvcr100.dll
!
" "$LINENO" 5
as_fn_error $? "Could not find msvcr100.dll
. Please specify using --with-msvcr-dll.
" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
$as_echo "$MSVCR_DLL" >&6; }
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
common/autoconf/toolchain.m4
浏览文件 @
82f0c958
...
...
@@ -176,6 +176,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_PATHS],
[
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
TOOLCHAIN_SETUP_MSVCR_DLL
BASIC_DEPRECATED_ARG_WITH([dxsdk])
BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
...
...
common/autoconf/toolchain_windows.m4
浏览文件 @
82f0c958
...
...
@@ -228,52 +228,113 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
AC_MSG_ERROR([Cannot continue])
fi
])
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL],
[
POSSIBLE_MSVCR_DLL="$1"
METHOD="$2"
if test -e "$POSSIBLE_MSVCR_DLL"; then
AC_MSG_NOTICE([Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD])
# Need to check if the found msvcr is correct architecture
AC_MSG_CHECKING([found msvcr100.dll architecture])
MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
CORRECT_MSVCR_ARCH=386
else
CORRECT_MSVCR_ARCH=x86-64
fi
if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
AC_MSG_RESULT([ok])
MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
AC_MSG_CHECKING([for msvcr100.dll])
AC_MSG_RESULT([$MSVCR_DLL])
else
AC_MSG_RESULT([incorrect, ignoring])
AC_MSG_NOTICE([The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE])
fi
fi
])
AC_DEFUN([TOOLCHAIN_SETUP_MSVCR_DLL],
[
AC_ARG_WITH(msvcr-dll, [AS_HELP_STRING([--with-msvcr-dll],
[copy this msvcr100.dll into the built JDK (Windows only) @<:@probed@:>@])])
if test "x$with_msvcr_dll" != x; then
MSVCR_DLL="$with_msvcr_dll"
else
# If given explicitely by user, do not probe. If not present, fail directly.
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$with_msvcr_dll], [--with-msvcr-dll])
if test "x$MSVCR_DLL" = x; then
AC_MSG_ERROR([Could not find a proper msvcr100.dll as specified by --with-msvcr-dll])
fi
fi
if test "x$MSVCR_DLL" = x; then
# Probe: Using well-known location from Visual Studio 10.0
if test "x$VCINSTALLDIR" != x; then
CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_VC_INSTALL_DIR)
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
else
MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
if test "x$MSVCR_DLL" = x; then
MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
fi
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [well-known location in VCINSTALLDIR])
fi
if test "x$MSVCR_DLL" != x; then
AC_MSG_NOTICE([msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR])
else
AC_MSG_NOTICE([Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR])
fi
if test "x$MSVCR_DLL" = x; then
# Probe: Check in the Boot JDK directory.
POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [well-known location in Boot JDK])
fi
if test "x$MSVCR_DLL" = x; then
# Probe: Look in the Windows system32 directory
CYGWIN_SYSTEMROOT="$SYSTEMROOT"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_SYSTEMROOT)
POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [well-known location in SYSTEMROOT])
fi
# Try some fallback alternatives
if test "x$MSVCR_DLL" = x; then
# If visual studio e
xpress is installed, there is usually one with the debugger
# Probe: If Visual Studio E
xpress is installed, there is usually one with the debugger
if test "x$VS100COMNTOOLS" != x; then
CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_VS_TOOLS_DIR)
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
AC_MSG_NOTICE([msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS..])
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
else
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
fi
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [search of VS100COMNTOOLS])
fi
fi
if test "x$MSVCR_DLL" = x; then
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
# Fallback for 32bit builds, look in the windows directory.
if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
AC_MSG_NOTICE([msvcr100.dll found in $SYSTEMROOT/system32])
MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
# Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
# (This was the original behaviour; kept since it might turn up something)
if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
else
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
if test "x$POSSIBLE_MSVCR_DLL" = x; then
# We're grasping at straws now...
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
fi
fi
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [search of VCINSTALLDIR])
fi
fi
if test "x$MSVCR_DLL" = x; then
AC_MSG_CHECKING([for msvcr100.dll])
AC_MSG_RESULT([no])
AC_MSG_ERROR([Could not find msvcr100.dll
!
])
AC_MSG_ERROR([Could not find msvcr100.dll
. Please specify using --with-msvcr-dll.
])
fi
AC_MSG_RESULT([$MSVCR_DLL])
BASIC_FIXUP_PATH(MSVCR_DLL)
])
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录