[PATCH v2] configure: Fix GCC version checking

Joel Stanley <[email protected]> Wed, 18 Jul 2018 20:31:46 +0930
Newsgroups gmane.comp.audio.mp3.lame
Message-ID <[email protected]>
The case statement fails to match as the braces are stripped when the
configure.in is converted to the configure script.

This is bad, as the configure script then decides to set GCC to false,
and no optimisation flags are applied.

Signed-off-by: Joel Stanley <[email protected]>
---
v2: The first fix was incorrect, as I was testing the changes
by hacking configure not configure.in. When generating configure, single
quotes are removed.

This has been tested on x86_64 and ppc64le.

 configure.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.in b/configure.in
index cea313d..aee44a6 100644
--- a/configure.in
+++ b/configure.in
@@ -96,7 +96,7 @@ if test "x${GCC}" = "xyes"; then
 		AC_MSG_CHECKING(version of GCC)
 		GCC_version="`${CC} --version | sed -n '1s/^[[^ ]]* (.*) //;s/ .*$//;1p'`"
 		case "${GCC_version}" in 
-		[0-9]*[0-9]*)
+		[[0-9]]*[[0-9]]*)
 			AC_MSG_RESULT(${GCC_version})
 			;;
 		*)
-- 
2.17.1


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot