From fa07c50559375edbb10e327c4df1ed101449a80d Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 4 Sep 2001 22:53:46 +0000 Subject: [PATCH] Added support for DirectFB video on Linux (thanks Denis!) --- configure.in | 42 ++ docs.html | 1 + src/video/Makefile.am | 2 +- src/video/SDL_sysvideo.h | 3 + src/video/SDL_video.c | 3 + src/video/directfb/.cvsignore | 6 + src/video/directfb/Makefile.am | 15 + src/video/directfb/SDL_DirectFB_events.c | 222 +++++++ src/video/directfb/SDL_DirectFB_events.h | 33 + src/video/directfb/SDL_DirectFB_keys.h | 135 ++++ src/video/directfb/SDL_DirectFB_video.c | 746 +++++++++++++++++++++++ src/video/directfb/SDL_DirectFB_video.h | 55 ++ 12 files changed, 1262 insertions(+), 1 deletion(-) create mode 100644 src/video/directfb/.cvsignore create mode 100644 src/video/directfb/Makefile.am create mode 100644 src/video/directfb/SDL_DirectFB_events.c create mode 100644 src/video/directfb/SDL_DirectFB_events.h create mode 100644 src/video/directfb/SDL_DirectFB_keys.h create mode 100644 src/video/directfb/SDL_DirectFB_video.c create mode 100644 src/video/directfb/SDL_DirectFB_video.h diff --git a/configure.in b/configure.in index e552a2175..761a96c94 100644 --- a/configure.in +++ b/configure.in @@ -695,6 +695,46 @@ CheckFBCON() fi } +dnl Find DirectFB +CheckDirectFB() +{ + AC_ARG_ENABLE(video-directfb, +[ --enable-video-directfb use DirectFB video driver [default=yes]], + , enable_video_directfb=yes) + if test x$enable_video = xyes -a x$enable_video_directfb = xyes; then + video_directfb=no + + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + if test x$PKG_CONFIG = xno ; then + AC_MSG_WARN([*** pkg-config is required to build the DirectFB video driver.]) + else + AC_MSG_CHECKING(for DirectFB support) + + if ! pkg-config --atleast-pkgconfig-version 0.5 ; then + AC_MSG_ERROR([*** pkg-config too old; version 0.5 or better required.]) + fi + + DIRECTFB_REQUIRED_VERSION=0.9.5 + + if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb ; then + DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb` + DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb` + video_directfb=yes + fi + fi + + AC_MSG_RESULT($video_directfb) + if test x$video_directfb = xyes; then + CFLAGS="$CFLAGS -DENABLE_DIRECTFB" + VIDEO_SUBDIRS="$VIDEO_SUBDIRS directfb" + VIDEO_DRIVERS="$VIDEO_DRIVERS directfb/libvideo_directfb.la" + + AC_SUBST(DIRECTFB_CFLAGS) + AC_SUBST(DIRECTFB_LIBS) + fi + fi +} + dnl See if we're running on PlayStation 2 hardware CheckPS2GS() { @@ -1219,6 +1259,7 @@ case "$target" in CheckNANOX CheckDGA CheckFBCON + CheckDirectFB CheckPS2GS CheckGGI CheckSVGA @@ -2174,6 +2215,7 @@ src/video/x11/Makefile src/video/dga/Makefile src/video/nanox/Makefile src/video/fbcon/Makefile +src/video/directfb/Makefile src/video/ps2gs/Makefile src/video/ggi/Makefile src/video/maccommon/Makefile diff --git a/docs.html b/docs.html index 3e01f99a2..7fbc6db50 100644 --- a/docs.html +++ b/docs.html @@ -16,6 +16,7 @@

Major changes since SDL 1.0.0: