aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2023-04-14 20:42:03 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2023-04-14 20:42:03 +0300
commit030e0f5859698638a33d3a34c0659871d1dc7333 (patch)
tree4be596a4c481e7fcc70a358a2ad34934ea4f7e12 /configure.ac
parentba0875373d2250e3a6d63d5269ff1a4a89a280ed (diff)
downloadsciteco-030e0f5859698638a33d3a34c0659871d1dc7333.tar.gz
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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 6 insertions, 2 deletions
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"