Compile lufs client optionally.
[captive.git] / autogen.pl
index a95974a..a3269ad 100755 (executable)
@@ -40,7 +40,8 @@ AutoGen->run(
                                .include_test_all.stamp
                                ./ChangeLog.bak
                                ./doc/*-pod.*
-                               ./doc/apiref/captive.types
+                               ./doc/apiref/gtk-doc.make
+                               ./doc/apiref/gtk-doc.make-captive
                                ./src/client/bug-replay/captive-bug-replay
                                ./src/client/cmdline/captive-cmdline
                                ./src/client/sandbox-server/captive-sandbox-server
@@ -64,19 +65,20 @@ AutoGen->run(
                                ./src/TraceFS/TraceFS-W32/buildfre.err
                                )],
                "prep"=>sub {
-                               local *F;
-                               do { open F,$_ or confess "Open $_: $!"; } for ("libtoolize --version|");
-                               local $/;
-                               undef $/;
-                               my $libtoolize_out=<F>;
-                               close F;
-                               my $libtoolize_version=($libtoolize_out=~m#([\d.]+)#)[0];
-                               confess "libtoolize(1) version not found in its output" if !$libtoolize_version;
-                               for (1.5) {
-                                               confess "'libtool' package version $_ or higher required"
-                                                               # Do not take 3rd+ numbers as it would not be a number
-                                                               if ($libtoolize_version=~/^(\d+[.]\d+)/)[0]<$_;
+                               # For conflicting object basenames in convenient libraries:
+                               AutoGen->checkcommandversion("libtoolize","1.5");
+                               # 1.5 for AM_PROG_AS.
+                               # 1.6 to prevent weird error wrt 'SANDBOX_IDL_SOURCES':
+                               AutoGen->checkcommandversion("automake","1.6");
+
+                               AutoGen::_system "gtkdocize --copy --docdir doc/apiref/";
+                               for my $fname ("doc/apiref/gtk-doc.make") {
+                                       my $gtk_doc_make=AutoGen::_readfile $fname;
+                                       for my $keyword (qw(EXTRA_DIST CLEANFILES)) {
+                                               $gtk_doc_make=~s/^$keyword =/$keyword +=/m or confess "$keyword not found in $fname";
                                                }
+                                       AutoGen::_writefile "$fname-captive",$gtk_doc_make;
+                                       }
                                1;
                                },
                );