From 5a93dd62456a8fbbbff38f7bd655ab6127faa8cb Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 20 Jan 2015 15:53:40 +0100 Subject: build: reduce worst case with mismatching FFmpeg pkg-config files Handles mismatching libavfilter/libavdevice and libavcodec slightly better. libavfilter and libavdevice are optional, and thus are checked separately and at a later point of the build. But if a user system has at least 2 FFmpeg installations, and one of them lacks libavfilter or libavdevice, the build script will pick up the libavfilter/libavdevice package of the "other" FFmpeg installation. The moment waf picks these up, all include paths will start pointing at the "wrong" FFmpeg, and the FFmpeg API checks done earlier might be wrong too, leading to obscure and hard to explain compilation failures. Just moving the libavfilter/libavdevice checks before the FFmpeg API checks somewhat deals with this issue. Certainly not a proper solution, but since the change is harmless, and there is no proper solution, and the change doesn't actually add anything new, why not. --- wscript | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/wscript b/wscript index 4798a82f3b..c8ab91ad83 100644 --- a/wscript +++ b/wscript @@ -396,6 +396,14 @@ Libav libraries ({0}). Aborting.".format(" ".join(libav_pkg_config_checks)) 'func': check_true, 'req': True, 'fmsg': 'No resampler found. Install libavresample or libswresample (FFmpeg).' + }, { + 'name': '--libavfilter', + 'desc': 'libavfilter', + 'func': check_pkg_config('libavfilter', '>= 3.90.100'), + }, { + 'name': '--libavdevice', + 'desc': 'libavdevice', + 'func': check_pkg_config('libavdevice', '>= 54.0.0'), }, { 'name': 'avcodec-chroma-pos-api', 'desc': 'libavcodec avcodec_enum_to_chroma_pos API', @@ -414,14 +422,6 @@ Libav libraries ({0}). Aborting.".format(" ".join(libav_pkg_config_checks)) 'func': check_statement('libavcodec/vdpau.h', 'AVVDPAUContext *x = av_vdpau_alloc_context()', use='libav') - }, { - 'name': '--libavfilter', - 'desc': 'libavfilter', - 'func': check_pkg_config('libavfilter', '>= 3.90.100'), - }, { - 'name': '--libavdevice', - 'desc': 'libavdevice', - 'func': check_pkg_config('libavdevice', '>= 54.0.0'), }, { 'name': 'avcodec-metadata-update-side-data', 'desc': 'libavcodec AV_PKT_DATA_METADATA_UPDATE side data type', -- cgit v1.2.3