From 4edf16ce2bd8b9b0964c01741aad4db20a8bd16f Mon Sep 17 00:00:00 2001
From: jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Date: Fri, 20 Jan 2012 17:17:04 +0000
Subject: [PATCH] =?UTF-8?q?[tools=C3=82]=20autoconf:=20make=20bin/autoconf?=
 =?UTF-8?q?=20relocatable=20as=20well?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29830 3c298f89-4303-0410-b956-a3cf2f4a3e73
---
 tools/autoconf/patches/000-relocatable.patch | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/tools/autoconf/patches/000-relocatable.patch b/tools/autoconf/patches/000-relocatable.patch
index c66e55eb01..98661e2002 100644
--- a/tools/autoconf/patches/000-relocatable.patch
+++ b/tools/autoconf/patches/000-relocatable.patch
@@ -137,3 +137,18 @@
    unshift @INC, $pkgdatadir;
  
    # Override SHELL.  On DJGPP SHELL may not be set to a shell
+--- a/bin/autoconf.as
++++ b/bin/autoconf.as
+@@ -85,7 +85,11 @@ exit_missing_arg='
+ # restore font-lock: '
+ 
+ # Variables.
+-: ${AUTOM4TE='@bindir@/@autom4te-name@'}
++if test -n "$STAGING_DIR"; then
++	: ${AUTOM4TE="$STAGING_DIR/../host/bin/@autom4te-name@"}
++else
++	: ${AUTOM4TE='@bindir@/@autom4te-name@'}
++fi
+ autom4te_options=
+ outfile=
+ verbose=false
-- 
GitLab