From 64dc9dde8665280e6ac0fcd6a5477ec2ade7bf9f Mon Sep 17 00:00:00 2001 From: Stephen Kitt Date: Tue, 10 Mar 2020 11:45:04 +0100 Subject: [PATCH] Handle GCC versions after 9 This simplifies the interpretation of GCC versions, and handles all versions greater than 4, hopefully for good. Fixes: #590 Signed-off-by: Stephen Kitt --- configure | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 85c81550a..4fb2cf08d 100755 --- a/configure +++ b/configure @@ -458,11 +458,17 @@ elif test "$have_gcc" = yes; then fi case $cxx_version in - 4.[7-9]|4.[7-9].[0-9]|4.[7-9].[0-9][-.]*|[5-9]|[5-9].[0-9]|[5-9].[0-9].[0-9]|[5-9].[0-9].[0-9][-.]*) + [1-9]*) _cxx_major=`echo $cxx_version | cut -d '.' -f 1` _cxx_minor=`echo $cxx_version | cut -d '.' -f 2` - cxx_version="$cxx_version, ok" - cxx_verc_fail=no + # Need at least version 4.7 + if [ $_cxx_major -ge 5 ] || [ $_cxx_major -eq 4 -a $_cxx_minor -ge 7 ]; then + cxx_version="$cxx_version, ok" + cxx_verc_fail=no + else + cxx_version="$cxx_version, bad" + cxx_verc_fail=yes + fi ;; 'not found') cxx_verc_fail=yes