autoconf.inc: Use 'which' to find m4
authorTom Rini <tom_rini@mentor.com>
Thu, 18 Nov 2010 14:01:56 +0000 (07:01 -0700)
committerTom Rini <tom_rini@mentor.com>
Thu, 18 Nov 2010 14:29:23 +0000 (07:29 -0700)
We need to make sure that if m4-native is built, it's used here
as there are hosts that otherwise have too old of an m4.  When
@M4@ is replaced here it's not used in conjunction with #! so this
is safe.

Signed-off-by: Tom Rini <tom_rini@mentor.com>
recipes/autoconf/autoconf.inc

index 79a8108..ca6504f 100644 (file)
@@ -21,8 +21,9 @@ SUBDIRS = "bin . lib"
 do_configure_prepend () {
        if ${@['true', 'false'][bb.data.inherits_class('native', d)]}
        then
+               M4=`which m4`
                export ac_cv_path_PERL="${ac_cv_path_PERL=${bindir}/perl}"
-               export ac_cv_path_M4="${ac_cv_path_M4=${bindir}/m4}"
+               export ac_cv_path_M4="${ac_cv_path_M4=${M4}}"
                export ac_cv_prog_gnu_m4="${ac_cv_prog_gnu_m4=yes}"
        fi
 }