[MPlayer-dev-eng] [PATCH] cross-compile: directfb version detection
Oded Shimon
ods15 at ods15.dyndns.org
Thu Oct 13 19:06:57 CEST 2005
On Thu, Oct 13, 2005 at 07:02:35PM +0200, Diego Biurrun wrote:
> On Wed, Oct 12, 2005 at 07:59:25PM +0200, Aurelien Jacobs wrote:
> > On Wed, 12 Oct 2005 11:39:43 +0200
> > Diego Biurrun <diego at biurrun.de> wrote:
> >
> > > On Mon, Oct 10, 2005 at 12:01:53AM +0200, Aurelien Jacobs wrote:
> > >
> > > > @@ -3459,7 +3459,14 @@
> > > > }
> > > > EOF
> > > > if cc_check $_inc_directfb -ldirectfb && "$TMPO" >> "$TMPLOG" ;
> > > > then
> > > > - _directfb_version=`"$TMPO"`
> > > > + cat > $TMPC <<EOF
> > > > +#include <directfb_version.h>
> > > > +int
> > > > +dfb_ver = DIRECTFB_MAJOR_VERSION DIRECTFB_MINOR_VERSION
> > > > DIRECTFB_MICRO_VERSION +;
> > > > +EOF
> > > > + 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"
> > >
> > > There is a test for this very thing above, what about it?
> >
> > The test above allows to verify if we can compile and link against
> > directfb, but we can't rely on it to detect the version, since we
> > can't assume we will be able to run the binary (remember we are
> > talking about cross-compiling ;-)
> > That's why I added a second test which use pre-processor only to
> > get version.
> > In fact, the first test could be modified as it don't need to
> > report the version anymore. But I think it is still a good test
> > to verify if directfb is available, so we can keep it as is.
>
> Yes, you should modify that test. Can't you just merge both tests into
> one?
>
> > > > @@ -3468,9 +3475,13 @@
> > > > _directfb=no
> > > > _res_comment="version >=0.9.13 required"
> > > > fi
> > > > - else
> > > > + else
> > >
> > > cosmetics
> >
> > It sounds like. But it's not really...
> > In fact it's just a diff misbehavior.
>
> No. Either you fiddled with the whitespace or your editor did. Maybe
> some tabs to spaces (or vice versa) conversion?
No, he didn't change any whitespace at all, it's just diff comparing the
wrong 'else' with the wrong 'else', see his hand-written diff 2 mails up.
- ods15
More information about the MPlayer-dev-eng
mailing list