[FFmpeg-devel] [PATCH 1/1] configure: use require_pkg_config to check for wavpack

Jan Ekström jeebjp at gmail.com
Sun Sep 20 15:51:01 EEST 2020


On Sun, Sep 20, 2020 at 3:34 PM Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>
>
>
>
>
> > Am 20.09.2020 um 13:52 schrieb Bernd Kuhls <bernd.kuhls at t-online.de>:
> >
> > Fixes static builds with toolchains needing "-lm" for math functions.
>
> Please don’t.
>

Please reword this in another way if your meaning is to note that
you'd like the configure option to still work without pkg-config.

I find pkg-config (or its less glib-dependant reimplementation,
pkgconf) to be great helpers, esp. when coupled with
PKG_CONFIG_{PATH,LIBDIR} (PATH appends, LIBDIR overrides) if you have
a custom prefix. So in my opinion the more pkg-config enabled checks
the better.

> Why is this necessary? Doesn’t every FFmpeg link command contain -lm?
>

"-lm" is only utilized in host_extralibs (and disabled in Haiku,
apparently), which is only utilized in `ffbuild/common.mak`. So when
you are doing configure checks you are going to be missing all of the
usual flags that you have not specifically specified in each and every
check.

That said, there is also a `libm` check_lib check which most likely
exports `libm_extralibs` as its result. It seems to be also utilized
in various checks where pkg-config is not utilized and the math
library was found to be required as part of the check.

Jan

Jan


More information about the ffmpeg-devel mailing list