Support two-digit version numbers in gcc version check
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Fri, 6 Dec 2019 20:23:56 +0000 (21:23 +0100)
committerGitHub <noreply@github.com>
Fri, 6 Dec 2019 20:23:56 +0000 (21:23 +0100)
fixes #2336 (non-recognition of gcc 10) with patch provided by JeffreyALaw.

f_check

diff --git a/f_check b/f_check
index 993ad9a..79b24e2 100644 (file)
--- a/f_check
+++ b/f_check
@@ -71,7 +71,7 @@ if ($compiler eq "") {
 
        if ($data =~ /GNU/) {
 
-           $data =~ /(\d)\.(\d).(\d)/;
+           $data =~ /(\d+)\.(\d+).(\d+)/;
            $major = $1;
            $minor = $2;