[MPlayer-dev-eng] [PATCH] Fix compilation on OpenBSD
Diego Biurrun
diego at biurrun.de
Fri Nov 28 10:41:50 CET 2008
On Tue, Nov 18, 2008 at 12:58:00PM +0300, Andrew Savchenko wrote:
>
> On Tuesday 18 November 2008 00:45, Diego Biurrun wrote:
> > > --- configure (revision 27949)
> > > +++ configure (working copy)
> > > @@ -6055,6 +6055,7 @@
> > > EOF
> > > for _ld_theora in "`$_pkg_config --silence-errors --libs
> > > --cflags theora`" "-ltheora -logg"; do cc_check $_ld_theora &&
> > > _ld_extra="$_ld_extra $_ld_theora" \ +
> > > && _inc_extra="$_inc_extra `$_pkg_config --silence-errors
> > > --cflags theora`" \ && _theora=yes && break
> > > done
> >
> > Hmm, that will subtly break if the pkg-config call fails, but
> > Theora is installed.
>
> Agreed. I missed that. What about the following patch?
> Should we add similar changes for all pkg-config detected libraries
> where this kind of behaviour may be required?
>
> --- configure (revision 27953)
> +++ configure (working copy)
> @@ -6053,8 +6053,10 @@
> + test $_pkg_config == "false" || _inc_theora="`$_pkg_config --silence-errors --cflags theora`"
Using == in 'test' invocations is a bashism.
Also, the value of _pkg_config is the *program* false, so that all
invocations of pkg-config via $_pkg_config will simply fail cleanly. So
you can simply execute the command and react according to the return
value.
Diego
More information about the MPlayer-dev-eng
mailing list