From: Khem Raj Date: Tue, 5 Oct 2010 23:50:27 +0000 (-0700) Subject: autotools.bbclass: Conditionally use autotools_prepackage_lamangler X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=014bd3b53453233d7b63c7ac46ba9afe443a7498;p=openembedded.git autotools.bbclass: Conditionally use autotools_prepackage_lamangler * autotools_prepackage_lamangler is not needed with libtool 2.4+ * add --with-sysroot when using libtool 2.4+ Signed-off-by: Khem Raj Acked-by: Martin Jansa Acked-by: Frans Meulenbroeks Acked-by: Koen Kooi --- diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass index b2de2b13f7..ce4f66a498 100644 --- a/classes/autotools.bbclass +++ b/classes/autotools.bbclass @@ -79,7 +79,9 @@ CONFIGUREOPTS = " --build=${BUILD_SYS} \ oe_runconf () { if [ -x ${S}/configure ] ; then - ${S}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@" + ${S}/configure \ + ${@["","--with-sysroot"][bb.data.getVar('LIBTOOL_HAS_SYSROOT', d, 1) == "yes"]} \ + ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@" else oefatal "no configure script found" fi @@ -170,8 +172,7 @@ autotools_do_install() { oe_runmake 'DESTDIR=${D}' install } -PACKAGE_PREPROCESS_FUNCS += "autotools_prepackage_lamangler" - +PACKAGE_PREPROCESS_FUNCS += "${@['autotools_prepackage_lamangler',''][bb.data.getVar('LIBTOOL_HAS_SYSROOT', d, 1) == "yes"]}" autotools_prepackage_lamangler () { for i in `find ${PKGD} -name "*.la"` ; do \ sed -i -e 's:${STAGING_LIBDIR}:${libdir}:g;' \