aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2008-10-12 09:07:14 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2008-10-12 09:07:14 +0000
commita5344cf7ec237cb0f68c14bca68636f92bfc224b (patch)
tree72c1782e18390899bb30f6a043b8800357f73a12 /configure
parentf2e5786771e6ce989efc7b9136c73343e354c0b0 (diff)
downloadffmpeg-a5344cf7ec237cb0f68c14bca68636f92bfc224b.tar.gz
Implement CPP condition check support in configure.
Originally committed as revision 15597 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure b/configure
index 0428454607..f45495ffbd 100755
--- a/configure
+++ b/configure
@@ -527,6 +527,18 @@ int main(int argc, char **argv){
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(){
log check_lib "$@"
header="$1"
@@ -614,6 +626,14 @@ require2(){
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(){
cfg=$1
pkg=$2