[Libreoffice-commits] .: autogen.sh
Michael Meeks
michael at kemper.freedesktop.org
Mon May 30 07:24:37 PDT 2011
autogen.sh | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
New commits:
commit 6ac9077e4ac01dc0821960fe91a828cab2c8e855
Author: Michael Meeks <michael.meeks at novell.com>
Date: Mon May 30 15:23:15 2011 +0100
initial attempt to avoid ugly errors with missing pkgconfig etc.
diff --git a/autogen.sh b/autogen.sh
index 30432c4..48a03aa 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -11,6 +11,38 @@ sub clean()
print "cleaned the build tree\n";
}
+# check we have various vital tools
+sub sanity_checks($)
+{
+ my $system = shift;
+ my @path = split (':', $ENV{'PATH'});
+ my %required = (
+ 'pkg-config' => "pkg-config is required to be installed",
+ 'autoconf' => "autoconf is required",
+ 'aclocal' => "aclocal is required",
+# 'knurdle' => 'please knurdle me test'
+ );
+ my $exe_ext = '';
+ $exe_ext = ".exe" if ($system =~ m/CYGWIN/);
+
+ for my $elem (@path) {
+# print "check $elem\n";
+ for my $app (keys %required) {
+ if (-f "$elem/$app$exe_ext") {
+# print "removing $app - found in $elem/$app\n";
+ delete $required{$app};
+ }
+ }
+ }
+ if ((keys %required) > 0) {
+ print ("Various low-level dependencies are missing, please install them:\n");
+ for my $app (keys %required) {
+ print "\t $app$exe_ext: " . $required{$app} . "\n";
+ }
+ exit (1);
+ }
+}
+
# one argument per line
sub read_args($)
{
@@ -84,6 +116,8 @@ system ("touch ChangeLog");
my $system = `uname -s`;
chomp $system;
+sanity_checks ($system);
+
my $aclocal_flags = $ENV{ACLOCAL_FLAGS};
$aclocal_flags = "-I ./m4/mac" if (($aclocal_flags eq "") && ($system eq 'Darwin'));
More information about the Libreoffice-commits
mailing list