common/autoconf/toolchain_windows.m4

changeset 839
174a54ce39c4
parent 796
b1e9396fb8af
child 857
5b4f14990dd1
equal deleted inserted replaced
838:ec48d637778a 839:174a54ce39c4
73 [ 73 [
74 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 74 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
75 VCVARSFILE="vc/bin/vcvars32.bat" 75 VCVARSFILE="vc/bin/vcvars32.bat"
76 else 76 else
77 VCVARSFILE="vc/bin/amd64/vcvars64.bat" 77 VCVARSFILE="vc/bin/amd64/vcvars64.bat"
78 fi 78 fi
79 79
80 VS_ENV_CMD="" 80 VS_ENV_CMD=""
81 VS_ENV_ARGS="" 81 VS_ENV_ARGS=""
82 if test "x$with_toolsdir" != x; then 82 if test "x$with_toolsdir" != x; then
83 TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$with_toolsdir/../..], [--with-tools-dir]) 83 TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$with_toolsdir/../..], [--with-tools-dir])
87 # Having specified an argument which is incorrect will produce an instant failure; 87 # Having specified an argument which is incorrect will produce an instant failure;
88 # we should not go on looking 88 # we should not go on looking
89 AC_MSG_NOTICE([The path given by --with-tools-dir does not contain a valid Visual Studio installation]) 89 AC_MSG_NOTICE([The path given by --with-tools-dir does not contain a valid Visual Studio installation])
90 AC_MSG_NOTICE([Please point to the VC/bin directory within the Visual Studio installation]) 90 AC_MSG_NOTICE([Please point to the VC/bin directory within the Visual Studio installation])
91 AC_MSG_ERROR([Cannot locate a valid Visual Studio installation]) 91 AC_MSG_ERROR([Cannot locate a valid Visual Studio installation])
92 fi 92 fi
93 93
94 if test "x$VS100COMNTOOLS" != x; then 94 if test "x$VS100COMNTOOLS" != x; then
95 TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$VS100COMNTOOLS/../..], [VS100COMNTOOLS variable]) 95 TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$VS100COMNTOOLS/../..], [VS100COMNTOOLS variable])
96 fi 96 fi
97 if test "x$PROGRAMFILES" != x; then 97 if test "x$PROGRAMFILES" != x; then
116 # Check if the VS env variables were setup prior to running configure. 116 # Check if the VS env variables were setup prior to running configure.
117 # If not, then find vcvarsall.bat and run it automatically, and integrate 117 # If not, then find vcvarsall.bat and run it automatically, and integrate
118 # the set env variables into the spec file. 118 # the set env variables into the spec file.
119 AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV], 119 AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
120 [ 120 [
121 # Store path to cygwin link.exe to help excluding it when searching for 121 # Store path to cygwin link.exe to help excluding it when searching for
122 # VS linker. This must be done before changing the PATH when looking for VS. 122 # VS linker. This must be done before changing the PATH when looking for VS.
123 AC_PATH_PROG(CYGWIN_LINK, link) 123 AC_PATH_PROG(CYGWIN_LINK, link)
124 if test "x$CYGWIN_LINK" != x; then 124 if test "x$CYGWIN_LINK" != x; then
125 AC_MSG_CHECKING([if the first found link.exe is actually the Cygwin link tool]) 125 AC_MSG_CHECKING([if the first found link.exe is actually the Cygwin link tool])
126 "$CYGWIN_LINK" --version > /dev/null 126 "$CYGWIN_LINK" --version > /dev/null
185 AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation]) 185 AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
186 AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.]) 186 AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
187 AC_MSG_ERROR([Cannot continue]) 187 AC_MSG_ERROR([Cannot continue])
188 fi 188 fi
189 189
190 # Now set all paths and other env variables. This will allow the rest of 190 # Now set all paths and other env variables. This will allow the rest of
191 # the configure script to find and run the compiler in the proper way. 191 # the configure script to find and run the compiler in the proper way.
192 AC_MSG_NOTICE([Setting extracted environment variables]) 192 AC_MSG_NOTICE([Setting extracted environment variables])
193 . $OUTPUT_ROOT/localdevenv.sh 193 . $OUTPUT_ROOT/localdevenv.sh
194 else 194 else
195 # We did not find a vsvars bat file, let's hope we are run from a VS command prompt. 195 # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
196 AC_MSG_NOTICE([Cannot locate a valid Visual Studio installation, checking current environment]) 196 AC_MSG_NOTICE([Cannot locate a valid Visual Studio installation, checking current environment])
197 fi 197 fi
198 198
199 # At this point, we should have corrent variables in the environment, or we can't continue. 199 # At this point, we should have corrent variables in the environment, or we can't continue.
200 AC_MSG_CHECKING([for Visual Studio variables]) 200 AC_MSG_CHECKING([for Visual Studio variables])
201 201
202 if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then 202 if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
203 if test "x$INCLUDE" = x || test "x$LIB" = x; then 203 if test "x$INCLUDE" = x || test "x$LIB" = x; then
204 AC_MSG_RESULT([present but broken]) 204 AC_MSG_RESULT([present but broken])
205 AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.]) 205 AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.])
206 else 206 else
226 fi 226 fi
227 AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation]) 227 AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
228 AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.]) 228 AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
229 AC_MSG_ERROR([Cannot continue]) 229 AC_MSG_ERROR([Cannot continue])
230 fi 230 fi
231 231
232 AC_MSG_CHECKING([for msvcr100.dll]) 232 AC_MSG_CHECKING([for msvcr100.dll])
233 AC_ARG_WITH(msvcr-dll, [AS_HELP_STRING([--with-msvcr-dll], 233 AC_ARG_WITH(msvcr-dll, [AS_HELP_STRING([--with-msvcr-dll],
234 [copy this msvcr100.dll into the built JDK (Windows only) @<:@probed@:>@])]) 234 [copy this msvcr100.dll into the built JDK (Windows only) @<:@probed@:>@])])
235 if test "x$with_msvcr_dll" != x; then 235 if test "x$with_msvcr_dll" != x; then
236 MSVCR_DLL="$with_msvcr_dll" 236 MSVCR_DLL="$with_msvcr_dll"

mercurial