1 From da21733178b34eea303964db5a05e8a3ee4095b4 Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Sat, 26 Aug 2017 15:17:06 +0200
4 Subject: [PATCH] build: make it possible to disable the build of the flex
7 The flex program uses fork(), which isn't available on noMMU
8 systems. However, the libfl library does not use fork(), and be used
9 by other programs/libraries.
11 Therefore, it makes sense to provide an option to disable the build of
14 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
15 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
18 Submitted-upstream: https://github.com/westes/flex/pull/256
19 Refused. We'll have to adapt when they do a new release...
22 configure.ac | 6 ++++++
23 doc/Makefile.am | 4 ++++
24 src/Makefile.am | 3 +++
25 4 files changed, 15 insertions(+)
27 diff --git a/Makefile.am b/Makefile.am
28 index e790e9d..8b57bc9 100644
31 @@ -62,8 +62,10 @@ ChangeLog: $(srcdir)/tools/git2cl
33 cd src && $(MAKE) $(AM_MAKEFLAGS) indent
37 cd $(DESTDIR)$(bindir) && \
38 $(LN_S) -f flex$(EXEEXT) flex++$(EXEEXT)
41 .PHONY: ChangeLog indent
42 diff --git a/configure.ac b/configure.ac
43 index 8882016..f49872b 100644
46 @@ -75,6 +75,12 @@ AC_ARG_ENABLE([libfl],
47 [], [enable_libfl=yes])
48 AM_CONDITIONAL([ENABLE_LIBFL], [test "x$enable_libfl" = xyes])
50 +AC_ARG_ENABLE([program],
51 + [AS_HELP_STRING([--disable-program],
52 + [do not build the flex program, only the libfl library])],
53 + [], [enable_program=yes])
54 +AM_CONDITIONAL([ENABLE_PROGRAM], [test "x$enable_program" = xyes])
56 # --disable-bootstrap is intended only to workaround problems with bootstrap
57 # (e.g. when cross-compiling flex or when bootstrapping has bugs).
58 # Ideally we should be able to bootstrap even when cross-compiling.
59 diff --git a/src/Makefile.am b/src/Makefile.am
60 index 0d13a5a..c73bc17 100644
63 @@ -4,7 +4,10 @@ LIBS = @LIBS@
72 noinst_PROGRAMS = stage1flex