Skip to content
Permalink
Browse files

Debian patch: 020_libcaca_new_api.diff

  • Loading branch information
slouken committed Oct 10, 2009
1 parent 7a043b4 commit b9de3ca54ed72883a959672e7901c246369ed978
Showing with 40 additions and 0 deletions.
  1. +33 −0 configure.in
  2. +1 −0 include/SDL_config.h.in
  3. +3 −0 src/video/SDL_sysvideo.h
  4. +3 −0 src/video/SDL_video.c
@@ -1518,6 +1518,38 @@ AC_HELP_STRING([--enable-video-aalib], [use AAlib video driver [[default=no]]]),
fi
}

dnl Find the libcaca includes
CheckCaca()
{
AC_ARG_ENABLE(video-caca,
AC_HELP_STRING([--enable-video-caca], [use libcaca video driver [[default=no]]]),
, enable_video_caca=no)
if test x$enable_video = xyes -a x$enable_video_caca = xyes; then
video_caca=no
AC_PATH_PROG(CACACONFIG, caca-config, no)
if test x$CACACONFIG != xno; then
AC_MSG_CHECKING(for libcaca support)
CACA_CFLAGS=`$CACACONFIG --cflags`
CACA_LDFLAGS=`$CACACONFIG --libs`
save_CFLAGS="$CFLAGS"
AC_TRY_COMPILE([
#include <caca.h>
],[
],[
video_caca=yes
])
CFLAGS="$save_CFLAGS"
AC_MSG_RESULT($video_caca)
if test x$video_caca = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_CACA)
EXTRA_CFLAGS="$EXTRA_CFLAGS $CACA_CFLAGS"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $CACA_LDFLAGS"
SOURCES="$SOURCES $srcdir/src/video/caca/*.c"
fi
fi
fi
}

dnl Set up the QTopia video driver if enabled
CheckQtopia()
{
@@ -2347,6 +2379,7 @@ case "$host" in
CheckVGL
CheckWscons
CheckAAlib
CheckCaca
CheckQtopia
CheckPicoGUI
CheckOpenGLX11
@@ -254,6 +254,7 @@
/* Enable various video drivers */
#undef SDL_VIDEO_DRIVER_AALIB
#undef SDL_VIDEO_DRIVER_BWINDOW
#undef SDL_VIDEO_DRIVER_CACA
#undef SDL_VIDEO_DRIVER_DC
#undef SDL_VIDEO_DRIVER_DDRAW
#undef SDL_VIDEO_DRIVER_DGA
@@ -407,6 +407,9 @@ extern VideoBootStrap OS2FSLib_bootstrap;
#if SDL_VIDEO_DRIVER_AALIB
extern VideoBootStrap AALIB_bootstrap;
#endif
#if SDL_VIDEO_DRIVER_CACA
extern VideoBootStrap CACA_bootstrap;
#endif
#if SDL_VIDEO_DRIVER_DUMMY
extern VideoBootStrap DUMMY_bootstrap;
#endif
@@ -123,6 +123,9 @@ static VideoBootStrap *bootstrap[] = {
#if SDL_VIDEO_DRIVER_AALIB
&AALIB_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_CACA
&CACA_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_DUMMY
&DUMMY_bootstrap,
#endif

0 comments on commit b9de3ca

Please sign in to comment.