]> mj.ucw.cz Git - moe.git/blobdiff - configure
Isolate: Directory rules can have flags
[moe.git] / configure
index d8c25e2236a61b16f48bc2ca11eda68a6c9db644..b772db090c0d91ee6094f271df50f7f1f1c4cc74 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # Configure script for MO-Eval
 #!/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;
 
 use warnings;
 use strict;
@@ -17,15 +17,19 @@ BEGIN {
                        die "Don't know how to find myself. Please set SRCDIR manually.";
                }
        }
                        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");
 Init($srcdir, "default.cfg");
-Include "lib/default.cfg";
+Include "ucw/default.cfg";
 Log "### Configuring MO-Eval ###\n\n";
 Include Get("CONFIG");
 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
 
 if (Get("CONFIG_SUBMIT") || Get("CONFIG_MOP")) {
        # Build libucw only if it is needed
@@ -34,7 +38,7 @@ if (Get("CONFIG_SUBMIT") || Get("CONFIG_MOP")) {
 
 if (Get("CONFIG_SUBMIT")) {
        # Submit server needs crypto libraries
 
 if (Get("CONFIG_SUBMIT")) {
        # Submit server needs crypto libraries
-       if (!TrivConfig("libgnutls", script => "libgnutls-config") ||
+       if (!PkgConfig("gnutls") && !TrivConfig("libgnutls", script => "libgnutls-config") ||
            !TrivConfig("libgcrypt", script => "libgcrypt-config")) {
                Fail "The libgnutls and libgcrypt libraries are required to build the submit server.";
        }
            !TrivConfig("libgcrypt", script => "libgcrypt-config")) {
                Fail "The libgnutls and libgcrypt libraries are required to build the submit server.";
        }