michael@0: dnl This Source Code Form is subject to the terms of the Mozilla Public michael@0: dnl License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: dnl file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: dnl Identify which version of the SDK we're building with michael@0: dnl Windows Server 2008 and newer SDKs have WinSDKVer.h, get the version michael@0: dnl from there michael@0: AC_DEFUN([MOZ_FIND_WINSDK_VERSION], [ michael@0: MOZ_CHECK_HEADERS([winsdkver.h]) michael@0: if test "$ac_cv_header_winsdkver_h" = "yes"; then michael@0: dnl Get the highest _WIN32_WINNT and NTDDI versions supported michael@0: dnl Take the higher of the two michael@0: dnl This is done because the Windows 7 beta SDK reports its michael@0: dnl NTDDI_MAXVER to be 0x06000100 instead of 0x06010000, as it should michael@0: AC_CACHE_CHECK(for highest Windows version supported by this SDK, michael@0: ac_cv_winsdk_maxver, michael@0: [cat > conftest.h < michael@0: #include michael@0: michael@0: #if (NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT_MAXVER) > NTDDI_MAXVER) michael@0: #define WINSDK_MAXVER NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT_MAXVER) michael@0: #else michael@0: #define WINSDK_MAXVER NTDDI_MAXVER michael@0: #endif michael@0: michael@0: WINSDK_MAXVER michael@0: EOF michael@0: ac_cv_winsdk_maxver=`$CPP conftest.h 2>/dev/null | tail -n1` michael@0: rm -f conftest.h michael@0: ]) michael@0: MOZ_WINSDK_MAXVER=${ac_cv_winsdk_maxver} michael@0: else michael@0: dnl Any SDK which doesn't have WinSDKVer.h is too old. michael@0: 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: fi michael@0: ])