(handle_gettext): Consider it.
(scan_autoconf_traces): Add AM_GNU_GETTEXT_INTL_SUBDIR to the list.
Set $seen_gettext_intl when it is seen.
* doc/automake.texi (gettext, Optional): Update.
* tests/gettext3.test: New test.
* tests/Makefile.am: Update.
+2006-10-14 Bruno Haible <bruno@clisp.org>
+ Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * 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.
+ * doc/automake.texi (gettext, Optional): Update.
+ * tests/gettext3.test: New test.
+ * tests/Makefile.am: Update.
+
2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
* lib/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
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 = ();
"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.
+ # 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
+ if (! ($seen_gettext_external && ! $seen_gettext_intl)
&& ! grep ($_ eq 'intl', @subdirs));
- # intl/ should not be used with AM_GNU_GETTEXT([external])
+ # 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 && grep ($_ eq 'intl', @subdirs));
+ if ($seen_gettext_external && ! $seen_gettext_intl
+ && grep ($_ eq 'intl', @subdirs));
}
require_file ($ac_gettext_location, GNU, 'ABOUT-NLS');
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,
$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;
this macro it ensures that the package meets some of gettext's
requirements.
+@item AM_GNU_GETTEXT_INTL_SUBDIR
+This macro specifies that the @file{intl/} subdirectory is to be built,
+even if the @code{AM_GNU_GETTEXT} macro was invoked with a first argument
+of @samp{external}.
+
@item AM_MAINTAINER_MODE
@opindex --enable-maintainer-mode
This macro adds a @option{--enable-maintainer-mode} option to
internationalization
(@pxref{GNU Gettext, , , gettext, GNU gettext utilities}).
-The @code{gettext} support in Automake requires the addition of two
-subdirectories to the package, @file{intl} and @file{po}. Automake
-insures that these directories exist and are mentioned in
+The @code{gettext} support in Automake requires the addition of one or
+two subdirectories to the package, @file{po} and possibly also @file{intl}.
+The latter is needed if @code{AM_GNU_GETTEXT} is not invoked with the
+@samp{external} argument, or if @code{AM_GNU_GETTEXT_INTL_SUBDIR} is used.
+Automake ensures that these directories exist and are mentioned in
@code{SUBDIRS}.
@node Libtool
-@set UPDATED 28 August 2006
-@set UPDATED-MONTH August 2006
+@set UPDATED 14 October 2006
+@set UPDATED-MONTH October 2006
@set EDITION 1.9c
@set VERSION 1.9c
-@set UPDATED 28 August 2006
-@set UPDATED-MONTH August 2006
+@set UPDATED 14 October 2006
+@set UPDATED-MONTH October 2006
@set EDITION 1.9c
@set VERSION 1.9c
getopt.test \
gettext.test \
gettext2.test \
+gettext3.test \
gnumake.test \
gnuwarn.test \
gnuwarn2.test \
getopt.test \
gettext.test \
gettext2.test \
+gettext3.test \
gnumake.test \
gnuwarn.test \
gnuwarn2.test \
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2006 Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Check gettext `AM_GNU_GETTEXT_INTL_SUBDIR' support.
+
+required='gettext'
+. ./defs || exit 1
+
+set -e
+
+cat >>configure.in <<END
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_INTL_SUBDIR
+AC_OUTPUT
+END
+
+echo 'SUBDIRS = po' >Makefile.am
+mkdir po
+
+# if aclocal fails, assume the gettext macros are too old and do not
+# define AM_GNU_GETTEXT_INTL_SUBDIR.
+$ACLOCAL || exit 77
+
+# config.rpath is required.
+: >config.rpath
+
+# intl/ is required.
+AUTOMAKE_fails --add-missing
+grep 'AM_GNU_GETTEXT.*intl.*SUBDIRS' stderr
+
+mkdir intl
+AUTOMAKE_fails --add-missing
+grep 'AM_GNU_GETTEXT.*intl.*SUBDIRS' stderr
+
+echo 'SUBDIRS = po intl' > Makefile.am
+$AUTOMAKE --add-missing