diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure index 8b2416152bd3..288bf483a151 100644 --- a/build/moz.configure/toolchain.configure +++ b/build/moz.configure/toolchain.configure @@ -906,5 +906,9 @@ set_define('HAVE_VISIBILITY_ATTRIBUTE', set_config('WRAP_SYSTEM_INCLUDES', wrap_system_includes) set_config('VISIBILITY_FLAGS', visibility_flags) -include('windows.configure') +@depends(target, c_compiler) +def is_windows(target, compiler): + return target.kernel == 'WINNT' and compiler.type in ['msvc', 'clang-cl'] + +include('windows.configure', when=is_windows) include('rust.configure') diff --git a/moz.configure b/moz.configure index ec90697f5d76..8457d48ebb2e 100644 --- a/moz.configure +++ b/moz.configure @@ -278,11 +278,13 @@ system_hunspell = pkg_check_modules('MOZ_HUNSPELL', 'hunspell', set_config('MOZ_SYSTEM_HUNSPELL', depends_if(system_hunspell)(lambda _: True)) -@depends(target) +@depends(target, c_compiler) @imports('os') -def makensis_progs(target): +def makensis_progs(target, compiler): if target.kernel != 'WINNT': return + elif target.kernel == 'WINNT' and compiler.type not in ['msvc', 'clang-cl']: + return candidates = [ 'makensis-3.0b3.exe', diff --git a/old-configure.in b/old-configure.in index 11a7d5827b39..abf8323889b9 100644 --- a/old-configure.in +++ b/old-configure.in @@ -3384,7 +3384,17 @@ if test -n "$MOZ_ANGLE_RENDERER"; then AC_MSG_RESULT([Windows SDK not found.]) fi else - AC_MSG_ERROR([Couldn't find Windows SDK 8.1 or higher needed for ANGLE.]) + if test "$target" != "$host"; then + case "$target" in + *-mingw*) + AC_MSG_RESULT([Windows SDK not needed for ANGLE in MinGW build.]) + ;; + *) + AC_MSG_ERROR([Couldn't find Windows SDK 8.1 or higher needed for ANGLE.]) + esac + else + AC_MSG_ERROR([Couldn't find Windows SDK 8.1 or higher needed for ANGLE.]) + fi fi if test -z "$MOZ_D3DCOMPILER_VISTA_DLL_PATH"; then