Debian patch: 020_libcaca_new_api.diff SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Sat, 10 Oct 2009 08:46:06 +0000
branchSDL-1.2
changeset 4295d62725f761a1
parent 4294 5b31c369820b
child 4296 f9fb7284991d
Debian patch: 020_libcaca_new_api.diff
configure.in
include/SDL_config.h.in
src/video/SDL_sysvideo.h
src/video/SDL_video.c
     1.1 --- a/configure.in	Sat Oct 10 08:11:36 2009 +0000
     1.2 +++ b/configure.in	Sat Oct 10 08:46:06 2009 +0000
     1.3 @@ -1518,6 +1518,38 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 +dnl Find the libcaca includes
     1.8 +CheckCaca()
     1.9 +{
    1.10 +    AC_ARG_ENABLE(video-caca,
    1.11 +AC_HELP_STRING([--enable-video-caca], [use libcaca video driver [[default=no]]]),
    1.12 +                  , enable_video_caca=no)
    1.13 +    if test x$enable_video = xyes -a x$enable_video_caca = xyes; then
    1.14 +        video_caca=no
    1.15 +        AC_PATH_PROG(CACACONFIG, caca-config, no)
    1.16 +        if test x$CACACONFIG != xno; then
    1.17 +            AC_MSG_CHECKING(for libcaca support)
    1.18 +            CACA_CFLAGS=`$CACACONFIG --cflags`
    1.19 +            CACA_LDFLAGS=`$CACACONFIG --libs`
    1.20 +            save_CFLAGS="$CFLAGS"
    1.21 +            AC_TRY_COMPILE([
    1.22 +             #include <caca.h>
    1.23 +            ],[
    1.24 +            ],[
    1.25 +             video_caca=yes
    1.26 +            ])
    1.27 +            CFLAGS="$save_CFLAGS"
    1.28 +            AC_MSG_RESULT($video_caca)
    1.29 +            if test x$video_caca = xyes; then
    1.30 +                AC_DEFINE(SDL_VIDEO_DRIVER_CACA)
    1.31 +                EXTRA_CFLAGS="$EXTRA_CFLAGS $CACA_CFLAGS"
    1.32 +                EXTRA_LDFLAGS="$EXTRA_LDFLAGS $CACA_LDFLAGS"
    1.33 +                SOURCES="$SOURCES $srcdir/src/video/caca/*.c"
    1.34 +            fi
    1.35 +        fi
    1.36 +    fi
    1.37 +}
    1.38 +
    1.39  dnl Set up the QTopia video driver if enabled
    1.40  CheckQtopia()
    1.41  {
    1.42 @@ -2347,6 +2379,7 @@
    1.43          CheckVGL
    1.44          CheckWscons
    1.45          CheckAAlib
    1.46 +        CheckCaca
    1.47          CheckQtopia
    1.48          CheckPicoGUI
    1.49          CheckOpenGLX11
     2.1 --- a/include/SDL_config.h.in	Sat Oct 10 08:11:36 2009 +0000
     2.2 +++ b/include/SDL_config.h.in	Sat Oct 10 08:46:06 2009 +0000
     2.3 @@ -254,6 +254,7 @@
     2.4  /* Enable various video drivers */
     2.5  #undef SDL_VIDEO_DRIVER_AALIB
     2.6  #undef SDL_VIDEO_DRIVER_BWINDOW
     2.7 +#undef SDL_VIDEO_DRIVER_CACA
     2.8  #undef SDL_VIDEO_DRIVER_DC
     2.9  #undef SDL_VIDEO_DRIVER_DDRAW
    2.10  #undef SDL_VIDEO_DRIVER_DGA
     3.1 --- a/src/video/SDL_sysvideo.h	Sat Oct 10 08:11:36 2009 +0000
     3.2 +++ b/src/video/SDL_sysvideo.h	Sat Oct 10 08:46:06 2009 +0000
     3.3 @@ -407,6 +407,9 @@
     3.4  #if SDL_VIDEO_DRIVER_AALIB
     3.5  extern VideoBootStrap AALIB_bootstrap;
     3.6  #endif
     3.7 +#if SDL_VIDEO_DRIVER_CACA
     3.8 +extern VideoBootStrap CACA_bootstrap;
     3.9 +#endif
    3.10  #if SDL_VIDEO_DRIVER_DUMMY
    3.11  extern VideoBootStrap DUMMY_bootstrap;
    3.12  #endif
     4.1 --- a/src/video/SDL_video.c	Sat Oct 10 08:11:36 2009 +0000
     4.2 +++ b/src/video/SDL_video.c	Sat Oct 10 08:46:06 2009 +0000
     4.3 @@ -123,6 +123,9 @@
     4.4  #if SDL_VIDEO_DRIVER_AALIB
     4.5  	&AALIB_bootstrap,
     4.6  #endif
     4.7 +#if SDL_VIDEO_DRIVER_CACA
     4.8 +	&CACA_bootstrap,
     4.9 +#endif
    4.10  #if SDL_VIDEO_DRIVER_DUMMY
    4.11  	&DUMMY_bootstrap,
    4.12  #endif