autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

support of gettext 0.15.1


From: Bruno Haible
Subject: support of gettext 0.15.1
Date: Mon, 2 Oct 2006 14:41:20 +0200
User-agent: KMail/1.9.1

Hi,

In gettext-0.15.1 a new macro will be added, AM_GNU_GETTEXT_INTL_SUBDIR.
Its effect is to override the first argument of AM_GNU_GETTEXT:

   The `AM_GNU_GETTEXT_INTL_SUBDIR' macro specifies that the
   `AM_GNU_GETTEXT' macro, although invoked with the first argument
   `external', should also prepare for building the `intl/' subdirectory.

Its purpose is to decouple the specification that gettext is needed from the
specification how it's provided. Needed for gnulib in particular.

Automake-1.9b, however, gives an error in this situation:

   Makefile.am:30: `intl' should not be in SUBDIRS when 
AM_GNU_GETTEXT([external]) is used

Here is a patch for automake to support this macro. Quite trivial.
It requires a tiny change in autom4te, which I'm sending to the autoconf
list separately.


2006-10-01  Bruno Haible  <address@hidden>

        * automake.in ($seen_gettext_intl): New variable.
        (handle_gettext): Consider it.
        (scan_autoconf_traces): Add AM_GNU_GETTEXT_INTL_SUBDIR to the list.
        Set $seen_gettext_intl when it is seen.

*** automake-1.9b/automake.in.bak       2006-09-10 15:21:51.000000000 +0200
--- automake-1.9b/automake.in   2006-10-01 20:05:57.000000000 +0200
***************
*** 349,354 ****
--- 349,356 ----
  my $seen_gettext_external = 0;
  # Where AM_GNU_GETTEXT appears.
  my $ac_gettext_location;
+ # Whether AM_GNU_GETTEXT_INTL_SUBDIR has been seen.
+ my $seen_gettext_intl = 0;
  
  # Lists of tags supported by Libtool.
  my %libtool_tags = ();
***************
*** 4226,4243 ****
               "AM_GNU_GETTEXT used but `po' not in SUBDIRS")
        if ! grep ($_ eq 'po', @subdirs);
  
!       # intl/ is not required when AM_GNU_GETTEXT is called with
!       # the `external' option.
        msg_var ('syntax', $subdirs,
               "AM_GNU_GETTEXT used but `intl' not in SUBDIRS")
!       if (! $seen_gettext_external
            && ! grep ($_ eq 'intl', @subdirs));
  
!       # intl/ should not be used with AM_GNU_GETTEXT([external])
        msg_var ('syntax', $subdirs,
               "`intl' should not be in SUBDIRS when "
               . "AM_GNU_GETTEXT([external]) is used")
!       if ($seen_gettext_external && grep ($_ eq 'intl', @subdirs));
      }
  
    require_file ($ac_gettext_location, GNU, 'ABOUT-NLS');
--- 4228,4247 ----
               "AM_GNU_GETTEXT used but `po' not in SUBDIRS")
        if ! grep ($_ eq 'po', @subdirs);
  
!       # intl/ is not required when AM_GNU_GETTEXT is called with the
!       # `external' option and AM_GNU_GETTEXT_INTL_SUBDIR is not called.
        msg_var ('syntax', $subdirs,
               "AM_GNU_GETTEXT used but `intl' not in SUBDIRS")
!       if (! ($seen_gettext_external && ! $seen_gettext_intl)
            && ! grep ($_ eq 'intl', @subdirs));
  
!       # intl/ should not be used with AM_GNU_GETTEXT([external]), except
!       # if AM_GNU_GETTEXT_INTL_SUBDIR is called.
        msg_var ('syntax', $subdirs,
               "`intl' should not be in SUBDIRS when "
               . "AM_GNU_GETTEXT([external]) is used")
!       if ($seen_gettext_external && ! $seen_gettext_intl
!           && grep ($_ eq 'intl', @subdirs));
      }
  
    require_file ($ac_gettext_location, GNU, 'ABOUT-NLS');
***************
*** 4777,4782 ****
--- 4781,4787 ----
                AM_CONDITIONAL => 2,
                AM_ENABLE_MULTILIB => 0,
                AM_GNU_GETTEXT => 0,
+               AM_GNU_GETTEXT_INTL_SUBDIR => 0,
                AM_INIT_AUTOMAKE => 0,
                AM_MAINTAINER_MODE => 0,
                AM_PROG_CC_C_O => 0,
***************
*** 4932,4937 ****
--- 4937,4946 ----
          $ac_gettext_location = $where;
          $seen_gettext_external = grep ($_ eq 'external', @args);
        }
+       elsif ($macro eq 'AM_GNU_GETTEXT_INTL_SUBDIR')
+       {
+         $seen_gettext_intl = $where;
+       }
        elsif ($macro eq 'AM_INIT_AUTOMAKE')
        {
          $seen_init_automake = $where;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]