351
dnl Checks for all prerequisites of the po subdirectory,
352
dnl except for USE_NLS.
353
AC_DEFUN([AM_PO_SUBDIRS],
355
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
356
AC_REQUIRE([AC_PROG_INSTALL])dnl
357
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
359
dnl Perform the following tests also if --disable-nls has been given,
360
dnl because they are needed for "make dist" to work.
362
dnl Search for GNU msgfmt in the PATH.
363
dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
364
dnl The second test excludes FreeBSD msgfmt.
365
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
366
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
367
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
369
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
371
dnl Search for GNU xgettext 0.11 or newer in the PATH.
372
dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
373
dnl The second test excludes FreeBSD xgettext.
374
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
375
[$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
376
(if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
378
dnl Remove leftover from FreeBSD xgettext call.
381
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
382
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
383
[$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
385
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
386
dnl Test whether we really found GNU msgfmt.
387
if test "$GMSGFMT" != ":"; then
388
dnl If it is no GNU msgfmt we define it as : so that the
389
dnl Makefiles still can work.
390
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
391
(if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
394
GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
396
[found $GMSGFMT program is not GNU msgfmt; ignore it])
401
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
402
dnl Test whether we really found GNU xgettext.
403
if test "$XGETTEXT" != ":"; then
404
dnl If it is no GNU xgettext we define it as : so that the
405
dnl Makefiles still can work.
406
if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
407
(if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
411
[found xgettext program is not GNU xgettext; ignore it])
414
dnl Remove leftover from FreeBSD xgettext call.
419
for ac_file in $CONFIG_FILES; do
420
# Support "outfile[:infile[:infile...]]"
422
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
424
# PO directories have a Makefile.in generated from Makefile.in.in.
425
case "$ac_file" in */Makefile.in)
426
# Adjust a relative srcdir.
427
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
428
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
429
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
430
# In autoconf-2.13 it is called $ac_given_srcdir.
431
# In autoconf-2.50 it is called $srcdir.
432
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
433
case "$ac_given_srcdir" in
434
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
435
/*) top_srcdir="$ac_given_srcdir" ;;
436
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
438
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
439
rm -f "$ac_dir/POTFILES"
440
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
441
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
442
# ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
443
# on $ac_dir but don't depend on user-specified configuration
445
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
446
# The LINGUAS file contains the set of available languages.
447
if test -n "$ALL_LINGUAS"; then
448
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
450
ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
451
# Hide the ALL_LINGUAS assigment from automake.
452
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
454
case "$ac_given_srcdir" in
456
*) srcdirpre='$(srcdir)/' ;;
462
for lang in $ALL_LINGUAS; do
463
POFILES="$POFILES $srcdirpre$lang.po"
464
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
465
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
466
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
468
# CATALOGS depends on both $ac_dir and the user's LINGUAS
469
# environment variable.
471
if test -n "$ALL_LINGUAS"; then
472
for presentlang in $ALL_LINGUAS; do
474
if test "%UNSET%" != "$LINGUAS"; then
475
desiredlanguages="$LINGUAS"
477
desiredlanguages="$ALL_LINGUAS"
479
for desiredlang in $desiredlanguages; do
480
# Use the presentlang catalog if desiredlang is
481
# a. equal to presentlang, or
482
# b. a variant of presentlang (because in this case,
483
# presentlang can be used as a fallback for messages
484
# which are not translated in the desiredlang catalog).
485
case "$desiredlang" in
486
"$presentlang"*) useit=yes;;
489
if test $useit = yes; then
490
INST_LINGUAS="$INST_LINGUAS $presentlang"
495
if test -n "$INST_LINGUAS"; then
496
for lang in $INST_LINGUAS; do
497
CATALOGS="$CATALOGS $lang.gmo"
500
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
501
sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
502
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
503
if test -f "$f"; then
505
*.orig | *.bak | *~) ;;
506
*) cat "$f" >> "$ac_dir/Makefile" ;;
514
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute
515
# POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
517
eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
518
# Capture the value of LINGUAS because we need it to compute CATALOGS.
519
LINGUAS="${LINGUAS-%UNSET%}"
524
367
dnl Checks for all prerequisites of the intl subdirectory,
525
368
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
526
369
dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
1759
1710
exec_prefix="$acl_save_exec_prefix"
1760
1711
prefix="$acl_save_prefix"
1762
# progtest.m4 serial 2 (gettext-0.10.40)
1763
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
1713
# longdouble.m4 serial 1 (gettext-0.12)
1714
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
1715
dnl This file is free software, distributed under the terms of the GNU
1716
dnl General Public License. As a special exception to the GNU General
1717
dnl Public License, this file may be distributed as part of a program
1718
dnl that contains a configuration script generated by Autoconf, under
1719
dnl the same distribution terms as the rest of that program.
1721
dnl From Bruno Haible.
1722
dnl Test whether the compiler supports the 'long double' type.
1723
dnl Prerequisite: AC_PROG_CC
1725
AC_DEFUN([gt_TYPE_LONGDOUBLE],
1727
AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
1728
[if test "$GCC" = yes; then
1729
gt_cv_c_long_double=yes
1732
/* The Stardent Vistra knows sizeof(long double), but does not support it. */
1733
long double foo = 0.0;
1734
/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
1735
int array [2*(sizeof(long double) >= sizeof(double)) - 1];
1737
gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
1739
if test $gt_cv_c_long_double = yes; then
1740
AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
1743
# longlong.m4 serial 4
1744
dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
1745
dnl This file is free software, distributed under the terms of the GNU
1746
dnl General Public License. As a special exception to the GNU General
1747
dnl Public License, this file may be distributed as part of a program
1748
dnl that contains a configuration script generated by Autoconf, under
1749
dnl the same distribution terms as the rest of that program.
1751
dnl From Paul Eggert.
1753
# Define HAVE_LONG_LONG if 'long long' works.
1755
AC_DEFUN([jm_AC_TYPE_LONG_LONG],
1757
AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
1758
[AC_TRY_LINK([long long ll = 1LL; int i = 63;],
1759
[long long llmax = (long long) -1;
1760
return ll << i | ll >> i | llmax / ll | llmax % ll;],
1761
ac_cv_type_long_long=yes,
1762
ac_cv_type_long_long=no)])
1763
if test $ac_cv_type_long_long = yes; then
1764
AC_DEFINE(HAVE_LONG_LONG, 1,
1765
[Define if you have the 'long long' type.])
1768
# nls.m4 serial 1 (gettext-0.12)
1769
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
1770
dnl This file is free software, distributed under the terms of the GNU
1771
dnl General Public License. As a special exception to the GNU General
1772
dnl Public License, this file may be distributed as part of a program
1773
dnl that contains a configuration script generated by Autoconf, under
1774
dnl the same distribution terms as the rest of that program.
1776
dnl This file can can be used in projects which are not available under
1777
dnl the GNU General Public License or the GNU Library General Public
1778
dnl License but which still want to provide support for the GNU gettext
1780
dnl Please note that the actual code of the GNU gettext library is covered
1781
dnl by the GNU Library General Public License, and the rest of the GNU
1782
dnl gettext package package is covered by the GNU General Public License.
1783
dnl They are *not* in the public domain.
1786
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1787
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1791
AC_MSG_CHECKING([whether NLS is requested])
1792
dnl Default is enabled NLS
1794
[ --disable-nls do not use Native Language Support],
1795
USE_NLS=$enableval, USE_NLS=yes)
1796
AC_MSG_RESULT($USE_NLS)
1800
AC_DEFUN([AM_MKINSTALLDIRS],
1802
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1803
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
1804
dnl Try to locate it.
1806
if test -n "$ac_aux_dir"; then
1807
case "$ac_aux_dir" in
1808
/*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
1809
*) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
1812
if test -z "$MKINSTALLDIRS"; then
1813
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1815
AC_SUBST(MKINSTALLDIRS)
1817
# po.m4 serial 3 (gettext-0.14)
1818
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
1819
dnl This file is free software, distributed under the terms of the GNU
1820
dnl General Public License. As a special exception to the GNU General
1821
dnl Public License, this file may be distributed as part of a program
1822
dnl that contains a configuration script generated by Autoconf, under
1823
dnl the same distribution terms as the rest of that program.
1825
dnl This file can can be used in projects which are not available under
1826
dnl the GNU General Public License or the GNU Library General Public
1827
dnl License but which still want to provide support for the GNU gettext
1829
dnl Please note that the actual code of the GNU gettext library is covered
1830
dnl by the GNU Library General Public License, and the rest of the GNU
1831
dnl gettext package package is covered by the GNU General Public License.
1832
dnl They are *not* in the public domain.
1835
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1836
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1838
dnl Checks for all prerequisites of the po subdirectory.
1839
AC_DEFUN([AM_PO_SUBDIRS],
1841
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1842
AC_REQUIRE([AC_PROG_INSTALL])dnl
1843
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1844
AC_REQUIRE([AM_NLS])dnl
1846
dnl Perform the following tests also if --disable-nls has been given,
1847
dnl because they are needed for "make dist" to work.
1849
dnl Search for GNU msgfmt in the PATH.
1850
dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
1851
dnl The second test excludes FreeBSD msgfmt.
1852
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1853
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
1854
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1856
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1858
dnl Search for GNU xgettext 0.12 or newer in the PATH.
1859
dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
1860
dnl The second test excludes FreeBSD xgettext.
1861
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1862
[$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
1863
(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)],
1865
dnl Remove leftover from FreeBSD xgettext call.
1868
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
1869
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
1870
[$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
1872
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1873
dnl Test whether we really found GNU msgfmt.
1874
if test "$GMSGFMT" != ":"; then
1875
dnl If it is no GNU msgfmt we define it as : so that the
1876
dnl Makefiles still can work.
1877
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
1878
(if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1881
GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
1883
[found $GMSGFMT program is not GNU msgfmt; ignore it])
1888
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1889
dnl Test whether we really found GNU xgettext.
1890
if test "$XGETTEXT" != ":"; then
1891
dnl If it is no GNU xgettext we define it as : so that the
1892
dnl Makefiles still can work.
1893
if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
1894
(if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1898
[found xgettext program is not GNU xgettext; ignore it])
1901
dnl Remove leftover from FreeBSD xgettext call.
1905
AC_OUTPUT_COMMANDS([
1906
for ac_file in $CONFIG_FILES; do
1907
# Support "outfile[:infile[:infile...]]"
1909
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1911
# PO directories have a Makefile.in generated from Makefile.in.in.
1912
case "$ac_file" in */Makefile.in)
1913
# Adjust a relative srcdir.
1914
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
1915
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
1916
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
1917
# In autoconf-2.13 it is called $ac_given_srcdir.
1918
# In autoconf-2.50 it is called $srcdir.
1919
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
1920
case "$ac_given_srcdir" in
1921
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
1922
/*) top_srcdir="$ac_given_srcdir" ;;
1923
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
1925
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
1926
rm -f "$ac_dir/POTFILES"
1927
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
1928
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
1929
POMAKEFILEDEPS="POTFILES.in"
1930
# ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
1931
# on $ac_dir but don't depend on user-specified configuration
1933
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
1934
# The LINGUAS file contains the set of available languages.
1935
if test -n "$OBSOLETE_ALL_LINGUAS"; then
1936
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
1938
ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
1939
# Hide the ALL_LINGUAS assigment from automake.
1940
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
1941
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
1943
# The set of available languages was given in configure.in.
1944
eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
1947
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
1948
# Compute UPDATEPOFILES
1949
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
1950
# Compute DUMMYPOFILES
1951
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
1953
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
1954
case "$ac_given_srcdir" in
1956
*) srcdirpre='$(srcdir)/' ;;
1962
for lang in $ALL_LINGUAS; do
1963
POFILES="$POFILES $srcdirpre$lang.po"
1964
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
1965
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
1966
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1968
# CATALOGS depends on both $ac_dir and the user's LINGUAS
1969
# environment variable.
1971
if test -n "$ALL_LINGUAS"; then
1972
for presentlang in $ALL_LINGUAS; do
1974
if test "%UNSET%" != "$LINGUAS"; then
1975
desiredlanguages="$LINGUAS"
1977
desiredlanguages="$ALL_LINGUAS"
1979
for desiredlang in $desiredlanguages; do
1980
# Use the presentlang catalog if desiredlang is
1981
# a. equal to presentlang, or
1982
# b. a variant of presentlang (because in this case,
1983
# presentlang can be used as a fallback for messages
1984
# which are not translated in the desiredlang catalog).
1985
case "$desiredlang" in
1986
"$presentlang"*) useit=yes;;
1989
if test $useit = yes; then
1990
INST_LINGUAS="$INST_LINGUAS $presentlang"
1995
if test -n "$INST_LINGUAS"; then
1996
for lang in $INST_LINGUAS; do
1997
CATALOGS="$CATALOGS $lang.gmo"
2000
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
2001
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"
2002
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
2003
if test -f "$f"; then
2005
*.orig | *.bak | *~) ;;
2006
*) cat "$f" >> "$ac_dir/Makefile" ;;
2014
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute
2015
# POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
2017
eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
2018
# Capture the value of LINGUAS because we need it to compute CATALOGS.
2019
LINGUAS="${LINGUAS-%UNSET%}"
2023
dnl Postprocesses a Makefile in a directory containing PO files.
2024
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
2026
# When this code is run, in config.status, two variables have already been
2028
# - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
2029
# - LINGUAS is the value of the environment variable LINGUAS at configure
2033
# Adjust a relative srcdir.
2034
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2035
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
2036
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2037
# In autoconf-2.13 it is called $ac_given_srcdir.
2038
# In autoconf-2.50 it is called $srcdir.
2039
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2040
case "$ac_given_srcdir" in
2041
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2042
/*) top_srcdir="$ac_given_srcdir" ;;
2043
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
2046
# Find a way to echo strings without interpreting backslash.
2047
if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
2050
if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
2051
gt_echo='printf %s\n'
2062
# A sed script that extracts the value of VARIABLE from a Makefile.
2064
# Test if the hold space is empty.
2069
# Yes it was empty. Look if we have the expected variable definition.
2070
/^[ ]*VARIABLE[ ]*=/{
2071
# Seen the first line of the variable definition.
2072
s/^[ ]*VARIABLE[ ]*=//
2077
# Here we are processing a line from the variable definition.
2078
# Remove comment, more precisely replace it with a space.
2080
# See if the line ends in a backslash.
2084
# Print the line, without the trailing backslash.
2087
# There was no trailing backslash. The end of the variable definition is
2088
# reached. Clear the hold space.
2093
# A trailing backslash means that the variable definition continues in the
2094
# next line. Put a nonempty string into the hold space to indicate this.
2101
# Set POTFILES to the value of the Makefile variable POTFILES.
2102
sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
2103
POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
2104
# Compute POTFILES_DEPS as
2105
# $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
2107
for file in $POTFILES; do
2108
POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
2112
if test -n "$OBSOLETE_ALL_LINGUAS"; then
2113
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2115
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2116
# The LINGUAS file contains the set of available languages.
2117
ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2118
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2120
# Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
2121
sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
2122
ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
2124
# Hide the ALL_LINGUAS assigment from automake.
2125
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2127
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2128
# Compute UPDATEPOFILES
2129
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2130
# Compute DUMMYPOFILES
2131
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2133
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2134
# Compute PROPERTIESFILES
2135
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
2136
# Compute CLASSFILES
2137
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
2139
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
2141
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
2142
# Compute RESOURCESDLLFILES
2143
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
2144
case "$ac_given_srcdir" in
2146
*) srcdirpre='$(srcdir)/' ;;
2157
for lang in $ALL_LINGUAS; do
2158
POFILES="$POFILES $srcdirpre$lang.po"
2159
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2160
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2161
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2162
PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
2163
CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
2164
QMFILES="$QMFILES $srcdirpre$lang.qm"
2165
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2166
MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
2167
frobbedlang=`echo $lang | sed -e 's/_/-/g'`
2168
RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
2170
# CATALOGS depends on both $ac_dir and the user's LINGUAS
2171
# environment variable.
2173
if test -n "$ALL_LINGUAS"; then
2174
for presentlang in $ALL_LINGUAS; do
2176
if test "%UNSET%" != "$LINGUAS"; then
2177
desiredlanguages="$LINGUAS"
2179
desiredlanguages="$ALL_LINGUAS"
2181
for desiredlang in $desiredlanguages; do
2182
# Use the presentlang catalog if desiredlang is
2183
# a. equal to presentlang, or
2184
# b. a variant of presentlang (because in this case,
2185
# presentlang can be used as a fallback for messages
2186
# which are not translated in the desiredlang catalog).
2187
case "$desiredlang" in
2188
"$presentlang"*) useit=yes;;
2191
if test $useit = yes; then
2192
INST_LINGUAS="$INST_LINGUAS $presentlang"
2201
if test -n "$INST_LINGUAS"; then
2202
for lang in $INST_LINGUAS; do
2203
CATALOGS="$CATALOGS $lang.gmo"
2204
JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
2205
QTCATALOGS="$QTCATALOGS $lang.qm"
2206
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2207
TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
2208
frobbedlang=`echo $lang | sed -e 's/_/-/g'`
2209
CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
2213
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"
2214
if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
2215
# Add dependencies that cannot be formulated as a simple suffix rule.
2216
for lang in $ALL_LINGUAS; do
2217
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2218
cat >> "$ac_file.tmp" <<EOF
2219
$frobbedlang.msg: $lang.po
2220
@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
2221
\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2225
if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
2226
# Add dependencies that cannot be formulated as a simple suffix rule.
2227
for lang in $ALL_LINGUAS; do
2228
frobbedlang=`echo $lang | sed -e 's/_/-/g'`
2229
cat >> "$ac_file.tmp" <<EOF
2230
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
2231
@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
2232
\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2236
if test -n "$POMAKEFILEDEPS"; then
2237
cat >> "$ac_file.tmp" <<EOF
2238
Makefile: $POMAKEFILEDEPS
2241
mv "$ac_file.tmp" "$ac_file"
2243
# printf-posix.m4 serial 2 (gettext-0.13.1)
2244
dnl Copyright (C) 2003 Free Software Foundation, Inc.
2245
dnl This file is free software, distributed under the terms of the GNU
2246
dnl General Public License. As a special exception to the GNU General
2247
dnl Public License, this file may be distributed as part of a program
2248
dnl that contains a configuration script generated by Autoconf, under
2249
dnl the same distribution terms as the rest of that program.
2251
dnl From Bruno Haible.
2252
dnl Test whether the printf() function supports POSIX/XSI format strings with
2255
AC_DEFUN([gt_PRINTF_POSIX],
2257
AC_REQUIRE([AC_PROG_CC])
2258
AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
2259
gt_cv_func_printf_posix,
2264
/* The string "%2$d %1$d", with dollar characters protected from the shell's
2265
dollar expansion (possibly an autoconf bug). */
2266
static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
2267
static char buf[100];
2270
sprintf (buf, format, 33, 55);
2271
return (strcmp (buf, "55 33") != 0);
2272
}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
2274
AC_EGREP_CPP(notposix, [
2275
#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
2278
], gt_cv_func_printf_posix="guessing no",
2279
gt_cv_func_printf_posix="guessing yes")
2282
case $gt_cv_func_printf_posix in
2284
AC_DEFINE(HAVE_POSIX_PRINTF, 1,
2285
[Define if your printf() function supports format strings with positions.])
2289
# progtest.m4 serial 3 (gettext-0.12)
2290
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
1764
2291
dnl This file is free software, distributed under the terms of the GNU
1765
2292
dnl General Public License. As a special exception to the GNU General
1766
2293
dnl Public License, this file may be distributed as part of a program