From d567e570a206ee8670b78b4567344177b97d2517 Mon Sep 17 00:00:00 2001 From: Georg Koppen Date: Wed, 1 Feb 2017 19:25:39 +0000 Subject: [PATCH] Backport of tjr's patch for bug 1314979 --- build/moz.configure/toolchain.configure | 6 +++++- moz.configure | 6 ++++-- old-configure.in | 12 +++++++++++- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure index 8b2416152bd3d..288bf483a1519 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 976cbd014e7b6..d725bbac408e3 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.01.exe', diff --git a/old-configure.in b/old-configure.in index 9c39e9a53cfd9..0a0ba44657004 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 -- GitLab