diff options
author | James Almer <jamrial@gmail.com> | 2017-09-29 22:56:08 -0300 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2017-10-04 19:12:26 +0200 |
commit | d66fe7ff53a5cade7a702100a9006dfe5ae1c473 (patch) | |
tree | fbb4e159366637772c6e78c33f9c8ade030ebd5a /configure | |
parent | 92f0aceb36c6e4412d4cf346e70dc74b5a4069e9 (diff) | |
download | ffmpeg-d66fe7ff53a5cade7a702100a9006dfe5ae1c473.tar.gz |
configure: Add test_pkg_config()
This helper is split off check_pkg_config(), setting only the pkg CFLAGS
and extralibs. This is useful for checks that do not require or do not
benefit from setting global CFLAGS.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -1025,8 +1025,8 @@ check_lib(){ enable $name && eval ${name}_extralibs="\$@" } -check_pkg_config(){ - log check_pkg_config "$@" +test_pkg_config(){ + log test_pkg_config "$@" name="$1" pkg_version="$2" pkg="${2%% *}" @@ -1039,8 +1039,15 @@ check_pkg_config(){ pkg_libs=$($pkg_config --libs $pkg_config_flags $pkg) check_func_headers "$headers" "$funcs" $pkg_cflags $pkg_libs "$@" && enable $name && - add_cflags "$pkg_cflags" && - eval $(sanitize_var_name ${name}_extralibs)="\$pkg_libs" + set_sanitized "${name}_cflags" $pkg_cflags && + set_sanitized "${name}_extralibs" $pkg_libs +} + +check_pkg_config(){ + log check_pkg_config "$@" + name="$1" + test_pkg_config "$@" && + eval add_cflags \$${name}_cflags } check_exec(){ |