changeset 32214:fe807b1b70af

Add function_check_broken convenience function. It can be used similar to header_check_broken, but it also tests for the availability of functions along with the needed headers.
author diego
date Sat, 18 Sep 2010 09:49:12 +0000
parents 350cd8d94435
children 37bf4af10f1b
files configure
diffstat 1 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Sat Sep 18 09:45:03 2010 +0000
+++ b/configure	Sat Sep 18 09:49:12 2010 +0000
@@ -115,8 +115,9 @@
   compile_check $TMPC $@
 }
 
-# This is a special check only to be used for broken headers that do not
-# include all dependencies.
+# The following checks are special and should only be used with broken and
+# non-selfsufficient headers that do not include all of their dependencies.
+
 header_check_broken() {
   cat > $TMPC << EOF
 #include <$1>
@@ -128,6 +129,17 @@
   compile_check $TMPC $@
 }
 
+function_check_broken() {
+  cat > $TMPC << EOF
+#include <$1>
+#include <$2>
+int main(void) { $3; return 0; }
+EOF
+  shift
+  shift
+  compile_check $TMPC $@
+}
+
 yasm_check() {
   echo >> "$TMPLOG"
   cat "$TMPS" >> "$TMPLOG"