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

James Almer jamrial at gmail.com
Sun Sep 20 17:01:17 EEST 2020


On 9/20/2020 8:52 AM, Bernd Kuhls wrote:
> Fixes static builds with toolchains needing "-lm" for math functions.
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls at t-online.de>
> ---
>  configure | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 5d68695192..4e6c6edd30 100755
> --- a/configure
> +++ b/configure
> @@ -6438,7 +6438,7 @@ enabled libvpx            && {
>      fi
>  }
>  
> -enabled libwavpack        && require libwavpack wavpack/wavpack.h WavpackOpenFileOutput  -lwavpack
> +enabled libwavpack        && require_pkg_config libwavpack wavpack "wavpack/wavpack.h" WavpackOpenFileOutput

For the sake of not breaking compilation with incomplete build
environments, add the pkg_config check while keeping the old check as a
fallback with the addition of $libm_extralibs after -lwavpack, which
should include -lm when present.

This means doing { check_pkg_config ... || require ... }, like with
libsmbclient.

>  enabled libwebp           && {
>      enabled libwebp_encoder      && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion
>      enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; }
> 



More information about the ffmpeg-devel mailing list