[MPlayer-dev-eng] [PATCH] Use pkg-config to detect DirectFB, fixes building with DirectFB from git
Dominik 'Rathann' Mierzejewski
dominik at rangers.eu.org
Wed Aug 27 18:48:15 CEST 2008
On Wednesday, 27 August 2008 at 15:53, Diogo Franco wrote:
> This patch makes the directfb configure test search for it using
> pkg-config. Building with latest directfb from git fails without it.
> Index: configure
> ===================================================================
> --- configure (revision 27482)
> +++ configure (working copy)
> @@ -3872,17 +3872,28 @@
>
>
> echocheck "DirectFB"
> +_dfb_cflags=""
> +_dfb_ldflags=""
> if test "$_directfb" = auto ; then
> _directfb=no
> 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; do
> - cc_check $_inc_tmp -ldirectfb && _directfb=yes && \
> - _inc_extra="$_inc_extra $_inc_tmp" && break
> - done
> +
> + _dfb_cflags=`pkg-config --silence-errors --cflags directfb`
> + _dfb_ldflags=`pkg-config --silence-errors --libs directfb`
> +
> + cc_check $_dfb_cflags $_dfb_ldflags && _directfb=yes
> +
> + if test "$_directfb" = no ; then
> + for _inc_tmp in "" -I/usr/local/include/directfb \
> + -I/usr/include/directfb -I/usr/local/include; do
> + cc_check $_inc_tmp -ldirectfb && _directfb=yes && \
> + _dfb_cflags="$_inc_tmp" && _dfb_ldflags="-ldirectfb" && break
> + done
Reindentation should come in a separate patch, rejected.
Regards,
R.
--
MPlayer http://mplayerhq.hu | Livna http://rpm.livna.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
More information about the MPlayer-dev-eng
mailing list