]> mj.ucw.cz Git - eval.git/blobdiff - configure
Better logging of exceptions
[eval.git] / configure
index a7bfa1f6885eb7797b66d7e7f69c1cac83ef9e99..2b6461799a3ef49cb4c5c853cd9a8d2bf78917ce 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # Configure script for MO-Eval
-# (c) 2008 Martin Mares <mj@ucw.cz>
+# (c) 2008--2009 Martin Mares <mj@ucw.cz>
 
 use warnings;
 use strict;
@@ -17,17 +17,32 @@ BEGIN {
                        die "Don't know how to find myself. Please set SRCDIR manually.";
                }
        }
-       require "$srcdir/lib/perl/Configure.pm";
-       UCW::Configure::import UCW::Configure;
 }
 
+use lib "$srcdir/ucw/perl";
+use UCW::Configure;
+use UCW::Configure::Pkg;
+
 Init($srcdir, "default.cfg");
-Include "lib/default.cfg";
+Include "ucw/default.cfg";
 Log "### Configuring MO-Eval ###\n\n";
 Include Get("CONFIG");
-Include "lib/autoconf.cfg";
+require UCW::Configure::Paths;
+require UCW::Configure::C;
+require UCW::Configure::LibUCW;
+
+if (Get("CONFIG_SUBMIT") || Get("CONFIG_MOP")) {
+       # Build libucw only if it is needed
+       Set("CONFIG_UCW_LIBS" => 1);
+}
 
-Set("CONFIG_UCW_LIBS" => 1);
+if (Get("CONFIG_SUBMIT")) {
+       # Submit server needs crypto libraries
+       if (!TrivConfig("libgnutls", script => "libgnutls-config") ||
+           !TrivConfig("libgcrypt", script => "libgcrypt-config")) {
+               Fail "The libgnutls and libgcrypt libraries are required to build the submit server.";
+       }
+}
 
 Finish();
 Log "\nConfigured, run `make' to build everything.\n";