summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2015-12-29 13:32:18 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2015-12-31 00:09:57 +0000
commit4c23184a115b607f19a32134f8c91d6f9df61ade (patch)
tree40771eeb4444b57457c8e94326a9e162b2865480 /autogen.sh
parentfe37d93a110cb9941c61fed0c71369a21a7d2765 (diff)
lode: make sure LODE_HOME/opt/bin is in the PATH for aclocal
When using a LODE setup, LODE_HOME must be defined in the environment but setting LODE_HOME/opt/bin in the PATH is optional and really only necessary as a convinience to get the right 'make' in the PATH. configure.ac has code do deal with the absence of LODE_HOME/opt/bin in the PATH but autogen.sh did not hence was failing in this case, not finding aclocal. Change-Id: I7a4449504dc539bb055798a6e1aea5268c5fb046 Reviewed-on: https://gerrit.libreoffice.org/21003 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
index f208f35f12b5..6c3856af8ac8 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -127,6 +127,18 @@ chomp $system;
sanity_checks ($system) unless($system eq 'Darwin');
+# If we are running in a LODE env, make sure we find the right aclocal
+# by making sure that LODE_HOME/opt/bin is in the PATH
+if (defined $ENV{LODE_HOME})
+{
+ my $lode_path = quotemeta "$ENV{LODE_HOME}/opt/bin";
+ if($ENV{PATH} !~ $lode_path)
+ {
+ $ENV{PATH}="$ENV{LODE_HOME}/opt/bin:$ENV{PATH}";
+ print STDERR "add LODE_HOME/opt/bin in PATH\n";
+ }
+}
+
my $aclocal_flags = $ENV{ACLOCAL_FLAGS};
$aclocal_flags .= " -I $src_path/m4";