Commit Graph

30 Commits

Author SHA1 Message Date
Steve Lhomme cedea4d018 configure: don't the check presence of stricmp
_stricmp a Windows thing that is present in all the CRT, even in UCRT.
The stricmp() deprecated variant doesn't seem to exist elsewhere.

In some configuration it's not possible to link with stricmp() even though
_stricmp() is available.
2023-02-28 10:10:27 +00:00
Pierre Lamot f8cd81e4f5 meson: fix dcomp.h detection
dcomp.h is not a valid C header
2023-02-28 09:39:43 +00:00
Steve Lhomme 8c46cfc25b meson: define X_DISPLAY_MISSING once
disabler() also supports found() and will return false.
2023-02-10 06:30:25 +00:00
Alexandre Janniaux df17310398 meson.build: set macosx option on OSX only 2023-02-06 21:14:23 +00:00
Steve Lhomme 42d230befa configure: don't define _POSIX_C_SOURCE for mingw-w64
It forces __USE_MINGW_ANSI_STDIO, M_PI and some functions we already have
done better in compat.
2023-01-31 09:11:53 +00:00
Steve Lhomme a7b55fa70f configure: don't define _POSIX_SOURCE for mingw-w64
It forces __USE_MINGW_ANSI_STDIO, M_PI and some functions we already have
done better in compat.
2023-01-31 09:11:53 +00:00
Steve Lhomme dddae21848 configure: detect asprintf/vasprintf the standard way
The mingw-w64 variant is equivalent to ours. No need to do a special case.
These are GNU functions, not C11 or POSIX functions.
2023-01-31 09:11:53 +00:00
Steve Lhomme 6b1f7dc265 meson: add stack protection option 2023-01-31 08:53:16 +00:00
Johannes Kauffmann 33fdb81100 meson: check for -Wl,-Bsymbolic 2023-01-30 07:11:43 +00:00
Steve Lhomme 8ef232fc81 meson: only enable __USE_MINGW_ANSI_STDIO for non-UCRT builds
Similar to configure.ac
2023-01-29 16:26:06 +00:00
Steve Lhomme a98a501df0 meson: fix PROCESS_MITIGATION_IMAGE_LOAD_POLICY check 2023-01-26 11:23:56 +00:00
Johannes Kauffmann 8b90010a5d meson: force -fno-strict-aliasing for C++ modules
Following 7a776a79ff.

Mirroring configure.ac, this check is only done for MinGW, because it
doesn't make sense on MSVC.
2023-01-24 14:02:56 +00:00
Steve Lhomme d7a9bc2326 meson: remove _ISOCXX_SOURCE macros on Windows
With a proper C11 compiler we don't need this. Either they activate C11
things in the compiler which should be there anyway. Or in the SDK
which is __USE_MINGW_ANSI_STDIO for C99 and nothing else.
2023-01-23 07:27:12 +00:00
Steve Lhomme 7e388405f4 meson: remove unneeded windows defines
They are used to enable _USE_MATH_DEFINES or __USE_MINGW_ANSI_STDIO, which we
already define.
2023-01-23 07:27:12 +00:00
Steve Lhomme 6be0e8af6b configure: remove static_assert check
We require C11 support where it's mandatory. Plus we use it later to check
for some function support.
2023-01-20 08:31:24 +00:00
Steve Lhomme ea876bf896 configure: detect gmtime_r/localtime_r the standard way
The mingw-w64 variants doesn't set the errno, so use our compat version.
2023-01-20 07:17:07 +00:00
Steve Lhomme 5b398308b6 meson: add common compiler options similar to configure.ac
Co-authored-by: Marvin Scholz <epirat07@gmail.com>
2023-01-18 12:16:33 +00:00
Steve Lhomme 455b4ffbe0 meson: simplify choice of compiler flag to use 2023-01-18 12:16:33 +00:00
Johannes Kauffmann c91fac9b59 meson: fix dict key/value style
As per the style guide.
2023-01-15 09:26:33 +00:00
Johannes Kauffmann f242e3c7eb meson: fix named argument style
As per the style guide.
2023-01-15 09:26:33 +00:00
Johannes Kauffmann a01c567bff meson: add initial winstore support
This patch tries to replicate configure.ac (at the time of writing)
from line 407 - 438, except the strict aliasing check. Libraries such as
ole32 are linked by default by meson, so those have been omitted.
Another difference: the check has been moved out of the mingw check.

This is not meant to be functional just yet, but having the winstore
option gives a starting point for further support.
2023-01-14 14:03:40 +00:00
Steve Lhomme 79f063df81 configure: only use sdkddkver.h to test the default _WIN32_WINNT
It's supported on all mingw-w64 versions we support. We don't need the
whole windows.h for that.
2023-01-13 14:35:04 +00:00
Steve Lhomme 5b27a78738 meson: only set _WIN32_WINNT if it's not set in the environment
The same way it's done in configure.ac
2023-01-13 14:35:04 +00:00
Steve Lhomme 6424f5452e meson: enable error on missing function declaration
This is also enabled in configure.ac.
2023-01-11 07:57:22 +00:00
Steve Lhomme 90efc05040 meson: add specific folder for missing includes in the Windows SDK 2023-01-11 07:57:22 +00:00
Steve Lhomme 0a5f544457 meson: fix header used to test functions on Windows
The proper definitions are not found in unistd.h.
It works both for the Windows SDK and mingw-w64.
2023-01-10 14:32:06 +00:00
Steve Lhomme ae3e820453 meson: fix iphlpapi.h tests
windows.h needs to be included before otherwise some defines are missing
2023-01-10 14:32:06 +00:00
Steve Lhomme e28d3cb33c meson: remove duplicate checks 2023-01-10 14:32:06 +00:00
Steve Lhomme e030e04e5d meson: define missing ssize_t and SSIZE_MAX from ptrdiff_t
ptrdiff_t is available in C11
2023-01-07 20:39:45 +00:00
Marvin Scholz d5f07af209 meson: add initial meson build system
Co-authored-by: Tanguy Dubroca <tanguy.dubroca@lse.epita.fr>
Co-authored-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
Co-authored-by: Alexandre Janniaux <ajanni@videolabs.io>
2023-01-04 14:48:39 +00:00