Re: new mplayer
Hi,
On Tue, 2006-09-26 at 01:46:42 +0200, Luca Capello wrote:
> FWIW, I cannot build it in a clean and updated-to-latest-sid pbuilder
> (complete script available on request, 10K gzipped):
> Script started on Tue 26 Sep 2006 01:38:35 AM CEST
> luca@gismo:~/test$ sudo pbuilder build mplayer_1.0~rc1~svn19921.dsc
> [...]
> Checking for DirectFB ... /tmp/mplayer-conf-24598-4424.c:1:30: error: directfb_version.h: No such file or directory
> no (failed to get version)
> [...]
I fixed this the other day, and forgot about it, here's the patch.
I've switched that test completely to pkg-config, hope it's not a
problem.
regards,
guillem
Index: configure
===================================================================
--- configure (revision 20007)
+++ configure (working copy)
@@ -3701,52 +3701,39 @@
echocheck "DirectFB"
if test "$_directfb" = auto ; then
_directfb=no
- if linux && test -c /dev/fb0; then
+ if pkg-config --exists 'directfb' ; then
cat > $TMPC <<EOF
#include <directfb.h>
int main(void) { IDirectFB *foo; DirectFBInit(0,0); return 0; }
EOF
- for _inc_tmp in "" -I/usr/local/include/directfb \
- -I/usr/include/directfb -I/usr/local/include -I/usr/include; do
- cc_check $_inc_tmp -ldirectfb && _directfb=yes && \
- _inc_extra="$_inc_extra $_inc_tmp" && break
- done
+ cc_check `pkg-config --libs --cflags directfb` && _directfb=yes
fi
fi
if test "$_directfb" = yes; then
- 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_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
- _res_comment="$_directfb_version"
- else
- _def_directfb_version='#undef DIRECTFBVERSION'
- _directfb=no
- _res_comment="version >=0.9.13 required"
- fi
+ _directfb_version=`pkg-config --modversion directfb`
+ _directfb_version_c=`echo $_directfb_version | sed 's/^0*//' | tr -d '. '`
+ _def_directfb_version="#define DIRECTFBVERSION $_directfb_version_c"
+ if pkg-config --atleast-version='0.9.13' directfb ; then
+ _res_comment="$_directfb_version"
else
+ _def_directfb_version='#undef DIRECTFBVERSION'
_directfb=no
- _res_comment="failed to get version"
+ _res_comment="version >=0.9.13 required"
fi
fi
echores "$_directfb"
if test "$_directfb" = yes ; then
_def_directfb='#define HAVE_DIRECTFB 1'
- if test "$_directfb_version" -ge 913; then
+ if pkg-config --atleast-version='0.9.13' directfb ; then
_vosrc="$_vosrc vo_directfb2.c"
_vomodules="directfb $_vomodules"
- _ld_directfb='-ldirectfb'
+ _ld_directfb="`pkg-config --libs directfb`"
+ _inc_extra="$_inc_extra `pkg-config --cflags directfb`"
fi
- if test "$_directfb_version" -ge 915; then
+ if pkg-config --atleast-version='0.9.15' directfb ; then
_vosrc="$_vosrc vo_dfbmga.c"
_vomodules="dfbmga $_vomodules"
fi
Reply to: