]> ruderich.org/simon Gitweb - blhc/blhc.git/blobdiff - bin/blhc
Fix false positive in configure output if $CC contains options.
[blhc/blhc.git] / bin / blhc
index 783ae73f27b66eb68df2fbc3c8e9c1635ebbfd2d..d5af8a01983d8f24241b44b596075b6646dea055 100755 (executable)
--- a/bin/blhc
+++ b/bin/blhc
@@ -852,7 +852,11 @@ foreach my $file (@ARGV) {
             next if $line =~ /^\s*(?:Host\s+)?(?:C(?:\+\+)?\s+)?
                                 [Cc]ompiler[\s.]*:?\s+
                                 /x;
-            next if $line =~ /^\s*(?:- )?(?:HOST_)?(?:CC|CXX)\s*=\s*$cc_regex_full\s*$/o;
+            next if $line =~ m{^\s*(?:-\s)?(?:HOST_)?(?:CC|CXX)
+                                \s*=\s*$cc_regex_full
+                                # optional compiler options, don't allow
+                                # "everything" here to prevent false negatives
+                                \s*(?:\s-\S+)*\s*$}xo;
             # `moc-qt4`/`moc-qt5` contain '-I.../linux-g++' in their command
             # line (or similar for other architectures) which gets recognized
             # as a compiler line, but `moc-qt*` is only a preprocessor for Qt