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