[PATCH] config: use simpler regexp syntax to get dot version

Bill Spitzak spitzak at gmail.com
Wed Apr 8 12:48:10 PDT 2015



On 04/08/2015 12:15 AM, Pekka Paalanen wrote:

>> +	dot_version=`$DOT -V 2>&1|$GREP -o ['[0-9]*\.[0-9]*\.[0-9]*']`
>>   	AS_VERSION_COMPARE([$dot_version], [2.26.0],
>>   	                   [AC_MSG_RESULT([no])
>>   	                    AC_MSG_ERROR([Graphviz dot $dot_version too old. Graphviz 2.26+ required for documentation build. Install required graphviz version or disable the documentation using --disable-documentation])],
>
> For the record, I think those @<:@ and @:>@ are square brackets. They
> are just an M4 escape thing to prevent M4 from interpreting those
> square brackets and possibly removing them.
>
> Oh yeah, "quadrigraphs":
> http://stackoverflow.com/questions/2308721/how-do-i-escape-text-in-autoconf-m4
>
> It's just another way to protect the square brackets. Your way should
> work fine here too, since these are not M4 macro arguments.

Egad, M4 is a mess.

Anyway it is possible the following is better:

	$EGREP -o ['[0-9]+\.[0-9]+\.[0-9]+']

This will prevent it from matching the text ".." if for some reason dot 
prints that before the version number.


More information about the wayland-devel mailing list