Browse Source

autoconf: another relocatability fix for autom4te, substitute hardcoded prefix with $STAGING_DIR when reading autom4te.cfg

SVN-Revision: 29931
Jo-Philipp Wich 13 years ago
parent
commit
478d9fc97e
1 changed files with 13 additions and 0 deletions
  1. 13 0
      tools/autoconf/patches/000-relocatable.patch

+ 13 - 0
tools/autoconf/patches/000-relocatable.patch

@@ -50,6 +50,19 @@
  # Some non-GNU m4's don't reject the --help option, so give them /dev/null.
  # Some non-GNU m4's don't reject the --help option, so give them /dev/null.
  fatal "need GNU m4 1.4 or later: $m4"
  fatal "need GNU m4 1.4 or later: $m4"
    if system "$m4 --help </dev/null 2>&1 | grep reload-state >/dev/null";
    if system "$m4 --help </dev/null 2>&1 | grep reload-state >/dev/null";
+@@ -270,6 +272,12 @@ sub load_configuration ($)
+ 
+       my @words = shellwords ($_);
+       my $type = shift @words;
++
++      if ($ENV{'STAGING_DIR'})
++      {
++        @words = map { s!^@pkgdatadir@!$ENV{'STAGING_DIR'}/../host/share/autoconf!; $_ } @words;
++      }
++
+       if ($type eq 'begin-language:')
+ 	{
+ 	  fatal "$file:$.: end-language missing for: $lang"
 --- a/bin/autoreconf.in
 --- a/bin/autoreconf.in
 +++ b/bin/autoreconf.in
 +++ b/bin/autoreconf.in
 @@ -27,7 +27,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";
 @@ -27,7 +27,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";