]> code.ossystems Code Review - openembedded-core.git/commitdiff
autotools.bbclass: Fix to work with configure files with leading whitespace
authorRichard Purdie <rpurdie@linux.intel.com>
Thu, 16 Jul 2009 14:54:47 +0000 (15:54 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Thu, 16 Jul 2009 14:54:47 +0000 (15:54 +0100)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
meta/classes/autotools.bbclass

index 82ed36816bdb090bb712ac37bfc61b97b5f93f22..5ef3a894020d48b3c352314af4aba19eb214b162 100644 (file)
@@ -114,7 +114,7 @@ autotools_do_configure() {
                        else
                          CONFIGURE_AC=configure.ac
                        fi
-                       if grep "^AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
+                       if grep "^[[:space:]]*AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
                          if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then
                            : do nothing -- we still have an old unmodified configure.ac
                          else
@@ -122,12 +122,12 @@ autotools_do_configure() {
                            echo "no" | glib-gettextize --force --copy
                          fi
                        fi
-                       if grep "^[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
+                       mkdir -p m4
+                       if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
                          oenote Executing intltoolize --copy --force --automake
                          intltoolize --copy --force --automake
                        fi
                        oenote Executing autoreconf --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
-                       mkdir -p m4
                        autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || oefatal "autoreconf execution failed."
                        cd $olddir
                fi