diff options
Diffstat (limited to 'm4/po.m4')
-rw-r--r-- | m4/po.m4 | 48 |
1 files changed, 13 insertions, 35 deletions
@@ -1,8 +1,10 @@ | |||
1 | # po.m4 serial 7 (gettext-0.14.3) | 1 | # po.m4 serial 2 (gettext-0.13) |
2 | dnl Copyright (C) 1995-2005 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software, distributed under the terms of the GNU |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl General Public License. As a special exception to the GNU General |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl Public License, this file may be distributed as part of a program |
6 | dnl that contains a configuration script generated by Autoconf, under | ||
7 | dnl the same distribution terms as the rest of that program. | ||
6 | dnl | 8 | dnl |
7 | dnl This file can can be used in projects which are not available under | 9 | dnl This file can can be used in projects which are not available under |
8 | dnl the GNU General Public License or the GNU Library General Public | 10 | dnl the GNU General Public License or the GNU Library General Public |
@@ -17,8 +19,6 @@ dnl Authors: | |||
17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | 19 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. |
18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. | 20 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. |
19 | 21 | ||
20 | AC_PREREQ(2.50) | ||
21 | |||
22 | dnl Checks for all prerequisites of the po subdirectory. | 22 | dnl Checks for all prerequisites of the po subdirectory. |
23 | AC_DEFUN([AM_PO_SUBDIRS], | 23 | AC_DEFUN([AM_PO_SUBDIRS], |
24 | [ | 24 | [ |
@@ -34,7 +34,7 @@ AC_DEFUN([AM_PO_SUBDIRS], | |||
34 | dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. | 34 | dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. |
35 | dnl The second test excludes FreeBSD msgfmt. | 35 | dnl The second test excludes FreeBSD msgfmt. |
36 | AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, | 36 | AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, |
37 | [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && | 37 | [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && |
38 | (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], | 38 | (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], |
39 | :) | 39 | :) |
40 | AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) | 40 | AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) |
@@ -43,7 +43,7 @@ AC_DEFUN([AM_PO_SUBDIRS], | |||
43 | dnl The first test excludes Solaris xgettext and early GNU xgettext versions. | 43 | dnl The first test excludes Solaris xgettext and early GNU xgettext versions. |
44 | dnl The second test excludes FreeBSD xgettext. | 44 | dnl The second test excludes FreeBSD xgettext. |
45 | AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, | 45 | AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, |
46 | [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && | 46 | [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && |
47 | (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], | 47 | (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], |
48 | :) | 48 | :) |
49 | dnl Remove leftover from FreeBSD xgettext call. | 49 | dnl Remove leftover from FreeBSD xgettext call. |
@@ -51,7 +51,7 @@ AC_DEFUN([AM_PO_SUBDIRS], | |||
51 | 51 | ||
52 | dnl Search for GNU msgmerge 0.11 or newer in the PATH. | 52 | dnl Search for GNU msgmerge 0.11 or newer in the PATH. |
53 | AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, | 53 | AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, |
54 | [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) | 54 | [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :) |
55 | 55 | ||
56 | dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. | 56 | dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. |
57 | dnl Test whether we really found GNU msgfmt. | 57 | dnl Test whether we really found GNU msgfmt. |
@@ -106,9 +106,6 @@ AC_DEFUN([AM_PO_SUBDIRS], | |||
106 | /*) top_srcdir="$ac_given_srcdir" ;; | 106 | /*) top_srcdir="$ac_given_srcdir" ;; |
107 | *) top_srcdir="$ac_dots$ac_given_srcdir" ;; | 107 | *) top_srcdir="$ac_dots$ac_given_srcdir" ;; |
108 | esac | 108 | esac |
109 | # Treat a directory as a PO directory if and only if it has a | ||
110 | # POTFILES.in file. This allows packages to have multiple PO | ||
111 | # directories under different names or in different locations. | ||
112 | if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then | 109 | if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then |
113 | rm -f "$ac_dir/POTFILES" | 110 | rm -f "$ac_dir/POTFILES" |
114 | test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" | 111 | test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" |
@@ -122,7 +119,7 @@ AC_DEFUN([AM_PO_SUBDIRS], | |||
122 | if test -n "$OBSOLETE_ALL_LINGUAS"; then | 119 | if test -n "$OBSOLETE_ALL_LINGUAS"; then |
123 | test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" | 120 | test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" |
124 | fi | 121 | fi |
125 | ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` | 122 | ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` |
126 | # Hide the ALL_LINGUAS assigment from automake. | 123 | # Hide the ALL_LINGUAS assigment from automake. |
127 | eval 'ALL_LINGUAS''=$ALL_LINGUAS_' | 124 | eval 'ALL_LINGUAS''=$ALL_LINGUAS_' |
128 | POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" | 125 | POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" |
@@ -301,7 +298,7 @@ changequote([,])dnl | |||
301 | fi | 298 | fi |
302 | if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then | 299 | if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then |
303 | # The LINGUAS file contains the set of available languages. | 300 | # The LINGUAS file contains the set of available languages. |
304 | ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` | 301 | ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` |
305 | POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" | 302 | POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" |
306 | else | 303 | else |
307 | # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS. | 304 | # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS. |
@@ -326,8 +323,6 @@ changequote([,])dnl | |||
326 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm) | 323 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm) |
327 | # Compute MSGFILES | 324 | # Compute MSGFILES |
328 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg) | 325 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg) |
329 | # Compute RESOURCESDLLFILES | ||
330 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll) | ||
331 | case "$ac_given_srcdir" in | 326 | case "$ac_given_srcdir" in |
332 | .) srcdirpre= ;; | 327 | .) srcdirpre= ;; |
333 | *) srcdirpre='$(srcdir)/' ;; | 328 | *) srcdirpre='$(srcdir)/' ;; |
@@ -340,7 +335,6 @@ changequote([,])dnl | |||
340 | CLASSFILES= | 335 | CLASSFILES= |
341 | QMFILES= | 336 | QMFILES= |
342 | MSGFILES= | 337 | MSGFILES= |
343 | RESOURCESDLLFILES= | ||
344 | for lang in $ALL_LINGUAS; do | 338 | for lang in $ALL_LINGUAS; do |
345 | POFILES="$POFILES $srcdirpre$lang.po" | 339 | POFILES="$POFILES $srcdirpre$lang.po" |
346 | UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" | 340 | UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" |
@@ -351,8 +345,6 @@ changequote([,])dnl | |||
351 | QMFILES="$QMFILES $srcdirpre$lang.qm" | 345 | QMFILES="$QMFILES $srcdirpre$lang.qm" |
352 | frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` | 346 | frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` |
353 | MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg" | 347 | MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg" |
354 | frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` | ||
355 | RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll" | ||
356 | done | 348 | done |
357 | # CATALOGS depends on both $ac_dir and the user's LINGUAS | 349 | # CATALOGS depends on both $ac_dir and the user's LINGUAS |
358 | # environment variable. | 350 | # environment variable. |
@@ -384,7 +376,6 @@ changequote([,])dnl | |||
384 | JAVACATALOGS= | 376 | JAVACATALOGS= |
385 | QTCATALOGS= | 377 | QTCATALOGS= |
386 | TCLCATALOGS= | 378 | TCLCATALOGS= |
387 | CSHARPCATALOGS= | ||
388 | if test -n "$INST_LINGUAS"; then | 379 | if test -n "$INST_LINGUAS"; then |
389 | for lang in $INST_LINGUAS; do | 380 | for lang in $INST_LINGUAS; do |
390 | CATALOGS="$CATALOGS $lang.gmo" | 381 | CATALOGS="$CATALOGS $lang.gmo" |
@@ -392,12 +383,10 @@ changequote([,])dnl | |||
392 | QTCATALOGS="$QTCATALOGS $lang.qm" | 383 | QTCATALOGS="$QTCATALOGS $lang.qm" |
393 | frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` | 384 | frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` |
394 | TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg" | 385 | TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg" |
395 | frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` | ||
396 | CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll" | ||
397 | done | 386 | done |
398 | fi | 387 | fi |
399 | 388 | ||
400 | sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp" | 389 | sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp" |
401 | if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then | 390 | if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then |
402 | # Add dependencies that cannot be formulated as a simple suffix rule. | 391 | # Add dependencies that cannot be formulated as a simple suffix rule. |
403 | for lang in $ALL_LINGUAS; do | 392 | for lang in $ALL_LINGUAS; do |
@@ -409,17 +398,6 @@ $frobbedlang.msg: $lang.po | |||
409 | EOF | 398 | EOF |
410 | done | 399 | done |
411 | fi | 400 | fi |
412 | if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then | ||
413 | # Add dependencies that cannot be formulated as a simple suffix rule. | ||
414 | for lang in $ALL_LINGUAS; do | ||
415 | frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` | ||
416 | cat >> "$ac_file.tmp" <<EOF | ||
417 | $frobbedlang/\$(DOMAIN).resources.dll: $lang.po | ||
418 | @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \ | ||
419 | \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } | ||
420 | EOF | ||
421 | done | ||
422 | fi | ||
423 | if test -n "$POMAKEFILEDEPS"; then | 401 | if test -n "$POMAKEFILEDEPS"; then |
424 | cat >> "$ac_file.tmp" <<EOF | 402 | cat >> "$ac_file.tmp" <<EOF |
425 | Makefile: $POMAKEFILEDEPS | 403 | Makefile: $POMAKEFILEDEPS |