462 WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH" |
462 WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH" |
463 test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/` |
463 test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/` |
464 if test "x$test_cygdrive_prefix" = x; then |
464 if test "x$test_cygdrive_prefix" = x; then |
465 AC_MSG_ERROR([Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c.]) |
465 AC_MSG_ERROR([Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c.]) |
466 fi |
466 fi |
467 EXECUTABLE_SUFFIX="" |
|
468 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then |
467 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then |
469 AC_MSG_CHECKING([msys release]) |
468 AC_MSG_CHECKING([msys release]) |
470 MSYS_VERSION=`$UNAME -r` |
469 MSYS_VERSION=`$UNAME -r` |
471 AC_MSG_RESULT([$MSYS_VERSION]) |
470 AC_MSG_RESULT([$MSYS_VERSION]) |
472 |
471 |
477 # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away |
476 # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away |
478 MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"` |
477 MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"` |
479 BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(MSYS_ROOT_PATH) |
478 BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(MSYS_ROOT_PATH) |
480 AC_MSG_RESULT([$MSYS_ROOT_PATH]) |
479 AC_MSG_RESULT([$MSYS_ROOT_PATH]) |
481 WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH" |
480 WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH" |
482 EXECUTABLE_SUFFIX="" |
|
483 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then |
481 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then |
484 EXECUTABLE_SUFFIX=".exe" |
482 AC_MSG_CHECKING([Windows version]) |
|
483 # m4 replaces [ and ] so we use @<:@ and @:>@ instead |
|
484 WINDOWS_VERSION=`$CMD /c ver.exe | $EGREP -o '(@<:@0-9@:>@+\.)+@<:@0-9@:>@+'` |
|
485 AC_MSG_RESULT([$WINDOWS_VERSION]) |
|
486 |
|
487 AC_MSG_CHECKING([WSL kernel version]) |
|
488 WSL_KERNEL_VERSION=`$UNAME -v` |
|
489 AC_MSG_RESULT([$WSL_KERNEL_VERSION]) |
|
490 |
|
491 AC_MSG_CHECKING([WSL kernel release]) |
|
492 WSL_KERNEL_RELEASE=`$UNAME -r` |
|
493 AC_MSG_RESULT([$WSL_KERNEL_RELEASE]) |
|
494 |
|
495 AC_MSG_CHECKING([WSL distribution]) |
|
496 WSL_DISTRIBUTION=`$LSB_RELEASE -d | sed 's/Description:\t//'` |
|
497 AC_MSG_RESULT([$WSL_DISTRIBUTION]) |
|
498 |
|
499 WINDOWS_ENV_VENDOR='WSL' |
|
500 WINDOWS_ENV_VERSION="$WSL_DISTRIBUTION $WSL_KERNEL_VERSION $WSL_KERNEL_RELEASE (on Windows build $WINDOWS_VERSION)" |
485 else |
501 else |
486 AC_MSG_ERROR([Unknown Windows environment. Neither cygwin, msys, nor wsl was detected.]) |
502 AC_MSG_ERROR([Unknown Windows environment. Neither cygwin, msys, nor wsl was detected.]) |
487 fi |
503 fi |
488 |
504 |
489 # Test if windows or unix (cygwin/msys) find is first in path. |
505 # Test if windows or unix (cygwin/msys) find is first in path. |