227 AC_MSG_NOTICE([nor is this script run from a Visual Studio command prompt.])
228 else
229 AC_MSG_NOTICE([Running the extraction script failed.])
230 fi
231 AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
232 AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
233 AC_MSG_ERROR([Cannot continue])
234 fi
235 ])
236
237 AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL],
238 [
239 POSSIBLE_MSVCR_DLL="$1"
240 METHOD="$2"
241 if test -e "$POSSIBLE_MSVCR_DLL"; then
242 AC_MSG_NOTICE([Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD])
243
244 # Need to check if the found msvcr is correct architecture
245 AC_MSG_CHECKING([found msvcr100.dll architecture])
246 MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
247 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
248 CORRECT_MSVCR_ARCH=386
249 else
250 CORRECT_MSVCR_ARCH=x86-64
251 fi
252 if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
253 AC_MSG_RESULT([ok])
254 MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
255 AC_MSG_CHECKING([for msvcr100.dll])
256 AC_MSG_RESULT([$MSVCR_DLL])
257 else
258 AC_MSG_RESULT([incorrect, ignoring])
259 AC_MSG_NOTICE([The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE])
260 fi
261 fi
262 ])
263
264 AC_DEFUN([TOOLCHAIN_SETUP_MSVCR_DLL],
265 [
266 AC_ARG_WITH(msvcr-dll, [AS_HELP_STRING([--with-msvcr-dll],
267 [copy this msvcr100.dll into the built JDK (Windows only) @<:@probed@:>@])])
268
269 if test "x$with_msvcr_dll" != x; then
270 # If given explicitely by user, do not probe. If not present, fail directly.
271 TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$with_msvcr_dll], [--with-msvcr-dll])
272 if test "x$MSVCR_DLL" = x; then
|
227 AC_MSG_NOTICE([nor is this script run from a Visual Studio command prompt.])
228 else
229 AC_MSG_NOTICE([Running the extraction script failed.])
230 fi
231 AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
232 AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
233 AC_MSG_ERROR([Cannot continue])
234 fi
235 ])
236
237 AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL],
238 [
239 POSSIBLE_MSVCR_DLL="$1"
240 METHOD="$2"
241 if test -e "$POSSIBLE_MSVCR_DLL"; then
242 AC_MSG_NOTICE([Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD])
243
244 # Need to check if the found msvcr is correct architecture
245 AC_MSG_CHECKING([found msvcr100.dll architecture])
246 MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
247 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
248 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
249 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
250 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
251 CORRECT_MSVCR_ARCH="PE32 executable"
252 else
253 CORRECT_MSVCR_ARCH="PE32+ executable"
254 fi
255 else
256 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
257 CORRECT_MSVCR_ARCH=386
258 else
259 CORRECT_MSVCR_ARCH=x86-64
260 fi
261 fi
262 if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
263 AC_MSG_RESULT([ok])
264 MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
265 AC_MSG_CHECKING([for msvcr100.dll])
266 AC_MSG_RESULT([$MSVCR_DLL])
267 else
268 AC_MSG_RESULT([incorrect, ignoring])
269 AC_MSG_NOTICE([The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE])
270 fi
271 fi
272 ])
273
274 AC_DEFUN([TOOLCHAIN_SETUP_MSVCR_DLL],
275 [
276 AC_ARG_WITH(msvcr-dll, [AS_HELP_STRING([--with-msvcr-dll],
277 [copy this msvcr100.dll into the built JDK (Windows only) @<:@probed@:>@])])
278
279 if test "x$with_msvcr_dll" != x; then
280 # If given explicitely by user, do not probe. If not present, fail directly.
281 TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$with_msvcr_dll], [--with-msvcr-dll])
282 if test "x$MSVCR_DLL" = x; then
|