[MPlayer-dev-eng] [PATCH] configure libav* with pkg-config
Diego Biurrun
diego at biurrun.de
Sun Jan 29 18:47:46 CET 2006
On Sun, Jan 29, 2006 at 01:20:57PM +0100, Nico Sabbi wrote:
> This patch configures mplayer's support for shared libav* trying to use
> pkg-config before trying to use the plain -lavcodec -lavformat.
>
> This *should* permit to use certain features of lavc and lavf relied
> to wrappers (such as xvid rc strategy, fancy formats, etc. that at the
> moment I'm trying).
They don't work ATM?
> Please, review.
Here you are...
> --- configure 23 Jan 2006 10:16:48 -0000 1.1129
> +++ configure 29 Jan 2006 12:15:41 -0000
> @@ -6078,7 +6078,12 @@
> return 0;
> }
> EOF
> - if cc_check -lavcodec $_ld_lm ; then
> + _libavcodec_pkg_incs=`pkg-config --cflags libavcodec`
> + _libavcodec_pkg_libs=`pkg-config --libs libavcodec`
Please name the variables consistently, the other pkg-config checks use
_inc_foo, _ld_foo.
> + if cc_check $_libavcodec_pkg_incs $_libavcodec_pkg_libs ; then
> + _libavcodec_so=yes
> + _res_comment="using libavcodec.so with pkg-config, but static libavcodec is recommended"
That's excessive detail IMO, it's not necessary to know if it was
detected by pkg-config or not. Just leave it out.
> @@ -6094,7 +6099,15 @@
> #include <ffmpeg/avformat.h>
> int main(void) { av_alloc_format_context(); return 0; }
> EOF
> - cc_check $_ld_lm -lavformat && _libavformat_so=yes
> + _libavformat_pkg_incs=`pkg-config --cflags libavformat`
> + _libavformat_pkg_libs=`pkg-config --libs libavformat`
> + if cc_check $_libavformat_pkg_incs $_libavformat_pkg_libs ; then
> + _libavformat_so=yes
> + _res_comment="using libavformat.so with pkg-config, but static libavformat is recommended"
see above
Diego
More information about the MPlayer-dev-eng
mailing list