diff options
author | Jan Holesovsky <kendy@suse.cz> | 2010-11-12 14:38:00 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2010-11-12 14:38:00 +0100 |
commit | 1a6972face7317b4904fdcb9e3bca142e48f64a0 (patch) | |
tree | 6c3246bb9ef39995fa83f05953e1d4fcca2c8475 /odk | |
parent | be93d9379b55cb25e52641ea4d122d3a0b7a48e9 (diff) | |
parent | 32653406efbb4f9257d277e4bae750165f8b80a0 (diff) |
Merge remote branch 'origin/libreoffice-3-3'
Diffstat (limited to 'odk')
-rwxr-xr-x | odk/configure.pl | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/odk/configure.pl b/odk/configure.pl index c02755c56772..c03fe0081c17 100755 --- a/odk/configure.pl +++ b/odk/configure.pl @@ -5,6 +5,7 @@ # use IO::File; +use File::Basename; $main::hostname= $ARGV[0]; $main::sdkpath= $ARGV[1]; @@ -549,15 +550,26 @@ sub resolveLink { my $base= shift; my $link= shift; - my $linktarget = readlink "$base/$link"; + + my $resolvedpath = "$base/$link"; + my $linktarget = readlink "$resolvedpath"; my $resolvedlink = ""; while ( $linktarget ne "") { - $link = $linktarget; - $linktarget = readlink "$base/$link"; + + if ( $linktarget =~ m/^\/.*/ ) + { + $resolvedpath = "$linktarget"; + } else { + $resolvedpath = `cd $base/$linktarget; pwd`; + chop $resolvedpath; } + $base = dirname("$resolvedpath"); - $resolvedlink = `cd $base/$link; pwd`; + $linktarget = readlink "$resolvedpath"; + } + + $resolvedlink = `cd $resolvedpath; pwd`; chop $resolvedlink; return $resolvedlink; } @@ -573,6 +585,7 @@ sub searchprog { if ( $main::operatingSystem =~ m/darwin/ ) { $progDir = resolveLink("/System/Library/Frameworks/JavaVM.Framework/Versions", "CurrentJDK"); + if ( -e "$progDir/$main::OO_SDK_JAVA_BIN_DIR/javac" ) { return "$progDir/$main::OO_SDK_JAVA_BIN_DIR"; |