Clang 15 makes implicit function declarations fatal by default which
leads to some configure tests silently failing/returning
the wrong result.
Signed-off-by: Sam James <sam@gentoo.org>
Refactor the previous sandbox check in a standalone function that also
includes Snap support.
Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
find_lib() uses sort -V, which is a GNU extension. Users of non-GNU
operating systems should either install GNU coreutils (assumed to
provide a gsort executable), or use the CMake build system.
Resolves: https://github.com/libsdl-org/SDL/issues/6106
Signed-off-by: Simon McVittie <smcv@collabora.com>
This reverts commit 8553632827.
An issue with choosing the shortest one, is that it will prefer development libraries: libfoo.so is shorter then libfoo.so.0.6.
SDL makes assumption that each dynamically loaded library must have
SONAME matching pattern <libname>.so.<digit>+ hence it discards any file
that has two (or more) digits after ".so". in practice however SONAME
might be in the form of ie <libname>.so.<major>.<minor>.
as a solution keep requirement for dynamically loaded files to be named
<libname>.so.* but consider all the possibilities and prefer the shortest
one.
On filesystems with large inode numbers, such as overlayfs, attempting
to stat() a file on a 32-bit system using legacy syscalls can fail
with EOVERFLOW. If we opt-in to more modern "large file support"
syscalls, then source code references to functions like stat() are
transparently replaced with ABIs that support large file sizes and
inode numbers, such as stat64().
This cannot safely be done globally by Linux distributions, because
some libraries expose types like `off_t` or `struct stat` in their
ABI, meaning that enabling large file support would be an incompatible
change that would cause crashes. However, SDL appears to be careful to
avoid these types in header files, so it should be OK to enable this.
Signed-off-by: Simon McVittie <smcv@collabora.com>
The use of square brackets for a character set collides with the use
of square brackets for m4 quote characters, so use the other quoting
mechanism that Autoconf provides, by escaping `[` as `@<:@` and so on.
Signed-off-by: Simon McVittie <smcv@collabora.com>
If we're strict about applying something resembling semantic versioning
to the "marketing" version number, then we can mechanically generate
the ABI version from it.
This limits the range of valid micro versions (patchlevels) to 0-99.
Signed-off-by: Simon McVittie <smcv@collabora.com>
For stable releases, this gives us the ability to make bugfix-only point
releases such as 2.24.1 if we want to, and distinguish between them
programmatically. For example, this ability could have been useful after
2.0.16 to fix Xwayland regressions, and after 2.0.18 to fix event loop
regressions.
For development releases, this gives us the ability to make multiple
prereleases during the same feature cycle, and distinguish between them
programmatically. For example, this would have been useful during 2.0.22
development, which went through three prereleases before reaching the
final release.
Signed-off-by: Simon McVittie <smcv@collabora.com>