From 4ac9784480441d2bebe8a2ad9584165bbf2ee345 Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Mon, 24 Oct 2016 12:12:29 +0100 Subject: [PATCH] Fix flex 2.6.1's output regarding signed/unsigned comparisons. Add comment referencing flex bug. Note this workaround breaks $(LFLAGS). --- configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9a8b9977..7abb916a 100644 --- a/configure.ac +++ b/configure.ac @@ -524,15 +524,19 @@ AS_IF([test "x$with_oauth" = xyes && test "x$HAVE_CURL_H" = x], dnl ---------------- dnl CHECK FLEX FIXUP dnl ---------------- +dnl BUG: This stops $(LFLAGS) working as it comes after $(AM_FLAGS). dnl Use AM_LFLAGS make variable setting to work around bugs in flex dnl 2.5.36-37 that cause signed/unsigned mismatch, dnl http://sourceforge.net/p/flex/bugs/140/ +dnl 2.6.1 bug: https://github.com/westes/flex/issues/97 AS_IF([test "$LEX" = flex], [AS_CASE([`$LEX -V`], [flex\ 2.5.35], [AM_LFLAGS=\ '; sed "s/ int n;/ size_t n;/" $@ >$@.tmp && mv -f $@.tmp $@'], [flex\ 2.5.3[[67]]], [AM_LFLAGS=\ -'; sed "s/\( \)int i;/\1yy_size_t i;/" $@ >$@.tmp && mv -f $@.tmp $@']) +'; sed "s/\( \)int i;/\1yy_size_t i;/" $@ >$@.tmp && mv -f $@.tmp $@'], + [flex\ 2.6.1], [AM_LFLAGS=\ +'; sed '\''/\/s/int/size_t/; s/\/int i/'\'' $@ >$@.tmp && mv -f $@.tmp $@']) AC_SUBST([AM_LFLAGS])]) dnl ------------------ -- 2.56.0