1.1 --- a/common/autoconf/toolchain_windows.m4 Wed Jun 05 15:20:35 2013 -0700 1.2 +++ b/common/autoconf/toolchain_windows.m4 Tue Jun 11 13:08:02 2013 +0200 1.3 @@ -91,6 +91,15 @@ 1.4 AC_MSG_ERROR([Cannot locate a valid Visual Studio installation]) 1.5 fi 1.6 1.7 + if test "x$VS100COMNTOOLS" != x; then 1.8 + TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$VS100COMNTOOLS/../..], [VS100COMNTOOLS variable]) 1.9 + fi 1.10 + if test "x$PROGRAMFILES" != x; then 1.11 + TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$PROGRAMFILES/Microsoft Visual Studio 10.0], [well-known name]) 1.12 + fi 1.13 + TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([C:/Program Files/Microsoft Visual Studio 10.0], [well-known name]) 1.14 + TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([C:/Program Files (x86)/Microsoft Visual Studio 10.0], [well-known name]) 1.15 + 1.16 if test "x$ProgramW6432" != x; then 1.17 TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin], [well-known name]) 1.18 fi 1.19 @@ -102,15 +111,6 @@ 1.20 fi 1.21 TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin], [well-known name]) 1.22 TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin], [well-known name]) 1.23 - 1.24 - if test "x$VS100COMNTOOLS" != x; then 1.25 - TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$VS100COMNTOOLS/../..], [VS100COMNTOOLS variable]) 1.26 - fi 1.27 - if test "x$PROGRAMFILES" != x; then 1.28 - TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$PROGRAMFILES/Microsoft Visual Studio 10.0], [well-known name]) 1.29 - fi 1.30 - TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([C:/Program Files/Microsoft Visual Studio 10.0], [well-known name]) 1.31 - TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([C:/Program Files (x86)/Microsoft Visual Studio 10.0], [well-known name]) 1.32 ]) 1.33 1.34 # Check if the VS env variables were setup prior to running configure. 1.35 @@ -248,10 +248,23 @@ 1.36 AC_MSG_NOTICE([Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR]) 1.37 fi 1.38 fi 1.39 + # Try some fallback alternatives 1.40 if test "x$MSVCR_DLL" = x; then 1.41 - if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then 1.42 - AC_MSG_NOTICE([msvcr100.dll found in $SYSTEMROOT/system32]) 1.43 - MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll" 1.44 + # If visual studio express is installed, there is usually one with the debugger 1.45 + if test "x$VS100COMNTOOLS" != x; then 1.46 + if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 1.47 + MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1` 1.48 + AC_MSG_NOTICE([msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS..]) 1.49 + fi 1.50 + fi 1.51 + fi 1.52 + if test "x$MSVCR_DLL" = x; then 1.53 + if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 1.54 + # Fallback for 32bit builds, look in the windows directory. 1.55 + if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then 1.56 + AC_MSG_NOTICE([msvcr100.dll found in $SYSTEMROOT/system32]) 1.57 + MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll" 1.58 + fi 1.59 fi 1.60 fi 1.61 fi