[FFmpeg-devel] [PATCH] configure: require pkg-config for libvorbis

Ricardo Constantino wiiaboo at gmail.com
Fri Jun 30 21:06:45 EEST 2017


libvorbis comes with pkg-config files since at least v1.0.1, way back
in 2003.

The extra check is needed for shared builds, as the pkg-config file
for vorbisenc doesn't include vorbis and ogg if --static isn't used.

The previous check could be also used as an extra fallback in case
pkg-config isn't installed.
---
 configure | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 282114d268..54c1c93ecc 100755
--- a/configure
+++ b/configure
@@ -5902,7 +5902,10 @@ enabled libtwolame        && require libtwolame twolame.h twolame_init -ltwolame
 enabled libv4l2           && require_pkg_config libv4l2 libv4l2.h v4l2_ioctl
 enabled libvidstab        && require_pkg_config "vidstab >= 0.98" vid.stab/libvidstab.h vsMotionDetectInit
 enabled libvo_amrwbenc    && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_init -lvo-amrwbenc
-enabled libvorbis         && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg
+enabled libvorbis         && { use_pkg_config vorbisenc vorbis/vorbisenc.h vorbis_info_init ||
+                               { check_pkg_config vorbisenc vorbis/vorbisenc.h vorbis_info_init -lvorbis -logg &&
+                                 add_cflags $vorbisenc_cflags && add_extralibs $vorbisenc_extralibs -lvorbis -logg; } ||
+                                 die "ERROR: libvorbis not found."; }
 
 enabled libvpx            && {
     enabled libvpx_vp8_decoder && {
-- 
2.13.0



More information about the ffmpeg-devel mailing list