From 6c95f845f529f6c5006dbeb997dbbd76ee9a040d Mon Sep 17 00:00:00 2001 From: aurel Date: Tue, 18 Oct 2005 21:37:28 +0000 Subject: [PATCH] modify DirectFB version detection so that it only requires pre-processing git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16802 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/configure b/configure index 66e4bf89a6..a72627481a 100755 --- a/configure +++ b/configure @@ -3454,21 +3454,20 @@ if test "$_directfb" = auto ; then _directfb=no cat > $TMPC < -int main(void) { IDirectFB *foo; return 0; } +int main(void) { IDirectFB *foo; DirectFBInit(0,0); 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; -} + cat > $TMPC << EOF +#include +int +dfb_ver = DIRECTFB_MAJOR_VERSION DIRECTFB_MINOR_VERSION DIRECTFB_MICRO_VERSION +; EOF - if cc_check $_inc_directfb -ldirectfb && "$TMPO" >> "$TMPLOG" ; then - _directfb_version=`"$TMPO"` + if $_cc -E $TMPC $_inc_directfb > "$TMPO"; then + _directfb_version=`sed -n 's/^dfb_ver[^1-9]*\(.*\)/\1/p' "$TMPO" | tr -d '() '` _def_directfb_version="#define DIRECTFBVERSION $_directfb_version" if test "$_directfb_version" -ge 913; then _res_comment="$_directfb_version"