]> mj.ucw.cz Git - moe.git/blob - configure
Cleaned up mop/admin/.
[moe.git] / configure
1 #!/usr/bin/perl
2 # Configure script for MO-Eval
3 # (c) 2008 Martin Mares <mj@ucw.cz>
4
5 use warnings;
6 use strict;
7
8 our $srcdir;
9 BEGIN {
10         my $pkgfile = "judge/token.c";
11         if (!defined ($srcdir = $ENV{"SRCDIR"})) {
12                 if (-f $pkgfile) {
13                         $srcdir=".";
14                 } elsif ($0 =~ m@^(.*)/configure$@ && -f "$1/$pkgfile") {
15                         $srcdir=$1;
16                 } else {
17                         die "Don't know how to find myself. Please set SRCDIR manually.";
18                 }
19         }
20         require "$srcdir/lib/perl/Configure.pm";
21         UCW::Configure::import UCW::Configure;
22 }
23
24 Init($srcdir, "default.cfg");
25 Include "lib/default.cfg";
26 Log "### Configuring MO-Eval ###\n\n";
27 Include Get("CONFIG");
28 Include "lib/autoconf.cfg";
29
30 if (Get("CONFIG_SUBMIT") || Get("CONFIG_MOP")) {
31         # Build libucw only if it is needed
32         Set("CONFIG_UCW_LIBS" => 1);
33 }
34
35 Finish();
36 Log "\nConfigured, run `make' to build everything.\n";