You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
configure: export pkg-config includedir variable
Some packages may not define custom cflags, in which case a simple "pkg-config --cflags" call will return an empty string. This change will be useful to get a valid include path that can be used in library checks. Reviewed-by: Haihao Xiang <haihao.xiang@intel.com> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
5
configure
vendored
5
configure
vendored
@@ -1446,9 +1446,11 @@ test_pkg_config(){
|
|||||||
test_cmd $pkg_config --exists --print-errors $pkg_version || return
|
test_cmd $pkg_config --exists --print-errors $pkg_version || return
|
||||||
pkg_cflags=$($pkg_config --cflags $pkg_config_flags $pkg)
|
pkg_cflags=$($pkg_config --cflags $pkg_config_flags $pkg)
|
||||||
pkg_libs=$($pkg_config --libs $pkg_config_flags $pkg)
|
pkg_libs=$($pkg_config --libs $pkg_config_flags $pkg)
|
||||||
|
pkg_incdir=$($pkg_config --variable=includedir $pkg_config_flags $pkg)
|
||||||
check_func_headers "$headers" "$funcs" $pkg_cflags $pkg_libs "$@" &&
|
check_func_headers "$headers" "$funcs" $pkg_cflags $pkg_libs "$@" &&
|
||||||
enable $name &&
|
enable $name &&
|
||||||
set_sanitized "${name}_cflags" $pkg_cflags &&
|
set_sanitized "${name}_cflags" $pkg_cflags &&
|
||||||
|
set_sanitized "${name}_incdir" $pkg_incdir &&
|
||||||
set_sanitized "${name}_extralibs" $pkg_libs
|
set_sanitized "${name}_extralibs" $pkg_libs
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1466,7 +1468,8 @@ test_pkg_config_cpp(){
|
|||||||
pkg_incdir=$($pkg_config --variable=includedir $pkg_config_flags $pkg)
|
pkg_incdir=$($pkg_config --variable=includedir $pkg_config_flags $pkg)
|
||||||
test_cpp_condition "$pkg_incdir/$headers" "$cond" "$@" &&
|
test_cpp_condition "$pkg_incdir/$headers" "$cond" "$@" &&
|
||||||
enable $name &&
|
enable $name &&
|
||||||
set_sanitized "${name}_cflags" $pkg_cflags
|
set_sanitized "${name}_cflags" $pkg_cflags &&
|
||||||
|
set_sanitized "${name}_incdir" $pkg_incdir
|
||||||
}
|
}
|
||||||
|
|
||||||
check_pkg_config(){
|
check_pkg_config(){
|
||||||
|
Reference in New Issue
Block a user