summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2019-03-17 15:01:22 -0400
committerZack Weinberg <zackw@panix.com>2020-08-18 08:49:18 -0400
commitb3b3af821a0b9e82ebe56b77b1731d2fe58f52de (patch)
treec33f797e6fe3cd5781ac6e5ee0f8a3c622e07349
parentdd880a0a6de5602cdd40b770ed6b083b34aa0768 (diff)
downloadautoconf-b3b3af821a0b9e82ebe56b77b1731d2fe58f52de.tar.gz
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.
-rw-r--r--NEWS2
-rw-r--r--bin/autoreconf.in64
-rw-r--r--doc/autoconf.texi6
-rw-r--r--lib/autom4te.in1
4 files changed, 50 insertions, 23 deletions
diff --git a/NEWS b/NEWS
index b467d85e..72761730 100644
--- a/NEWS
+++ b/NEWS
@@ -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.
diff --git a/bin/autoreconf.in b/bin/autoreconf.in
index 14e12895..e0216f95 100644
--- a/bin/autoreconf.in
+++ b/bin/autoreconf.in
@@ -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. #
# ------------------- #
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 76a4d7fe..43df8f32 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -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
diff --git a/lib/autom4te.in b/lib/autom4te.in
index 7488d2f0..3c787972 100644
--- a/lib/autom4te.in
+++ b/lib/autom4te.in
@@ -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