]> mj.ucw.cz Git - leo.git/blob - perl/UCW/Configure/Build.pm
css.h: Fixed a wrong type
[leo.git] / perl / UCW / Configure / Build.pm
1 # UCW Library configuration system: find UCW build system
2 # (c) 2008 Michal Vaner <vorner@ucw.cz>
3
4 # This module asks pkg-config for a path to UCW build system
5 # and sets propper variables for it (or fails, as it is expected
6 # the build system is crucial).
7
8 package UCW::Configure::Build;
9 use UCW::Configure;
10
11 use strict;
12 use warnings;
13
14 if (!IsGiven("BUILDSYS")) {
15         Test("BUILDSYS", "Looking for UCW build system", sub {
16                 my $path=`pkg-config libucw --variable=build_system`;
17                 if($? || not defined $path) {
18                         Fail("Not found (is libUCW installed and PKG_CONFIG_PATH set?)");
19                 }
20                 chomp $path;
21                 return $path;
22         });
23 }
24
25 # We succeeded
26 1;