[ragel-users] [PATCH] Handle the new ragel version format in the autoconf script
Wictor Lund
wlund at iki.fi
Mon Aug 12 06:34:38 EDT 2019
Hi,
Some older ragel version I have does like this:
$ ragel --version
Ragel State Machine Compiler version 6.9 Oct 2014
Copyright (c) 2001-2009 by Adrian Thurston
, while a newer one does like this:
$ ragel --version
Ragel State Machine Compiler version 7.0.0.9 August 2016
Copyright (c) 2001-2015 by Adrian Thurston
The current contrib/ragel.m4 file cannot parse the newer --version string.
I propose that contrib/ragel.m4 should be fixed according to the attached
patch.
--
Wictor Lund
---
contrib/ragel.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/ragel.m4 b/contrib/ragel.m4
index 3629d334..e7b42425 100644
--- a/contrib/ragel.m4
+++ b/contrib/ragel.m4
@@ -23,7 +23,7 @@ AC_DEFUN([CHECK_RAGEL], [
AS_IF([test x"$RAGEL" = x"no"],
[RAGEL=false],
AS_IF([test x"$2" != "x"],
- [ragel_version=`$RAGEL --version | sed -n -e '1s:.*version \(@<:@0-9@:>@\.@<:@0-9@:>@\) .*:\1:p'`
+ [ragel_version=`$RAGEL --version | sed -n -e '1s:.*version \(@<:@0-9@:>@\.@<:@0-9@:>@\)\(\.@<:@0-9@:>@\)* .*:\1:p'`
ragel_version_compare=`echo $ragel_version | tr -d .`
ragel_wanted_version=`echo $2 | tr -d .`
AS_IF([test $ragel_version_compare -lt $ragel_wanted_version],
--
2.22.0
More information about the ragel-users
mailing list