autoreconf: integrate intltoolize into the standard configuration tools

In addition to the gtkdocize tool, gtk-related software may utilize the
IT_PROG_INTLTOOL macro in order to require the intltoolize tool. So too
here should the tool be run by autoreconf itself, in order to guarantee
its initialization via the unified frontend for all autotools projects.
This commit is contained in:
Eli Schwartz 2019-03-17 15:01:22 -04:00 committed by Zack Weinberg
parent dd880a0a6d
commit b3b3af821a
No known key found for this signature in database
GPG Key ID: 384F8E68AC65B0D5
4 changed files with 50 additions and 23 deletions

2
NEWS
View File

@ -16,7 +16,7 @@ GNU Autoconf NEWS - User visible changes.
** autoconf will now issue warnings (in the syntax category) if the
input file is missing a call to AC_INIT and/or AC_OUTPUT.
** autoreconf will now run gtkdocize when appropriate.
** autoreconf will now run gtkdocize and intltoolize when appropriate.
** Older version of automake and aclocal (< 1.8) are no longer supported
by autoreconf.

View File

@ -106,15 +106,16 @@ Written by David J. MacKenzie and Akim Demaille.
";
# Lib files.
my $autoconf = $ENV{'AUTOCONF'} || '@bindir@/@autoconf-name@';
my $autoheader = $ENV{'AUTOHEADER'} || '@bindir@/@autoheader-name@';
my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@';
my $automake = $ENV{'AUTOMAKE'} || 'automake';
my $aclocal = $ENV{'ACLOCAL'} || 'aclocal';
my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize';
my $gtkdocize = $ENV{'GTKDOCIZE'} || 'gtkdocize';
my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint';
my $make = $ENV{'MAKE'} || 'make';
my $autoconf = $ENV{'AUTOCONF'} || '@bindir@/@autoconf-name@';
my $autoheader = $ENV{'AUTOHEADER'} || '@bindir@/@autoheader-name@';
my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@';
my $automake = $ENV{'AUTOMAKE'} || 'automake';
my $aclocal = $ENV{'ACLOCAL'} || 'aclocal';
my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize';
my $intltoolize = $ENV{'INTLTOOLIZE'} || 'intltoolize';
my $gtkdocize = $ENV{'GTKDOCIZE'} || 'gtkdocize';
my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint';
my $make = $ENV{'MAKE'} || 'make';
# --install -- as --add-missing in other tools.
my $install = 0;
@ -176,6 +177,7 @@ sub parse_args ()
$automake, $aclocal,
$autopoint,
$libtoolize,
$intltoolize,
$gtkdocize)
{
xsystem ("$prog --version | sed 1q >&2");
@ -199,20 +201,22 @@ sub parse_args ()
# --install and --symlink;
if ($install)
{
$automake .= ' --add-missing';
$automake .= ' --copy' unless $symlink;
$libtoolize .= ' --copy' unless $symlink;
$gtkdocize .= ' --copy' unless $symlink;
$automake .= ' --add-missing';
$automake .= ' --copy' unless $symlink;
$libtoolize .= ' --copy' unless $symlink;
$intltoolize .= ' --copy' unless $symlink;
$gtkdocize .= ' --copy' unless $symlink;
}
# --force;
if ($force)
{
$aclocal .= ' --force';
$autoconf .= ' --force';
$autoheader .= ' --force';
$automake .= ' --force-missing';
$autopoint .= ' --force';
$libtoolize .= ' --force';
$aclocal .= ' --force';
$autoconf .= ' --force';
$autoheader .= ' --force';
$automake .= ' --force-missing';
$autopoint .= ' --force';
$libtoolize .= ' --force';
$intltoolize .= ' --force';
}
else
{
@ -391,6 +395,7 @@ sub autoreconf_current_directory ($)
my $aux_dir;
my $uses_gettext_via_traces;
my $uses_libtool;
my $uses_intltool;
my $uses_gtkdoc;
my $uses_libltdl;
my $uses_autoheader;
@ -413,6 +418,7 @@ sub autoreconf_current_directory ($)
'LT_CONFIG_LTDL_DIR',
'AM_GNU_GETTEXT',
'AM_INIT_AUTOMAKE',
'IT_PROG_INTLTOOL',
'GTK_DOC_CHECK',
)
. ' |');
@ -429,6 +435,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_intltool = 1 if $macro eq "IT_PROG_INTLTOOL";
$uses_gtkdoc = 1 if $macro eq "GTK_DOC_CHECK";
push @subdir, split (' ', $args[0])
if $macro eq "AC_CONFIG_SUBDIRS" && $recursive;
@ -497,6 +504,25 @@ sub autoreconf_current_directory ($)
}
# --------------------- #
# Running intltoolize. #
# --------------------- #
if (!$uses_intltool)
{
verb "$configure_ac: not using Intltool";
}
elsif ($install)
{
xsystem_hint ("intltoolize is needed because this package uses Intltool", $intltoolize);
xsystem ($intltoolize)
}
else
{
verb "$configure_ac: not running intltool: --install not given";
}
# ------------------- #
# Running gtkdocize. #
# ------------------- #

View File

@ -1689,13 +1689,13 @@ been updated, or finally, simply in order to install the GNU Build
System in a fresh tree.
@command{autoreconf} runs @command{autoconf}, @command{autoheader},
@command{aclocal}, @command{automake}, @command{libtoolize},
@command{aclocal}, @command{automake}, @command{libtoolize}, @command{intltoolize},
@command{gtkdocize}, and @command{autopoint} (when appropriate) repeatedly
to update the GNU Build System in the specified directories and their
subdirectories (@pxref{Subdirectories}). By default, it only remakes
those files that are older than their sources. The environment variables
@env{AUTOM4TE}, @env{AUTOCONF}, @env{AUTOHEADER}, @env{AUTOMAKE},
@env{ACLOCAL}, @env{AUTOPOINT}, @env{LIBTOOLIZE}, @env{GTKDOCIZE}, @env{M4},
@env{AUTOM4TE}, @env{AUTOCONF}, @env{AUTOHEADER}, @env{AUTOMAKE}, @env{ACLOCAL},
@env{AUTOPOINT}, @env{LIBTOOLIZE}, @env{INTLTOOLIZE}, @env{GTKDOCIZE}, @env{M4},
and @env{MAKE} may be used to override the invocation of the respective tools.
If you install a new version of some tool, you can make

View File

@ -100,6 +100,7 @@ args: --preselect AC_INIT
args: --preselect AC_PROG_LIBTOOL
args: --preselect AM_PROG_LIBTOOL
args: --preselect GTK_DOC_CHECK
args: --preselect IT_PROG_INTLTOOL
args: --preselect LT_INIT
args: --preselect LT_CONFIG_LTDL_DIR
args: --preselect AM_GNU_GETTEXT