2 # Configure script for the libucw example (inspired by ../external/configure)
3 # (c) 2008 Michal Vaner <vorner@ucw.cz>
11 my $pkgfile = "test.c";
12 if (!defined ($srcdir = $ENV{"SRCDIR"})) {
15 } elsif ($0 =~ m@^(.*)/configure$@ && -f "$1/$pkgfile") {
18 die "Don't know how to find myself. Please set SRCDIR manually.";
21 # Ask pkg-config for the rest of configure
22 $libdir=`pkg-config libucw --atleast-version=3.13 --variable=perl_modules_dir`;
24 die "Package `libucw' (version 3.13 or newer) not found. Is PKG_CONFIG_PATH set properly?" if $? || not defined $libdir;
29 Init($srcdir, 'default.cfg');
30 Log "### Configuring TestApp ###\n\n";
31 Include Get("CONFIG");
32 # What should be detected?
33 require UCW::Configure::Build;
34 require UCW::Configure::Paths;
35 require UCW::Configure::C;
36 require UCW::Configure::Pkg;
37 # You could generate your own documentation, too
38 # require UCW::Configure::Doc;
41 UCW::Configure::Pkg::PkgConfig("libucw") or Fail("libUCW is required");
44 Log "\nConfigured, run `make' to build everything.\n";