comparison configure.in @ 3351:8e0182c236d8

SuSE 11.1 installs directfb-config without directfb-devel, so check to make sure the development headers are actually available!
author Sam Lantinga <slouken@libsdl.org>
date Wed, 07 Oct 2009 06:11:53 +0000
parents 61ea9005fddf
children 98c5b421426e
comparison
equal deleted inserted replaced
3350:15f661b279e7 3351:8e0182c236d8
1321 DIRECTFB_REQUIRED_VERSION=1.0.0 1321 DIRECTFB_REQUIRED_VERSION=1.0.0
1322 1322
1323 AC_PATH_PROG(DIRECTFBCONFIG, directfb-config, no) 1323 AC_PATH_PROG(DIRECTFBCONFIG, directfb-config, no)
1324 if test x$DIRECTFBCONFIG = xno; then 1324 if test x$DIRECTFBCONFIG = xno; then
1325 AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 1325 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
1326 AC_MSG_CHECKING(for DirectFB $DIRECTFB_REQUIRED_VERSION support)
1327 if test x$PKG_CONFIG != xno; then 1326 if test x$PKG_CONFIG != xno; then
1328 if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb; then 1327 if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb; then
1329 DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb` 1328 DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb`
1330 DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb` 1329 DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb`
1331 DIRECTFB_PREFIX=`$PKG_CONFIG --variable=prefix directfb` 1330 DIRECTFB_PREFIX=`$PKG_CONFIG --variable=prefix directfb`
1332 video_directfb=yes 1331 video_directfb=yes
1333 fi 1332 fi
1334 fi 1333 fi
1335 AC_MSG_RESULT($video_directfb)
1336 else 1334 else
1337 AC_MSG_CHECKING(for DirectFB $DIRECTFB_REQUIRED_VERSION support)
1338 set -- `echo $DIRECTFB_REQUIRED_VERSION | sed 's/\./ /g'` 1335 set -- `echo $DIRECTFB_REQUIRED_VERSION | sed 's/\./ /g'`
1339 NEED_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3` 1336 NEED_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3`
1340 set -- `directfb-config --version | sed 's/\./ /g'` 1337 set -- `directfb-config --version | sed 's/\./ /g'`
1341 HAVE_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3` 1338 HAVE_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3`
1342 if test $HAVE_VERSION -ge $NEED_VERSION; then 1339 if test $HAVE_VERSION -ge $NEED_VERSION; then
1343 DIRECTFB_CFLAGS=`$DIRECTFBCONFIG --cflags` 1340 DIRECTFB_CFLAGS=`$DIRECTFBCONFIG --cflags`
1344 DIRECTFB_LIBS=`$DIRECTFBCONFIG --libs` 1341 DIRECTFB_LIBS=`$DIRECTFBCONFIG --libs`
1345 DIRECTFB_PREFIX=`$DIRECTFBCONFIG --prefix` 1342 DIRECTFB_PREFIX=`$DIRECTFBCONFIG --prefix`
1346 video_directfb=yes 1343 video_directfb=yes
1347 fi 1344 fi
1348 AC_MSG_RESULT($video_directfb) 1345 fi
1349 fi 1346 if test x$video_directfb = xyes; then
1347 # SuSE 11.1 installs directfb-config without directfb-devel
1348 save_CFLAGS="$CFLAGS"
1349 CFLAGS="$CFLAGS $DIRECTFB_CFLAGS"
1350 AC_CHECK_HEADER(directfb.h, have_directfb_hdr=yes, have_directfb_hdr=no)
1351 CFLAGS="$save_CFLAGS"
1352 video_directfb=$have_directfb_hdr
1353 fi
1354 AC_MSG_CHECKING(for DirectFB $DIRECTFB_REQUIRED_VERSION support)
1355 AC_MSG_RESULT($video_directfb)
1350 1356
1351 if test x$video_directfb = xyes; then 1357 if test x$video_directfb = xyes; then
1352 AC_ARG_ENABLE(directfb-shared, 1358 AC_ARG_ENABLE(directfb-shared,
1353 AC_HELP_STRING([--enable-directfb-shared], [dynamically load directfb support [[default=yes]]]), 1359 AC_HELP_STRING([--enable-directfb-shared], [dynamically load directfb support [[default=yes]]]),
1354 , enable_directfb_shared=yes) 1360 , enable_directfb_shared=yes)