Fix method ./configure uses to determine bison version (did not work in bourne shell) (submitted by anonymous)"
authorMario de Sousa <msousa@fe.up.pt>
Fri, 22 Dec 2017 17:14:02 +0000
changeset 1066 29735e347716
parent 1065 0066fe31a034
child 1067 ce81fa6d9024
Fix method ./configure uses to determine bison version (did not work in bourne shell) (submitted by anonymous)"
configure.ac
--- a/configure.ac	Thu Dec 21 17:56:12 2017 +0000
+++ b/configure.ac	Fri Dec 22 17:14:02 2017 +0000
@@ -28,8 +28,7 @@
 AC_PROG_AWK
 
 # Check bison version, we need a version great or equal than 2.4 to build matiec.
-version_bison="$(bison --version | sed q | cut -d' ' -f4)"
-version_bison=${version_bison:0:3}
+version_bison="$(bison --version | sed q | cut -d' ' -f4 | cut -d'.' -f1,2 )"
 
 AS_IF([awk -v ver="$version_bison" 'BEGIN { if (ver < 2.4) exit 1; }'],
 	[have_bison_correct=yes], [have_bison_correct=no])