]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
autoreconf: integrate intltoolize into the standard configuration tools
authorEli Schwartz <eschwartz@archlinux.org>
Sun, 17 Mar 2019 19:01:22 +0000 (15:01 -0400)
committerZack Weinberg <zackw@panix.com>
Tue, 18 Aug 2020 12:49:18 +0000 (08:49 -0400)
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.

NEWS
bin/autoreconf.in
doc/autoconf.texi
lib/autom4te.in

diff --git a/NEWS b/NEWS
index b467d85e731d67bb4c80c62cf69f7ac9f2a1e37a..727617301bad6ae7506a0c9e00a8346a8af5ed1e 100644 (file)
--- 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.
index 14e12895e2a2d98729dc19f38e442626f1d72444..e0216f9532df9d7ab8f21268e8c30c3f0bed6c0e 100644 (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.  #
   # ------------------- #
index 76a4d7fe4d8740d6070e21beddae8b6bcf94a545..43df8f32fda3f722487c128fb2fd8b5e38ea72ef 100644 (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
index 7488d2f0e12abe0bacb00790028cac718c4c5a7d..3c787972a8a93e1ac5725c2effd3c2177e084dc6 100644 (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