build/autoconf/winsdk.m4

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 dnl This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 dnl License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 4
michael@0 5 dnl Identify which version of the SDK we're building with
michael@0 6 dnl Windows Server 2008 and newer SDKs have WinSDKVer.h, get the version
michael@0 7 dnl from there
michael@0 8 AC_DEFUN([MOZ_FIND_WINSDK_VERSION], [
michael@0 9 MOZ_CHECK_HEADERS([winsdkver.h])
michael@0 10 if test "$ac_cv_header_winsdkver_h" = "yes"; then
michael@0 11 dnl Get the highest _WIN32_WINNT and NTDDI versions supported
michael@0 12 dnl Take the higher of the two
michael@0 13 dnl This is done because the Windows 7 beta SDK reports its
michael@0 14 dnl NTDDI_MAXVER to be 0x06000100 instead of 0x06010000, as it should
michael@0 15 AC_CACHE_CHECK(for highest Windows version supported by this SDK,
michael@0 16 ac_cv_winsdk_maxver,
michael@0 17 [cat > conftest.h <<EOF
michael@0 18 #include <winsdkver.h>
michael@0 19 #include <sdkddkver.h>
michael@0 20
michael@0 21 #if (NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT_MAXVER) > NTDDI_MAXVER)
michael@0 22 #define WINSDK_MAXVER NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT_MAXVER)
michael@0 23 #else
michael@0 24 #define WINSDK_MAXVER NTDDI_MAXVER
michael@0 25 #endif
michael@0 26
michael@0 27 WINSDK_MAXVER
michael@0 28 EOF
michael@0 29 ac_cv_winsdk_maxver=`$CPP conftest.h 2>/dev/null | tail -n1`
michael@0 30 rm -f conftest.h
michael@0 31 ])
michael@0 32 MOZ_WINSDK_MAXVER=${ac_cv_winsdk_maxver}
michael@0 33 else
michael@0 34 dnl Any SDK which doesn't have WinSDKVer.h is too old.
michael@0 35 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.])
michael@0 36 fi
michael@0 37 ])

mercurial