aboutsummaryrefslogtreecommitdiffstats
path: root/classes/autotools.bbclass
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-10-19 19:50:14 -0700
committerChris Larson <chris_larson@mentor.com>2010-11-02 18:39:02 -0700
commit6e509ddf9ae266d224f136ecf2b2f83a7401df9c (patch)
tree646d69d016a27f5e391f81fb0f299493f8e0e67f /classes/autotools.bbclass
parent4857112c0b087845457c418e87d53a07204e6eeb (diff)
downloadopenembedded-6e509ddf9ae266d224f136ecf2b2f83a7401df9c.tar.gz
autotools: update config.{sub,guess} directly
Drops gnu-configize in favor of doing it in the classes, and automatically doing it in autotools_base as well as autotools, ensuring that even recipes which only want oe_runconf will get the config files updated. Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'classes/autotools.bbclass')
-rw-r--r--classes/autotools.bbclass45
1 files changed, 42 insertions, 3 deletions
diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass
index 16ba469d2a..46d6d3dad1 100644
--- a/classes/autotools.bbclass
+++ b/classes/autotools.bbclass
@@ -18,8 +18,7 @@ def autotools_deps(d):
and not bb.data.inherits_class('sdk', d) \
and not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d, 1):
deps += 'libtool-cross '
-
- return deps + 'gnu-config-native '
+ return deps
DEPENDS_prepend = "${@autotools_deps(d)}"
DEPENDS_virtclass-native_prepend = "${@autotools_deps(d)}"
@@ -28,6 +27,39 @@ DEPENDS_virtclass-nativesdk_prepend = "${@autotools_deps(d)}"
acpaths = "default"
EXTRA_AUTORECONF = "--exclude=autopoint"
+gnu_configize_here() {
+ if [ -n "`autoconf -t AC_CANONICAL_BUILD`" ]; then
+ macrodir="`autoconf -t AC_CONFIG_MACRO_DIR|cut -d: -f4|tail -n 1`"
+ if [ -z "$macrodir" ]; then
+ macrodir="."
+ fi
+ if [ ! -e ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ]; then
+ oefatal "gnu-config data files missing"
+ fi
+ oenote Updating config.sub and config.guess in $macrodir
+ rm -f $macrodir/config.sub $macrodir/config.guess
+ cp ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub $macrodir/config.sub
+ cp ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess $macrodir/config.guess
+ fi
+}
+
+gnu_configize() {
+ subdirs="`autoconf -t AC_CONFIG_SUBDIRS|cut -d: -f4`"
+ for dir in $subdirs .; do
+ if [ ! -e "$olddir/$dir" ]; then
+ continue
+ fi
+
+ pushd $dir
+ gnu_configize_here
+ popd
+ done
+}
+
+do_configure_prepend () {
+ alias gnu-configize=gnu_configize
+}
+
oe_autoreconf () {
# 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
@@ -56,9 +88,12 @@ oe_autoreconf () {
mkdir -p m4
autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} "$@" \
|| oefatal "autoreconf execution failed."
+
if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
intltoolize --copy --force --automake
fi
+
+ gnu_configize_here
}
autotools_do_configure() {
@@ -91,7 +126,11 @@ autotools_do_configure() {
fi
;;
esac
- autotools_base_do_configure
+ if [ -e ${S}/configure ]; then
+ oe_runconf $@
+ else
+ oenote "nothing to configure"
+ fi
}
EXPORT_FUNCTIONS do_configure