build: add check_apple_framework()
authorClément Bœsch <cboesch@gopro.com>
Wed, 6 Sep 2017 09:29:23 +0000 (11:29 +0200)
committerClément Bœsch <u@pkh.me>
Fri, 8 Sep 2017 16:55:19 +0000 (18:55 +0200)
This will be used in the following commits.

configure

index 996cb9f..8d4ab43 100755 (executable)
--- a/configure
+++ b/configure
@@ -1121,6 +1121,15 @@ check_header_objcc(){
     } | check_objcc && check_stat "$TMPO" && enable_safe $header
 }
 
+check_apple_framework(){
+    log check_apple_framework "$@"
+    framework="$1"
+    name="$(tolower $framework)"
+    header="${framework}/${framework}.h"
+    disable $name
+    check_header_objcc $header && enable $name && add_extralibs "-framework $framework"
+}
+
 check_func(){
     log check_func "$@"
     func=$1