summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-03-29 17:27:08 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-03-29 17:28:11 +0100
commit02f385b9eafe7172727cf8cdd2d9c86540cdf275 (patch)
tree411e8879194c457a5ecc7d4327931e27171bfff1 /autogen.sh
parent3db7c67ddda3f6f9f0e6aa70c83ea43db65b325a (diff)
deal with symlinks in your PWD breaking gnumake dependencies
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
index 78a6f6734bc5..6f997124f794 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -3,6 +3,7 @@
if 0;
use strict;
+use Cwd ('cwd', 'realpath');
sub clean()
{
@@ -131,6 +132,16 @@ chomp $system;
sanity_checks ($system) unless($system eq 'Darwin');
+# since this looks crazy, if you have a symlink on a path up to and including
+# the current directory, we need our configure to run in the realpath of that
+# such that compiled (realpath'd) dependency filenames match the filenames
+# used in our makefiles - ie. this gets dependencies right via SRC_ROOT
+my $cwd_str = realpath(cwd());
+chdir ($cwd_str);
+# more amazingly, if you don't clobber 'PWD' shells will re-assert their
+# old path from the environment, not cwd.
+$ENV{PWD} = $cwd_str;
+
my $aclocal_flags = $ENV{ACLOCAL_FLAGS};
if ($aclocal_flags eq "")