summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2021-03-26 21:48:45 +1300
committerAndrew Bartlett <abartlet@samba.org>2021-03-29 02:12:23 +0000
commit942c0d2128cb8e64a9354dde6bdae82a1c1c3d88 (patch)
treee4acc7beedb23e8f0b400ebdf91b4fb67c1435c1 /wscript
parent5bc1463a5c6e793ed78a77d9e513d94006dfce20 (diff)
downloadsamba-942c0d2128cb8e64a9354dde6bdae82a1c1c3d88.tar.gz
build: Notice if flex is missing at configure time
This may also fix the coverage build by ensuring --noline is always specified to flex. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14586 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Mar 29 02:12:23 UTC 2021 on sn-devel-184
Diffstat (limited to 'wscript')
-rw-r--r--wscript16
1 files changed, 13 insertions, 3 deletions
diff --git a/wscript b/wscript
index e44436391a8..9c501e9441f 100644
--- a/wscript
+++ b/wscript
@@ -232,6 +232,19 @@ def configure(conf):
if not (Options.options.without_ad_dc):
conf.DEFINE('AD_DC_BUILD_IS_ENABLED', 1)
+ # Check for flex before doing the embedded heimdal checks so we can bail if we don't have it.
+ Logs.info("Checking for flex")
+ conf.find_program('flex', var='FLEX')
+ if conf.env['FLEX']:
+ conf.CHECK_COMMAND('%s --version' % conf.env.FLEX[0],
+ msg='Using flex version',
+ define=None,
+ on_target=False)
+ conf.env.FLEXFLAGS = ['-t']
+
+ # #line statements in these generated files cause issues for lcov
+ conf.env.FLEXFLAGS += ["--noline"]
+
if Options.options.with_system_mitkrb5:
if not Options.options.with_experimental_mit_ad_dc and \
not Options.options.without_ad_dc:
@@ -355,9 +368,6 @@ def configure(conf):
msg="Checking compiler for full RELRO support"):
conf.env['ENABLE_RELRO'] = True
- # #line statements in these generated files cause issues for lcov
- conf.env.FLEXFLAGS += ["--noline"]
-
conf.SAMBA_CONFIG_H('include/config.h')
def etags(ctx):