configure: Split test_cflags function off from check_cflags
authorDiego Biurrun <diego@biurrun.de>
Thu, 31 Oct 2013 18:48:59 +0000 (19:48 +0100)
committerDiego Biurrun <diego@biurrun.de>
Fri, 1 Nov 2013 21:05:20 +0000 (22:05 +0100)
This is useful to test flags without directly adding them to CFLAGS.

configure

index f72db76..549e04c 100755 (executable)
--- a/configure
+++ b/configure
@@ -779,14 +779,19 @@ int x;
 EOF
 }
 
-check_cflags(){
-    log check_cflags "$@"
+test_cflags(){
+    log test_cflags "$@"
     set -- $($cflags_filter "$@")
-    check_cc "$@" <<EOF && append CFLAGS "$@"
+    check_cc "$@" <<EOF
 int x;
 EOF
 }
 
+check_cflags(){
+    log check_cflags "$@"
+    test_cflags "$@" && add_cflags "$@"
+}
+
 test_ldflags(){
     log test_ldflags "$@"
     check_ld "$@" <<EOF