summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorsyrjala <syrjala@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-10-08 22:16:38 +0000
committersyrjala <syrjala@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-10-08 22:16:38 +0000
commit8db718fbf80845fa0fee3fe547d93f3394944743 (patch)
tree455035ad1e2103acc2bb31ae480f147f61a70ebc /configure
parent348ea88925e18cb0de79d52107e56fa98c481ca2 (diff)
downloadmpv-8db718fbf80845fa0fee3fe547d93f3394944743.tar.bz2
mpv-8db718fbf80845fa0fee3fe547d93f3394944743.tar.xz
Fix DirectFB version check. The old code simply concatenated the
digits, so 1.0.0 was considered older than 0.9.XY. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20118 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 14 insertions, 6 deletions
diff --git a/configure b/configure
index ea91762043..e52028790a 100755
--- a/configure
+++ b/configure
@@ -3759,17 +3759,25 @@ EOF
fi
fi
+dfb_version() {
+ expr $1 \* 65536 + $2 \* 256 + $3
+}
+
if test "$_directfb" = yes; then
cat > $TMPC << EOF
#include <directfb_version.h>
int
-dfb_ver = DIRECTFB_MAJOR_VERSION DIRECTFB_MINOR_VERSION DIRECTFB_MICRO_VERSION
+dfb_ver = DIRECTFB_MAJOR_VERSION.DIRECTFB_MINOR_VERSION.DIRECTFB_MICRO_VERSION
;
EOF
if $_cc -E $TMPC $_inc_extra > "$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
+ _directfb_version=`sed -n 's/^dfb_ver[^0-9]*\(.*\)/\1/p' "$TMPO" | 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"
else
_def_directfb_version='#undef DIRECTFBVERSION'
@@ -3785,13 +3793,13 @@ echores "$_directfb"
if test "$_directfb" = yes ; then
_def_directfb='#define HAVE_DIRECTFB 1'
- if test "$_directfb_version" -ge 913; then
+ if test "$_dfb_version" -ge $(dfb_version 0 9 13); then
_vosrc="$_vosrc vo_directfb2.c"
_vomodules="directfb $_vomodules"
_ld_directfb='-ldirectfb'
fi
- if test "$_directfb_version" -ge 915; then
+ if test "$_dfb_version" -ge $(dfb_version 0 9 15); then
_vosrc="$_vosrc vo_dfbmga.c"
_vomodules="dfbmga $_vomodules"
fi