@@ -26,6 +26,11 @@ OECONF_ARCHTUPLE:>sdk-cross = " --target=${TARGET_ARCH}"
OECONF_ARCHTUPLE:>canadian-cross = " --target=${TARGET_ARCH}"
OECONF_ARCHTUPLE[emit] = "do_configure"
+OECONF_STATIC = "--disable-static"
+OECONF_SHARED = "--disable-shared"
+OECONF_STATIC:STATIC = "--enable-static"
+OECONF_SHARED:SHARED = "--enable-shared"
+
CONFIGURE_SCRIPT ?= "${S}/configure"
autotools_configure () {
@@ -38,6 +43,7 @@ autotools_configure () {
--sharedstatedir=${sharedstatedir} --localstatedir=${localstatedir}\
--libdir=${libdir} --includedir=${includedir}\
--infodir=${infodir} --mandir=${mandir}\
+ ${OECONF_SHARED} ${OECONF_STATIC}\
${EXTRA_OECONF} $@
else
oefatal "no configure script found"
@@ -13,6 +13,14 @@ require conf/make.conf
export MAKE
+# Default flags for shared/static
+OECONF_SHARED_native ?= "true"
+OECONF_STATIC_native ?= "true"
+OECONF_SHARED_cross ?= "true"
+OECONF_STATIC_cross ?= "true"
+OECONF_SHARED_machine ?= "true"
+OECONF_STATIC_machine ?= "true"
+
oe_runmake() {
${MAKE} $PARALLEL_MAKE ${EXTRA_OEMAKE} "$@"
}
@@ -81,5 +81,25 @@ def late_overrides_fixup(d):
if cpu == 'x86_64':
overrides.insert(overrides.index('%s_CPU_${%s_CPU}'%(type, type)) + 1,
'%s_CPU_x86'%(type))
+
+ # Static/Shared
+ fmtPN = d.get("PN").replace("-","_").replace("+","p")
+ enable = d.get("OECONF_STATIC_" + fmtPN + "_" + d.get("RECIPE_TYPE"))
+ if enable:
+ if enable.lower() in ("yes", "true", "t", "1"):
+ overrides.append("STATIC")
+ else:
+ enable = d.get("OECONF_STATIC_" + d.get("RECIPE_TYPE"))
+ if enable and enable.lower() in ("yes", "true", "t", "1"):
+ overrides.append("STATIC")
+ enable = d.get("OECONF_SHARED_" + fmtPN + "_" + d.get("RECIPE_TYPE"))
+ if enable:
+ if enable.lower() in ("yes", "true", "t", "1"):
+ overrides.append("SHARED")
+ else:
+ enable = d.get("OECONF_SHARED_" + d.get("RECIPE_TYPE"))
+ if enable and enable.lower() in ("yes", "true", "t", "1"):
+ overrides.append("SHARED")
+
d.set("OVERRIDES", ":".join(overrides))
return