diff --git a/configure b/configure
index d3bae10a423c6badfa5a5fc7d0d4047a7c4dba04..872734dbd479a505eb27f674a82568313f1bbab9 100755
--- a/configure
+++ b/configure
@@ -214,7 +214,7 @@ add_extralibs(){
 }
 
 check_cmd(){
-    "$@" 2>&1 | tee -a $logfile | { ! grep -q .; }
+    "$@" 2>&1 | tee -a $logfile | { ! grep -E -q -v '#warning|^In file'; }
 }
 
 check_cc(){