configure.in
branchSDL-1.2
changeset 4295 d62725f761a1
parent 4279 42ad751f3192
child 4296 f9fb7284991d
     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