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