On Fri, Apr 22, 2011 at 06:18:59 (CEST), Reinhard Tartler wrote: > On Fri, Apr 22, 2011 at 00:50:11 (CEST), Måns Rullgård wrote: > >> Reinhard Tartler <[email protected]> writes: >> >>>>> -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 >> >> It most certainly does, for instance in fft.c. > > I see. Well, this still doesn't matter as with this patch pkg-config > still ensures that -lm appears. So anything to change in my patch or can > I push it now?
ping. Diego requestet this patch to be split in two, but TBH, I don't see much point in having them split. the .pc file as is now is pretty useless for static linking, and I'd prefer to get it fixed immediately. patch follows: commit 12e435568e3205f658500ced08b7d109270da59f Author: Reinhard Tartler <[email protected]> Date: Wed Apr 20 17:47:59 2011 +0200 Add missing inter-library dependencies to generated .pc files 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 diff --git a/configure b/configure index 32c3544..e0e2600 100755 --- a/configure +++ b/configure @@ -2839,7 +2839,7 @@ for thread in $THREADS_LIST; do fi done -check_lib math.h sin -lm +check_lib math.h sin -lm && LIBM="-lm" enabled vaapi && require vaapi va/va.h vaInitialize -lva check_mathfunc exp2 @@ -3425,10 +3425,10 @@ Cflags: -I\${includedir} EOF } -pkgconfig_generate libavutil "Libav utility library" "$LIBAVUTIL_VERSION" -pkgconfig_generate libavcodec "Libav codec library" "$LIBAVCODEC_VERSION" "$extralibs" +pkgconfig_generate libavutil "Libav utility library" "$LIBAVUTIL_VERSION" "$LIBM" +pkgconfig_generate libavcodec "Libav codec library" "$LIBAVCODEC_VERSION" "$extralibs $LIBM" "libavutil = $LIBAVUTIL_VERSION" 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" -- Gruesse/greetings, Reinhard Tartler, KeyID 945348A4 _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
