From 868fb5d278485f707cf8921ea137094fa8a7fdf5 Mon Sep 17 00:00:00 2001 From: diego Date: Wed, 15 Sep 2010 15:58:48 +0000 Subject: build: update DirectFB requirements, reduce #ifdefs Require DirectFB version 0.9.15 instead of 0.9.13. This simplifies the build system at the cost of requiring a library version that was released at the end rather than the middle of 2002. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32251 b3059339-0415-0410-9bf9-f77b7e298cf2 Simplify DirectFB check. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32252 b3059339-0415-0410-9bf9-f77b7e298cf2 Require DirectFB version 0.9.22. This allows getting rid of a lot of library version check #ifdeffery. Release 0.9.22 is from February 2005, so the requirement is reasonable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32253 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 59 ++++++++++++----------------------------------------------- 1 file changed, 12 insertions(+), 47 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 0fc4f3ce45..b7185e4962 100755 --- a/configure +++ b/configure @@ -3974,60 +3974,28 @@ echores "$_bl" echocheck "DirectFB" if test "$_directfb" = auto ; then _directfb=no - for _inc_tmp in "" -I/usr/local/include/directfb -I/usr/include/directfb -I/usr/local/include; do - function_check directfb.h 'DirectFBInit(0, 0)' $_inc_tmp -ldirectfb && - _directfb=yes && extra_cflags="$extra_cflags $_inc_tmp" && break - done -fi - -dfb_version() { - expr $1 \* 65536 + $2 \* 256 + $3 -} - -if test "$_directfb" = yes; then cat > $TMPC << EOF +#include #include -int -dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION -; +#if (DIRECTFB_MAJOR_VERSION << 16 | DIRECTFB_MINOR_VERSION << 8 | DIRECTFB_MICRO_VERSION) < (0 << 16 | 9 << 8 | 22) +#error "DirectFB version too old." +#endif +int main(void) { DirectFBInit(0, 0); return 0; } EOF - if $_cc -E $TMPC $extra_cflags > "$TMPEXE"; then - _directfb_version=$(sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPEXE" | tr -d '()') - _dfb_major=$(echo $_directfb_version | cut -d . -f 1) - _dfb_minor=$(echo $_directfb_version | cut -d . -f 2) - _dfb_micro=$(echo $_directfb_version | cut -d . -f 3) - _dfb_version=$(dfb_version $_dfb_major $_dfb_minor $_dfb_micro) - if test "$_dfb_version" -ge $(dfb_version 0 9 13); then - def_directfb_version="#define DIRECTFBVERSION $_dfb_version" - res_comment="$_directfb_version" - test "$_dfb_version" -ge $(dfb_version 0 9 15) && _dfbmga=yes - else - def_directfb_version='#undef DIRECTFBVERSION' - _directfb=no - res_comment="version >=0.9.13 required" - fi - else - _directfb=no - res_comment="failed to get version" - fi + for _inc_tmp in "" -I/usr/local/include/directfb -I/usr/include/directfb -I/usr/local/include; do + cc_check $_inc_tmp -ldirectfb && + _directfb=yes && extra_cflags="$extra_cflags $_inc_tmp" && break + done fi -echores "$_directfb" - if test "$_directfb" = yes ; then def_directfb='#define CONFIG_DIRECTFB 1' - vomodules="directfb $vomodules" + vomodules="directfb dfbmga $vomodules" libs_mplayer="$libs_mplayer -ldirectfb" else def_directfb='#undef CONFIG_DIRECTFB' - novomodules="directfb $novomodules" -fi -if test "$_dfbmga" = yes; then - vomodules="dfbmga $vomodules" - def_dfbmga='#define CONFIG_DFBMGA 1' -else - novomodules="dfbmga $novomodules" - def_dfbmga='#undef CONFIG_DFBMGA' + novomodules="directfb dfbmga $novomodules" fi +echores "$_directfb" echocheck "X11 headers presence" @@ -7554,7 +7522,6 @@ CDDB = $_cddb COREAUDIO = $_coreaudio COREVIDEO = $_corevideo DART = $_dart -DFBMGA = $_dfbmga DGA = $_dga DIRECT3D = $_direct3d DIRECTFB = $_directfb @@ -8035,13 +8002,11 @@ $def_aa $def_bl $def_caca $def_corevideo -$def_dfbmga $def_dga $def_dga1 $def_dga2 $def_direct3d $def_directfb -$def_directfb_version $def_directx $def_dvb $def_dvbin -- cgit v1.2.3