configure.in
changeset 167 cb384ef627f6
parent 166 39877400bd1e
child 168 e92aa316c517
     1.1 --- a/configure.in	Tue Sep 04 22:48:09 2001 +0000
     1.2 +++ b/configure.in	Tue Sep 04 22:53:46 2001 +0000
     1.3 @@ -695,6 +695,46 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 +dnl Find DirectFB
     1.8 +CheckDirectFB()
     1.9 +{
    1.10 +    AC_ARG_ENABLE(video-directfb,
    1.11 +[  --enable-video-directfb    use DirectFB video driver [default=yes]],
    1.12 +                  , enable_video_directfb=yes)
    1.13 +    if test x$enable_video = xyes -a x$enable_video_directfb = xyes; then
    1.14 +        video_directfb=no
    1.15 +
    1.16 +        AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
    1.17 +        if test x$PKG_CONFIG = xno ; then
    1.18 +            AC_MSG_WARN([*** pkg-config is required to build the DirectFB video driver.])
    1.19 +        else
    1.20 +            AC_MSG_CHECKING(for DirectFB support)
    1.21 +
    1.22 +            if ! pkg-config --atleast-pkgconfig-version 0.5 ; then
    1.23 +                AC_MSG_ERROR([*** pkg-config too old; version 0.5 or better required.])
    1.24 +            fi
    1.25 +
    1.26 +            DIRECTFB_REQUIRED_VERSION=0.9.5
    1.27 +
    1.28 +            if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb ; then
    1.29 +                DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb`
    1.30 +                DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb`
    1.31 +                video_directfb=yes
    1.32 +            fi
    1.33 +        fi
    1.34 +
    1.35 +        AC_MSG_RESULT($video_directfb)
    1.36 +        if test x$video_directfb = xyes; then
    1.37 +            CFLAGS="$CFLAGS -DENABLE_DIRECTFB"
    1.38 +            VIDEO_SUBDIRS="$VIDEO_SUBDIRS directfb"
    1.39 +            VIDEO_DRIVERS="$VIDEO_DRIVERS directfb/libvideo_directfb.la"
    1.40 +
    1.41 +            AC_SUBST(DIRECTFB_CFLAGS)
    1.42 +            AC_SUBST(DIRECTFB_LIBS)
    1.43 +        fi
    1.44 +    fi
    1.45 +}
    1.46 +
    1.47  dnl See if we're running on PlayStation 2 hardware
    1.48  CheckPS2GS()
    1.49  {
    1.50 @@ -1219,6 +1259,7 @@
    1.51          CheckNANOX
    1.52          CheckDGA
    1.53          CheckFBCON
    1.54 +        CheckDirectFB
    1.55          CheckPS2GS
    1.56          CheckGGI
    1.57          CheckSVGA
    1.58 @@ -2174,6 +2215,7 @@
    1.59  src/video/dga/Makefile
    1.60  src/video/nanox/Makefile
    1.61  src/video/fbcon/Makefile
    1.62 +src/video/directfb/Makefile
    1.63  src/video/ps2gs/Makefile
    1.64  src/video/ggi/Makefile
    1.65  src/video/maccommon/Makefile