automake: further relocation fixes
[openwrt/openwrt.git] / tools / automake / patches / 000-relocatable.patch
index 36a56c00fe16eb9b3b8455a86007138e10fc8743..3255b97518fcbf83576622a0bbbb6876b3cde0de 100644 (file)
    unshift @INC, (split '@PATH_SEPARATOR@', $perllibdir);
  }
  
+@@ -57,8 +58,8 @@ $perl_threads = 0;
+ # @system_includes can be augmented with the `dirlist' file.  Also
+ # --acdir will reset both @automake_includes and @system_includes.
+ my @user_includes = ();
+-my @automake_includes = ("@datadir@/aclocal-$APIVERSION");
+-my @system_includes = ('@datadir@/aclocal');
++my @automake_includes = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . "/../host/share/aclocal-$APIVERSION" : "@datadir@/aclocal-$APIVERSION");
++my @system_includes = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/aclocal' : '@datadir@/aclocal');
+ # Whether we should copy M4 file in $user_includes[0].
+ my $install = 0;
 --- a/automake.in
 +++ b/automake.in
 @@ -31,7 +31,8 @@ package Language;