]> mj.ucw.cz Git - eval.git/commitdiff
Added a trivial configure script.
authorMartin Mares <mj@ucw.cz>
Thu, 15 May 2008 09:24:10 +0000 (11:24 +0200)
committerMartin Mares <mj@ucw.cz>
Thu, 15 May 2008 09:24:10 +0000 (11:24 +0200)
configure [new file with mode: 0755]
default.cfg [new file with mode: 0644]

diff --git a/configure b/configure
new file mode 100755 (executable)
index 0000000..a7bfa1f
--- /dev/null
+++ b/configure
@@ -0,0 +1,33 @@
+#!/usr/bin/perl
+# Configure script for MO-Eval
+# (c) 2008 Martin Mares <mj@ucw.cz>
+
+use warnings;
+use strict;
+
+our $srcdir;
+BEGIN {
+       my $pkgfile = "judge/token.c";
+       if (!defined ($srcdir = $ENV{"SRCDIR"})) {
+               if (-f $pkgfile) {
+                       $srcdir=".";
+               } elsif ($0 =~ m@^(.*)/configure$@ && -f "$1/$pkgfile") {
+                       $srcdir=$1;
+               } else {
+                       die "Don't know how to find myself. Please set SRCDIR manually.";
+               }
+       }
+       require "$srcdir/lib/perl/Configure.pm";
+       UCW::Configure::import UCW::Configure;
+}
+
+Init($srcdir, "default.cfg");
+Include "lib/default.cfg";
+Log "### Configuring MO-Eval ###\n\n";
+Include Get("CONFIG");
+Include "lib/autoconf.cfg";
+
+Set("CONFIG_UCW_LIBS" => 1);
+
+Finish();
+Log "\nConfigured, run `make' to build everything.\n";
diff --git a/default.cfg b/default.cfg
new file mode 100644 (file)
index 0000000..703863c
--- /dev/null
@@ -0,0 +1,8 @@
+# Default configuration file for MO-Eval
+
+# Settings of libucw
+UnSet("CONFIG_SHARED");
+UnSet("CONFIG_UCW_THREADS");
+
+# Return success
+1;