Mercurial > mplayer.hg
comparison configure @ 16801:55b28be7a0e6
modify DirectFB version detection so that it only requires pre-processing
author | aurel |
---|---|
date | Tue, 18 Oct 2005 21:37:28 +0000 |
parents | 3e8a61c10b47 |
children | a356a606bd66 |
comparison
equal
deleted
inserted
replaced
16800:3e8a61c10b47 | 16801:55b28be7a0e6 |
---|---|
3452 echocheck "DirectFB" | 3452 echocheck "DirectFB" |
3453 if test "$_directfb" = auto ; then | 3453 if test "$_directfb" = auto ; then |
3454 _directfb=no | 3454 _directfb=no |
3455 cat > $TMPC <<EOF | 3455 cat > $TMPC <<EOF |
3456 #include <directfb.h> | 3456 #include <directfb.h> |
3457 int main(void) { IDirectFB *foo; return 0; } | 3457 int main(void) { IDirectFB *foo; DirectFBInit(0,0); return 0; } |
3458 EOF | 3458 EOF |
3459 linux && test -c /dev/fb0 && cc_check $_inc_directfb -ldirectfb && _directfb=yes | 3459 linux && test -c /dev/fb0 && cc_check $_inc_directfb -ldirectfb && _directfb=yes |
3460 fi | 3460 fi |
3461 | 3461 |
3462 if test "$_directfb" = yes; then | 3462 if test "$_directfb" = yes; then |
3463 cat > $TMPC <<EOF | 3463 cat > $TMPC << EOF |
3464 #include <directfb.h> | 3464 #include <directfb_version.h> |
3465 int main(void) { | 3465 int |
3466 printf ("%i",(directfb_major_version*100+directfb_minor_version)*100+directfb_micro_version); | 3466 dfb_ver = DIRECTFB_MAJOR_VERSION DIRECTFB_MINOR_VERSION DIRECTFB_MICRO_VERSION |
3467 return 0; | 3467 ; |
3468 } | 3468 EOF |
3469 EOF | 3469 if $_cc -E $TMPC $_inc_directfb > "$TMPO"; then |
3470 if cc_check $_inc_directfb -ldirectfb && "$TMPO" >> "$TMPLOG" ; then | 3470 _directfb_version=`sed -n 's/^dfb_ver[^1-9]*\(.*\)/\1/p' "$TMPO" | tr -d '() '` |
3471 _directfb_version=`"$TMPO"` | |
3472 _def_directfb_version="#define DIRECTFBVERSION $_directfb_version" | 3471 _def_directfb_version="#define DIRECTFBVERSION $_directfb_version" |
3473 if test "$_directfb_version" -ge 913; then | 3472 if test "$_directfb_version" -ge 913; then |
3474 _res_comment="$_directfb_version" | 3473 _res_comment="$_directfb_version" |
3475 else | 3474 else |
3476 _def_directfb_version='#undef DIRECTFBVERSION' | 3475 _def_directfb_version='#undef DIRECTFBVERSION' |