From 030e0f5859698638a33d3a34c0659871d1dc7333 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 14 Apr 2023 20:42:03 +0300 Subject: allow disabling Lexilla (Lexer) support by specifying --without-lexilla * This does not make sense for most SciTECO builds, but only when you want to optimize for size as the lexers take up 50% of the compressed binary size. Without Lexilla, it should be possible get it compiled in about 500kb. * It can be useful for instance when building for embedded distributions. * When Lexilla is disabled, symbols-scilexer.c is also not generated (we assume that the Lexilla sources are not available and it also doesn't serve any purpose). * Consequently, most of the lexer configuration scripts are also not installed under --without-lexilla. --- configure.ac | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 3f50576..4ee824c 100644 --- a/configure.ac +++ b/configure.ac @@ -196,8 +196,12 @@ AC_ARG_WITH(lexilla, AS_HELP_STRING([--with-lexilla=PATH], [Specify Lexilla's path [default=./contrib/lexilla]]), [LEXILLA_PATH=$withval], [LEXILLA_PATH=./contrib/lexilla]) -LEXILLA_PATH=`canonicalize $LEXILLA_PATH` -AC_SUBST(LEXILLA_PATH) +AM_CONDITIONAL(LEXILLA, [test x$LEXILLA_PATH != xno]) +if [[ x$LEXILLA_PATH != xno ]]; then + LEXILLA_PATH=`canonicalize $LEXILLA_PATH` + AC_SUBST(LEXILLA_PATH) + AC_DEFINE(HAVE_LEXILLA, 1, [Building with Lexilla (Lexer) support]) +fi CPPFLAGS="$CPPFLAGS -I$LEXILLA_PATH/include" -- cgit v1.2.3