summaryrefslogtreecommitdiff
path: root/meta/classes/autotools.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/autotools.bbclass')
-rw-r--r--meta/classes/autotools.bbclass42
1 files changed, 19 insertions, 23 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 324cbff47a..d43ae6d88b 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -38,6 +38,12 @@ def autotools_set_crosscompiling(d):
return " cross_compiling=yes"
return ""
+def append_libtool_sysroot(d):
+ # Only supply libtool sysroot option for non-native packages
+ if not bb.data.inherits_class('native', d):
+ return '--with-libtool-sysroot=${STAGING_DIR_HOST}'
+ return ""
+
# EXTRA_OECONF_append = "${@autotools_set_crosscompiling(d)}"
CONFIGUREOPTS = " --build=${BUILD_SYS} \
@@ -56,14 +62,13 @@ CONFIGUREOPTS = " --build=${BUILD_SYS} \
--includedir=${includedir} \
--oldincludedir=${oldincludedir} \
--infodir=${infodir} \
- --mandir=${mandir}"
+ --mandir=${mandir} \
+ ${@append_libtool_sysroot(d)}"
oe_runconf () {
if [ -x ${S}/configure ] ; then
cfgcmd="${S}/configure \
- ${CONFIGUREOPTS} \
- ${EXTRA_OECONF} \
- $@"
+ ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
oenote "Running $cfgcmd..."
$cfgcmd || oefatal "oe_runconf failed"
else
@@ -104,9 +109,12 @@ autotools_do_configure() {
AUTOV=`automake --version |head -n 1 |sed "s/.* //;s/\.[0-9]\+$//"`
automake --version
echo "AUTOV is $AUTOV"
- install -d ${STAGING_DATADIR}/aclocal
- install -d ${STAGING_DATADIR}/aclocal-$AUTOV
- acpaths="$acpaths -I${STAGING_DATADIR}/aclocal-$AUTOV -I ${STAGING_DATADIR}/aclocal"
+ if [ -d ${STAGING_DATADIR}/aclocal-$AUTOV ]; then
+ acpaths="$acpaths -I${STAGING_DATADIR}/aclocal-$AUTOV"
+ fi
+ if [ -d ${STAGING_DATADIR}/aclocal ]; then
+ acpaths="$acpaths -I ${STAGING_DATADIR}/aclocal"
+ fi
# autoreconf is too shy to overwrite aclocal.m4 if it doesn't look
# like it was auto-generated. Work around this by blowing it away
# by hand, unless the package specifically asked not to run aclocal.
@@ -150,22 +158,10 @@ autotools_do_configure() {
autotools_do_install() {
oe_runmake 'DESTDIR=${D}' install
-}
-
-PACKAGE_PREPROCESS_FUNCS += "autotools_prepackage_lamangler"
-
-autotools_prepackage_lamangler () {
- for i in `find ${PKGD} -name "*.la"` ; do \
- sed -i -e 's:${STAGING_LIBDIR}:${libdir}:g;' \
- -e 's:${D}::g;' \
- -e 's:-I${WORKDIR}\S*: :g;' \
- -e 's:-L${WORKDIR}\S*: :g;' \
- $i
- done
-}
-
-autotools_stage_dir() {
- sysroot_stage_dir $1 $2
+ # Info dir listing isn't interesting at this point so remove it if it exists.
+ if [ -e "${D}${infodir}/dir" ]; then
+ rm -f ${D}${infodir}/dir
+ fi
}
inherit siteconfig