101 lines
3.1 KiB
Diff
101 lines
3.1 KiB
Diff
From 94c1308880c9bed9f7ddecf930e8f1e771a9f552 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
|
|
Date: Wed, 8 Dec 2021 23:34:23 +0100
|
|
Subject: [PATCH] use pkgconfig to find sdl2
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Upstream-Status: Inappropriate [oe specific]
|
|
|
|
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
|
|
---
|
|
acinclude.m4 | 63 ++++------------------------------------------------
|
|
1 file changed, 4 insertions(+), 59 deletions(-)
|
|
|
|
diff --git a/acinclude.m4 b/acinclude.m4
|
|
index faf376e2c..23f260630 100644
|
|
--- a/acinclude.m4
|
|
+++ b/acinclude.m4
|
|
@@ -12,37 +12,9 @@ AC_ARG_ENABLE(sdl2, [ --enable-sdl2 Enable SDL 2.x],
|
|
|
|
AH_TEMPLATE(C_SDL2,[Set to 1 to enable SDL 2.x support])
|
|
|
|
- SDL2_CONFIG=no
|
|
if test x$enable_sdl2enable = xyes ; then
|
|
- if test x$sdl2_exec_prefix != x ; then
|
|
- sdl2_args="$sdl2_args --exec-prefix=$sdl2_exec_prefix"
|
|
- if test x${SDL2_CONFIG+set} != xset ; then
|
|
- SDL2_CONFIG=$sdl2_exec_prefix/bin/sdl2-config
|
|
- fi
|
|
- fi
|
|
- if test x$sdl2_prefix != x ; then
|
|
- sdl2_args="$sdl2_args --prefix=$sdl2_prefix"
|
|
- if test x${SDL2_CONFIG+set} != xset ; then
|
|
- SDL2_CONFIG=$sdl2_prefix/bin/sdl2-config
|
|
- fi
|
|
- fi
|
|
-
|
|
- if test -x vs/sdl2/linux-host/bin/sdl2-config ; then
|
|
- SDL2_CONFIG=vs/sdl2/linux-host/bin/sdl2-config
|
|
- PATH=vs/sdl2/linux-host/bin:$PATH
|
|
- fi
|
|
-
|
|
- AC_PATH_PROG(SDL2_CONFIG, sdl2-config, no)
|
|
- min_sdl2_version=ifelse([$1], ,0.11.0,$1)
|
|
- AC_MSG_CHECKING(for SDL2 - version >= $min_sdl2_version)
|
|
- no_sdl2=""
|
|
- if test "$SDL2_CONFIG" = "no" ; then
|
|
- no_sdl2=yes
|
|
- else
|
|
- SDL2_CFLAGS=`$SDL2_CONFIG $sdl2conf_args --cflags`
|
|
- SDL2_LIBS=`$SDL2_CONFIG $sdl2conf_args --libs`
|
|
- AC_DEFINE(C_SDL2,1)
|
|
- fi
|
|
+ AC_DEFINE(C_SDL2,1)
|
|
+ PKG_CHECK_MODULES([SDL2], [sdl2])
|
|
fi
|
|
|
|
AC_SUBST(SDL2_CFLAGS)
|
|
@@ -69,35 +41,8 @@ AC_ARG_ENABLE(sdl, [ --enable-sdl Enable SDL 1.x],
|
|
|
|
SDL_CONFIG=no
|
|
if test x$enable_sdlenable = xyes ; then
|
|
- if test x$sdl_exec_prefix != x ; then
|
|
- sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
|
|
- if test x${SDL_CONFIG+set} != xset ; then
|
|
- SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
|
|
- fi
|
|
- fi
|
|
- if test x$sdl_prefix != x ; then
|
|
- sdl_args="$sdl_args --prefix=$sdl_prefix"
|
|
- if test x${SDL_CONFIG+set} != xset ; then
|
|
- SDL_CONFIG=$sdl_prefix/bin/sdl-config
|
|
- fi
|
|
- fi
|
|
-
|
|
- if test -x vs/sdl/linux-host/bin/sdl-config ; then
|
|
- SDL_CONFIG=vs/sdl/linux-host/bin/sdl-config
|
|
- PATH=vs/sdl/linux-host/bin:$PATH
|
|
- fi
|
|
-
|
|
- AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
|
|
- min_sdl_version=ifelse([$1], ,0.11.0,$1)
|
|
- AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
|
|
- no_sdl=""
|
|
- if test "$SDL_CONFIG" = "no" ; then
|
|
- no_sdl=yes
|
|
- else
|
|
- SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
|
|
- SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
|
|
- AC_DEFINE(C_SDL1,1)
|
|
- fi
|
|
+ AC_DEFINE(C_SDL1,1)
|
|
+ PKG_CHECK_MODULES([SDL], [sdl])
|
|
fi
|
|
|
|
AC_SUBST(SDL_CFLAGS)
|
|
--
|
|
2.31.1
|
|
|