377
386
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
378
387
AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
379
388
AC_REQUIRE([gt_INTTYPES_PRI])dnl
389
AC_REQUIRE([gl_XSIZE])dnl
391
AC_CHECK_TYPE([ptrdiff_t], ,
392
[AC_DEFINE([ptrdiff_t], [long],
393
[Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
381
395
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
382
396
stdlib.h string.h unistd.h sys/param.h])
383
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
384
geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
385
strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \
397
AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
398
mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
399
strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
402
dnl Use the _snprintf function only if it is declared (because on NetBSD it
403
dnl is defined as a weak alias of snprintf; we prefer to use the latter).
404
gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
405
gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
407
dnl Use the *_unlocked functions only if they are declared.
408
dnl (because some of them were defined without being declared in Solaris
409
dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
410
dnl on Solaris 2.5.1 to run on Solaris 2.6).
411
dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
412
gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
413
gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
414
gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
416
case $gt_cv_func_printf_posix in
417
*yes) HAVE_POSIX_PRINTF=1 ;;
418
*) HAVE_POSIX_PRINTF=0 ;;
420
AC_SUBST([HAVE_POSIX_PRINTF])
421
if test "$ac_cv_func_asprintf" = yes; then
426
AC_SUBST([HAVE_ASPRINTF])
427
if test "$ac_cv_func_snprintf" = yes; then
432
AC_SUBST([HAVE_SNPRINTF])
433
if test "$ac_cv_func_wprintf" = yes; then
438
AC_SUBST([HAVE_WPRINTF])
389
441
AM_LANGINFO_CODESET
390
442
if test $ac_cv_header_locale_h = yes; then
1683
dnl Postprocesses a Makefile in a directory containing PO files.
1684
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
1686
# When this code is run, in config.status, two variables have already been
1688
# - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
1689
# - LINGUAS is the value of the environment variable LINGUAS at configure
1693
# Adjust a relative srcdir.
1694
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
1695
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
1696
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
1697
# In autoconf-2.13 it is called $ac_given_srcdir.
1698
# In autoconf-2.50 it is called $srcdir.
1699
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
1700
case "$ac_given_srcdir" in
1701
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
1702
/*) top_srcdir="$ac_given_srcdir" ;;
1703
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
1706
# Find a way to echo strings without interpreting backslash.
1707
if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
1710
if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
1711
gt_echo='printf %s\n'
1722
# A sed script that extracts the value of VARIABLE from a Makefile.
1724
# Test if the hold space is empty.
1729
# Yes it was empty. Look if we have the expected variable definition.
1730
/^[ ]*VARIABLE[ ]*=/{
1731
# Seen the first line of the variable definition.
1732
s/^[ ]*VARIABLE[ ]*=//
1737
# Here we are processing a line from the variable definition.
1738
# Remove comment, more precisely replace it with a space.
1740
# See if the line ends in a backslash.
1744
# Print the line, without the trailing backslash.
1747
# There was no trailing backslash. The end of the variable definition is
1748
# reached. Clear the hold space.
1753
# A trailing backslash means that the variable definition continues in the
1754
# next line. Put a nonempty string into the hold space to indicate this.
1761
# Set POTFILES to the value of the Makefile variable POTFILES.
1762
sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
1763
POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
1764
# Compute POTFILES_DEPS as
1765
# $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
1767
for file in $POTFILES; do
1768
POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
1772
if test -n "$OBSOLETE_ALL_LINGUAS"; then
1773
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
1775
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
1776
# The LINGUAS file contains the set of available languages.
1777
ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
1778
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
1780
# Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
1781
sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
1782
ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
1784
# Hide the ALL_LINGUAS assigment from automake.
1785
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
1787
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
1788
# Compute UPDATEPOFILES
1789
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
1790
# Compute DUMMYPOFILES
1791
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
1793
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
1794
# Compute PROPERTIESFILES
1795
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
1796
# Compute CLASSFILES
1797
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
1799
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
1801
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
1802
# Compute RESOURCESDLLFILES
1803
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
1804
case "$ac_given_srcdir" in
1806
*) srcdirpre='$(srcdir)/' ;;
1817
for lang in $ALL_LINGUAS; do
1818
POFILES="$POFILES $srcdirpre$lang.po"
1819
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
1820
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
1821
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1822
PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
1823
CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
1824
QMFILES="$QMFILES $srcdirpre$lang.qm"
1825
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
1826
MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
1827
frobbedlang=`echo $lang | sed -e 's/_/-/g'`
1828
RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
1830
# CATALOGS depends on both $ac_dir and the user's LINGUAS
1831
# environment variable.
1833
if test -n "$ALL_LINGUAS"; then
1834
for presentlang in $ALL_LINGUAS; do
1836
if test "%UNSET%" != "$LINGUAS"; then
1837
desiredlanguages="$LINGUAS"
1839
desiredlanguages="$ALL_LINGUAS"
1841
for desiredlang in $desiredlanguages; do
1842
# Use the presentlang catalog if desiredlang is
1843
# a. equal to presentlang, or
1844
# b. a variant of presentlang (because in this case,
1845
# presentlang can be used as a fallback for messages
1846
# which are not translated in the desiredlang catalog).
1847
case "$desiredlang" in
1848
"$presentlang"*) useit=yes;;
1851
if test $useit = yes; then
1852
INST_LINGUAS="$INST_LINGUAS $presentlang"
1861
if test -n "$INST_LINGUAS"; then
1862
for lang in $INST_LINGUAS; do
1863
CATALOGS="$CATALOGS $lang.gmo"
1864
JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
1865
QTCATALOGS="$QTCATALOGS $lang.qm"
1866
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
1867
TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
1868
frobbedlang=`echo $lang | sed -e 's/_/-/g'`
1869
CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
1873
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"
1874
if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
1875
# Add dependencies that cannot be formulated as a simple suffix rule.
1876
for lang in $ALL_LINGUAS; do
1877
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
1878
cat >> "$ac_file.tmp" <<EOF
1879
$frobbedlang.msg: $lang.po
1880
@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
1881
\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
1885
if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
1886
# Add dependencies that cannot be formulated as a simple suffix rule.
1887
for lang in $ALL_LINGUAS; do
1888
frobbedlang=`echo $lang | sed -e 's/_/-/g'`
1889
cat >> "$ac_file.tmp" <<EOF
1890
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
1891
@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
1892
\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
1896
if test -n "$POMAKEFILEDEPS"; then
1897
cat >> "$ac_file.tmp" <<EOF
1898
Makefile: $POMAKEFILEDEPS
1901
mv "$ac_file.tmp" "$ac_file"
1601
1904
# progtest.m4 serial 3 (gettext-0.12)
1602
1905
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
1603
1906
dnl This file is free software, distributed under the terms of the GNU
1721
2024
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1722
2025
[AM_AUTOMAKE_VERSION([1.8.5])])
1724
# Figure out how to run the assembler. -*- Autoconf -*-
1728
# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
1730
# This program is free software; you can redistribute it and/or modify
1731
# it under the terms of the GNU General Public License as published by
1732
# the Free Software Foundation; either version 2, or (at your option)
1733
# any later version.
1735
# This program is distributed in the hope that it will be useful,
1736
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1737
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1738
# GNU General Public License for more details.
1740
# You should have received a copy of the GNU General Public License
1741
# along with this program; if not, write to the Free Software
1742
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1747
AC_DEFUN([AM_PROG_AS],
1748
[# By default we simply use the C compiler to build assembly code.
1749
AC_REQUIRE([AC_PROG_CC])
1750
test "${CCAS+set}" = set || CCAS=$CC
1751
test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
1752
AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
1753
AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
1756
2027
# AM_AUX_DIR_EXPAND
1758
2029
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.