configure: Add check_builtin convenience function
authorDiego Biurrun <diego@biurrun.de>
Mon, 4 Mar 2013 21:59:41 +0000 (22:59 +0100)
committerDiego Biurrun <diego@biurrun.de>
Tue, 5 Mar 2013 10:04:37 +0000 (11:04 +0100)
configure

index 157517f..f4c04a3 100755 (executable)
--- a/configure
+++ b/configure
@@ -937,6 +937,16 @@ check_struct(){
         enable_safe "${struct}_${member}"
 }
 
+check_builtin(){
+    log check_builtin "$@"
+    name=$1
+    headers=$2
+    builtin=$3
+    shift 3
+    disable "$name"
+    check_code ld "$headers" "$builtin" "$@" && enable "$name"
+}
+
 require(){
     name="$1"
     header="$2"