Skip to content

Commit 1c7a16a

Browse files
authored
Merge pull request #4063 from cmitu/dosbox-sdl2-ftbs1
dosbox-sdl2: fix build with SDL 2.x
2 parents 6a0272d + 5203dd8 commit 1c7a16a

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

scriptmodules/emulators/dosbox-sdl2.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ function sources_dosbox-sdl2() {
2727
# use custom config filename & path to allow coexistence with regular dosbox
2828
sed -i "src/misc/cross.cpp" -e 's/~\/.dosbox/~\/.'$md_id'/g' \
2929
-e 's/DEFAULT_CONFIG_FILE "dosbox-"/DEFAULT_CONFIG_FILE "'$md_id'-"/g'
30+
# patch the SDL2 detection to remove the strict 2.0.x version check
31+
applyPatch "$md_data/001-sd2.0-check-remove.diff"
3032
}
3133

3234
function build_dosbox-sdl2() {
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
diff --git a/configure.ac b/configure.ac
2+
index 407d553..731d960 100644
3+
--- a/configure.ac
4+
+++ b/configure.ac
5+
@@ -31,20 +31,6 @@ EXULT_CHECK_SDL(:,AC_MSG_ERROR([[*** SDL not found!]]))
6+
LIBS="$LIBS $SDL_LIBS"
7+
CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"
8+
9+
-dnl Check if SDL is 2.0.x
10+
-AC_MSG_CHECKING([for SDL version being 2.0.x])
11+
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
12+
-#include "SDL.h"
13+
-void blah(){
14+
-#if !((SDL_MAJOR_VERSION == 2) && (SDL_MINOR_VERSION == 0))
15+
-#error "Only SDL 2.0 supported"
16+
-#endif
17+
-;
18+
-}
19+
-])],AC_MSG_RESULT([yes]),[
20+
- AC_MSG_RESULT([no])
21+
- AC_MSG_ERROR([Only libSDL 2.0.x supported])])
22+
-
23+
dnl Checks for header files.
24+
25+
dnl Checks for typedefs, structures, and compiler characteristics.

0 commit comments

Comments
 (0)