]> mj.ucw.cz Git - libucw.git/blob - free/libs/configure
a359da281800638055b798e531eeb050949d8a83
[libucw.git] / free / libs / configure
1 #!/usr/bin/perl
2 # Configure Script for Stand-Alone Sherlock Libraries
3 # (c) 2007 Martin Mares <mj@ucw.cz>
4
5 use warnings;
6 use strict;
7
8 our $srcdir;
9 BEGIN {
10         my $pkgfile = "ucw/wildmatch.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/ucw/perl/Configure.pm";
21         UCW::Configure::import UCW::Configure;
22 }
23
24 Init($srcdir, "default.cfg");
25 Include "ucw/default.cfg";
26 Log "### Configuring Sherlock Libraries " . Get("SHERLOCK_VERSION") . " with configuration " . Get("CONFIG") . "\n";
27 Include Get("CONFIG");
28 Include "ucw/paths.cfg";
29 Include "ucw/autoconf.cfg";
30 Include "ucw/ucw.cfg";
31 Finish();
32
33 Log "\nConfigured, run `make' to build everything.\n";