From 52083dde7e6ce906ab5febb3f49f9c4af292f936 Mon Sep 17 00:00:00 2001 From: arpi Date: Mon, 5 Aug 2002 11:42:29 +0000 Subject: [PATCH] directfb version detection little bit modified patch by jiri.svoboda@seznam.cz git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6920 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 72 +++++++++++++++++-------------------------------------- 1 file changed, 22 insertions(+), 50 deletions(-) diff --git a/configure b/configure index 0308bc1a73..c24d82470b 100755 --- a/configure +++ b/configure @@ -2001,6 +2001,27 @@ int main(void) { IDirectFB *foo; return 0; } EOF linux && test -c /dev/fb0 && cc_check $_inc_directfb -ldirectfb && _directfb=yes fi + +if test "$_directfb" = yes; then +cat > $TMPC < +int main(void) { + printf ("%i",(directfb_major_version*100+directfb_minor_version)*100+directfb_micro_version); + return 0; +} +EOF + if cc_check $_inc_directfb -ldirectfb && "$TMPO" >> "$TMPLOG" ; then + _directfb_version=`"$TMPO"` + _def_directfb_version="#define DIRECTFBVERSION $_directfb_version" + echores "yes ($_directfb_version)" + else + _directfb=no + echores "no (failed to get version)" + fi +else + echores "$_directfb" +fi + if test "$_directfb" = yes ; then _def_directfb='#define HAVE_DIRECTFB 1' _vosrc="$_vosrc vo_directfb.c" @@ -2011,53 +2032,6 @@ else _novomodules="directfb $_novomodules" _inc_directfb="" fi -echores "$_directfb" - -if test "$_directfb" = yes; then -echocheck "DirectFB >= 0.9.9" - _directfb099=no - cat > $TMPC < -int main(void) { IDirectFBEventBuffer *foo; return 0; } -EOF - cc_check $_inc_directfb -ldirectfb && _directfb099=yes -if test "$_directfb099" = yes ; then - _def_directfb099='#define HAVE_DIRECTFB099 1' -else - _def_directfb099='#undef HAVE_DIRECTFB099' -fi -echores "$_directfb099" -fi -if test "$_directfb" = yes; then -echocheck "DirectFB >= 0.9.10" - _directfb0910=no - cat > $TMPC < -int main(void) { DFBDisplayLayerCapabilities caps=DLCAPS_DST_COLORKEY; return 0; } -EOF - cc_check $_inc_directfb -ldirectfb && _directfb0910=yes -if test "$_directfb0910" = yes ; then - _def_directfb0910='#define HAVE_DIRECTFB0910 1' -else - _def_directfb0910='#undef HAVE_DIRECTFB0910' -fi -echores "$_directfb0910" -fi -if test "$_directfb" = yes; then -echocheck "DirectFB >= 0.9.11" - _directfb0911=no - cat > $TMPC < -int main(void) { DFBInputEvent *foo; return foo->key_symbol; } -EOF - cc_check $_inc_directfb -ldirectfb && _directfb0911=yes -if test "$_directfb0911" = yes ; then - _def_directfb0911='#define HAVE_DIRECTFB0911 1' -else - _def_directfb0911='#undef HAVE_DIRECTFB0911' -fi -echores "$_directfb0911" -fi echocheck "X11 headers presence" @@ -4598,9 +4572,7 @@ $_def_ggi $_def_3dfx $_def_tdfxfb $_def_directfb -$_def_directfb099 -$_def_directfb0910 -$_def_directfb0911 +$_def_directfb_version $_def_zr $_def_mga $_def_xmga