From bfea765ecfee0a1db16e1c46c9ba2aa6cc02f36a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Wed, 9 Mar 2016 17:56:16 +0000 Subject: autoreconf: Add checks for Gtk-Doc usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Javier Jardón --- bin/autoreconf.in | 22 ++++++++++++++++++++++ lib/autom4te.in | 1 + 2 files changed, 23 insertions(+) diff --git a/bin/autoreconf.in b/bin/autoreconf.in index acf25d48..1a275c70 100644 --- a/bin/autoreconf.in +++ b/bin/autoreconf.in @@ -114,6 +114,7 @@ my $aclocal = $ENV{'ACLOCAL'} || 'aclocal'; my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize'; my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint'; my $make = $ENV{'MAKE'} || 'make'; +my $gtkdocize = $ENV{'GTKDOCIZE'} || 'gtkdocize'; # --install -- as --add-missing in other tools. my $install = 0; @@ -206,6 +207,7 @@ sub parse_args () $automake .= ' --add-missing'; $automake .= ' --copy' unless $symlink; $libtoolize .= ' --copy' unless $symlink; + $gtkdocize .= ' --copy' unless $symlink; } # --force; if ($force) @@ -459,6 +461,7 @@ sub autoreconf_current_directory () my $uses_libltdl; my $uses_autoheader; my $uses_automake; + my $uses_gtkdoc; my @subdir; verb "$configure_ac: tracing"; my $traces = new Autom4te::XFile @@ -476,6 +479,7 @@ sub autoreconf_current_directory () 'LT_CONFIG_LTDL_DIR', 'AM_GNU_GETTEXT', 'AM_INIT_AUTOMAKE', + 'GTK_DOC_CHECK', ) . ' |'); while ($_ = $traces->getline) @@ -490,6 +494,7 @@ sub autoreconf_current_directory () $uses_libltdl = 1 if $macro eq "LT_CONFIG_LTDL_DIR"; $uses_autoheader = 1 if $macro eq "AC_CONFIG_HEADERS"; $uses_automake = 1 if $macro eq "AM_INIT_AUTOMAKE"; + $uses_gtkdoc = 1 if $macro eq "GTK_DOC_CHECK"; push @subdir, split (' ', $args[0]) if $macro eq "AC_CONFIG_SUBDIRS" && $recursive; } @@ -532,6 +537,23 @@ sub autoreconf_current_directory () or error "cannot create $aux_dir: $!"; } + # ------------------- # + # Running gtkdocize # + # ------------------- # + + if (!$uses_gtkdoc) + { + verb "$configure_ac: not using Gtk-Doc"; + } + elsif (!$install) + { + verb "$configure_ac: not running gtkdocize: --install not given"; + } + else + { + xsystem_hint ("gtkdocize is needed because this package uses Gtk-Doc", "$gtkdocize"); + } + # -------------------- # # Running libtoolize. # diff --git a/lib/autom4te.in b/lib/autom4te.in index a5605014..28e7732d 100644 --- a/lib/autom4te.in +++ b/lib/autom4te.in @@ -96,6 +96,7 @@ args: --preselect AC_PROG_LIBTOOL args: --preselect LT_INIT args: --preselect LT_CONFIG_LTDL_DIR args: --preselect AM_GNU_GETTEXT +args: --preselect GTK_DOC_CHECK end-language: "Autoreconf-preselections" -- cgit v1.2.1