# HG changeset patch # User Sam Lantinga # Date 1255164366 0 # Node ID d62725f761a1572ad83cbd60832755a4d82f156a # Parent 5b31c369820b96cca93dc23f2dd0bb537143e098 Debian patch: 020_libcaca_new_api.diff diff -r 5b31c369820b -r d62725f761a1 configure.in --- a/configure.in Sat Oct 10 08:11:36 2009 +0000 +++ b/configure.in Sat Oct 10 08:46:06 2009 +0000 @@ -1518,6 +1518,38 @@ 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 + ],[ + ],[ + 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 @@ CheckVGL CheckWscons CheckAAlib + CheckCaca CheckQtopia CheckPicoGUI CheckOpenGLX11 diff -r 5b31c369820b -r d62725f761a1 include/SDL_config.h.in --- a/include/SDL_config.h.in Sat Oct 10 08:11:36 2009 +0000 +++ b/include/SDL_config.h.in Sat Oct 10 08:46:06 2009 +0000 @@ -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 diff -r 5b31c369820b -r d62725f761a1 src/video/SDL_sysvideo.h --- a/src/video/SDL_sysvideo.h Sat Oct 10 08:11:36 2009 +0000 +++ b/src/video/SDL_sysvideo.h Sat Oct 10 08:46:06 2009 +0000 @@ -407,6 +407,9 @@ #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 diff -r 5b31c369820b -r d62725f761a1 src/video/SDL_video.c --- a/src/video/SDL_video.c Sat Oct 10 08:11:36 2009 +0000 +++ b/src/video/SDL_video.c Sat Oct 10 08:46:06 2009 +0000 @@ -123,6 +123,9 @@ #if SDL_VIDEO_DRIVER_AALIB &AALIB_bootstrap, #endif +#if SDL_VIDEO_DRIVER_CACA + &CACA_bootstrap, +#endif #if SDL_VIDEO_DRIVER_DUMMY &DUMMY_bootstrap, #endif