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.

Conflicts:
	wscript
This commit is contained in:
wm4 2015-01-20 15:53:40 +01:00 committed by Diogo Franco (Kovensky)
parent a0de98871b
commit 1f815558b8
1 changed files with 12 additions and 12 deletions

24
wscript
View File

@ -391,6 +391,18 @@ Libav libraries ({0}). Aborting.".format(" ".join(libav_pkg_config_checks))
'func': check_true, 'func': check_true,
'req': True, 'req': True,
'fmsg': 'No resampler found. Install libavresample or libswresample (FFmpeg).' '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': '--libpostproc',
'desc': 'libpostproc',
'func': check_pkg_config('libpostproc', '>= 52.2.100'),
}, { }, {
'name': 'avcodec-chroma-pos-api', 'name': 'avcodec-chroma-pos-api',
'desc': 'libavcodec avcodec_enum_to_chroma_pos API', 'desc': 'libavcodec avcodec_enum_to_chroma_pos API',
@ -415,18 +427,6 @@ Libav libraries ({0}). Aborting.".format(" ".join(libav_pkg_config_checks))
'func': check_statement('libavcodec/vdpau.h', 'func': check_statement('libavcodec/vdpau.h',
'AVVDPAUContext *x = av_vdpau_alloc_context()', 'AVVDPAUContext *x = av_vdpau_alloc_context()',
use='libav') 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': '--libpostproc',
'desc': 'libpostproc',
'func': check_pkg_config('libpostproc', '>= 52.2.100'),
}, { }, {
'name': 'avcodec-metadata-update-side-data', 'name': 'avcodec-metadata-update-side-data',
'desc': 'libavcodec AV_PKT_DATA_METADATA_UPDATE side data type', 'desc': 'libavcodec AV_PKT_DATA_METADATA_UPDATE side data type',