version 1.1.1.1, 2012/02/21 22:57:49
|
version 1.1.1.3, 2021/03/17 13:38:46
|
Line 1
|
Line 1
|
# po.m4 serial 17 (gettext-0.18) | # po.m4 serial 24a |
dnl Copyright (C) 1995-2009 Free Software Foundation, Inc. | dnl Copyright (C) 1995-2014, 2016, 2018-2019 Free Software Foundation, Inc. |
dnl This file is free software; the Free Software Foundation |
dnl This file is free software; the Free Software Foundation |
dnl gives unlimited permission to copy and/or distribute it, |
dnl gives unlimited permission to copy and/or distribute it, |
dnl with or without modifications, as long as this notice is preserved. |
dnl with or without modifications, as long as this notice is preserved. |
dnl |
dnl |
dnl This file can can be used in projects which are not available under | dnl This file can be used in projects which are not available under |
dnl the GNU General Public License or the GNU Library General Public |
dnl the GNU General Public License or the GNU Library General Public |
dnl License but which still want to provide support for the GNU gettext |
dnl License but which still want to provide support for the GNU gettext |
dnl functionality. |
dnl functionality. |
dnl Please note that the actual code of the GNU gettext library is covered |
dnl Please note that the actual code of the GNU gettext library is covered |
dnl by the GNU Library General Public License, and the rest of the GNU |
dnl by the GNU Library General Public License, and the rest of the GNU |
dnl gettext package package is covered by the GNU General Public License. | dnl gettext package is covered by the GNU General Public License. |
dnl They are *not* in the public domain. |
dnl They are *not* in the public domain. |
|
|
dnl Authors: |
dnl Authors: |
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. |
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. |
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. |
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. |
|
|
AC_PREREQ([2.50]) | AC_PREREQ([2.60]) |
|
|
dnl Checks for all prerequisites of the po subdirectory. |
dnl Checks for all prerequisites of the po subdirectory. |
AC_DEFUN([AM_PO_SUBDIRS], |
AC_DEFUN([AM_PO_SUBDIRS], |
[ |
[ |
AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
AC_REQUIRE([AC_PROG_INSTALL])dnl |
AC_REQUIRE([AC_PROG_INSTALL])dnl |
AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake | AC_REQUIRE([AC_PROG_MKDIR_P])dnl |
| AC_REQUIRE([AC_PROG_SED])dnl |
AC_REQUIRE([AM_NLS])dnl |
AC_REQUIRE([AM_NLS])dnl |
|
|
dnl Release version of the gettext macros. This is used to ensure that |
dnl Release version of the gettext macros. This is used to ensure that |
dnl the gettext macros and po/Makefile.in.in are in sync. |
dnl the gettext macros and po/Makefile.in.in are in sync. |
AC_SUBST([GETTEXT_MACRO_VERSION], [0.17]) | AC_SUBST([GETTEXT_MACRO_VERSION], [0.19]) |
|
|
dnl Perform the following tests also if --disable-nls has been given, |
dnl Perform the following tests also if --disable-nls has been given, |
dnl because they are needed for "make dist" to work. |
dnl because they are needed for "make dist" to work. |
Line 82 changequote([,])dnl
|
Line 83 changequote([,])dnl
|
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, |
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, |
[$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) |
[$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) |
|
|
dnl Installation directories. |
|
dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we |
|
dnl have to define it here, so that it can be used in po/Makefile. |
|
test -n "$localedir" || localedir='${datadir}/locale' |
|
AC_SUBST([localedir]) |
|
|
|
dnl Support for AM_XGETTEXT_OPTION. |
dnl Support for AM_XGETTEXT_OPTION. |
test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= |
test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= |
AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) |
AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) |
Line 102 changequote([,])dnl
|
Line 97 changequote([,])dnl
|
case "$ac_file" in */Makefile.in) |
case "$ac_file" in */Makefile.in) |
# Adjust a relative srcdir. |
# Adjust a relative srcdir. |
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` |
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` |
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" | ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` |
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` |
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` |
# In autoconf-2.13 it is called $ac_given_srcdir. |
# In autoconf-2.13 it is called $ac_given_srcdir. |
# In autoconf-2.50 it is called $srcdir. |
# In autoconf-2.50 it is called $srcdir. |
Line 118 changequote([,])dnl
|
Line 113 changequote([,])dnl
|
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then |
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then |
rm -f "$ac_dir/POTFILES" |
rm -f "$ac_dir/POTFILES" |
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" |
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" |
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" | gt_tab=`printf '\t'` |
| 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" |
POMAKEFILEDEPS="POTFILES.in" |
POMAKEFILEDEPS="POTFILES.in" |
# ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend |
# ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend |
# on $ac_dir but don't depend on user-specified configuration |
# on $ac_dir but don't depend on user-specified configuration |
Line 128 changequote([,])dnl
|
Line 124 changequote([,])dnl
|
if test -n "$OBSOLETE_ALL_LINGUAS"; then |
if test -n "$OBSOLETE_ALL_LINGUAS"; then |
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" |
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" |
fi |
fi |
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` | ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` |
# Hide the ALL_LINGUAS assigment from automake < 1.5. | |
eval 'ALL_LINGUAS''=$ALL_LINGUAS_' | |
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" |
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" |
else |
else |
# The set of available languages was given in configure.in. |
# The set of available languages was given in configure.in. |
# Hide the ALL_LINGUAS assigment from automake < 1.5. | ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS |
eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' | |
fi |
fi |
# Compute POFILES |
# Compute POFILES |
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) |
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) |
Line 206 changequote([,])dnl
|
Line 199 changequote([,])dnl
|
esac |
esac |
done]], |
done]], |
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute |
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute |
# POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it | # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. |
# from automake < 1.5. | OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS" |
eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' | |
# Capture the value of LINGUAS because we need it to compute CATALOGS. |
# Capture the value of LINGUAS because we need it to compute CATALOGS. |
LINGUAS="${LINGUAS-%UNSET%}" |
LINGUAS="${LINGUAS-%UNSET%}" |
]) |
]) |
Line 226 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
|
Line 218 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
|
changequote(,)dnl |
changequote(,)dnl |
# Adjust a relative srcdir. |
# Adjust a relative srcdir. |
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` |
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` |
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" | ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` |
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` |
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` |
# In autoconf-2.13 it is called $ac_given_srcdir. |
# In autoconf-2.13 it is called $ac_given_srcdir. |
# In autoconf-2.50 it is called $srcdir. |
# In autoconf-2.50 it is called $srcdir. |
Line 254 EOT
|
Line 246 EOT
|
fi |
fi |
|
|
# A sed script that extracts the value of VARIABLE from a Makefile. |
# A sed script that extracts the value of VARIABLE from a Makefile. |
|
tab=`printf '\t'` |
sed_x_variable=' |
sed_x_variable=' |
# Test if the hold space is empty. |
# Test if the hold space is empty. |
x |
x |
Line 261 s/P/P/
|
Line 254 s/P/P/
|
x |
x |
ta |
ta |
# Yes it was empty. Look if we have the expected variable definition. |
# Yes it was empty. Look if we have the expected variable definition. |
/^[ ]*VARIABLE[ ]*=/{ | /^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{ |
# Seen the first line of the variable definition. |
# Seen the first line of the variable definition. |
s/^[ ]*VARIABLE[ ]*=// | s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=// |
ba |
ba |
} |
} |
bd |
bd |
Line 308 changequote([,])dnl
|
Line 301 changequote([,])dnl
|
fi |
fi |
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then |
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then |
# The LINGUAS file contains the set of available languages. |
# The LINGUAS file contains the set of available languages. |
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` | ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` |
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" |
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" |
else |
else |
# Set ALL_LINGUAS to the value of the Makefile variable LINGUAS. |
# Set ALL_LINGUAS to the value of the Makefile variable LINGUAS. |
sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'` |
sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'` |
ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` | ALL_LINGUAS=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` |
fi |
fi |
# Hide the ALL_LINGUAS assigment from automake < 1.5. |
|
eval 'ALL_LINGUAS''=$ALL_LINGUAS_' |
|
# Compute POFILES |
# Compute POFILES |
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) |
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) |
# Compute UPDATEPOFILES |
# Compute UPDATEPOFILES |
Line 405 changequote([,])dnl
|
Line 396 changequote([,])dnl
|
fi |
fi |
|
|
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" |
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" |
|
tab=`printf '\t'` |
if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then |
if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then |
# Add dependencies that cannot be formulated as a simple suffix rule. |
# Add dependencies that cannot be formulated as a simple suffix rule. |
for lang in $ALL_LINGUAS; do |
for lang in $ALL_LINGUAS; do |
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` |
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` |
cat >> "$ac_file.tmp" <<EOF |
cat >> "$ac_file.tmp" <<EOF |
$frobbedlang.msg: $lang.po |
$frobbedlang.msg: $lang.po |
@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \ | ${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \ |
\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } | ${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } |
EOF |
EOF |
done |
done |
fi |
fi |
Line 422 EOF
|
Line 414 EOF
|
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/'` |
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/'` |
cat >> "$ac_file.tmp" <<EOF |
cat >> "$ac_file.tmp" <<EOF |
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po |
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po |
@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \ | ${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \ |
\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } | ${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } |
EOF |
EOF |
done |
done |
fi |
fi |