diff mbox

[FFmpeg-devel] configure: Fix detection of vp9 decoder/encoder

Message ID 6a1df4ea6f578904bd2d63d681d77133@matouschek.org
State New
Headers show

Commit Message

Felix Matouschek Dec. 12, 2017, 2:53 p.m. UTC
Am 12.12.2017 15:37, schrieb James Almer:
> No, this is not correct. If anything has to be added here, it would be
> $libm_extralibs. -lm is not needed/available on some systems.

Ok, changed it.

> Also, you should be using pkg-config. Its job is to make sure all the
> cflags and ldflags are correct for your system.
> This shitty fallback shouldn't be here in the first place, but some
> people are too stubborn about it.

The Android NDK has no pkg-config so it is somehow useful.

Comments

Felix Matouschek Dec. 19, 2017, 8:05 p.m. UTC | #1
Any chance this could get merged?

> Am 12.12.2017 um 15:53 schrieb Felix Matouschek <felix@matouschek.org>:
> 
> Am 12.12.2017 15:37, schrieb James Almer:
>> No, this is not correct. If anything has to be added here, it would be
>> $libm_extralibs. -lm is not needed/available on some systems.
> 
> Ok, changed it.
> 
>> Also, you should be using pkg-config. Its job is to make sure all the
>> cflags and ldflags are correct for your system.
>> This shitty fallback shouldn't be here in the first place, but some
>> people are too stubborn about it.
> 
> The Android NDK has no pkg-config so it is somehow useful.<0001-configure-Fix-detection-of-vp9-decoder-encoder.patch>_______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
James Almer Dec. 19, 2017, 8:19 p.m. UTC | #2
On 12/12/2017 11:53 AM, Felix Matouschek wrote:
> Am 12.12.2017 15:37, schrieb James Almer:
>> No, this is not correct. If anything has to be added here, it would be
>> $libm_extralibs. -lm is not needed/available on some systems.
> 
> Ok, changed it.
> 
>> Also, you should be using pkg-config. Its job is to make sure all the
>> cflags and ldflags are correct for your system.
>> This shitty fallback shouldn't be here in the first place, but some
>> people are too stubborn about it.
> 
> The Android NDK has no pkg-config so it is somehow useful.
> 
> 0001-configure-Fix-detection-of-vp9-decoder-encoder.patch
> 
> 
> From b2f30f087aaf7d1284ebe08a09adc478df80ba22 Mon Sep 17 00:00:00 2001
> From: Felix Matouschek <felix@matouschek.org>
> Date: Tue, 12 Dec 2017 10:42:40 +0100
> Subject: [PATCH] configure: Fix detection of vp9 decoder/encoder
> To: ffmpeg-devel@ffmpeg.org
> 
> At least on Android the vp9 decoder/encoder needs $libm_extralibs
> to successfully link, it was missing in the check_lib calls for vp9
> 
> Signed-off-by: Felix Matouschek <felix@matouschek.org>
> ---
>  configure | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/configure b/configure
> index 8cf48ae1cf..df149024d3 100755
> --- a/configure
> +++ b/configure
> @@ -5918,11 +5918,11 @@ enabled libvpx            && {
>      }
>      enabled libvpx_vp9_decoder && {
>          check_pkg_config libvpx_vp9_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp9_dx ||
> -            check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" -lvpx
> +            check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" -lvpx $libm_extralibs
>      }
>      enabled libvpx_vp9_encoder && {
>          check_pkg_config libvpx_vp9_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp9_cx ||
> -            check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" -lvpx
> +            check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" -lvpx $libm_extralibs
>      }
>      if disabled_all libvpx_vp8_decoder libvpx_vp9_decoder libvpx_vp8_encoder libvpx_vp9_encoder; then
>          die "libvpx enabled but no supported decoders found"
> -- 2.14.1.windows.1

Pushed.

Wouldn't this need to be done for vp8 as well, for that matter?
Felix Matouschek Dec. 19, 2017, 8:22 p.m. UTC | #3
Am 19.12.2017 um 21:19 schrieb James Almer <jamrial@gmail.com>:
> 
> Pushed.
> 
> Wouldn't this need to be done for vp8 as well, for that matter?
> 

At least on Android using libvpx 1.6.1 it was not needed for vp8, only for vp9.
diff mbox

Patch

From b2f30f087aaf7d1284ebe08a09adc478df80ba22 Mon Sep 17 00:00:00 2001
From: Felix Matouschek <felix@matouschek.org>
Date: Tue, 12 Dec 2017 10:42:40 +0100
Subject: [PATCH] configure: Fix detection of vp9 decoder/encoder
To: ffmpeg-devel@ffmpeg.org

At least on Android the vp9 decoder/encoder needs $libm_extralibs
to successfully link, it was missing in the check_lib calls for vp9

Signed-off-by: Felix Matouschek <felix@matouschek.org>
---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 8cf48ae1cf..df149024d3 100755
--- a/configure
+++ b/configure
@@ -5918,11 +5918,11 @@  enabled libvpx            && {
     }
     enabled libvpx_vp9_decoder && {
         check_pkg_config libvpx_vp9_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp9_dx ||
-            check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" -lvpx
+            check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" -lvpx $libm_extralibs
     }
     enabled libvpx_vp9_encoder && {
         check_pkg_config libvpx_vp9_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp9_cx ||
-            check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" -lvpx
+            check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" -lvpx $libm_extralibs
     }
     if disabled_all libvpx_vp8_decoder libvpx_vp9_decoder libvpx_vp8_encoder libvpx_vp9_encoder; then
         die "libvpx enabled but no supported decoders found"
-- 
2.14.1.windows.1