On Wed, Apr 20, 2011 at 20:06:11 (CEST), Måns Rullgård wrote:
> Reinhard Tartler <[email protected]> writes:
>
>> This unbreaks static compilation against libav when using pkg-config,
>> like mplayer2 does
>>
>> Taken from on a patch from "Uoti Urpal <[email protected]>"
>> http://repo.or.cz/w/FFMpeg-mirror/mplayer-patches.git/commitdiff/65e612b5943fe79a6aaf83c0f48a1e4a0f739ffc?hp=0d0f1bc11ec7c8f81a61c1fa4a6bc0048ad10f30
>> ---
>> configure | 7 ++++---
>> 1 files changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 32c3544..09dfb80 100755
>> --- a/configure
>> +++ b/configure
>> @@ -2840,6 +2840,7 @@ for thread in $THREADS_LIST; do
>> done
>>
>> check_lib math.h sin -lm
>> +enabled sin && LIBM="-lm"
>
> check_lib ... && LIBM=-lm
will change
>> enabled vaapi && require vaapi va/va.h vaInitialize -lva
>>
>> check_mathfunc exp2
>> @@ -3425,10 +3426,10 @@ Cflags: -I\${includedir}
>> EOF
>> }
>>
>> -pkgconfig_generate libavutil "Libav utility library" "$LIBAVUTIL_VERSION"
>> +pkgconfig_generate libavutil "Libav utility library" "$LIBAVUTIL_VERSION"
>> "$LIBM"
>> pkgconfig_generate libavcodec "Libav codec library" "$LIBAVCODEC_VERSION"
>> "$extralibs"
>> pkgconfig_generate libavformat "Libav container format library"
>> "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION"
>> pkgconfig_generate libavdevice "Libav device handling library"
>> "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION"
>> pkgconfig_generate libavfilter "Libav video filtering library"
>> "$LIBAVFILTER_VERSION" "$extralibs"
>> -pkgconfig_generate libpostproc "Libav post processing library"
>> "$LIBPOSTPROC_VERSION"
>> -pkgconfig_generate libswscale "Libav image rescaling library"
>> "$LIBSWSCALE_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
>> +pkgconfig_generate libpostproc "Libav post processing library"
>> "$LIBPOSTPROC_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
>> +pkgconfig_generate libswscale "Libav image rescaling library"
>> "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION"
>> --
>> 1.7.0.4
>
> Why add libm to those specific files? libavcodec most definitely uses it.
because pkg-config resolves dependencies recursively. libavcodec does
not seem to use libm directly
--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel