Bug 1114577 - Miscellaneous build system cleanups now that Windows SDK 8.1 is the minimum supported version. r=glandium
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 07 Jan 2015 11:32:07 -0500
changeset 222452 6399ee520bcca0eb10b633de307ea11c0efb8b58
parent 222451 84708ff7c9fe0be4c9feaf412d987527aef65663
child 222453 42272b7f8e4810be997951082901d27eb7e69b71
push id53620
push userryanvm@gmail.com
push dateWed, 07 Jan 2015 16:32:42 +0000
treeherdermozilla-inbound@6399ee520bcc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1114577
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1114577 - Miscellaneous build system cleanups now that Windows SDK 8.1 is the minimum supported version. r=glandium
build/autoconf/winsdk.m4
configure.in
--- a/build/autoconf/winsdk.m4
+++ b/build/autoconf/winsdk.m4
@@ -1,37 +1,22 @@
 dnl This Source Code Form is subject to the terms of the Mozilla Public
 dnl License, v. 2.0. If a copy of the MPL was not distributed with this
 dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 dnl Identify which version of the SDK we're building with
 dnl Windows Server 2008 and newer SDKs have WinSDKVer.h, get the version
 dnl from there
 AC_DEFUN([MOZ_FIND_WINSDK_VERSION], [
-  MOZ_CHECK_HEADERS([winsdkver.h])
-  if test "$ac_cv_header_winsdkver_h" = "yes"; then
-      dnl Get the highest _WIN32_WINNT and NTDDI versions supported
-      dnl Take the higher of the two
-      dnl This is done because the Windows 7 beta SDK reports its
-      dnl NTDDI_MAXVER to be 0x06000100 instead of 0x06010000, as it should
-      AC_CACHE_CHECK(for highest Windows version supported by this SDK,
-                     ac_cv_winsdk_maxver,
-                     [cat > conftest.h <<EOF
+  AC_CACHE_CHECK(for highest Windows version supported by this SDK,
+                 ac_cv_winsdk_maxver,
+                 [cat > conftest.h <<EOF
 #include <winsdkver.h>
-#include <sdkddkver.h>
 
-#if (NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT_MAXVER) > NTDDI_MAXVER)
-#define WINSDK_MAXVER NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT_MAXVER)
-#else
-#define WINSDK_MAXVER NTDDI_MAXVER
-#endif
-
-WINSDK_MAXVER
+WINVER_MAXVER
 EOF
                       ac_cv_winsdk_maxver=`$CPP conftest.h 2>/dev/null | tail -n1`
                       rm -f conftest.h
                      ])
-      MOZ_WINSDK_MAXVER=${ac_cv_winsdk_maxver}
-  else
-      dnl Any SDK which doesn't have WinSDKVer.h is too old.
-      AC_MSG_ERROR([Your SDK does not have WinSDKVer.h. It is probably too old. Please upgrade to a newer SDK or try running the Windows SDK Configuration Tool and selecting a newer SDK. See https://developer.mozilla.org/En/Windows_SDK_versions for more details on fixing this.])
-  fi
+      dnl WinSDKVer.h returns the version number in 4-digit format while many
+      dnl consumers expect 8. Therefore, pad the result with an extra 4 zeroes.
+      MOZ_WINSDK_MAXVER=${ac_cv_winsdk_maxver}0000
 ])
--- a/configure.in
+++ b/configure.in
@@ -6020,25 +6020,16 @@ MOZ_ARG_DISABLE_BOOL(gamepad,
     MOZ_GAMEPAD=1)
 
 if test "$MOZ_GAMEPAD"; then
     case "$OS_TARGET" in
     Darwin)
         MOZ_GAMEPAD_BACKEND=cocoa
         ;;
     WINNT)
-        case "$MOZ_WINSDK_MAXVER" in
-        # We support building with the Windows 7 SDK otherwise, but
-        # Gamepad support requires the Windows 8 SDK for some HID headers.
-        0x0601*)
-          AC_MSG_ERROR([The Windows 8 SDK or newer is required to build Gamepad support. Please install a newer Windows SDK or reconfigure with --disable-gamepad to disable gamepad support.])
-          ;;
-        *)
-          ;;
-        esac
         MOZ_GAMEPAD_BACKEND=windows
         ;;
     Linux)
         MOZ_CHECK_HEADER([linux/joystick.h])
         if test "$ac_cv_header_linux_joystick_h" != "yes"; then
           AC_MSG_ERROR([Can't find header linux/joystick.h, needed for gamepad support. Please install Linux kernel headers or reconfigure with --disable-gamepad to disable gamepad support.])
         fi
         MOZ_GAMEPAD_BACKEND=linux