minimal required version of (optional) tools

Ondřej Surý ondrej at sury.org
Sun Jul 1 18:01:30 EDT 2012


> Can we stick to flex instead of lex?  In any case, flex 2.5.35 supports
> %option reentrant noyyget_FUNCTIO and noyyset_FUNCTION, which options are
> not supported by lex on ci.cyrusimap.org .  noyyget_ and noyyset_ permit to
> exclude some unneeded functions from sieve/addr-lex.c and sieve/sieve-lex.c,
> which results smaller .c files and smaller tables of exported symbols (which
> in theory means less time for the dynamic linker to find an exported
> symbol).

Just in case you need autoconf macro, we ended up with this in Knot DNS:

AC_CACHE_CHECK([for reentrant lex], [ac_cv_path_LEX],
  [AC_PATH_PROGS_FEATURE_CHECK([LEX], [$LEX flex gflex],
  [cat >conftest.l <<_ACEOF
%{
%}

%option reentrant
%option bison-bridge
%option noinput
%option nounput
%option noreject

BLANK [ \t\n]

%%
<<EOF>> return 0;
%%
_ACEOF
_AC_DO_VAR(ac_path_LEX conftest.l)
test $ac_status -eq 0 && ac_cv_path_LEX=$ac_path_LEX ac_path_LEX_found=true
rm -f conftest.l lexyy.c lex.yy.c
],
[AC_MSG_ERROR([could not find lex that supports reentrant parsers])])])
AC_SUBST([LEX], [$ac_cv_path_LEX])
AM_PROG_LEX

O.
-- 
Ondřej Surý <ondrej at sury.org>


More information about the Cyrus-devel mailing list