[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch] Fix SDL2 detection on some platforms
From: |
Sijmen J. Mulder |
Subject: |
[patch] Fix SDL2 detection on some platforms |
Date: |
Mon, 05 Feb 2024 23:56:02 +0100 |
There's a small portability issue in configure.ac, which uses test(1) to
check the SDL version. On platforms where test does not support the '=='
syntax, SDL 1 is incorrectly assumed.
Example:
$ uname -sr
NetBSD 10.0_RC3
$ test x = x || echo fail
$ test x == x || echo fail
$ sh -c 'test x = x' || echo fail
$ sh -c 'test x == x' || echo fail
test: ==: unexpected operator
fail
Sijmen J. Mulder
--- configure.ac.orig 2024-02-04 22:00:47.864879289 +0000
+++ configure.ac
@@ -1219,7 +1219,7 @@ if test x$fim_handle_sdl != xno; then
LIBS="$LIBS `$LIBSDL_CONFIG $LIBSDL_CONFIG_FLAGS`"
# finish this !
#FIM_LIB_OBJECTS="$FIM_LIB_OBJECTS SDLDevice.o"
- if test x`$LIBSDL_CONFIG --version | head -c 1` == x2; then
+ if test x`$LIBSDL_CONFIG --version | head -c 1` = x2; then
AC_DEFINE(FIM_WITH_LIBSDL, 2, [Defined if libsdl
support is enabled, and set to 1 or 2.])
else
AC_DEFINE(FIM_WITH_LIBSDL, 1, [Defined if libsdl
support is enabled, and set to 1 or 2.])
signature.asc
Description: This is a digitally signed message part.
- [patch] Fix SDL2 detection on some platforms,
Sijmen J. Mulder <=