[vlc-devel] [3.0 PATCH v2 18/20] configure: Make the new value of _WIN32_WINNT available to configure tests
Martin Storsjö
martin at martin.st
Thu Apr 2 16:30:19 CEST 2020
On Thu, 2 Apr 2020, Steve Lhomme wrote:
> From: Martin Storsjö <martin at martin.st>
>
> Definitions from AH_TOP aren't included in the configure checks.
>
> This was the original intent of e807c8e91.
>
> This makes sure configure checks and actual compilation are run
> with the same version defined.
>
> EDIT: adapted to the default for 3.0 (0x502 or XP SP2)
>
> (cherry picked from commit 0a27328b5ac2bc0e417c70f048131f783b201d04)
> ---
> configure.ac | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index c60fd78e116..6b9325a5266 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -218,9 +218,14 @@ case "${host_os}" in
> CXXFLAGS="${CXXFLAGS} -static-libgcc"
> AC_CHECK_TOOL(WINDRES, windres, :)
> AC_CHECK_TOOL(OBJCOPY, objcopy, :)
> - AH_TOP([#if defined(_WIN32) && !defined(_WIN32_WINNT)])
> - AH_TOP([# define _WIN32_WINNT 0x0502 /* Windows XP SP2 */])
> - AH_TOP([#endif])
> + AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
> + [[#ifdef _WIN32_WINNT
> + # error _WIN32_WINNT already defined
> + #endif
> + ]],[[;]])
> + ],[
> + AC_DEFINE([_WIN32_WINNT], 0x0502, [Define to '0x0502' for Windows XP SP2.])
> + ])
Most of these patches look great - but don't you need a number of more
patches as well (e.g. for fixing building contrib/qt?). I have a ready
patchset for backporting qt patches to make Qt 5.6 work with the very
latest llvm-mingw - I can provide those patches later today if it's of any
use.
For this patch, this ends up defining _WIN32_WINNT to 0x0502 on a
toolchain that otherwise would default to a higher value.
I can send a different variant of the patch.
// Martin
More information about the vlc-devel
mailing list