# Ignore false positives.
#
# ./configure summary.
- next if $line =~ /^Compiler:\s+(cc|gcc|g\+\+|c\+\+)$/;
+ my $cc_regex = qr/(cc|(x86_64-linux-gnu-)?gcc|g\+\+|c\+\+)/;
+ next if $line =~ /^\s*(C|c)ompiler[\s.]*:\s+$cc_regex(\s-std=[a-z0-9:+]+)?\s*$/
+ or $line =~ /^\s*- (CC|CXX)\s*=\s*$cc_regex\s*$/
+ or $line =~ /^\s*-- Check for working (C|CXX) compiler: /;
# Is this a compiler or linker command?
my $compiler = 1;
# Output by configure or similar tools which should be ignored.
Compiler: gcc
+
+ compiler : gcc -std=gnu99
+
+ - General Compile FLAGS
+ - CC = mpicc
+ - CXX = g++
+ - FC = f95
+ - CPPFLAGS = -D_FORTIFY_SOURCE=2
+ - CFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security
+ - CXXFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security
+ - FCFLAGS = -g -O2
+ - LDLAGS = -Wl,--as-needed
+ - LIBS =
+
+Configure summary:
+
+ Compiler....................: gcc -std=gnu99
+ Compiler Flags..............: -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -Wextra
+ Prefix......................: /usr
+ Coding style checks.........: no
+ Enable debug................: yes
+
+Configuration:
+
+ Detected OS: linux-gnu
+ Install path: /usr
+ Compilation arch: linux
+
+ Compiler: x86_64-linux-gnu-gcc
+ Compiler flags: -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security
+
+ Linker flags: -rdynamic -Wl,-z,relro
+ Libraries: -lm
+
+-- Check for working C compiler: /usr/bin/gcc
+-- Check for working C compiler: /usr/bin/gcc
+-- Check for working C compiler: /usr/bin/gcc -- works
+-- Check for working C compiler: /usr/bin/gcc -- works
+-- Check for working CXX compiler: /usr/bin/c++
+-- Check for working CXX compiler: /usr/bin/c++
+-- Check for working CXX compiler: /usr/bin/c++ -- works
+-- Check for working CXX compiler: /usr/bin/c++ -- works