comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/aclocal/po.m4 @ 68:5028fdace37b

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 16:23:26 -0400
parents
children
comparison
equal deleted inserted replaced
67:0e9998148a16 68:5028fdace37b
1 # po.m4 serial 32 (gettext-0.21.1)
2 dnl Copyright (C) 1995-2014, 2016, 2018-2022, 2024 Free Software Foundation,
3 dnl Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
7 dnl
8 dnl This file can be used in projects which are not available under
9 dnl the GNU General Public License or the GNU Lesser General Public
10 dnl License but which still want to provide support for the GNU gettext
11 dnl functionality.
12 dnl Please note that the actual code of the GNU gettext library is covered
13 dnl by the GNU Lesser General Public License, and the rest of the GNU
14 dnl gettext package is covered by the GNU General Public License.
15 dnl They are *not* in the public domain.
16
17 dnl Authors:
18 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
19 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
20
21 AC_PREREQ([2.60])
22
23 dnl Checks for all prerequisites of the po subdirectory.
24 AC_DEFUN([AM_PO_SUBDIRS],
25 [
26 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
27 AC_REQUIRE([AC_PROG_INSTALL])dnl
28 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
29 AC_REQUIRE([AC_PROG_SED])dnl
30 AC_REQUIRE([AM_NLS])dnl
31
32 dnl Release version of the gettext macros. This is used to ensure that
33 dnl the gettext macros and po/Makefile.in.in are in sync.
34 AC_SUBST([GETTEXT_MACRO_VERSION], [0.20])
35
36 dnl Perform the following tests also if --disable-nls has been given,
37 dnl because they are needed for "make dist" to work.
38
39 dnl Search for GNU msgfmt in the PATH.
40 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
41 dnl The second test excludes FreeBSD msgfmt.
42 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
43 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
44 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
45 :)
46 AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
47
48 dnl Test whether it is GNU msgfmt >= 0.15.
49 changequote(,)dnl
50 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
51 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
52 *) GMSGFMT_015=$GMSGFMT ;;
53 esac
54 changequote([,])dnl
55 AC_SUBST([GMSGFMT_015])
56
57 dnl Search for GNU xgettext 0.12 or newer in the PATH.
58 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
59 dnl The second test excludes FreeBSD xgettext.
60 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
61 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
62 (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)],
63 :)
64 dnl Remove leftover from FreeBSD xgettext call.
65 rm -f messages.po
66
67 dnl Test whether it is GNU xgettext >= 0.15.
68 changequote(,)dnl
69 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
70 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
71 *) XGETTEXT_015=$XGETTEXT ;;
72 esac
73 changequote([,])dnl
74 AC_SUBST([XGETTEXT_015])
75
76 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
77 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
78 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
79
80 dnl Test whether it is GNU msgmerge >= 0.20.
81 if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then
82 MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt'
83 else
84 dnl Test whether it is GNU msgmerge >= 0.12.
85 if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then
86 MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet'
87 else
88 dnl With these old versions, $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) is
89 dnl slow. But this is not a big problem, as such old gettext versions are
90 dnl hardly in use any more.
91 MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet'
92 fi
93 fi
94 AC_SUBST([MSGMERGE_FOR_MSGFMT_OPTION])
95
96 dnl Support for AM_XGETTEXT_OPTION.
97 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
98 AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
99
100 AC_CONFIG_COMMANDS([po-directories], [[
101 for ac_file in $CONFIG_FILES; do
102 # Support "outfile[:infile[:infile...]]"
103 case "$ac_file" in
104 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
105 esac
106 # PO directories have a Makefile.in generated from Makefile.in.in.
107 case "$ac_file" in */Makefile.in)
108 # Adjust a relative srcdir.
109 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
110 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
111 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
112 # In autoconf-2.13 it is called $ac_given_srcdir.
113 # In autoconf-2.50 it is called $srcdir.
114 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
115 case "$ac_given_srcdir" in
116 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
117 /*) top_srcdir="$ac_given_srcdir" ;;
118 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
119 esac
120 # Treat a directory as a PO directory if and only if it has a
121 # POTFILES.in file. This allows packages to have multiple PO
122 # directories under different names or in different locations.
123 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
124 rm -f "$ac_dir/POTFILES"
125 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
126 gt_tab=`printf '\t'`
127 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
128 POMAKEFILEDEPS="POTFILES.in"
129 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
130 # on $ac_dir but don't depend on user-specified configuration
131 # parameters.
132 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
133 # The LINGUAS file contains the set of available languages.
134 if test -n "$OBSOLETE_ALL_LINGUAS"; then
135 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
136 fi
137 ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
138 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
139 else
140 # The set of available languages was given in configure.in.
141 ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS
142 fi
143 # Compute POFILES
144 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
145 # Compute UPDATEPOFILES
146 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
147 # Compute DUMMYPOFILES
148 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
149 # Compute GMOFILES
150 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
151 case "$ac_given_srcdir" in
152 .) srcdirpre= ;;
153 *) srcdirpre='$(srcdir)/' ;;
154 esac
155 POFILES=
156 UPDATEPOFILES=
157 DUMMYPOFILES=
158 GMOFILES=
159 for lang in $ALL_LINGUAS; do
160 POFILES="$POFILES $srcdirpre$lang.po"
161 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
162 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
163 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
164 done
165 # CATALOGS depends on both $ac_dir and the user's LINGUAS
166 # environment variable.
167 INST_LINGUAS=
168 if test -n "$ALL_LINGUAS"; then
169 for presentlang in $ALL_LINGUAS; do
170 useit=no
171 if test "%UNSET%" != "$LINGUAS"; then
172 desiredlanguages="$LINGUAS"
173 else
174 desiredlanguages="$ALL_LINGUAS"
175 fi
176 for desiredlang in $desiredlanguages; do
177 # Use the presentlang catalog if desiredlang is
178 # a. equal to presentlang, or
179 # b. a variant of presentlang (because in this case,
180 # presentlang can be used as a fallback for messages
181 # which are not translated in the desiredlang catalog).
182 case "$desiredlang" in
183 "$presentlang" | "$presentlang"_* | "$presentlang".* | "$presentlang"@*)
184 useit=yes
185 ;;
186 esac
187 done
188 if test $useit = yes; then
189 INST_LINGUAS="$INST_LINGUAS $presentlang"
190 fi
191 done
192 fi
193 CATALOGS=
194 if test -n "$INST_LINGUAS"; then
195 for lang in $INST_LINGUAS; do
196 CATALOGS="$CATALOGS $lang.gmo"
197 done
198 fi
199 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
200 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
201 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
202 if test -f "$f"; then
203 case "$f" in
204 *.orig | *.bak | *~) ;;
205 *) cat "$f" >> "$ac_dir/Makefile" ;;
206 esac
207 fi
208 done
209 fi
210 ;;
211 esac
212 done]],
213 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
214 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS.
215 OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS"
216 # Capture the value of LINGUAS because we need it to compute CATALOGS.
217 LINGUAS="${LINGUAS-%UNSET%}"
218 ])
219 ])
220
221 dnl Postprocesses a Makefile in a directory containing PO files.
222 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
223 [
224 # When this code is run, in config.status, two variables have already been
225 # set:
226 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
227 # - LINGUAS is the value of the environment variable LINGUAS at configure
228 # time.
229
230 changequote(,)dnl
231 # Adjust a relative srcdir.
232 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
233 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
234 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
235 # In autoconf-2.13 it is called $ac_given_srcdir.
236 # In autoconf-2.50 it is called $srcdir.
237 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
238 case "$ac_given_srcdir" in
239 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
240 /*) top_srcdir="$ac_given_srcdir" ;;
241 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
242 esac
243
244 # Find a way to echo strings without interpreting backslash.
245 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
246 gt_echo='echo'
247 else
248 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
249 gt_echo='printf %s\n'
250 else
251 echo_func () {
252 cat <<EOT
253 $*
254 EOT
255 }
256 gt_echo='echo_func'
257 fi
258 fi
259
260 # A sed script that extracts the value of VARIABLE from a Makefile.
261 tab=`printf '\t'`
262 sed_x_variable='
263 # Test if the hold space is empty.
264 x
265 s/P/P/
266 x
267 ta
268 # Yes it was empty. Look if we have the expected variable definition.
269 /^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
270 # Seen the first line of the variable definition.
271 s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
272 ba
273 }
274 bd
275 :a
276 # Here we are processing a line from the variable definition.
277 # Remove comment, more precisely replace it with a space.
278 s/#.*$/ /
279 # See if the line ends in a backslash.
280 tb
281 :b
282 s/\\$//
283 # Print the line, without the trailing backslash.
284 p
285 tc
286 # There was no trailing backslash. The end of the variable definition is
287 # reached. Clear the hold space.
288 s/^.*$//
289 x
290 bd
291 :c
292 # A trailing backslash means that the variable definition continues in the
293 # next line. Put a nonempty string into the hold space to indicate this.
294 s/^.*$/P/
295 x
296 :d
297 '
298 changequote([,])dnl
299
300 # Set POTFILES to the value of the Makefile variable POTFILES.
301 sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
302 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
303 # Compute POTFILES_DEPS as
304 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
305 POTFILES_DEPS=
306 for file in $POTFILES; do
307 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
308 done
309 POMAKEFILEDEPS=""
310
311 if test -n "$OBSOLETE_ALL_LINGUAS"; then
312 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
313 fi
314 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
315 # The LINGUAS file contains the set of available languages.
316 ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
317 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
318 else
319 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
320 sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
321 ALL_LINGUAS=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
322 fi
323 # Compute POFILES
324 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
325 # Compute UPDATEPOFILES
326 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
327 # Compute DUMMYPOFILES
328 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
329 # Compute GMOFILES
330 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
331 # Compute PROPERTIESFILES
332 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).properties)
333 # Compute CLASSFILES
334 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).class)
335 # Compute QMFILES
336 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
337 # Compute MSGFILES
338 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
339 # Compute RESOURCESDLLFILES
340 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
341 case "$ac_given_srcdir" in
342 .) srcdirpre= ;;
343 *) srcdirpre='$(srcdir)/' ;;
344 esac
345 POFILES=
346 UPDATEPOFILES=
347 DUMMYPOFILES=
348 GMOFILES=
349 PROPERTIESFILES=
350 CLASSFILES=
351 QMFILES=
352 MSGFILES=
353 RESOURCESDLLFILES=
354 for lang in $ALL_LINGUAS; do
355 POFILES="$POFILES $srcdirpre$lang.po"
356 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
357 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
358 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
359 PROPERTIESFILES="$PROPERTIESFILES \$(srcdir)/\$(DOMAIN)_$lang.properties"
360 CLASSFILES="$CLASSFILES \$(srcdir)/\$(DOMAIN)_$lang.class"
361 QMFILES="$QMFILES $srcdirpre$lang.qm"
362 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
363 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
364 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/'`
365 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
366 done
367 # CATALOGS depends on both $ac_dir and the user's LINGUAS
368 # environment variable.
369 INST_LINGUAS=
370 if test -n "$ALL_LINGUAS"; then
371 for presentlang in $ALL_LINGUAS; do
372 useit=no
373 if test "%UNSET%" != "$LINGUAS"; then
374 desiredlanguages="$LINGUAS"
375 else
376 desiredlanguages="$ALL_LINGUAS"
377 fi
378 for desiredlang in $desiredlanguages; do
379 # Use the presentlang catalog if desiredlang is
380 # a. equal to presentlang, or
381 # b. a variant of presentlang (because in this case,
382 # presentlang can be used as a fallback for messages
383 # which are not translated in the desiredlang catalog).
384 case "$desiredlang" in
385 "$presentlang" | "$presentlang"_* | "$presentlang".* | "$presentlang"@*)
386 useit=yes
387 ;;
388 esac
389 done
390 if test $useit = yes; then
391 INST_LINGUAS="$INST_LINGUAS $presentlang"
392 fi
393 done
394 fi
395 CATALOGS=
396 JAVACATALOGS=
397 QTCATALOGS=
398 TCLCATALOGS=
399 CSHARPCATALOGS=
400 if test -n "$INST_LINGUAS"; then
401 for lang in $INST_LINGUAS; do
402 CATALOGS="$CATALOGS $lang.gmo"
403 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
404 QTCATALOGS="$QTCATALOGS $lang.qm"
405 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
406 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
407 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/'`
408 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
409 done
410 fi
411
412 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"
413 tab=`printf '\t'`
414 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
415 # Add dependencies that cannot be formulated as a simple suffix rule.
416 for lang in $ALL_LINGUAS; do
417 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
418 cat >> "$ac_file.tmp" <<EOF
419 $frobbedlang.msg: $lang.po
420 ${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
421 ${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
422 EOF
423 done
424 fi
425 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
426 # Add dependencies that cannot be formulated as a simple suffix rule.
427 for lang in $ALL_LINGUAS; do
428 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/'`
429 cat >> "$ac_file.tmp" <<EOF
430 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
431 ${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
432 ${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
433 EOF
434 done
435 fi
436 if test -n "$POMAKEFILEDEPS"; then
437 cat >> "$ac_file.tmp" <<EOF
438 Makefile: $POMAKEFILEDEPS
439 EOF
440 fi
441 mv "$ac_file.tmp" "$ac_file"
442 ])
443
444 dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
445 AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
446 [
447 XGETTEXT_EXTRA_OPTIONS=
448 ])
449
450 dnl Registers an option to be passed to xgettext in the po subdirectory.
451 AC_DEFUN([AM_XGETTEXT_OPTION],
452 [
453 AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
454 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
455 ])