summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-20 15:53:40 +0100
committerwm4 <wm4@nowhere>2015-01-20 15:53:40 +0100
commit5a93dd62456a8fbbbff38f7bd655ab6127faa8cb (patch)
tree14cbfab18c9b20e6697dda6190d4a26bc550ee81 /wscript
parent061d9b1afeae6281c63f1cba15c557c50fa0563b (diff)
downloadmpv-5a93dd62456a8fbbbff38f7bd655ab6127faa8cb.tar.bz2
mpv-5a93dd62456a8fbbbff38f7bd655ab6127faa8cb.tar.xz
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.
Diffstat (limited to 'wscript')
-rw-r--r--wscript16
1 files changed, 8 insertions, 8 deletions
diff --git a/wscript b/wscript
index 4798a82f3b..c8ab91ad83 100644
--- a/wscript
+++ b/wscript
@@ -397,6 +397,14 @@ Libav libraries ({0}). Aborting.".format(" ".join(libav_pkg_config_checks))
'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',
'func': check_statement('libavcodec/avcodec.h', """int x, y;
@@ -415,14 +423,6 @@ Libav libraries ({0}). Aborting.".format(" ".join(libav_pkg_config_checks))
'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',
'func': check_statement('libavcodec/avcodec.h',