patch-6165353-Xcode.in   [plain text]


--- aclocal.in.orig	2006-10-15 09:19:37.000000000 -0700
+++ aclocal.in	2008-08-21 13:28:04.000000000 -0700
@@ -28,9 +28,13 @@
 # Written by Tom Tromey <tromey@redhat.com>, and
 # Alexandre Duret-Lutz <adl@gnu.org>.
 
+use File::Basename ();
+my($_bindir, $_datadir);
 BEGIN
 {
-  my $perllibdir = $ENV{'perllibdir'} || '@datadir@/@PACKAGE@-@APIVERSION@';
+  $_bindir = File::Basename::dirname($0);
+  ($_datadir = '@datadir@') =~ s,^/usr,$_bindir/..,;
+  my $perllibdir = $ENV{'perllibdir'} || "$_datadir/@PACKAGE@-@APIVERSION@";
   unshift @INC, (split '@PATH_SEPARATOR@', $perllibdir);
 }
 
@@ -56,8 +60,8 @@
 # @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 = ("$_datadir/aclocal-$APIVERSION");
+my @system_includes = ("$_datadir/aclocal");
 
 # Whether we should copy M4 file in $user_includes[0].
 my $install = 0;
@@ -648,7 +652,7 @@
   my %files = map { $map{$_} => 1 } keys %macro_seen;
   %files = strip_redundant_includes %files;
 
-  my $traces = ($ENV{AUTOM4TE} || 'autom4te');
+  my $traces = ($ENV{AUTOM4TE} || "$_bindir/autom4te");
   $traces .= " --language Autoconf-without-aclocal-m4 ";
   # All candidate files.
   $traces .= join (' ', grep { exists $files{$_} } @file_order) . " ";
--- automake.in.orig	2006-10-15 09:19:37.000000000 -0700
+++ automake.in	2008-08-21 19:21:08.000000000 -0700
@@ -30,9 +30,13 @@
 
 package Language;
 
+use File::Basename ();
+my $_bindir;
 BEGIN
 {
-  my $perllibdir = $ENV{'perllibdir'} || '@datadir@/@PACKAGE@-@APIVERSION@';
+  $_bindir = File::Basename::dirname($0);
+  (my $_datadir = '@datadir@') =~ s,^/usr,$_bindir/..,;
+  my $perllibdir = $ENV{'perllibdir'} || "$_datadir/@PACKAGE@-@APIVERSION@";
   unshift @INC, (split '@PATH_SEPARATOR@', $perllibdir);
 
   # Override SHELL.  This is required on DJGPP so that system() uses
@@ -4802,7 +4806,7 @@
 		sinclude => 1,
 	      );
 
-  my $traces = ($ENV{AUTOCONF} || 'autoconf') . " ";
+  my $traces = ($ENV{AUTOCONF} || "$_bindir/autoconf") . " ";
 
   # Use a separator unlikely to be used, not `:', the default, which
   # has a precise meaning for AC_CONFIG_FILES and so on.
--- lib/Automake/Config.in.orig	2005-05-14 12:52:09.000000000 -0700
+++ lib/Automake/Config.in	2008-08-21 02:44:45.000000000 -0700
@@ -18,6 +18,7 @@
 
 package Automake::Config;
 use strict;
+use File::Basename ();
 
 use 5.006;
 require Exporter;
@@ -30,7 +31,10 @@
 our $APIVERSION = '@APIVERSION@';
 our $PACKAGE = '@PACKAGE@';
 our $VERSION = '@VERSION@';
-our $libdir = '@datadir@/@PACKAGE@-@APIVERSION@';
+
+my $_bindir = File::Basename::dirname($0);
+(my $_datadir = '@datadir@') =~ s,^/usr,$_bindir/..,;
+our $libdir = "$_datadir/@PACKAGE@-@APIVERSION@";
 
 1;;