aboutsummaryrefslogtreecommitdiffstats
path: root/tools/autoconf/patches/000-relocatable.patch
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-01-20 15:19:06 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-01-20 15:19:06 +0000
commit30afe193cfeace4cd956198c031d5532e274d2f1 (patch)
treec05034ee79c67731b5818cb8ec1667734fe3156a /tools/autoconf/patches/000-relocatable.patch
parent3842e64d1840dfcfb884cc088d786a738d0bd70d (diff)
downloadupstream-30afe193cfeace4cd956198c031d5532e274d2f1.tar.gz
upstream-30afe193cfeace4cd956198c031d5532e274d2f1.tar.bz2
upstream-30afe193cfeace4cd956198c031d5532e274d2f1.zip
[tools] autoconf: further relocation fixes
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29827 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'tools/autoconf/patches/000-relocatable.patch')
-rw-r--r--tools/autoconf/patches/000-relocatable.patch47
1 files changed, 43 insertions, 4 deletions
diff --git a/tools/autoconf/patches/000-relocatable.patch b/tools/autoconf/patches/000-relocatable.patch
index 0fe830a7ec..c66e55eb01 100644
--- a/tools/autoconf/patches/000-relocatable.patch
+++ b/tools/autoconf/patches/000-relocatable.patch
@@ -10,6 +10,15 @@
unshift @INC, "$pkgdatadir";
# Override SHELL. On DJGPP SHELL may not be set to a shell
+@@ -51,7 +52,7 @@ use strict;
+ use vars qw ($config_h %verbatim %symbol);
+
+ # Lib files.
+-my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@';
++my $autom4te = $ENV{'AUTOM4TE'} || ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/bin/@autom4te-name@' : '@bindir@/@autom4te-name@');
+ local $config_h;
+ my $config_h_in;
+ my @prepend_include;
--- a/bin/autom4te.in
+++ b/bin/autom4te.in
@@ -25,7 +25,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";
@@ -32,6 +41,15 @@
# $LANGUAGE{LANGUAGE} -- Automatic options for LANGUAGE.
my %language;
+@@ -88,7 +90,7 @@ my @include;
+ my $freeze = 0;
+
+ # $M4.
+-my $m4 = $ENV{"M4"} || '@M4@';
++my $m4 = $ENV{"M4"} || ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/bin/m4' : '@M4@');
+ # 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"
+ if system "$m4 --help </dev/null 2>&1 | grep reload-state >/dev/null";
--- a/bin/autoreconf.in
+++ b/bin/autoreconf.in
@@ -27,7 +27,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";
@@ -44,6 +62,19 @@
unshift @INC, $pkgdatadir;
# Override SHELL. On DJGPP SHELL may not be set to a shell
+@@ -107,9 +108,9 @@ Written by David J. MacKenzie and Akim D
+ ";
+
+ # Lib files.
+-my $autoconf = $ENV{'AUTOCONF'} || '@bindir@/@autoconf-name@';
+-my $autoheader = $ENV{'AUTOHEADER'} || '@bindir@/@autoheader-name@';
+-my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@';
++my $autoconf = $ENV{'AUTOCONF'} || ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/bin/@autoconf-name@' : '@bindir@/@autoconf-name@');
++my $autoheader = $ENV{'AUTOHEADER'} || ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/bin/@autoheader-name@' : '@bindir@/@autoheader-name@');
++my $autom4te = $ENV{'AUTOM4TE'} || ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/bin/@autom4te-name@' : '@bindir@/@autom4te-name@');
+ my $automake = $ENV{'AUTOMAKE'} || 'automake';
+ my $aclocal = $ENV{'ACLOCAL'} || 'aclocal';
+ my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize';
--- a/bin/autoscan.in
+++ b/bin/autoscan.in
@@ -26,7 +26,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";
@@ -56,8 +87,12 @@
unshift @INC, $pkgdatadir;
# Override SHELL. On DJGPP SHELL may not be set to a shell
-@@ -95,7 +96,7 @@ my $log;
- my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@';
+@@ -92,10 +93,10 @@ my $configure_scan = 'configure.scan';
+ my $log;
+
+ # Autoconf and lib files.
+-my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@';
++my $autom4te = $ENV{'AUTOM4TE'} || ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/bin/@autom4te-name@' : '@bindir@/@autom4te-name@');
my $autoconf = "$autom4te --language=autoconf";
my @prepend_include;
-my @include = ('@pkgdatadir@');
@@ -77,7 +112,7 @@
unshift @INC, $pkgdatadir;
# Override SHELL. On DJGPP SHELL may not be set to a shell
-@@ -51,7 +52,7 @@ my $autom4te = $ENV{'AUTOM4TE'} || '@bin
+@@ -51,10 +52,10 @@ my $autom4te = $ENV{'AUTOM4TE'} || '@bin
my $autoconf = "$autom4te --language=autoconf";
# We need to find m4sugar.
my @prepend_include;
@@ -85,7 +120,11 @@
+my @include = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/autoconf' : '@pkgdatadir@');
my $force = 0;
# m4.
- my $m4 = $ENV{"M4"} || '@M4@';
+-my $m4 = $ENV{"M4"} || '@M4@';
++my $m4 = $ENV{"M4"} || ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/bin/m4' : '@M4@');
+
+
+ # $HELP
--- a/bin/ifnames.in
+++ b/bin/ifnames.in
@@ -31,7 +31,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";