From a88aca1d7dfa3a08957dd49cb61bac850f197106 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 12 Jan 2011 20:34:55 +0100 Subject: [PATCH] autotools.bbclass: pass distro_imposed_configure_flags Acked-by: Khem Raj Acked-by: Tom Rini Signed-off-by: Bernhard Reutner-Fischer --- classes/autotools.bbclass | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass index 247e21d199..77bd37d6f3 100644 --- a/classes/autotools.bbclass +++ b/classes/autotools.bbclass @@ -65,6 +65,22 @@ def append_libtool_sysroot(d): return '--with-libtool-sysroot=${STAGING_DIR_HOST}' return '' +def distro_imposed_configure_flags(d): + distro_features = bb.data.getVar('DISTRO_FEATURES', d, True) or "" + distro_features = distro_features.split() + flags = set() + features = (('largefile', 'largefile'), + ('ipv6' , 'ipv6'), + ('nls' , 'nls')) + + for knob, cfgargs in features: + if isinstance(cfgargs, basestring): + cfgargs = [cfgargs] + en_or_dis = knob in distro_features and "enable" or "disable" + for flg in cfgargs: + flags.add("--%s-%s" % (en_or_dis, flg)) + return " ".join(flags) + # EXTRA_OECONF_append = "${@autotools_set_crosscompiling(d)}" CONFIGUREOPTS = " --build=${BUILD_SYS} \ @@ -85,6 +101,7 @@ CONFIGUREOPTS = " --build=${BUILD_SYS} \ --infodir=${infodir} \ --mandir=${mandir} \ ${@append_libtool_sysroot(d)} \ + ${@distro_imposed_configure_flags(d)} \ " oe_runconf () { -- 2.39.5