mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-24 11:59:38 +00:00
Implement CPP condition check support in configure.
Originally committed as revision 15597 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
f2e5786771
commit
a5344cf7ec
20
configure
vendored
20
configure
vendored
@ -527,6 +527,18 @@ int main(int argc, char **argv){
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_cpp_condition(){
|
||||||
|
log check_cpp_condition "$@"
|
||||||
|
header=$1
|
||||||
|
condition=$2
|
||||||
|
check_cpp <<EOF
|
||||||
|
#include <$header>
|
||||||
|
#if !($condition)
|
||||||
|
#error "unsatisfied condition: $condition"
|
||||||
|
#endif
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
check_lib(){
|
check_lib(){
|
||||||
log check_lib "$@"
|
log check_lib "$@"
|
||||||
header="$1"
|
header="$1"
|
||||||
@ -614,6 +626,14 @@ require2(){
|
|||||||
check_lib2 "$headers" $func "$@" || die "ERROR: $name not found"
|
check_lib2 "$headers" $func "$@" || die "ERROR: $name not found"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
require_cpp_condition(){
|
||||||
|
name="$1"
|
||||||
|
header="$2"
|
||||||
|
cpp_condition="$3"
|
||||||
|
shift 3
|
||||||
|
check_cpp_condition $header "$cpp_condition" || die "ERROR: $name does not satisfy CPP condition: $cpp_condition"
|
||||||
|
}
|
||||||
|
|
||||||
check_foo_config(){
|
check_foo_config(){
|
||||||
cfg=$1
|
cfg=$1
|
||||||
pkg=$2
|
pkg=$2
|
||||||
|
Loading…
Reference in New Issue
Block a user