]> mj.ucw.cz Git - libucw.git/blob - ucw/perl/UCW/Configure/Doc.pm
Doc system: Detect asciidoc
[libucw.git] / ucw / perl / UCW / Configure / Doc.pm
1 # UCW Library configuration system: documentation requirements
2 # (c) 2008 Michal Vaner <vorner@ucw.cz>
3
4 package UCW::Configure::Paths;
5 use UCW::Configure;
6
7 use strict;
8 use warnings;
9
10 Test("ASCII_DOC", "Checking for AsciiDoc", sub {
11         my $version = `asciidoc --version`;
12         return "none" if !defined $version || $version eq "";
13         my( $vnum ) = $version =~ / (\d+)\.\S*$/;
14         return "old" if $vnum < 7;
15         return "yes";
16 });
17
18 if(Get("ASCII_DOC") eq "yes") {
19         Set("CONFIG_DOC");
20 } else {
21         Warn("Need asciidoc >= 7 to build documentation");
22         UnSet("CONFIG_DOC");
23 }
24
25 # We succeeded
26 1;