mirror of https://github.com/encounter/SDL.git
Fixed detecting Raspberry Pi 2/3 video support on Pi 4
This commit is contained in:
parent
4e5839a5f4
commit
5f1558ffe3
|
@ -1651,7 +1651,7 @@ Optional Features:
|
||||||
[default=yes]
|
[default=yes]
|
||||||
--enable-libdecor-shared
|
--enable-libdecor-shared
|
||||||
dynamically load libdecor [default=yes]
|
dynamically load libdecor [default=yes]
|
||||||
--enable-video-rpi use Raspberry Pi video driver [default=yes]
|
--enable-video-rpi use Raspberry Pi 2/3 video driver [default=yes]
|
||||||
--enable-video-x11 use X11 video driver [default=yes]
|
--enable-video-x11 use X11 video driver [default=yes]
|
||||||
--enable-x11-shared dynamically load X11 support [default=maybe]
|
--enable-x11-shared dynamically load X11 support [default=maybe]
|
||||||
--enable-video-x11-xcursor
|
--enable-video-x11-xcursor
|
||||||
|
@ -20220,18 +20220,21 @@ fi
|
||||||
# Add the Raspberry Pi compiler flags and libraries
|
# Add the Raspberry Pi compiler flags and libraries
|
||||||
CFLAGS="$CFLAGS $RPI_CFLAGS"; LIBS="$LIBS $RPI_LIBS"
|
CFLAGS="$CFLAGS $RPI_CFLAGS"; LIBS="$LIBS $RPI_LIBS"
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Raspberry Pi" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Raspberry Pi 2/3" >&5
|
||||||
$as_echo_n "checking for Raspberry Pi... " >&6; }
|
$as_echo_n "checking for Raspberry Pi 2/3... " >&6; }
|
||||||
have_video_rpi=no
|
have_video_rpi=no
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
|
|
||||||
#include <bcm_host.h>
|
#include <bcm_host.h>
|
||||||
|
#include <EGL/eglplatform.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
EGL_DISPMANX_WINDOW_T window;
|
||||||
|
|
||||||
bcm_host_init();
|
bcm_host_init();
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
|
@ -1674,7 +1674,7 @@ CheckNativeClient()
|
||||||
CheckRPI()
|
CheckRPI()
|
||||||
{
|
{
|
||||||
AC_ARG_ENABLE(video-rpi,
|
AC_ARG_ENABLE(video-rpi,
|
||||||
[AS_HELP_STRING([--enable-video-rpi], [use Raspberry Pi video driver [default=yes]])],
|
[AS_HELP_STRING([--enable-video-rpi], [use Raspberry Pi 2/3 video driver [default=yes]])],
|
||||||
, enable_video_rpi=yes)
|
, enable_video_rpi=yes)
|
||||||
if test x$enable_video = xyes -a x$enable_video_rpi = xyes; then
|
if test x$enable_video = xyes -a x$enable_video_rpi = xyes; then
|
||||||
PKG_CHECK_MODULES([RPI], [bcm_host brcmegl], video_rpi=yes, video_rpi=no)
|
PKG_CHECK_MODULES([RPI], [bcm_host brcmegl], video_rpi=yes, video_rpi=no)
|
||||||
|
@ -1695,11 +1695,14 @@ CheckRPI()
|
||||||
# Add the Raspberry Pi compiler flags and libraries
|
# Add the Raspberry Pi compiler flags and libraries
|
||||||
CFLAGS="$CFLAGS $RPI_CFLAGS"; LIBS="$LIBS $RPI_LIBS"
|
CFLAGS="$CFLAGS $RPI_CFLAGS"; LIBS="$LIBS $RPI_LIBS"
|
||||||
|
|
||||||
AC_MSG_CHECKING(for Raspberry Pi)
|
AC_MSG_CHECKING(for Raspberry Pi 2/3)
|
||||||
have_video_rpi=no
|
have_video_rpi=no
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||||
#include <bcm_host.h>
|
#include <bcm_host.h>
|
||||||
|
#include <EGL/eglplatform.h>
|
||||||
]], [[
|
]], [[
|
||||||
|
EGL_DISPMANX_WINDOW_T window;
|
||||||
|
|
||||||
bcm_host_init();
|
bcm_host_init();
|
||||||
]])], [have_video_rpi=yes],[])
|
]])], [have_video_rpi=yes],[])
|
||||||
AC_MSG_RESULT($have_video_rpi)
|
AC_MSG_RESULT($have_video_rpi)
|
||||||
|
|
Loading…
Reference in New Issue