configure.in
branchSDL-1.2-olpc
changeset 4404 b8de86ee2ad6
parent 3935 00959c391aa6
     1.1 --- a/configure.in	Thu Apr 19 07:10:05 2007 +0000
     1.2 +++ b/configure.in	Thu Apr 19 07:12:30 2007 +0000
     1.3 @@ -1347,6 +1347,35 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 +dnl Find the GTK+ includes
     1.8 +CheckGTK()
     1.9 +{
    1.10 +    AC_ARG_ENABLE(video-gtk,
    1.11 +AC_HELP_STRING([--enable-video-gtk], [use GTK+ video driver [[default=no]]]),
    1.12 +                  , enable_video_gtk=no)
    1.13 +    if test x$enable_video = xyes -a x$enable_video_gtk = xyes; then
    1.14 +        AC_PATH_PROG(HAVEPKGCONFIG, pkg-config, $PATH)
    1.15 +        if test -z "$HAVEPKGCONFIG"; then
    1.16 +            AC_MSG_ERROR([*** pkg-config not found. Cannot probe for gtk+-2.0.])
    1.17 +        else
    1.18 +            AC_MSG_CHECKING(for GTK+ support)
    1.19 +            video_gtk=no
    1.20 +            $HAVEPKGCONFIG --exists gtk+-2.0
    1.21 +            if test $? -eq 0 ; then
    1.22 +                video_gtk=yes
    1.23 +                have_video=yes
    1.24 +                AC_DEFINE(SDL_VIDEO_DRIVER_GTK)
    1.25 +                SOURCES="$SOURCES $srcdir/src/video/gtk/*.c"
    1.26 +                GTK2_CFLAGS=`$HAVEPKGCONFIG --cflags libglade-2.0 gtk+-2.0`
    1.27 +                GTK2_LIBS=`$HAVEPKGCONFIG --libs libglade-2.0 gtk+-2.0`
    1.28 +                EXTRA_CFLAGS="$EXTRA_CFLAGS $GTK2_CFLAGS"
    1.29 +                EXTRA_LDFLAGS="$EXTRA_LDFLAGS $GTK2_LIBS"
    1.30 +            fi
    1.31 +            AC_MSG_RESULT($video_gtk)
    1.32 +        fi
    1.33 +    fi
    1.34 +}
    1.35 +
    1.36  dnl Set up the QTopia video driver if enabled
    1.37  CheckQtopia()
    1.38  {
    1.39 @@ -2161,6 +2190,7 @@
    1.40          CheckVGL
    1.41          CheckWscons
    1.42          CheckAAlib
    1.43 +        CheckGTK
    1.44          CheckQtopia
    1.45          CheckPicoGUI
    1.46          CheckOpenGLX11