summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2006-05-18 22:05:43 +0000
committerTon Voon <tonvoon@users.sourceforge.net>2006-05-18 22:05:43 +0000
commita8cd7705e7898d77764aa12ddcc2e29de1860138 (patch)
tree970f609cbecbe515998907fd55a12f814ad2edcd /m4
parent08394ddb2d62ec8aab9121e45ab9c1a102e85ba4 (diff)
downloadmonitoring-plugins-a8cd7705e7898d77764aa12ddcc2e29de1860138.tar.gz
Synchronise with coreutils 2.95. Gettext now synced with coreutils,
so no longer development platform requirement git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1394 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'm4')
-rw-r--r--m4/.cvsignore2
-rw-r--r--m4/Makefile.am3
-rw-r--r--m4/afs.m420
-rw-r--r--m4/codeset.m48
-rw-r--r--m4/error.m413
-rw-r--r--m4/exitfail.m415
-rw-r--r--m4/extensions.m413
-rw-r--r--m4/fstypename.m49
-rw-r--r--m4/fsusage.m442
-rw-r--r--m4/getopt.m487
-rw-r--r--m4/gettext.m4392
-rw-r--r--m4/glibc21.m414
-rw-r--r--m4/iconv.m48
-rw-r--r--m4/intdiv0.m472
-rw-r--r--m4/inttypes-pri.m48
-rw-r--r--m4/inttypes.m48
-rw-r--r--m4/inttypes_h.m426
-rw-r--r--m4/isc-posix.m426
-rw-r--r--m4/lcmessage.m432
-rw-r--r--m4/lib-ld.m447
-rw-r--r--m4/lib-link.m440
-rw-r--r--m4/lib-prefix.m461
-rw-r--r--m4/longdouble.m428
-rw-r--r--m4/longlong.m423
-rw-r--r--m4/ls-mntd-fs.m459
-rw-r--r--m4/malloc.m425
-rw-r--r--m4/mountlist.m425
-rw-r--r--m4/nls.m451
-rw-r--r--m4/np_coreutils.m46
-rw-r--r--m4/onceonly_2_57.m4 (renamed from m4/onceonly.m4)39
-rw-r--r--m4/po.m4429
-rw-r--r--m4/progtest.m479
-rw-r--r--m4/realloc.m425
-rw-r--r--m4/signed.m417
-rw-r--r--m4/stdbool.m457
-rw-r--r--m4/stdint_h.m426
-rw-r--r--m4/uintmax_t.m433
-rw-r--r--m4/ulonglong.m420
-rw-r--r--m4/unlocked-io.m418
-rw-r--r--m4/wchar_t.m420
-rw-r--r--m4/wint_t.m420
-rw-r--r--m4/xalloc.m423
42 files changed, 1292 insertions, 677 deletions
diff --git a/m4/.cvsignore b/m4/.cvsignore
new file mode 100644
index 00000000..282522db
--- /dev/null
+++ b/m4/.cvsignore
@@ -0,0 +1,2 @@
1Makefile
2Makefile.in
diff --git a/m4/Makefile.am b/m4/Makefile.am
index ddb9d08a..404c0430 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -45,3 +45,6 @@ Makefile.am: Makefile.am.in
45 sed -n '/^Makefile\.am:/,$$p' $@.in >> $@t 45 sed -n '/^Makefile\.am:/,$$p' $@.in >> $@t
46 chmod a-w $@t 46 chmod a-w $@t
47 mv $@t $@ 47 mv $@t $@
48
49print_coreutil_files:
50 @echo $(EXTRA_DIST)
diff --git a/m4/afs.m4 b/m4/afs.m4
index 9e7d7731..6f7a56cc 100644
--- a/m4/afs.m4
+++ b/m4/afs.m4
@@ -1,13 +1,17 @@
1#serial 5 1#serial 8
2 2
3AC_DEFUN([jm_AFS], 3# Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
4# This file is free software; the Free Software Foundation
5# gives unlimited permission to copy and/or distribute it,
6# with or without modifications, as long as this notice is preserved.
7
8AC_DEFUN([gl_AFS],
4 [ 9 [
5 AC_MSG_CHECKING(for AFS) 10 AC_ARG_WITH(afs,
6 if test -d /afs; then 11 AC_HELP_STRING([--with-afs],
12 [support for the Andrew File System [[default=no]]]),
13 test "$withval" = no || with_afs=yes, with_afs=no)
14 if test "$with_afs" = yes; then
7 AC_DEFINE(AFS, 1, [Define if you have the Andrew File System.]) 15 AC_DEFINE(AFS, 1, [Define if you have the Andrew File System.])
8 ac_result=yes
9 else
10 ac_result=no
11 fi 16 fi
12 AC_MSG_RESULT($ac_result)
13 ]) 17 ])
diff --git a/m4/codeset.m4 b/m4/codeset.m4
index 59535ebc..a6e67ec4 100644
--- a/m4/codeset.m4
+++ b/m4/codeset.m4
@@ -1,10 +1,8 @@
1# codeset.m4 serial AM1 (gettext-0.10.40) 1# codeset.m4 serial AM1 (gettext-0.10.40)
2dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. 2dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software; the Free Software Foundation
4dnl General Public License. As a special exception to the GNU General 4dnl gives unlimited permission to copy and/or distribute it,
5dnl Public License, this file may be distributed as part of a program 5dnl with or without modifications, as long as this notice is preserved.
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8 6
9dnl From Bruno Haible. 7dnl From Bruno Haible.
10 8
diff --git a/m4/error.m4 b/m4/error.m4
index 0bc2e689..7c7746e2 100644
--- a/m4/error.m4
+++ b/m4/error.m4
@@ -1,14 +1,21 @@
1#serial 9 1#serial 11
2
3# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2004 Free Software
4# Foundation, Inc.
5#
6# This file is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it,
8# with or without modifications, as long as this notice is preserved.
2 9
3AC_DEFUN([gl_ERROR], 10AC_DEFUN([gl_ERROR],
4[ 11[
5 AC_FUNC_ERROR_AT_LINE 12 AC_FUNC_ERROR_AT_LINE
6 dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]). 13 dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
7 jm_PREREQ_ERROR 14 gl_PREREQ_ERROR
8]) 15])
9 16
10# Prerequisites of lib/error.c. 17# Prerequisites of lib/error.c.
11AC_DEFUN([jm_PREREQ_ERROR], 18AC_DEFUN([gl_PREREQ_ERROR],
12[ 19[
13 AC_REQUIRE([AC_FUNC_STRERROR_R]) 20 AC_REQUIRE([AC_FUNC_STRERROR_R])
14 : 21 :
diff --git a/m4/exitfail.m4 b/m4/exitfail.m4
index fa5b1493..5523676f 100644
--- a/m4/exitfail.m4
+++ b/m4/exitfail.m4
@@ -1,13 +1,14 @@
1# exitfail.m4 serial 3 1# exitfail.m4 serial 5
2dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. 2dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software; the Free Software Foundation
4dnl General Public License. As a special exception to the GNU General 4dnl gives unlimited permission to copy and/or distribute it,
5dnl Public License, this file may be distributed as part of a program 5dnl with or without modifications, as long as this notice is preserved.
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8 6
9AC_DEFUN([gl_EXITFAIL], 7AC_DEFUN([gl_EXITFAIL],
10[ 8[
9 AC_LIBSOURCES([exitfail.c, exitfail.h])
10 AC_LIBOBJ([exitfail])
11
11 dnl No prerequisites of lib/exitfail.c. 12 dnl No prerequisites of lib/exitfail.c.
12 : 13 :
13]) 14])
diff --git a/m4/extensions.m4 b/m4/extensions.m4
index 58bc0beb..e71845f1 100644
--- a/m4/extensions.m4
+++ b/m4/extensions.m4
@@ -1,12 +1,9 @@
1# Enable extensions on systems that normally disable them. 1# Enable extensions on systems that normally disable them.
2 2
3# Copyright (C) 2003 Free Software Foundation, Inc. 3# Copyright (C) 2003 Free Software Foundation, Inc.
4 4# This file is free software; the Free Software Foundation
5# This file is free software, distributed under the terms of the GNU 5# gives unlimited permission to copy and/or distribute it,
6# General Public License. As a special exception to the GNU General 6# with or without modifications, as long as this notice is preserved.
7# Public License, this file may be distributed as part of a program
8# that contains a configuration script generated by Autoconf, under
9# the same distribution terms as the rest of that program.
10 7
11# gl_USE_SYSTEM_EXTENSIONS 8# gl_USE_SYSTEM_EXTENSIONS
12# ------------------------ 9# ------------------------
@@ -24,6 +21,10 @@ AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS], [
24[/* Enable extensions on Solaris. */ 21[/* Enable extensions on Solaris. */
25#ifndef __EXTENSIONS__ 22#ifndef __EXTENSIONS__
26# undef __EXTENSIONS__ 23# undef __EXTENSIONS__
24#endif
25#ifndef _POSIX_PTHREAD_SEMANTICS
26# undef _POSIX_PTHREAD_SEMANTICS
27#endif]) 27#endif])
28 AC_DEFINE([__EXTENSIONS__]) 28 AC_DEFINE([__EXTENSIONS__])
29 AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
29]) 30])
diff --git a/m4/fstypename.m4 b/m4/fstypename.m4
index 75723a14..7ff33e20 100644
--- a/m4/fstypename.m4
+++ b/m4/fstypename.m4
@@ -1,4 +1,4 @@
1#serial 3 1#serial 5
2 2
3dnl From Jim Meyering. 3dnl From Jim Meyering.
4dnl 4dnl
@@ -6,7 +6,12 @@ dnl See if struct statfs has the f_fstypename member.
6dnl If so, define HAVE_F_FSTYPENAME_IN_STATFS. 6dnl If so, define HAVE_F_FSTYPENAME_IN_STATFS.
7dnl 7dnl
8 8
9AC_DEFUN([jm_FSTYPENAME], 9# Copyright (C) 1998, 1999, 2001, 2004 Free Software Foundation, Inc.
10# This file is free software; the Free Software Foundation
11# gives unlimited permission to copy and/or distribute it,
12# with or without modifications, as long as this notice is preserved.
13
14AC_DEFUN([gl_FSTYPENAME],
10 [ 15 [
11 AC_CACHE_CHECK([for f_fstypename in struct statfs], 16 AC_CACHE_CHECK([for f_fstypename in struct statfs],
12 fu_cv_sys_f_fstypename_in_statfs, 17 fu_cv_sys_f_fstypename_in_statfs,
diff --git a/m4/fsusage.m4 b/m4/fsusage.m4
index a0ab1e15..dd10f799 100644
--- a/m4/fsusage.m4
+++ b/m4/fsusage.m4
@@ -1,28 +1,43 @@
1#serial 11 1#serial 16
2# Obtaining file system usage information.
2 3
3# From fileutils/configure.in 4# Copyright (C) 1997, 1998, 2000, 2001, 2003, 2004, 2005 Free Software
5# Foundation, Inc.
6#
7# This file is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# Written by Jim Meyering.
4 12
5AC_DEFUN([gl_FSUSAGE], 13AC_DEFUN([gl_FSUSAGE],
6[ 14[
15 AC_LIBSOURCES([fsusage.c, fsusage.h])
16
7 AC_CHECK_HEADERS_ONCE(sys/param.h) 17 AC_CHECK_HEADERS_ONCE(sys/param.h)
8 AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs_types.h) 18 AC_CHECK_HEADERS_ONCE(sys/vfs.h sys/fs_types.h)
9 jm_FILE_SYSTEM_USAGE([gl_cv_fs_space=yes], [gl_cv_fs_space=no]) 19 AC_CHECK_HEADERS(sys/mount.h, [], [],
20 [AC_INCLUDES_DEFAULT
21 [#if HAVE_SYS_PARAM_H
22 #include <sys/param.h>
23 #endif]])
24 gl_FILE_SYSTEM_USAGE([gl_cv_fs_space=yes], [gl_cv_fs_space=no])
10 if test $gl_cv_fs_space = yes; then 25 if test $gl_cv_fs_space = yes; then
11 AC_LIBOBJ(fsusage) 26 AC_LIBOBJ(fsusage)
12 gl_PREREQ_FSUSAGE_EXTRA 27 gl_PREREQ_FSUSAGE_EXTRA
13 fi 28 fi
14]) 29])
15 30
16# Try to determine how a program can obtain filesystem usage information. 31# Try to determine how a program can obtain file system usage information.
17# If successful, define the appropriate symbol (see fsusage.c) and 32# If successful, define the appropriate symbol (see fsusage.c) and
18# execute ACTION-IF-FOUND. Otherwise, execute ACTION-IF-NOT-FOUND. 33# execute ACTION-IF-FOUND. Otherwise, execute ACTION-IF-NOT-FOUND.
19# 34#
20# jm_FILE_SYSTEM_USAGE([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) 35# gl_FILE_SYSTEM_USAGE([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
21 36
22AC_DEFUN([jm_FILE_SYSTEM_USAGE], 37AC_DEFUN([gl_FILE_SYSTEM_USAGE],
23[ 38[
24 39
25echo "checking how to get filesystem space usage..." 40echo "checking how to get file system space usage..."
26ac_fsusage_space=no 41ac_fsusage_space=no
27 42
28# Perform only the link test since it seems there are no variants of the 43# Perform only the link test since it seems there are no variants of the
@@ -199,7 +214,7 @@ if test $ac_fsusage_space = no; then
199 AC_TRY_CPP([#include <sys/filsys.h> 214 AC_TRY_CPP([#include <sys/filsys.h>
200 ], 215 ],
201 AC_DEFINE(STAT_READ_FILSYS, 1, 216 AC_DEFINE(STAT_READ_FILSYS, 1,
202 [Define if there is no specific function for reading filesystems usage 217 [Define if there is no specific function for reading file systems usage
203 information and you have the <sys/filsys.h> header file. (SVR2)]) 218 information and you have the <sys/filsys.h> header file. (SVR2)])
204 ac_fsusage_space=yes) 219 ac_fsusage_space=yes)
205fi 220fi
@@ -212,7 +227,7 @@ AS_IF([test $ac_fsusage_space = yes], [$1], [$2])
212# Check for SunOS statfs brokenness wrt partitions 2GB and larger. 227# Check for SunOS statfs brokenness wrt partitions 2GB and larger.
213# If <sys/vfs.h> exists and struct statfs has a member named f_spare, 228# If <sys/vfs.h> exists and struct statfs has a member named f_spare,
214# enable the work-around code in fsusage.c. 229# enable the work-around code in fsusage.c.
215AC_DEFUN([jm_STATFS_TRUNCATES], 230AC_DEFUN([gl_STATFS_TRUNCATES],
216[ 231[
217 AC_MSG_CHECKING([for statfs that truncates block counts]) 232 AC_MSG_CHECKING([for statfs that truncates block counts])
218 AC_CACHE_VAL(fu_cv_sys_truncating_statfs, 233 AC_CACHE_VAL(fu_cv_sys_truncating_statfs,
@@ -236,11 +251,10 @@ choke -- this is a workaround for a Sun-specific problem
236]) 251])
237 252
238 253
239# Prerequisites of lib/fsusage.c not done by jm_FILE_SYSTEM_USAGE. 254# Prerequisites of lib/fsusage.c not done by gl_FILE_SYSTEM_USAGE.
240AC_DEFUN([gl_PREREQ_FSUSAGE_EXTRA], 255AC_DEFUN([gl_PREREQ_FSUSAGE_EXTRA],
241[ 256[
242 AC_REQUIRE([jm_AC_TYPE_UINTMAX_T]) 257 AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])
243 AC_CHECK_HEADERS_ONCE(fcntl.h)
244 AC_CHECK_HEADERS(dustat.h sys/fs/s5param.h sys/filsys.h sys/statfs.h sys/statvfs.h) 258 AC_CHECK_HEADERS(dustat.h sys/fs/s5param.h sys/filsys.h sys/statfs.h sys/statvfs.h)
245 jm_STATFS_TRUNCATES 259 gl_STATFS_TRUNCATES
246]) 260])
diff --git a/m4/getopt.m4 b/m4/getopt.m4
index df602b98..6b98782c 100644
--- a/m4/getopt.m4
+++ b/m4/getopt.m4
@@ -1,13 +1,80 @@
1# getopt.m4 serial 2 1# getopt.m4 serial 11
2dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. 2dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software; the Free Software Foundation
4dnl General Public License. As a special exception to the GNU General 4dnl gives unlimited permission to copy and/or distribute it,
5dnl Public License, this file may be distributed as part of a program 5dnl with or without modifications, as long as this notice is preserved.
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8 6
9AC_DEFUN([gl_GETOPT], 7# The getopt module assume you want GNU getopt, with getopt_long etc,
8# rather than vanilla POSIX getopt. This means your your code should
9# always include <getopt.h> for the getopt prototypes.
10
11AC_DEFUN([gl_GETOPT_SUBSTITUTE],
12[
13 AC_LIBOBJ([getopt])
14 AC_LIBOBJ([getopt1])
15 gl_GETOPT_SUBSTITUTE_HEADER
16 gl_PREREQ_GETOPT
17])
18
19AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
10[ 20[
11 dnl Prerequisites of lib/getopt.c. 21 GETOPT_H=getopt.h
12 : 22 AC_DEFINE([__GETOPT_PREFIX], [[rpl_]],
23 [Define to rpl_ if the getopt replacement functions and variables
24 should be used.])
25 AC_SUBST([GETOPT_H])
13]) 26])
27
28AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
29[
30 if test -z "$GETOPT_H"; then
31 AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h])
32 fi
33
34 if test -z "$GETOPT_H"; then
35 AC_CHECK_FUNCS([getopt_long_only], [], [GETOPT_H=getopt.h])
36 fi
37
38 dnl BSD getopt_long uses an incompatible method to reset option processing,
39 dnl and (as of 2004-10-15) mishandles optional option-arguments.
40 if test -z "$GETOPT_H"; then
41 AC_CHECK_DECL([optreset], [GETOPT_H=getopt.h], [], [#include <getopt.h>])
42 fi
43
44 dnl Solaris 10 getopt doesn't handle `+' as a leading character in an
45 dnl option string (as of 2005-05-05).
46 if test -z "$GETOPT_H"; then
47 AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_gnu_getopt],
48 [AC_RUN_IFELSE(
49 [AC_LANG_PROGRAM([#include <getopt.h>],
50 [[
51 char *myargv[3];
52 myargv[0] = "conftest";
53 myargv[1] = "-+";
54 myargv[2] = 0;
55 return getopt (2, myargv, "+a") != '?';
56 ]])],
57 [gl_cv_func_gnu_getopt=yes],
58 [gl_cv_func_gnu_getopt=no],
59 [dnl cross compiling - pessimistically guess based on decls
60 dnl Solaris 10 getopt doesn't handle `+' as a leading character in an
61 dnl option string (as of 2005-05-05).
62 AC_CHECK_DECL([getopt_clip],
63 [gl_cv_func_gnu_getopt=no], [gl_cv_func_gnu_getopt=yes],
64 [#include <getopt.h>])])])
65 if test "$gl_cv_func_gnu_getopt" = "no"; then
66 GETOPT_H=getopt.h
67 fi
68 fi
69])
70
71AC_DEFUN([gl_GETOPT_IFELSE],
72[
73 AC_REQUIRE([gl_GETOPT_CHECK_HEADERS])
74 AS_IF([test -n "$GETOPT_H"], [$1], [$2])
75])
76
77AC_DEFUN([gl_GETOPT], [gl_GETOPT_IFELSE([gl_GETOPT_SUBSTITUTE])])
78
79# Prerequisites of lib/getopt*.
80AC_DEFUN([gl_PREREQ_GETOPT], [:])
diff --git a/m4/gettext.m4 b/m4/gettext.m4
index 45cad855..624a8078 100644
--- a/m4/gettext.m4
+++ b/m4/gettext.m4
@@ -1,10 +1,8 @@
1# gettext.m4 serial 17 (gettext-0.11.5) 1# gettext.m4 serial 37 (gettext-0.14.4)
2dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. 2dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software; the Free Software Foundation
4dnl General Public License. As a special exception to the GNU General 4dnl gives unlimited permission to copy and/or distribute it,
5dnl Public License, this file may be distributed as part of a program 5dnl with or without modifications, as long as this notice is preserved.
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8dnl 6dnl
9dnl This file can can be used in projects which are not available under 7dnl This file can can be used in projects which are not available under
10dnl the GNU General Public License or the GNU Library General Public 8dnl the GNU General Public License or the GNU Library General Public
@@ -17,7 +15,7 @@ dnl They are *not* in the public domain.
17 15
18dnl Authors: 16dnl Authors:
19dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. 17dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
20dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002. 18dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
21 19
22dnl Macro to add for using GNU gettext. 20dnl Macro to add for using GNU gettext.
23 21
@@ -65,8 +63,8 @@ AC_DEFUN([AM_GNU_GETTEXT],
65 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , 63 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
66 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT 64 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
67])])])]) 65])])])])
68 define(gt_included_intl, ifelse([$1], [external], [no], [yes])) 66 define([gt_included_intl], ifelse([$1], [external], [no], [yes]))
69 define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) 67 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
70 68
71 AC_REQUIRE([AM_PO_SUBDIRS])dnl 69 AC_REQUIRE([AM_PO_SUBDIRS])dnl
72 ifelse(gt_included_intl, yes, [ 70 ifelse(gt_included_intl, yes, [
@@ -92,13 +90,11 @@ AC_DEFUN([AM_GNU_GETTEXT],
92 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 90 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
93 ]) 91 ])
94 92
95 AC_MSG_CHECKING([whether NLS is requested]) 93 dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
96 dnl Default is enabled NLS 94 gt_INTL_MACOSX
97 AC_ARG_ENABLE(nls, 95
98 [ --disable-nls do not use Native Language Support], 96 dnl Set USE_NLS.
99 USE_NLS=$enableval, USE_NLS=yes) 97 AM_NLS
100 AC_MSG_RESULT($USE_NLS)
101 AC_SUBST(USE_NLS)
102 98
103 ifelse(gt_included_intl, yes, [ 99 ifelse(gt_included_intl, yes, [
104 BUILD_INCLUDED_LIBINTL=no 100 BUILD_INCLUDED_LIBINTL=no
@@ -143,7 +139,7 @@ changequote([,])dnl
143], [])[extern int _nl_msg_cat_cntr; 139], [])[extern int _nl_msg_cat_cntr;
144extern int *_nl_domain_bindings;], 140extern int *_nl_domain_bindings;],
145 [bindtextdomain ("", ""); 141 [bindtextdomain ("", "");
146return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], 142return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
147 gt_cv_func_gnugettext_libc=yes, 143 gt_cv_func_gnugettext_libc=yes,
148 gt_cv_func_gnugettext_libc=no)]) 144 gt_cv_func_gnugettext_libc=no)])
149 145
@@ -177,9 +173,9 @@ extern
177#ifdef __cplusplus 173#ifdef __cplusplus
178"C" 174"C"
179#endif 175#endif
180const char *_nl_expand_alias ();], 176const char *_nl_expand_alias (const char *);],
181 [bindtextdomain ("", ""); 177 [bindtextdomain ("", "");
182return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], 178return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
183 gt_cv_func_gnugettext_libintl=yes, 179 gt_cv_func_gnugettext_libintl=yes,
184 gt_cv_func_gnugettext_libintl=no) 180 gt_cv_func_gnugettext_libintl=no)
185 dnl Now see whether libintl exists and depends on libiconv. 181 dnl Now see whether libintl exists and depends on libiconv.
@@ -198,9 +194,9 @@ extern
198#ifdef __cplusplus 194#ifdef __cplusplus
199"C" 195"C"
200#endif 196#endif
201const char *_nl_expand_alias ();], 197const char *_nl_expand_alias (const char *);],
202 [bindtextdomain ("", ""); 198 [bindtextdomain ("", "");
203return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], 199return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
204 [LIBINTL="$LIBINTL $LIBICONV" 200 [LIBINTL="$LIBINTL $LIBICONV"
205 LTLIBINTL="$LTLIBINTL $LTLIBICONV" 201 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
206 gt_cv_func_gnugettext_libintl=yes 202 gt_cv_func_gnugettext_libintl=yes
@@ -216,7 +212,8 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
216 dnl libintl. (Cf. the install rule in intl/Makefile.in.) 212 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
217 if test "$gt_cv_func_gnugettext_libc" = "yes" \ 213 if test "$gt_cv_func_gnugettext_libc" = "yes" \
218 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ 214 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
219 && test "$PACKAGE" != gettext; }; then 215 && test "$PACKAGE" != gettext-runtime \
216 && test "$PACKAGE" != gettext-tools; }; then
220 gt_use_preinstalled_gnugettext=yes 217 gt_use_preinstalled_gnugettext=yes
221 else 218 else
222 dnl Reset the values set by searching for libintl. 219 dnl Reset the values set by searching for libintl.
@@ -235,7 +232,6 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
235 232
236 if test "$nls_cv_use_gnu_gettext" = "yes"; then 233 if test "$nls_cv_use_gnu_gettext" = "yes"; then
237 dnl Mark actions used to generate GNU NLS library. 234 dnl Mark actions used to generate GNU NLS library.
238 INTLOBJS="\$(GETTOBJS)"
239 BUILD_INCLUDED_LIBINTL=yes 235 BUILD_INCLUDED_LIBINTL=yes
240 USE_INCLUDED_LIBINTL=yes 236 USE_INCLUDED_LIBINTL=yes
241 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" 237 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
@@ -243,6 +239,7 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
243 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` 239 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
244 fi 240 fi
245 241
242 CATOBJEXT=
246 if test "$gt_use_preinstalled_gnugettext" = "yes" \ 243 if test "$gt_use_preinstalled_gnugettext" = "yes" \
247 || test "$nls_cv_use_gnu_gettext" = "yes"; then 244 || test "$nls_cv_use_gnu_gettext" = "yes"; then
248 dnl Mark actions to use GNU gettext tools. 245 dnl Mark actions to use GNU gettext tools.
@@ -250,6 +247,15 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
250 fi 247 fi
251 ]) 248 ])
252 249
250 if test -n "$INTL_MACOSX_LIBS"; then
251 if test "$gt_use_preinstalled_gnugettext" = "yes" \
252 || test "$nls_cv_use_gnu_gettext" = "yes"; then
253 dnl Some extra flags are needed during linking.
254 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
255 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
256 fi
257 fi
258
253 if test "$gt_use_preinstalled_gnugettext" = "yes" \ 259 if test "$gt_use_preinstalled_gnugettext" = "yes" \
254 || test "$nls_cv_use_gnu_gettext" = "yes"; then 260 || test "$nls_cv_use_gnu_gettext" = "yes"; then
255 AC_DEFINE(ENABLE_NLS, 1, 261 AC_DEFINE(ENABLE_NLS, 1,
@@ -260,6 +266,22 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
260 fi 266 fi
261 fi 267 fi
262 268
269 AC_MSG_CHECKING([whether to use NLS])
270 AC_MSG_RESULT([$USE_NLS])
271 if test "$USE_NLS" = "yes"; then
272 AC_MSG_CHECKING([where the gettext function comes from])
273 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
274 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
275 gt_source="external libintl"
276 else
277 gt_source="libc"
278 fi
279 else
280 gt_source="included intl directory"
281 fi
282 AC_MSG_RESULT([$gt_source])
283 fi
284
263 if test "$USE_NLS" = "yes"; then 285 if test "$USE_NLS" = "yes"; then
264 286
265 if test "$gt_use_preinstalled_gnugettext" = "yes"; then 287 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
@@ -283,7 +305,7 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
283 ifelse(gt_included_intl, yes, [ 305 ifelse(gt_included_intl, yes, [
284 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL 306 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
285 dnl to 'yes' because some of the testsuite requires it. 307 dnl to 'yes' because some of the testsuite requires it.
286 if test "$PACKAGE" = gettext; then 308 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
287 BUILD_INCLUDED_LIBINTL=yes 309 BUILD_INCLUDED_LIBINTL=yes
288 fi 310 fi
289 311
@@ -291,7 +313,6 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
291 AC_SUBST(BUILD_INCLUDED_LIBINTL) 313 AC_SUBST(BUILD_INCLUDED_LIBINTL)
292 AC_SUBST(USE_INCLUDED_LIBINTL) 314 AC_SUBST(USE_INCLUDED_LIBINTL)
293 AC_SUBST(CATOBJEXT) 315 AC_SUBST(CATOBJEXT)
294 AC_SUBST(INTLOBJS)
295 316
296 dnl For backward compatibility. Some configure.ins may be using this. 317 dnl For backward compatibility. Some configure.ins may be using this.
297 nls_cv_header_intl= 318 nls_cv_header_intl=
@@ -309,6 +330,13 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
309 GENCAT=gencat 330 GENCAT=gencat
310 AC_SUBST(GENCAT) 331 AC_SUBST(GENCAT)
311 332
333 dnl For backward compatibility. Some Makefiles may be using this.
334 INTLOBJS=
335 if test "$USE_INCLUDED_LIBINTL" = yes; then
336 INTLOBJS="\$(GETTOBJS)"
337 fi
338 AC_SUBST(INTLOBJS)
339
312 dnl Enable libtool support if the surrounding package wishes it. 340 dnl Enable libtool support if the surrounding package wishes it.
313 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix 341 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
314 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) 342 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
@@ -325,179 +353,6 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
325]) 353])
326 354
327 355
328dnl Checks for all prerequisites of the po subdirectory,
329dnl except for USE_NLS.
330AC_DEFUN([AM_PO_SUBDIRS],
331[
332 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
333 AC_REQUIRE([AC_PROG_INSTALL])dnl
334 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
335
336 dnl Perform the following tests also if --disable-nls has been given,
337 dnl because they are needed for "make dist" to work.
338
339 dnl Search for GNU msgfmt in the PATH.
340 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
341 dnl The second test excludes FreeBSD msgfmt.
342 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
343 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
344 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
345 :)
346 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
347
348 dnl Search for GNU xgettext 0.11 or newer in the PATH.
349 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
350 dnl The second test excludes FreeBSD xgettext.
351 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
352 [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
353 (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)],
354 :)
355 dnl Remove leftover from FreeBSD xgettext call.
356 rm -f messages.po
357
358 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
359 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
360 [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
361
362 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
363 dnl Test whether we really found GNU msgfmt.
364 if test "$GMSGFMT" != ":"; then
365 dnl If it is no GNU msgfmt we define it as : so that the
366 dnl Makefiles still can work.
367 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
368 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
369 : ;
370 else
371 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
372 AC_MSG_RESULT(
373 [found $GMSGFMT program is not GNU msgfmt; ignore it])
374 GMSGFMT=":"
375 fi
376 fi
377
378 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
379 dnl Test whether we really found GNU xgettext.
380 if test "$XGETTEXT" != ":"; then
381 dnl If it is no GNU xgettext we define it as : so that the
382 dnl Makefiles still can work.
383 if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
384 (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
385 : ;
386 else
387 AC_MSG_RESULT(
388 [found xgettext program is not GNU xgettext; ignore it])
389 XGETTEXT=":"
390 fi
391 dnl Remove leftover from FreeBSD xgettext call.
392 rm -f messages.po
393 fi
394
395 AC_OUTPUT_COMMANDS([
396 for ac_file in $CONFIG_FILES; do
397 # Support "outfile[:infile[:infile...]]"
398 case "$ac_file" in
399 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
400 esac
401 # PO directories have a Makefile.in generated from Makefile.in.in.
402 case "$ac_file" in */Makefile.in)
403 # Adjust a relative srcdir.
404 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
405 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
406 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
407 # In autoconf-2.13 it is called $ac_given_srcdir.
408 # In autoconf-2.50 it is called $srcdir.
409 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
410 case "$ac_given_srcdir" in
411 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
412 /*) top_srcdir="$ac_given_srcdir" ;;
413 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
414 esac
415 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
416 rm -f "$ac_dir/POTFILES"
417 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
418 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
419 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
420 # on $ac_dir but don't depend on user-specified configuration
421 # parameters.
422 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
423 # The LINGUAS file contains the set of available languages.
424 if test -n "$ALL_LINGUAS"; then
425 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
426 fi
427 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
428 # Hide the ALL_LINGUAS assigment from automake.
429 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
430 fi
431 case "$ac_given_srcdir" in
432 .) srcdirpre= ;;
433 *) srcdirpre='$(srcdir)/' ;;
434 esac
435 POFILES=
436 GMOFILES=
437 UPDATEPOFILES=
438 DUMMYPOFILES=
439 for lang in $ALL_LINGUAS; do
440 POFILES="$POFILES $srcdirpre$lang.po"
441 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
442 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
443 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
444 done
445 # CATALOGS depends on both $ac_dir and the user's LINGUAS
446 # environment variable.
447 INST_LINGUAS=
448 if test -n "$ALL_LINGUAS"; then
449 for presentlang in $ALL_LINGUAS; do
450 useit=no
451 if test "%UNSET%" != "$LINGUAS"; then
452 desiredlanguages="$LINGUAS"
453 else
454 desiredlanguages="$ALL_LINGUAS"
455 fi
456 for desiredlang in $desiredlanguages; do
457 # Use the presentlang catalog if desiredlang is
458 # a. equal to presentlang, or
459 # b. a variant of presentlang (because in this case,
460 # presentlang can be used as a fallback for messages
461 # which are not translated in the desiredlang catalog).
462 case "$desiredlang" in
463 "$presentlang"*) useit=yes;;
464 esac
465 done
466 if test $useit = yes; then
467 INST_LINGUAS="$INST_LINGUAS $presentlang"
468 fi
469 done
470 fi
471 CATALOGS=
472 if test -n "$INST_LINGUAS"; then
473 for lang in $INST_LINGUAS; do
474 CATALOGS="$CATALOGS $lang.gmo"
475 done
476 fi
477 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
478 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"
479 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
480 if test -f "$f"; then
481 case "$f" in
482 *.orig | *.bak | *~) ;;
483 *) cat "$f" >> "$ac_dir/Makefile" ;;
484 esac
485 fi
486 done
487 fi
488 ;;
489 esac
490 done],
491 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
492 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
493 # from automake.
494 eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
495 # Capture the value of LINGUAS because we need it to compute CATALOGS.
496 LINGUAS="${LINGUAS-%UNSET%}"
497 ])
498])
499
500
501dnl Checks for all prerequisites of the intl subdirectory, 356dnl Checks for all prerequisites of the intl subdirectory,
502dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, 357dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
503dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. 358dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
@@ -507,31 +362,90 @@ AC_DEFUN([AM_INTL_SUBDIR],
507 AC_REQUIRE([AM_MKINSTALLDIRS])dnl 362 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
508 AC_REQUIRE([AC_PROG_CC])dnl 363 AC_REQUIRE([AC_PROG_CC])dnl
509 AC_REQUIRE([AC_CANONICAL_HOST])dnl 364 AC_REQUIRE([AC_CANONICAL_HOST])dnl
365 AC_REQUIRE([gt_GLIBC2])dnl
510 AC_REQUIRE([AC_PROG_RANLIB])dnl 366 AC_REQUIRE([AC_PROG_RANLIB])dnl
511 AC_REQUIRE([AC_ISC_POSIX])dnl 367 AC_REQUIRE([AC_ISC_POSIX])dnl
512 AC_REQUIRE([AC_HEADER_STDC])dnl 368 AC_REQUIRE([AC_HEADER_STDC])dnl
513 AC_REQUIRE([AC_C_CONST])dnl 369 AC_REQUIRE([AC_C_CONST])dnl
370 AC_REQUIRE([bh_C_SIGNED])dnl
514 AC_REQUIRE([AC_C_INLINE])dnl 371 AC_REQUIRE([AC_C_INLINE])dnl
515 AC_REQUIRE([AC_TYPE_OFF_T])dnl 372 AC_REQUIRE([AC_TYPE_OFF_T])dnl
516 AC_REQUIRE([AC_TYPE_SIZE_T])dnl 373 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
374 AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl
375 AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
376 AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
377 AC_REQUIRE([gt_TYPE_WINT_T])dnl
378 AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
379 AC_REQUIRE([gl_AC_HEADER_STDINT_H])
380 AC_REQUIRE([gt_TYPE_INTMAX_T])
381 AC_REQUIRE([gt_PRINTF_POSIX])
517 AC_REQUIRE([AC_FUNC_ALLOCA])dnl 382 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
518 AC_REQUIRE([AC_FUNC_MMAP])dnl 383 AC_REQUIRE([AC_FUNC_MMAP])dnl
519 AC_REQUIRE([jm_GLIBC21])dnl 384 AC_REQUIRE([gl_GLIBC21])dnl
520 AC_REQUIRE([gt_INTDIV0])dnl 385 AC_REQUIRE([gt_INTDIV0])dnl
521 AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl 386 AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
522 AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl 387 AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
523 AC_REQUIRE([gt_INTTYPES_PRI])dnl 388 AC_REQUIRE([gt_INTTYPES_PRI])dnl
389 AC_REQUIRE([gl_XSIZE])dnl
390 AC_REQUIRE([gt_INTL_MACOSX])dnl
524 391
392 AC_CHECK_TYPE([ptrdiff_t], ,
393 [AC_DEFINE([ptrdiff_t], [long],
394 [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
395 ])
525 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ 396 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
526stdlib.h string.h unistd.h sys/param.h]) 397stdlib.h string.h unistd.h sys/param.h])
527 AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ 398 AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
528geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ 399mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
529strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next]) 400strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
401__fsetlocking])
402
403 dnl Use the _snprintf function only if it is declared (because on NetBSD it
404 dnl is defined as a weak alias of snprintf; we prefer to use the latter).
405 gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
406 gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
407
408 dnl Use the *_unlocked functions only if they are declared.
409 dnl (because some of them were defined without being declared in Solaris
410 dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
411 dnl on Solaris 2.5.1 to run on Solaris 2.6).
412 dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
413 gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
414 gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
415 gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
416
417 case $gt_cv_func_printf_posix in
418 *yes) HAVE_POSIX_PRINTF=1 ;;
419 *) HAVE_POSIX_PRINTF=0 ;;
420 esac
421 AC_SUBST([HAVE_POSIX_PRINTF])
422 if test "$ac_cv_func_asprintf" = yes; then
423 HAVE_ASPRINTF=1
424 else
425 HAVE_ASPRINTF=0
426 fi
427 AC_SUBST([HAVE_ASPRINTF])
428 if test "$ac_cv_func_snprintf" = yes; then
429 HAVE_SNPRINTF=1
430 else
431 HAVE_SNPRINTF=0
432 fi
433 AC_SUBST([HAVE_SNPRINTF])
434 if test "$ac_cv_func_wprintf" = yes; then
435 HAVE_WPRINTF=1
436 else
437 HAVE_WPRINTF=0
438 fi
439 AC_SUBST([HAVE_WPRINTF])
530 440
531 AM_ICONV 441 AM_ICONV
532 AM_LANGINFO_CODESET 442 AM_LANGINFO_CODESET
533 if test $ac_cv_header_locale_h = yes; then 443 if test $ac_cv_header_locale_h = yes; then
534 AM_LC_MESSAGES 444 gt_LC_MESSAGES
445 fi
446
447 if test -n "$INTL_MACOSX_LIBS"; then
448 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
535 fi 449 fi
536 450
537 dnl intl/plural.c is generated from intl/plural.y. It requires bison, 451 dnl intl/plural.c is generated from intl/plural.y. It requires bison,
@@ -567,19 +481,67 @@ changequote([,])dnl
567]) 481])
568 482
569 483
570AC_DEFUN([AM_MKINSTALLDIRS], 484dnl Checks for special options needed on MacOS X.
485dnl Defines INTL_MACOSX_LIBS.
486AC_DEFUN([gt_INTL_MACOSX],
571[ 487[
572 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly 488 dnl Check for API introduced in MacOS X 10.2.
573 dnl find the mkinstalldirs script in another subdir but $(top_srcdir). 489 AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
574 dnl Try to locate is. 490 gt_cv_func_CFPreferencesCopyAppValue,
575 MKINSTALLDIRS= 491 [gt_save_CPPFLAGS="$CPPFLAGS"
576 if test -n "$ac_aux_dir"; then 492 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
577 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" 493 gt_save_LIBS="$LIBS"
494 LIBS="$LIBS -framework CoreFoundation"
495 AC_TRY_LINK([#include <CFPreferences.h>],
496 [CFPreferencesCopyAppValue(NULL, NULL)],
497 [gt_cv_func_CFPreferencesCopyAppValue=yes],
498 [gt_cv_func_CFPreferencesCopyAppValue=no])
499 CPPFLAGS="$gt_save_CPPFLAGS"
500 LIBS="$gt_save_LIBS"])
501 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
502 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
503 [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
504 fi
505 dnl Check for API introduced in MacOS X 10.3.
506 AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
507 [gt_save_CPPFLAGS="$CPPFLAGS"
508 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
509 gt_save_LIBS="$LIBS"
510 LIBS="$LIBS -framework CoreFoundation"
511 AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();],
512 [gt_cv_func_CFLocaleCopyCurrent=yes],
513 [gt_cv_func_CFLocaleCopyCurrent=no])
514 CPPFLAGS="$gt_save_CPPFLAGS"
515 LIBS="$gt_save_LIBS"])
516 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
517 AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
518 [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
519 fi
520 INTL_MACOSX_LIBS=
521 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
522 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
578 fi 523 fi
579 if test -z "$MKINSTALLDIRS"; then 524 AC_SUBST([INTL_MACOSX_LIBS])
580 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" 525])
526
527
528dnl gt_CHECK_DECL(FUNC, INCLUDES)
529dnl Check whether a function is declared.
530AC_DEFUN([gt_CHECK_DECL],
531[
532 AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
533 [AC_TRY_COMPILE([$2], [
534#ifndef $1
535 char *p = (char *) $1;
536#endif
537], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
538 if test $ac_cv_have_decl_$1 = yes; then
539 gt_value=1
540 else
541 gt_value=0
581 fi 542 fi
582 AC_SUBST(MKINSTALLDIRS) 543 AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
544 [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
583]) 545])
584 546
585 547
diff --git a/m4/glibc21.m4 b/m4/glibc21.m4
index 9c9f3db3..d95fd986 100644
--- a/m4/glibc21.m4
+++ b/m4/glibc21.m4
@@ -1,15 +1,13 @@
1# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40) 1# glibc21.m4 serial 3
2dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. 2dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software; the Free Software Foundation
4dnl General Public License. As a special exception to the GNU General 4dnl gives unlimited permission to copy and/or distribute it,
5dnl Public License, this file may be distributed as part of a program 5dnl with or without modifications, as long as this notice is preserved.
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8 6
9# Test for the GNU C Library, version 2.1 or newer. 7# Test for the GNU C Library, version 2.1 or newer.
10# From Bruno Haible. 8# From Bruno Haible.
11 9
12AC_DEFUN([jm_GLIBC21], 10AC_DEFUN([gl_GLIBC21],
13 [ 11 [
14 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, 12 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
15 ac_cv_gnu_library_2_1, 13 ac_cv_gnu_library_2_1,
diff --git a/m4/iconv.m4 b/m4/iconv.m4
index c5f35798..654c4158 100644
--- a/m4/iconv.m4
+++ b/m4/iconv.m4
@@ -1,10 +1,8 @@
1# iconv.m4 serial AM4 (gettext-0.11.3) 1# iconv.m4 serial AM4 (gettext-0.11.3)
2dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. 2dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software; the Free Software Foundation
4dnl General Public License. As a special exception to the GNU General 4dnl gives unlimited permission to copy and/or distribute it,
5dnl Public License, this file may be distributed as part of a program 5dnl with or without modifications, as long as this notice is preserved.
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8 6
9dnl From Bruno Haible. 7dnl From Bruno Haible.
10 8
diff --git a/m4/intdiv0.m4 b/m4/intdiv0.m4
deleted file mode 100644
index 55dddcf1..00000000
--- a/m4/intdiv0.m4
+++ /dev/null
@@ -1,72 +0,0 @@
1# intdiv0.m4 serial 1 (gettext-0.11.3)
2dnl Copyright (C) 2002 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU
4dnl General Public License. As a special exception to the GNU General
5dnl Public License, this file may be distributed as part of a program
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8
9dnl From Bruno Haible.
10
11AC_DEFUN([gt_INTDIV0],
12[
13 AC_REQUIRE([AC_PROG_CC])dnl
14 AC_REQUIRE([AC_CANONICAL_HOST])dnl
15
16 AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
17 gt_cv_int_divbyzero_sigfpe,
18 [
19 AC_TRY_RUN([
20#include <stdlib.h>
21#include <signal.h>
22
23static void
24#ifdef __cplusplus
25sigfpe_handler (int sig)
26#else
27sigfpe_handler (sig) int sig;
28#endif
29{
30 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
31 exit (sig != SIGFPE);
32}
33
34int x = 1;
35int y = 0;
36int z;
37int nan;
38
39int main ()
40{
41 signal (SIGFPE, sigfpe_handler);
42/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
43#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
44 signal (SIGTRAP, sigfpe_handler);
45#endif
46/* Linux/SPARC yields signal SIGILL. */
47#if defined (__sparc__) && defined (__linux__)
48 signal (SIGILL, sigfpe_handler);
49#endif
50
51 z = x / y;
52 nan = y / y;
53 exit (1);
54}
55], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
56 [
57 # Guess based on the CPU.
58 case "$host_cpu" in
59 alpha* | i[34567]86 | m68k | s390*)
60 gt_cv_int_divbyzero_sigfpe="guessing yes";;
61 *)
62 gt_cv_int_divbyzero_sigfpe="guessing no";;
63 esac
64 ])
65 ])
66 case "$gt_cv_int_divbyzero_sigfpe" in
67 *yes) value=1;;
68 *) value=0;;
69 esac
70 AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
71 [Define if integer division by zero raises signal SIGFPE.])
72])
diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4
index fd007c31..4d56a9ad 100644
--- a/m4/inttypes-pri.m4
+++ b/m4/inttypes-pri.m4
@@ -1,10 +1,8 @@
1# inttypes-pri.m4 serial 1 (gettext-0.11.4) 1# inttypes-pri.m4 serial 1 (gettext-0.11.4)
2dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. 2dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software; the Free Software Foundation
4dnl General Public License. As a special exception to the GNU General 4dnl gives unlimited permission to copy and/or distribute it,
5dnl Public License, this file may be distributed as part of a program 5dnl with or without modifications, as long as this notice is preserved.
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8 6
9dnl From Bruno Haible. 7dnl From Bruno Haible.
10 8
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4
index ab370ffe..779bcea0 100644
--- a/m4/inttypes.m4
+++ b/m4/inttypes.m4
@@ -1,10 +1,8 @@
1# inttypes.m4 serial 1 (gettext-0.11.4) 1# inttypes.m4 serial 1 (gettext-0.11.4)
2dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. 2dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software; the Free Software Foundation
4dnl General Public License. As a special exception to the GNU General 4dnl gives unlimited permission to copy and/or distribute it,
5dnl Public License, this file may be distributed as part of a program 5dnl with or without modifications, as long as this notice is preserved.
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8 6
9dnl From Paul Eggert. 7dnl From Paul Eggert.
10 8
diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4
index 400a1118..a5d075d9 100644
--- a/m4/inttypes_h.m4
+++ b/m4/inttypes_h.m4
@@ -1,28 +1,26 @@
1# inttypes_h.m4 serial 4 (gettext-0.11.4) 1# inttypes_h.m4 serial 6
2dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. 2dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software; the Free Software Foundation
4dnl General Public License. As a special exception to the GNU General 4dnl gives unlimited permission to copy and/or distribute it,
5dnl Public License, this file may be distributed as part of a program 5dnl with or without modifications, as long as this notice is preserved.
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8 6
9dnl From Paul Eggert. 7dnl From Paul Eggert.
10 8
11# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists, 9# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
12# doesn't clash with <sys/types.h>, and declares uintmax_t. 10# doesn't clash with <sys/types.h>, and declares uintmax_t.
13 11
14AC_DEFUN([jm_AC_HEADER_INTTYPES_H], 12AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
15[ 13[
16 AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h, 14 AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h,
17 [AC_TRY_COMPILE( 15 [AC_TRY_COMPILE(
18 [#include <sys/types.h> 16 [#include <sys/types.h>
19#include <inttypes.h>], 17#include <inttypes.h>],
20 [uintmax_t i = (uintmax_t) -1;], 18 [uintmax_t i = (uintmax_t) -1;],
21 jm_ac_cv_header_inttypes_h=yes, 19 gl_cv_header_inttypes_h=yes,
22 jm_ac_cv_header_inttypes_h=no)]) 20 gl_cv_header_inttypes_h=no)])
23 if test $jm_ac_cv_header_inttypes_h = yes; then 21 if test $gl_cv_header_inttypes_h = yes; then
24 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, 22 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
25[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, 23 [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
26 and declares uintmax_t. ]) 24 and declares uintmax_t. ])
27 fi 25 fi
28]) 26])
diff --git a/m4/isc-posix.m4 b/m4/isc-posix.m4
deleted file mode 100644
index 1319dd1c..00000000
--- a/m4/isc-posix.m4
+++ /dev/null
@@ -1,26 +0,0 @@
1# isc-posix.m4 serial 2 (gettext-0.11.2)
2dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU
4dnl General Public License. As a special exception to the GNU General
5dnl Public License, this file may be distributed as part of a program
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8
9# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
10
11# This test replaces the one in autoconf.
12# Currently this macro should have the same name as the autoconf macro
13# because gettext's gettext.m4 (distributed in the automake package)
14# still uses it. Otherwise, the use in gettext.m4 makes autoheader
15# give these diagnostics:
16# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
17# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
18
19undefine([AC_ISC_POSIX])
20
21AC_DEFUN([AC_ISC_POSIX],
22 [
23 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
24 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
25 ]
26)
diff --git a/m4/lcmessage.m4 b/m4/lcmessage.m4
deleted file mode 100644
index ffd4008b..00000000
--- a/m4/lcmessage.m4
+++ /dev/null
@@ -1,32 +0,0 @@
1# lcmessage.m4 serial 3 (gettext-0.11.3)
2dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU
4dnl General Public License. As a special exception to the GNU General
5dnl Public License, this file may be distributed as part of a program
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8dnl
9dnl This file can can be used in projects which are not available under
10dnl the GNU General Public License or the GNU Library General Public
11dnl License but which still want to provide support for the GNU gettext
12dnl functionality.
13dnl Please note that the actual code of the GNU gettext library is covered
14dnl by the GNU Library General Public License, and the rest of the GNU
15dnl gettext package package is covered by the GNU General Public License.
16dnl They are *not* in the public domain.
17
18dnl Authors:
19dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
20
21# Check whether LC_MESSAGES is available in <locale.h>.
22
23AC_DEFUN([AM_LC_MESSAGES],
24[
25 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
26 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
27 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
28 if test $am_cv_val_LC_MESSAGES = yes; then
29 AC_DEFINE(HAVE_LC_MESSAGES, 1,
30 [Define if your <locale.h> file defines LC_MESSAGES.])
31 fi
32])
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4
index ddb57323..96c4e2c3 100644
--- a/m4/lib-ld.m4
+++ b/m4/lib-ld.m4
@@ -1,10 +1,8 @@
1# lib-ld.m4 serial 1 (gettext-0.11) 1# lib-ld.m4 serial 3 (gettext-0.13)
2dnl Copyright (C) 1996-2002 Free Software Foundation, Inc. 2dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software; the Free Software Foundation
4dnl General Public License. As a special exception to the GNU General 4dnl gives unlimited permission to copy and/or distribute it,
5dnl Public License, this file may be distributed as part of a program 5dnl with or without modifications, as long as this notice is preserved.
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8 6
9dnl Subroutines of libtool.m4, 7dnl Subroutines of libtool.m4,
10dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision 8dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
@@ -14,11 +12,12 @@ dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
14AC_DEFUN([AC_LIB_PROG_LD_GNU], 12AC_DEFUN([AC_LIB_PROG_LD_GNU],
15[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, 13[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
16[# I'd rather use --version here, but apparently some GNU ld's only accept -v. 14[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
17if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then 15case `$LD -v 2>&1 </dev/null` in
18 acl_cv_prog_gnu_ld=yes 16*GNU* | *'with BFD'*)
19else 17 acl_cv_prog_gnu_ld=yes ;;
20 acl_cv_prog_gnu_ld=no 18*)
21fi]) 19 acl_cv_prog_gnu_ld=no ;;
20esac])
22with_gnu_ld=$acl_cv_prog_gnu_ld 21with_gnu_ld=$acl_cv_prog_gnu_ld
23]) 22])
24 23
@@ -29,6 +28,19 @@ AC_DEFUN([AC_LIB_PROG_LD],
29test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) 28test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
30AC_REQUIRE([AC_PROG_CC])dnl 29AC_REQUIRE([AC_PROG_CC])dnl
31AC_REQUIRE([AC_CANONICAL_HOST])dnl 30AC_REQUIRE([AC_CANONICAL_HOST])dnl
31# Prepare PATH_SEPARATOR.
32# The user is always right.
33if test "${PATH_SEPARATOR+set}" != set; then
34 echo "#! /bin/sh" >conf$$.sh
35 echo "exit 0" >>conf$$.sh
36 chmod +x conf$$.sh
37 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
38 PATH_SEPARATOR=';'
39 else
40 PATH_SEPARATOR=:
41 fi
42 rm -f conf$$.sh
43fi
32ac_prog=ld 44ac_prog=ld
33if test "$GCC" = yes; then 45if test "$GCC" = yes; then
34 # Check if gcc -print-prog-name=ld gives a path. 46 # Check if gcc -print-prog-name=ld gives a path.
@@ -75,11 +87,12 @@ AC_CACHE_VAL(acl_cv_path_LD,
75 # Check to see if the program is GNU ld. I'd rather use --version, 87 # Check to see if the program is GNU ld. I'd rather use --version,
76 # but apparently some GNU ld's only accept -v. 88 # but apparently some GNU ld's only accept -v.
77 # Break only if it was the GNU/non-GNU ld that we prefer. 89 # Break only if it was the GNU/non-GNU ld that we prefer.
78 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then 90 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
79 test "$with_gnu_ld" != no && break 91 *GNU* | *'with BFD'*)
80 else 92 test "$with_gnu_ld" != no && break ;;
81 test "$with_gnu_ld" != yes && break 93 *)
82 fi 94 test "$with_gnu_ld" != yes && break ;;
95 esac
83 fi 96 fi
84 done 97 done
85 IFS="$ac_save_ifs" 98 IFS="$ac_save_ifs"
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
index 6b942510..244a7791 100644
--- a/m4/lib-link.m4
+++ b/m4/lib-link.m4
@@ -1,13 +1,13 @@
1# lib-link.m4 serial 3 (gettext-0.11.3) 1# lib-link.m4 serial 7 (gettext-0.15)
2dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software; the Free Software Foundation
4dnl General Public License. As a special exception to the GNU General 4dnl gives unlimited permission to copy and/or distribute it,
5dnl Public License, this file may be distributed as part of a program 5dnl with or without modifications, as long as this notice is preserved.
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8 6
9dnl From Bruno Haible. 7dnl From Bruno Haible.
10 8
9AC_PREREQ(2.50)
10
11dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and 11dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
12dnl the libraries corresponding to explicit and implicit dependencies. 12dnl the libraries corresponding to explicit and implicit dependencies.
13dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and 13dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
@@ -92,10 +92,11 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
92 92
93dnl Determine the platform dependent parameters needed to use rpath: 93dnl Determine the platform dependent parameters needed to use rpath:
94dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, 94dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
95dnl hardcode_direct, hardcode_minus_L, 95dnl hardcode_direct, hardcode_minus_L.
96dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
97AC_DEFUN([AC_LIB_RPATH], 96AC_DEFUN([AC_LIB_RPATH],
98[ 97[
98 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
99 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
99 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS 100 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
100 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld 101 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
101 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host 102 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
@@ -114,8 +115,6 @@ AC_DEFUN([AC_LIB_RPATH],
114 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" 115 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
115 hardcode_direct="$acl_cv_hardcode_direct" 116 hardcode_direct="$acl_cv_hardcode_direct"
116 hardcode_minus_L="$acl_cv_hardcode_minus_L" 117 hardcode_minus_L="$acl_cv_hardcode_minus_L"
117 sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
118 sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
119 dnl Determine whether the user wants rpath handling at all. 118 dnl Determine whether the user wants rpath handling at all.
120 AC_ARG_ENABLE(rpath, 119 AC_ARG_ENABLE(rpath,
121 [ --disable-rpath do not hardcode runtime library paths], 120 [ --disable-rpath do not hardcode runtime library paths],
@@ -127,6 +126,7 @@ dnl the libraries corresponding to explicit and implicit dependencies.
127dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. 126dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
128AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 127AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
129[ 128[
129 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
130 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 130 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
131 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 131 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
132 dnl By default, look in $includedir and $libdir. 132 dnl By default, look in $includedir and $libdir.
@@ -135,7 +135,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
135 eval additional_includedir=\"$includedir\" 135 eval additional_includedir=\"$includedir\"
136 eval additional_libdir=\"$libdir\" 136 eval additional_libdir=\"$libdir\"
137 ]) 137 ])
138 AC_ARG_WITH([lib$1-prefix], 138 AC_LIB_ARG_WITH([lib$1-prefix],
139[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib 139[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
140 --without-lib$1-prefix don't search for lib$1 in includedir and libdir], 140 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
141[ 141[
@@ -149,7 +149,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
149 ]) 149 ])
150 else 150 else
151 additional_includedir="$withval/include" 151 additional_includedir="$withval/include"
152 additional_libdir="$withval/lib" 152 additional_libdir="$withval/$acl_libdirstem"
153 fi 153 fi
154 fi 154 fi
155]) 155])
@@ -249,7 +249,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
249 dnl Linking with a shared library. We attempt to hardcode its 249 dnl Linking with a shared library. We attempt to hardcode its
250 dnl directory into the executable's runpath, unless it's the 250 dnl directory into the executable's runpath, unless it's the
251 dnl standard /usr/lib. 251 dnl standard /usr/lib.
252 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then 252 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
253 dnl No hardcoding is needed. 253 dnl No hardcoding is needed.
254 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 254 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
255 else 255 else
@@ -335,8 +335,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
335 dnl Assume the include files are nearby. 335 dnl Assume the include files are nearby.
336 additional_includedir= 336 additional_includedir=
337 case "$found_dir" in 337 case "$found_dir" in
338 */lib | */lib/) 338 */$acl_libdirstem | */$acl_libdirstem/)
339 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` 339 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
340 additional_includedir="$basedir/include" 340 additional_includedir="$basedir/include"
341 ;; 341 ;;
342 esac 342 esac
@@ -353,7 +353,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
353 if test "X$additional_includedir" = "X/usr/local/include"; then 353 if test "X$additional_includedir" = "X/usr/local/include"; then
354 if test -n "$GCC"; then 354 if test -n "$GCC"; then
355 case $host_os in 355 case $host_os in
356 linux*) haveit=yes;; 356 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
357 esac 357 esac
358 fi 358 fi
359 fi 359 fi
@@ -397,12 +397,12 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
397 dnl 3. if it's already present in $LDFLAGS or the already 397 dnl 3. if it's already present in $LDFLAGS or the already
398 dnl constructed $LIBNAME, 398 dnl constructed $LIBNAME,
399 dnl 4. if it doesn't exist as a directory. 399 dnl 4. if it doesn't exist as a directory.
400 if test "X$additional_libdir" != "X/usr/lib"; then 400 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
401 haveit= 401 haveit=
402 if test "X$additional_libdir" = "X/usr/local/lib"; then 402 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
403 if test -n "$GCC"; then 403 if test -n "$GCC"; then
404 case $host_os in 404 case $host_os in
405 linux*) haveit=yes;; 405 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
406 esac 406 esac
407 fi 407 fi
408 fi 408 fi
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
index b8b79ab9..a8684e17 100644
--- a/m4/lib-prefix.m4
+++ b/m4/lib-prefix.m4
@@ -1,13 +1,18 @@
1# lib-prefix.m4 serial 1 (gettext-0.11) 1# lib-prefix.m4 serial 5 (gettext-0.15)
2dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software; the Free Software Foundation
4dnl General Public License. As a special exception to the GNU General 4dnl gives unlimited permission to copy and/or distribute it,
5dnl Public License, this file may be distributed as part of a program 5dnl with or without modifications, as long as this notice is preserved.
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8 6
9dnl From Bruno Haible. 7dnl From Bruno Haible.
10 8
9dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
10dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
11dnl require excessive bracketing.
12ifdef([AC_HELP_STRING],
13[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
14[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
15
11dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed 16dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
12dnl to access previously installed libraries. The basic assumption is that 17dnl to access previously installed libraries. The basic assumption is that
13dnl a user will want packages to use other packages he previously installed 18dnl a user will want packages to use other packages he previously installed
@@ -19,6 +24,7 @@ AC_DEFUN([AC_LIB_PREFIX],
19 AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) 24 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
20 AC_REQUIRE([AC_PROG_CC]) 25 AC_REQUIRE([AC_PROG_CC])
21 AC_REQUIRE([AC_CANONICAL_HOST]) 26 AC_REQUIRE([AC_CANONICAL_HOST])
27 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
22 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 28 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
23 dnl By default, look in $includedir and $libdir. 29 dnl By default, look in $includedir and $libdir.
24 use_additional=yes 30 use_additional=yes
@@ -26,7 +32,7 @@ AC_DEFUN([AC_LIB_PREFIX],
26 eval additional_includedir=\"$includedir\" 32 eval additional_includedir=\"$includedir\"
27 eval additional_libdir=\"$libdir\" 33 eval additional_libdir=\"$libdir\"
28 ]) 34 ])
29 AC_ARG_WITH([lib-prefix], 35 AC_LIB_ARG_WITH([lib-prefix],
30[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib 36[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
31 --without-lib-prefix don't search for libraries in includedir and libdir], 37 --without-lib-prefix don't search for libraries in includedir and libdir],
32[ 38[
@@ -40,7 +46,7 @@ AC_DEFUN([AC_LIB_PREFIX],
40 ]) 46 ])
41 else 47 else
42 additional_includedir="$withval/include" 48 additional_includedir="$withval/include"
43 additional_libdir="$withval/lib" 49 additional_libdir="$withval/$acl_libdirstem"
44 fi 50 fi
45 fi 51 fi
46]) 52])
@@ -64,7 +70,7 @@ AC_DEFUN([AC_LIB_PREFIX],
64 if test "X$additional_includedir" = "X/usr/local/include"; then 70 if test "X$additional_includedir" = "X/usr/local/include"; then
65 if test -n "$GCC"; then 71 if test -n "$GCC"; then
66 case $host_os in 72 case $host_os in
67 linux*) haveit=yes;; 73 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
68 esac 74 esac
69 fi 75 fi
70 fi 76 fi
@@ -82,7 +88,7 @@ AC_DEFUN([AC_LIB_PREFIX],
82 dnl 2. if it's already present in $LDFLAGS, 88 dnl 2. if it's already present in $LDFLAGS,
83 dnl 3. if it's /usr/local/lib and we are using GCC on Linux, 89 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
84 dnl 4. if it doesn't exist as a directory. 90 dnl 4. if it doesn't exist as a directory.
85 if test "X$additional_libdir" != "X/usr/lib"; then 91 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
86 haveit= 92 haveit=
87 for x in $LDFLAGS; do 93 for x in $LDFLAGS; do
88 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 94 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
@@ -92,7 +98,7 @@ AC_DEFUN([AC_LIB_PREFIX],
92 fi 98 fi
93 done 99 done
94 if test -z "$haveit"; then 100 if test -z "$haveit"; then
95 if test "X$additional_libdir" = "X/usr/local/lib"; then 101 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
96 if test -n "$GCC"; then 102 if test -n "$GCC"; then
97 case $host_os in 103 case $host_os in
98 linux*) haveit=yes;; 104 linux*) haveit=yes;;
@@ -146,3 +152,34 @@ AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
146 exec_prefix="$acl_save_exec_prefix" 152 exec_prefix="$acl_save_exec_prefix"
147 prefix="$acl_save_prefix" 153 prefix="$acl_save_prefix"
148]) 154])
155
156dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
157dnl the basename of the libdir, either "lib" or "lib64".
158AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
159[
160 dnl There is no formal standard regarding lib and lib64. The current
161 dnl practice is that on a system supporting 32-bit and 64-bit instruction
162 dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
163 dnl libraries go under $prefix/lib. We determine the compiler's default
164 dnl mode by looking at the compiler's library search path. If at least
165 dnl of its elements ends in /lib64 or points to a directory whose absolute
166 dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
167 dnl default, namely "lib".
168 acl_libdirstem=lib
169 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
170 if test -n "$searchpath"; then
171 acl_save_IFS="${IFS= }"; IFS=":"
172 for searchdir in $searchpath; do
173 if test -d "$searchdir"; then
174 case "$searchdir" in
175 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
176 *) searchdir=`cd "$searchdir" && pwd`
177 case "$searchdir" in
178 */lib64 ) acl_libdirstem=lib64 ;;
179 esac ;;
180 esac
181 fi
182 done
183 IFS="$acl_save_IFS"
184 fi
185])
diff --git a/m4/longdouble.m4 b/m4/longdouble.m4
new file mode 100644
index 00000000..40cd7ce0
--- /dev/null
+++ b/m4/longdouble.m4
@@ -0,0 +1,28 @@
1# longdouble.m4 serial 1 (gettext-0.12)
2dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl From Bruno Haible.
8dnl Test whether the compiler supports the 'long double' type.
9dnl Prerequisite: AC_PROG_CC
10
11AC_DEFUN([gt_TYPE_LONGDOUBLE],
12[
13 AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
14 [if test "$GCC" = yes; then
15 gt_cv_c_long_double=yes
16 else
17 AC_TRY_COMPILE([
18 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
19 long double foo = 0.0;
20 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
21 int array [2*(sizeof(long double) >= sizeof(double)) - 1];
22 ], ,
23 gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
24 fi])
25 if test $gt_cv_c_long_double = yes; then
26 AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
27 fi
28])
diff --git a/m4/longlong.m4 b/m4/longlong.m4
new file mode 100644
index 00000000..7b399e01
--- /dev/null
+++ b/m4/longlong.m4
@@ -0,0 +1,23 @@
1# longlong.m4 serial 5
2dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl From Paul Eggert.
8
9# Define HAVE_LONG_LONG if 'long long' works.
10
11AC_DEFUN([gl_AC_TYPE_LONG_LONG],
12[
13 AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
14 [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
15 [long long llmax = (long long) -1;
16 return ll << i | ll >> i | llmax / ll | llmax % ll;],
17 ac_cv_type_long_long=yes,
18 ac_cv_type_long_long=no)])
19 if test $ac_cv_type_long_long = yes; then
20 AC_DEFINE(HAVE_LONG_LONG, 1,
21 [Define if you have the 'long long' type.])
22 fi
23])
diff --git a/m4/ls-mntd-fs.m4 b/m4/ls-mntd-fs.m4
index c28466bb..ed243861 100644
--- a/m4/ls-mntd-fs.m4
+++ b/m4/ls-mntd-fs.m4
@@ -1,13 +1,30 @@
1#serial 14 1#serial 20
2# How to list mounted file systems.
3
4# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
5# Foundation, Inc.
6#
7# This file is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
2 10
3dnl From Jim Meyering. 11dnl From Jim Meyering.
4dnl 12dnl
5dnl This is not pretty. I've just taken the autoconf code and wrapped 13dnl This is not pretty. I've just taken the autoconf code and wrapped
6dnl it in an AC_DEFUN. 14dnl it in an AC_DEFUN and made some other fixes.
7dnl 15dnl
8 16
9# jm_LIST_MOUNTED_FILESYSTEMS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) 17# Replace Autoconf's AC_FUNC_GETMNTENT to work around a bug in Autoconf
10AC_DEFUN([jm_LIST_MOUNTED_FILESYSTEMS], 18# through Autoconf 2.59. We can remove this once we assume Autoconf 2.60
19# or later.
20AC_DEFUN([AC_FUNC_GETMNTENT],
21[# getmntent is in the standard C library on UNICOS, in -lsun on Irix 4,
22# -lseq on Dynix/PTX, -lgen on Unixware.
23AC_SEARCH_LIBS(getmntent, [sun seq gen], [AC_CHECK_FUNCS(getmntent)])
24])
25
26# gl_LIST_MOUNTED_FILE_SYSTEMS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
27AC_DEFUN([gl_LIST_MOUNTED_FILE_SYSTEMS],
11 [ 28 [
12AC_CHECK_FUNCS(listmntent getmntinfo) 29AC_CHECK_FUNCS(listmntent getmntinfo)
13AC_CHECK_HEADERS_ONCE(sys/param.h) 30AC_CHECK_HEADERS_ONCE(sys/param.h)
@@ -16,7 +33,13 @@ AC_CHECK_HEADERS_ONCE(sys/param.h)
16# NGROUPS (as the array dimension for a struct member) without a definition. 33# NGROUPS (as the array dimension for a struct member) without a definition.
17AC_CHECK_HEADERS(sys/ucred.h, [], [], [#include <grp.h>]) 34AC_CHECK_HEADERS(sys/ucred.h, [], [], [#include <grp.h>])
18 35
19AC_CHECK_HEADERS(mntent.h sys/mount.h sys/fs_types.h) 36AC_CHECK_HEADERS(sys/mount.h, [], [],
37 [AC_INCLUDES_DEFAULT
38 [#if HAVE_SYS_PARAM_H
39 #include <sys/param.h>
40 #endif]])
41
42AC_CHECK_HEADERS(mntent.h sys/fs_types.h)
20 getfsstat_includes="\ 43 getfsstat_includes="\
21$ac_includes_default 44$ac_includes_default
22#if HAVE_SYS_PARAM_H 45#if HAVE_SYS_PARAM_H
@@ -35,11 +58,11 @@ $ac_includes_default
35" 58"
36AC_CHECK_MEMBERS([struct fsstat.f_fstypename],,,[$getfsstat_includes]) 59AC_CHECK_MEMBERS([struct fsstat.f_fstypename],,,[$getfsstat_includes])
37 60
38# Determine how to get the list of mounted filesystems. 61# Determine how to get the list of mounted file systems.
39ac_list_mounted_fs= 62ac_list_mounted_fs=
40 63
41# If the getmntent function is available but not in the standard library, 64# If the getmntent function is available but not in the standard library,
42# make sure LIBS contains -lsun (on Irix4) or -lseq (on PTX). 65# make sure LIBS contains the appropriate -l option.
43AC_FUNC_GETMNTENT 66AC_FUNC_GETMNTENT
44 67
45# This test must precede the ones for getmntent because Unicos-9 is 68# This test must precede the ones for getmntent because Unicos-9 is
@@ -70,7 +93,7 @@ yes
70 ac_list_mounted_fs=found 93 ac_list_mounted_fs=found
71 AC_DEFINE(MOUNTED_LISTMNTENT, 1, 94 AC_DEFINE(MOUNTED_LISTMNTENT, 1,
72 [Define if there is a function named listmntent that can be used to 95 [Define if there is a function named listmntent that can be used to
73 list all mounted filesystems. (UNICOS)]) 96 list all mounted file systems. (UNICOS)])
74 fi 97 fi
75fi 98fi
76 99
@@ -86,7 +109,7 @@ if test -z "$ac_list_mounted_fs"; then
86 ac_list_mounted_fs=found 109 ac_list_mounted_fs=found
87 AC_DEFINE(MOUNTED_VMOUNT, 1, 110 AC_DEFINE(MOUNTED_VMOUNT, 1,
88 [Define if there is a function named mntctl that can be used to read 111 [Define if there is a function named mntctl that can be used to read
89 the list of mounted filesystems, and there is a system header file 112 the list of mounted file systems, and there is a system header file
90 that declares `struct vmount.' (AIX)]) 113 that declares `struct vmount.' (AIX)])
91 fi 114 fi
92fi 115fi
@@ -125,7 +148,7 @@ if test $ac_cv_func_getmntent = yes; then
125 ac_list_mounted_fs=found 148 ac_list_mounted_fs=found
126 AC_DEFINE(MOUNTED_GETMNTENT1, 1, 149 AC_DEFINE(MOUNTED_GETMNTENT1, 1,
127 [Define if there is a function named getmntent for reading the list 150 [Define if there is a function named getmntent for reading the list
128 of mounted filesystems, and that function takes a single argument. 151 of mounted file systems, and that function takes a single argument.
129 (4.3BSD, SunOS, HP-UX, Dynix, Irix)]) 152 (4.3BSD, SunOS, HP-UX, Dynix, Irix)])
130 fi 153 fi
131 fi 154 fi
@@ -142,7 +165,7 @@ if test $ac_cv_func_getmntent = yes; then
142 ac_list_mounted_fs=found 165 ac_list_mounted_fs=found
143 AC_DEFINE(MOUNTED_GETMNTENT2, 1, 166 AC_DEFINE(MOUNTED_GETMNTENT2, 1,
144 [Define if there is a function named getmntent for reading the list of 167 [Define if there is a function named getmntent for reading the list of
145 mounted filesystems, and that function takes two arguments. (SVR4)]) 168 mounted file systems, and that function takes two arguments. (SVR4)])
146 fi 169 fi
147 fi 170 fi
148 171
@@ -173,7 +196,7 @@ if test -z "$ac_list_mounted_fs"; then
173 ac_list_mounted_fs=found 196 ac_list_mounted_fs=found
174 AC_DEFINE(MOUNTED_GETFSSTAT, 1, 197 AC_DEFINE(MOUNTED_GETFSSTAT, 1,
175 [Define if there is a function named getfsstat for reading the 198 [Define if there is a function named getfsstat for reading the
176 list of mounted filesystems. (DEC Alpha running OSF/1)]) 199 list of mounted file systems. (DEC Alpha running OSF/1)])
177 fi 200 fi
178fi 201fi
179 202
@@ -192,7 +215,7 @@ if test -z "$ac_list_mounted_fs"; then
192 ac_list_mounted_fs=found 215 ac_list_mounted_fs=found
193 AC_DEFINE(MOUNTED_FREAD_FSTYP, 1, 216 AC_DEFINE(MOUNTED_FREAD_FSTYP, 1,
194 [Define if (like SVR2) there is no specific function for reading the 217 [Define if (like SVR2) there is no specific function for reading the
195 list of mounted filesystems, and your system has these header files: 218 list of mounted file systems, and your system has these header files:
196 <sys/fstyp.h> and <sys/statfs.h>. (SVR3)]) 219 <sys/fstyp.h> and <sys/statfs.h>. (SVR3)])
197 fi 220 fi
198fi 221fi
@@ -211,7 +234,7 @@ if test -z "$ac_list_mounted_fs"; then
211 ac_list_mounted_fs=found 234 ac_list_mounted_fs=found
212 AC_DEFINE(MOUNTED_GETMNTINFO, 1, 235 AC_DEFINE(MOUNTED_GETMNTINFO, 1,
213 [Define if there is a function named getmntinfo for reading the 236 [Define if there is a function named getmntinfo for reading the
214 list of mounted filesystems. (4.4BSD, Darwin)]) 237 list of mounted file systems. (4.4BSD, Darwin)])
215 fi 238 fi
216fi 239fi
217 240
@@ -229,7 +252,7 @@ if test -z "$ac_list_mounted_fs"; then
229 ac_list_mounted_fs=found 252 ac_list_mounted_fs=found
230 AC_DEFINE(MOUNTED_GETMNT, 1, 253 AC_DEFINE(MOUNTED_GETMNT, 1,
231 [Define if there is a function named getmnt for reading the list of 254 [Define if there is a function named getmnt for reading the list of
232 mounted filesystems. (Ultrix)]) 255 mounted file systems. (Ultrix)])
233 fi 256 fi
234fi 257fi
235 258
@@ -250,7 +273,7 @@ if test -z "$ac_list_mounted_fs"; then
250 ac_list_mounted_fs=found 273 ac_list_mounted_fs=found
251 AC_DEFINE(MOUNTED_FS_STAT_DEV, 1, 274 AC_DEFINE(MOUNTED_FS_STAT_DEV, 1,
252 [Define if there are functions named next_dev and fs_stat_dev for 275 [Define if there are functions named next_dev and fs_stat_dev for
253 reading the list of mounted filesystems. (BeOS)]) 276 reading the list of mounted file systems. (BeOS)])
254 fi 277 fi
255fi 278fi
256 279
@@ -266,13 +289,13 @@ if test -z "$ac_list_mounted_fs"; then
266 ac_list_mounted_fs=found 289 ac_list_mounted_fs=found
267 AC_DEFINE(MOUNTED_FREAD, 1, 290 AC_DEFINE(MOUNTED_FREAD, 1,
268 [Define if there is no specific function for reading the list of 291 [Define if there is no specific function for reading the list of
269 mounted filesystems. fread will be used to read /etc/mnttab. 292 mounted file systems. fread will be used to read /etc/mnttab.
270 (SVR2) ]) 293 (SVR2) ])
271 fi 294 fi
272fi 295fi
273 296
274if test -z "$ac_list_mounted_fs"; then 297if test -z "$ac_list_mounted_fs"; then
275 AC_MSG_ERROR([could not determine how to read list of mounted filesystems]) 298 AC_MSG_ERROR([could not determine how to read list of mounted file systems])
276 # FIXME -- no need to abort building the whole package 299 # FIXME -- no need to abort building the whole package
277 # Can't build mountlist.c or anything that needs its functions 300 # Can't build mountlist.c or anything that needs its functions
278fi 301fi
diff --git a/m4/malloc.m4 b/m4/malloc.m4
deleted file mode 100644
index 2452acf0..00000000
--- a/m4/malloc.m4
+++ /dev/null
@@ -1,25 +0,0 @@
1# malloc.m4 serial 7
2dnl Copyright (C) 2002 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU
4dnl General Public License. As a special exception to the GNU General
5dnl Public License, this file may be distributed as part of a program
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8
9dnl From Jim Meyering.
10dnl Determine whether malloc accepts 0 as its argument.
11dnl If it doesn't, arrange to use the replacement function.
12
13AC_DEFUN([jm_FUNC_MALLOC],
14[
15 AC_REQUIRE([AC_FUNC_MALLOC])
16 dnl autoconf < 2.57 used the symbol ac_cv_func_malloc_works.
17 if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then
18 gl_PREREQ_MALLOC
19 fi
20])
21
22# Prerequisites of lib/malloc.c.
23AC_DEFUN([gl_PREREQ_MALLOC], [
24 :
25])
diff --git a/m4/mountlist.m4 b/m4/mountlist.m4
index 6a6b38c3..b2a2e12f 100644
--- a/m4/mountlist.m4
+++ b/m4/mountlist.m4
@@ -1,26 +1,25 @@
1# mountlist.m4 serial 2 1#serial 8
2dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. 2dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software; the Free Software Foundation
4dnl General Public License. As a special exception to the GNU General 4dnl gives unlimited permission to copy and/or distribute it,
5dnl Public License, this file may be distributed as part of a program 5dnl with or without modifications, as long as this notice is preserved.
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8 6
9AC_DEFUN([gl_MOUNTLIST], 7AC_DEFUN([gl_MOUNTLIST],
10[ 8[
11 jm_LIST_MOUNTED_FILESYSTEMS([gl_cv_list_mounted_fs=yes], 9 AC_LIBSOURCES([mountlist.c, mountlist.h])
12 [gl_cv_list_mounted_fs=no]) 10
11 gl_LIST_MOUNTED_FILE_SYSTEMS([gl_cv_list_mounted_fs=yes],
12 [gl_cv_list_mounted_fs=no])
13 if test $gl_cv_list_mounted_fs = yes; then 13 if test $gl_cv_list_mounted_fs = yes; then
14 AC_LIBOBJ(mountlist) 14 AC_LIBOBJ(mountlist)
15 gl_PREREQ_MOUNTLIST_EXTRA 15 gl_PREREQ_MOUNTLIST_EXTRA
16 fi 16 fi
17]) 17])
18 18
19# Prerequisites of lib/mountlist.c not done by jm_LIST_MOUNTED_FILESYSTEMS. 19# Prerequisites of lib/mountlist.c not done by gl_LIST_MOUNTED_FILE_SYSTEMS.
20AC_DEFUN([gl_PREREQ_MOUNTLIST_EXTRA], 20AC_DEFUN([gl_PREREQ_MOUNTLIST_EXTRA],
21[ 21[
22 dnl Note jm_LIST_MOUNTED_FILESYSTEMS checks for mntent.h, not sys/mntent.h. 22 dnl Note gl_LIST_MOUNTED_FILE_SYSTEMS checks for mntent.h, not sys/mntent.h.
23 AC_CHECK_HEADERS_ONCE(fcntl.h unistd.h)
24 AC_CHECK_HEADERS(sys/mntent.h) 23 AC_CHECK_HEADERS(sys/mntent.h)
25 jm_FSTYPENAME 24 gl_FSTYPENAME
26]) 25])
diff --git a/m4/nls.m4 b/m4/nls.m4
new file mode 100644
index 00000000..2082c3b2
--- /dev/null
+++ b/m4/nls.m4
@@ -0,0 +1,51 @@
1# nls.m4 serial 2 (gettext-0.14.3)
2dnl Copyright (C) 1995-2003, 2005 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6dnl
7dnl This file can can be used in projects which are not available under
8dnl the GNU General Public License or the GNU Library General Public
9dnl License but which still want to provide support for the GNU gettext
10dnl functionality.
11dnl Please note that the actual code of the GNU gettext library is covered
12dnl by the GNU Library General Public License, and the rest of the GNU
13dnl gettext package package is covered by the GNU General Public License.
14dnl They are *not* in the public domain.
15
16dnl Authors:
17dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
18dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
19
20AC_PREREQ(2.50)
21
22AC_DEFUN([AM_NLS],
23[
24 AC_MSG_CHECKING([whether NLS is requested])
25 dnl Default is enabled NLS
26 AC_ARG_ENABLE(nls,
27 [ --disable-nls do not use Native Language Support],
28 USE_NLS=$enableval, USE_NLS=yes)
29 AC_MSG_RESULT($USE_NLS)
30 AC_SUBST(USE_NLS)
31])
32
33AC_DEFUN([AM_MKINSTALLDIRS],
34[
35 dnl Tell automake >= 1.10 to complain if mkinstalldirs is missing.
36 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([mkinstalldirs])])
37 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
38 dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
39 dnl Try to locate it.
40 MKINSTALLDIRS=
41 if test -n "$ac_aux_dir"; then
42 case "$ac_aux_dir" in
43 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
44 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
45 esac
46 fi
47 if test -z "$MKINSTALLDIRS"; then
48 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
49 fi
50 AC_SUBST(MKINSTALLDIRS)
51])
diff --git a/m4/np_coreutils.m4 b/m4/np_coreutils.m4
index e7296040..e6627a2b 100644
--- a/m4/np_coreutils.m4
+++ b/m4/np_coreutils.m4
@@ -10,12 +10,12 @@ dnl These are all m4 things that need to be called
10dnl Usually in coreutils' prereq.m4, but this is a subset that we need 10dnl Usually in coreutils' prereq.m4, but this is a subset that we need
11AC_DEFUN([np_COREUTILS], 11AC_DEFUN([np_COREUTILS],
12[ 12[
13 AC_REQUIRE([gl_GETOPT])
14 AC_REQUIRE([AM_STDBOOL_H]) 13 AC_REQUIRE([AM_STDBOOL_H])
15 AC_REQUIRE([jm_AFS]) 14 AC_REQUIRE([gl_GETOPT])
15 AC_REQUIRE([gl_AFS])
16 AC_REQUIRE([gl_EXITFAIL]) 16 AC_REQUIRE([gl_EXITFAIL])
17 AC_REQUIRE([gl_XALLOC]) 17 AC_REQUIRE([gl_XALLOC])
18 AC_REQUIRE([gl_MOUNTLIST]) 18 AC_REQUIRE([gl_MOUNTLIST])
19 AC_REQUIRE([gl_FSUSAGE]) 19 AC_REQUIRE([gl_FSUSAGE])
20 AC_REQUIRE([jm_FUNC_GLIBC_UNLOCKED_IO]) 20 AC_REQUIRE([gl_FUNC_GLIBC_UNLOCKED_IO])
21]) 21])
diff --git a/m4/onceonly.m4 b/m4/onceonly_2_57.m4
index 50b33f48..14d3c0b2 100644
--- a/m4/onceonly.m4
+++ b/m4/onceonly_2_57.m4
@@ -1,5 +1,5 @@
1# onceonly.m4 serial 3 (gettext-0.12) 1# onceonly_2_57.m4 serial 3
2dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software, distributed under the terms of the GNU
4dnl General Public License. As a special exception to the GNU General 4dnl General Public License. As a special exception to the GNU General
5dnl Public License, this file may be distributed as part of a program 5dnl Public License, this file may be distributed as part of a program
@@ -21,22 +21,36 @@ dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
21dnl empty, and the check will be inserted before the body of the AC_DEFUNed 21dnl empty, and the check will be inserted before the body of the AC_DEFUNed
22dnl function. 22dnl function.
23 23
24dnl This is like onceonly.m4, except that it uses diversions to named sections
25dnl DEFAULTS and INIT_PREPARE in order to check all requested headers at once,
26dnl thus reducing the size of 'configure'. Works with autoconf-2.57. The
27dnl size reduction is ca. 9%.
28
24dnl Autoconf version 2.57 or newer is recommended. 29dnl Autoconf version 2.57 or newer is recommended.
25AC_PREREQ(2.54) 30AC_PREREQ(2.57)
26 31
27# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of 32# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
28# AC_CHECK_HEADERS(HEADER1 HEADER2 ...). 33# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
29AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ 34AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
30 : 35 :
31 AC_FOREACH([gl_HEADER_NAME], [$1], [ 36 AC_FOREACH([gl_HEADER_NAME], [$1], [
32 AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(m4_defn([gl_HEADER_NAME]), 37 AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
33 [-./], [___])), [ 38 [./-], [___])), [
34 AC_CHECK_HEADERS(gl_HEADER_NAME) 39 m4_divert_text([INIT_PREPARE],
40 [gl_header_list="$gl_header_list gl_HEADER_NAME"])
41 gl_HEADERS_EXPANSION
42 AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_HEADER_NAME])),
43 [Define to 1 if you have the <]m4_defn([gl_HEADER_NAME])[> header file.])
35 ]) 44 ])
36 AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME, 45 AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
37 [-./], [___]))) 46 [./-], [___])))
38 ]) 47 ])
39]) 48])
49m4_define([gl_HEADERS_EXPANSION], [
50 m4_divert_text([DEFAULTS], [gl_header_list=])
51 AC_CHECK_HEADERS([$gl_header_list])
52 m4_define([gl_HEADERS_EXPANSION], [])
53])
40 54
41# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of 55# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
42# AC_CHECK_FUNCS(FUNC1 FUNC2 ...). 56# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
@@ -44,11 +58,20 @@ AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
44 : 58 :
45 AC_FOREACH([gl_FUNC_NAME], [$1], [ 59 AC_FOREACH([gl_FUNC_NAME], [$1], [
46 AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [ 60 AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
47 AC_CHECK_FUNCS(m4_defn([gl_FUNC_NAME])) 61 m4_divert_text([INIT_PREPARE],
62 [gl_func_list="$gl_func_list gl_FUNC_NAME"])
63 gl_FUNCS_EXPANSION
64 AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_FUNC_NAME])),
65 [Define to 1 if you have the `]m4_defn([gl_FUNC_NAME])[' function.])
48 ]) 66 ])
49 AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME])) 67 AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
50 ]) 68 ])
51]) 69])
70m4_define([gl_FUNCS_EXPANSION], [
71 m4_divert_text([DEFAULTS], [gl_func_list=])
72 AC_CHECK_FUNCS([$gl_func_list])
73 m4_define([gl_FUNCS_EXPANSION], [])
74])
52 75
53# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of 76# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
54# AC_CHECK_DECLS(DECL1, DECL2, ...). 77# AC_CHECK_DECLS(DECL1, DECL2, ...).
diff --git a/m4/po.m4 b/m4/po.m4
new file mode 100644
index 00000000..f2795eea
--- /dev/null
+++ b/m4/po.m4
@@ -0,0 +1,429 @@
1# po.m4 serial 7 (gettext-0.14.3)
2dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6dnl
7dnl This file can can be used in projects which are not available under
8dnl the GNU General Public License or the GNU Library General Public
9dnl License but which still want to provide support for the GNU gettext
10dnl functionality.
11dnl Please note that the actual code of the GNU gettext library is covered
12dnl by the GNU Library General Public License, and the rest of the GNU
13dnl gettext package package is covered by the GNU General Public License.
14dnl They are *not* in the public domain.
15
16dnl Authors:
17dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
18dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
19
20AC_PREREQ(2.50)
21
22dnl Checks for all prerequisites of the po subdirectory.
23AC_DEFUN([AM_PO_SUBDIRS],
24[
25 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
26 AC_REQUIRE([AC_PROG_INSTALL])dnl
27 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
28 AC_REQUIRE([AM_NLS])dnl
29
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
33 dnl Search for GNU msgfmt in the PATH.
34 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
35 dnl The second test excludes FreeBSD msgfmt.
36 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
37 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
38 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
39 :)
40 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
41
42 dnl Search for GNU xgettext 0.12 or newer in the PATH.
43 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
44 dnl The second test excludes FreeBSD xgettext.
45 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
46 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
47 (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)],
48 :)
49 dnl Remove leftover from FreeBSD xgettext call.
50 rm -f messages.po
51
52 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
53 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
54 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
55
56 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
57 dnl Test whether we really found GNU msgfmt.
58 if test "$GMSGFMT" != ":"; then
59 dnl If it is no GNU msgfmt we define it as : so that the
60 dnl Makefiles still can work.
61 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
62 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
63 : ;
64 else
65 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
66 AC_MSG_RESULT(
67 [found $GMSGFMT program is not GNU msgfmt; ignore it])
68 GMSGFMT=":"
69 fi
70 fi
71
72 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
73 dnl Test whether we really found GNU xgettext.
74 if test "$XGETTEXT" != ":"; then
75 dnl If it is no GNU xgettext we define it as : so that the
76 dnl Makefiles still can work.
77 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
78 (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
79 : ;
80 else
81 AC_MSG_RESULT(
82 [found xgettext program is not GNU xgettext; ignore it])
83 XGETTEXT=":"
84 fi
85 dnl Remove leftover from FreeBSD xgettext call.
86 rm -f messages.po
87 fi
88
89 AC_OUTPUT_COMMANDS([
90 for ac_file in $CONFIG_FILES; do
91 # Support "outfile[:infile[:infile...]]"
92 case "$ac_file" in
93 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
94 esac
95 # PO directories have a Makefile.in generated from Makefile.in.in.
96 case "$ac_file" in */Makefile.in)
97 # Adjust a relative srcdir.
98 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
99 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
100 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
101 # In autoconf-2.13 it is called $ac_given_srcdir.
102 # In autoconf-2.50 it is called $srcdir.
103 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
104 case "$ac_given_srcdir" in
105 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
106 /*) top_srcdir="$ac_given_srcdir" ;;
107 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
108 esac
109 # Treat a directory as a PO directory if and only if it has a
110 # POTFILES.in file. This allows packages to have multiple PO
111 # directories under different names or in different locations.
112 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
113 rm -f "$ac_dir/POTFILES"
114 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
115 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
116 POMAKEFILEDEPS="POTFILES.in"
117 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
118 # on $ac_dir but don't depend on user-specified configuration
119 # parameters.
120 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
121 # The LINGUAS file contains the set of available languages.
122 if test -n "$OBSOLETE_ALL_LINGUAS"; then
123 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
124 fi
125 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
126 # Hide the ALL_LINGUAS assigment from automake.
127 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
128 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
129 else
130 # The set of available languages was given in configure.in.
131 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
132 fi
133 # Compute POFILES
134 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
135 # Compute UPDATEPOFILES
136 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
137 # Compute DUMMYPOFILES
138 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
139 # Compute GMOFILES
140 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
141 case "$ac_given_srcdir" in
142 .) srcdirpre= ;;
143 *) srcdirpre='$(srcdir)/' ;;
144 esac
145 POFILES=
146 UPDATEPOFILES=
147 DUMMYPOFILES=
148 GMOFILES=
149 for lang in $ALL_LINGUAS; do
150 POFILES="$POFILES $srcdirpre$lang.po"
151 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
152 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
153 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
154 done
155 # CATALOGS depends on both $ac_dir and the user's LINGUAS
156 # environment variable.
157 INST_LINGUAS=
158 if test -n "$ALL_LINGUAS"; then
159 for presentlang in $ALL_LINGUAS; do
160 useit=no
161 if test "%UNSET%" != "$LINGUAS"; then
162 desiredlanguages="$LINGUAS"
163 else
164 desiredlanguages="$ALL_LINGUAS"
165 fi
166 for desiredlang in $desiredlanguages; do
167 # Use the presentlang catalog if desiredlang is
168 # a. equal to presentlang, or
169 # b. a variant of presentlang (because in this case,
170 # presentlang can be used as a fallback for messages
171 # which are not translated in the desiredlang catalog).
172 case "$desiredlang" in
173 "$presentlang"*) useit=yes;;
174 esac
175 done
176 if test $useit = yes; then
177 INST_LINGUAS="$INST_LINGUAS $presentlang"
178 fi
179 done
180 fi
181 CATALOGS=
182 if test -n "$INST_LINGUAS"; then
183 for lang in $INST_LINGUAS; do
184 CATALOGS="$CATALOGS $lang.gmo"
185 done
186 fi
187 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
188 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"
189 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
190 if test -f "$f"; then
191 case "$f" in
192 *.orig | *.bak | *~) ;;
193 *) cat "$f" >> "$ac_dir/Makefile" ;;
194 esac
195 fi
196 done
197 fi
198 ;;
199 esac
200 done],
201 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
202 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
203 # from automake.
204 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
205 # Capture the value of LINGUAS because we need it to compute CATALOGS.
206 LINGUAS="${LINGUAS-%UNSET%}"
207 ])
208])
209
210dnl Postprocesses a Makefile in a directory containing PO files.
211AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
212[
213 # When this code is run, in config.status, two variables have already been
214 # set:
215 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
216 # - LINGUAS is the value of the environment variable LINGUAS at configure
217 # time.
218
219changequote(,)dnl
220 # Adjust a relative srcdir.
221 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
222 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
223 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
224 # In autoconf-2.13 it is called $ac_given_srcdir.
225 # In autoconf-2.50 it is called $srcdir.
226 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
227 case "$ac_given_srcdir" in
228 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
229 /*) top_srcdir="$ac_given_srcdir" ;;
230 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
231 esac
232
233 # Find a way to echo strings without interpreting backslash.
234 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
235 gt_echo='echo'
236 else
237 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
238 gt_echo='printf %s\n'
239 else
240 echo_func () {
241 cat <<EOT
242$*
243EOT
244 }
245 gt_echo='echo_func'
246 fi
247 fi
248
249 # A sed script that extracts the value of VARIABLE from a Makefile.
250 sed_x_variable='
251# Test if the hold space is empty.
252x
253s/P/P/
254x
255ta
256# Yes it was empty. Look if we have the expected variable definition.
257/^[ ]*VARIABLE[ ]*=/{
258 # Seen the first line of the variable definition.
259 s/^[ ]*VARIABLE[ ]*=//
260 ba
261}
262bd
263:a
264# Here we are processing a line from the variable definition.
265# Remove comment, more precisely replace it with a space.
266s/#.*$/ /
267# See if the line ends in a backslash.
268tb
269:b
270s/\\$//
271# Print the line, without the trailing backslash.
272p
273tc
274# There was no trailing backslash. The end of the variable definition is
275# reached. Clear the hold space.
276s/^.*$//
277x
278bd
279:c
280# A trailing backslash means that the variable definition continues in the
281# next line. Put a nonempty string into the hold space to indicate this.
282s/^.*$/P/
283x
284:d
285'
286changequote([,])dnl
287
288 # Set POTFILES to the value of the Makefile variable POTFILES.
289 sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
290 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
291 # Compute POTFILES_DEPS as
292 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
293 POTFILES_DEPS=
294 for file in $POTFILES; do
295 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
296 done
297 POMAKEFILEDEPS=""
298
299 if test -n "$OBSOLETE_ALL_LINGUAS"; then
300 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
301 fi
302 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
303 # The LINGUAS file contains the set of available languages.
304 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
305 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
306 else
307 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
308 sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
309 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
310 fi
311 # Hide the ALL_LINGUAS assigment from automake.
312 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
313 # Compute POFILES
314 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
315 # Compute UPDATEPOFILES
316 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
317 # Compute DUMMYPOFILES
318 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
319 # Compute GMOFILES
320 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
321 # Compute PROPERTIESFILES
322 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
323 # Compute CLASSFILES
324 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
325 # Compute QMFILES
326 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
327 # Compute MSGFILES
328 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
329 # Compute RESOURCESDLLFILES
330 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
331 case "$ac_given_srcdir" in
332 .) srcdirpre= ;;
333 *) srcdirpre='$(srcdir)/' ;;
334 esac
335 POFILES=
336 UPDATEPOFILES=
337 DUMMYPOFILES=
338 GMOFILES=
339 PROPERTIESFILES=
340 CLASSFILES=
341 QMFILES=
342 MSGFILES=
343 RESOURCESDLLFILES=
344 for lang in $ALL_LINGUAS; do
345 POFILES="$POFILES $srcdirpre$lang.po"
346 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
347 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
348 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
349 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
350 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
351 QMFILES="$QMFILES $srcdirpre$lang.qm"
352 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
353 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
354 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/'`
355 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
356 done
357 # CATALOGS depends on both $ac_dir and the user's LINGUAS
358 # environment variable.
359 INST_LINGUAS=
360 if test -n "$ALL_LINGUAS"; then
361 for presentlang in $ALL_LINGUAS; do
362 useit=no
363 if test "%UNSET%" != "$LINGUAS"; then
364 desiredlanguages="$LINGUAS"
365 else
366 desiredlanguages="$ALL_LINGUAS"
367 fi
368 for desiredlang in $desiredlanguages; do
369 # Use the presentlang catalog if desiredlang is
370 # a. equal to presentlang, or
371 # b. a variant of presentlang (because in this case,
372 # presentlang can be used as a fallback for messages
373 # which are not translated in the desiredlang catalog).
374 case "$desiredlang" in
375 "$presentlang"*) useit=yes;;
376 esac
377 done
378 if test $useit = yes; then
379 INST_LINGUAS="$INST_LINGUAS $presentlang"
380 fi
381 done
382 fi
383 CATALOGS=
384 JAVACATALOGS=
385 QTCATALOGS=
386 TCLCATALOGS=
387 CSHARPCATALOGS=
388 if test -n "$INST_LINGUAS"; then
389 for lang in $INST_LINGUAS; do
390 CATALOGS="$CATALOGS $lang.gmo"
391 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
392 QTCATALOGS="$QTCATALOGS $lang.qm"
393 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
394 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
395 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/'`
396 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
397 done
398 fi
399
400 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"
401 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
402 # Add dependencies that cannot be formulated as a simple suffix rule.
403 for lang in $ALL_LINGUAS; do
404 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
405 cat >> "$ac_file.tmp" <<EOF
406$frobbedlang.msg: $lang.po
407 @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
408 \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
409EOF
410 done
411 fi
412 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
413 # Add dependencies that cannot be formulated as a simple suffix rule.
414 for lang in $ALL_LINGUAS; do
415 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/'`
416 cat >> "$ac_file.tmp" <<EOF
417$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
418 @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
419 \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
420EOF
421 done
422 fi
423 if test -n "$POMAKEFILEDEPS"; then
424 cat >> "$ac_file.tmp" <<EOF
425Makefile: $POMAKEFILEDEPS
426EOF
427 fi
428 mv "$ac_file.tmp" "$ac_file"
429])
diff --git a/m4/progtest.m4 b/m4/progtest.m4
index 443c8e30..a56365cd 100644
--- a/m4/progtest.m4
+++ b/m4/progtest.m4
@@ -1,10 +1,8 @@
1# progtest.m4 serial 2 (gettext-0.10.40) 1# progtest.m4 serial 4 (gettext-0.14.2)
2dnl Copyright (C) 1996-2002 Free Software Foundation, Inc. 2dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software; the Free Software Foundation
4dnl General Public License. As a special exception to the GNU General 4dnl gives unlimited permission to copy and/or distribute it,
5dnl Public License, this file may be distributed as part of a program 5dnl with or without modifications, as long as this notice is preserved.
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8dnl 6dnl
9dnl This file can can be used in projects which are not available under 7dnl This file can can be used in projects which are not available under
10dnl the GNU General Public License or the GNU Library General Public 8dnl the GNU General Public License or the GNU Library General Public
@@ -18,36 +16,71 @@ dnl They are *not* in the public domain.
18dnl Authors: 16dnl Authors:
19dnl Ulrich Drepper <drepper@cygnus.com>, 1996. 17dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
20 18
19AC_PREREQ(2.50)
20
21# Search path for a program which passes the given test. 21# Search path for a program which passes the given test.
22 22
23dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, 23dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
24dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) 24dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
25AC_DEFUN([AM_PATH_PROG_WITH_TEST], 25AC_DEFUN([AM_PATH_PROG_WITH_TEST],
26[# Extract the first word of "$2", so it can be a program name with args. 26[
27# Prepare PATH_SEPARATOR.
28# The user is always right.
29if test "${PATH_SEPARATOR+set}" != set; then
30 echo "#! /bin/sh" >conf$$.sh
31 echo "exit 0" >>conf$$.sh
32 chmod +x conf$$.sh
33 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
34 PATH_SEPARATOR=';'
35 else
36 PATH_SEPARATOR=:
37 fi
38 rm -f conf$$.sh
39fi
40
41# Find out how to test for executable files. Don't use a zero-byte file,
42# as systems may use methods other than mode bits to determine executability.
43cat >conf$$.file <<_ASEOF
44#! /bin/sh
45exit 0
46_ASEOF
47chmod +x conf$$.file
48if test -x conf$$.file >/dev/null 2>&1; then
49 ac_executable_p="test -x"
50else
51 ac_executable_p="test -f"
52fi
53rm -f conf$$.file
54
55# Extract the first word of "$2", so it can be a program name with args.
27set dummy $2; ac_word=[$]2 56set dummy $2; ac_word=[$]2
28AC_MSG_CHECKING([for $ac_word]) 57AC_MSG_CHECKING([for $ac_word])
29AC_CACHE_VAL(ac_cv_path_$1, 58AC_CACHE_VAL(ac_cv_path_$1,
30[case "[$]$1" in 59[case "[$]$1" in
31 /*) 60 [[\\/]]* | ?:[[\\/]]*)
32 ac_cv_path_$1="[$]$1" # Let the user override the test with a path. 61 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
33 ;; 62 ;;
34 *) 63 *)
35 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 64 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
36 for ac_dir in ifelse([$5], , $PATH, [$5]); do 65 for ac_dir in ifelse([$5], , $PATH, [$5]); do
37 test -z "$ac_dir" && ac_dir=. 66 IFS="$ac_save_IFS"
38 if test -f $ac_dir/$ac_word; then 67 test -z "$ac_dir" && ac_dir=.
39 if [$3]; then 68 for ac_exec_ext in '' $ac_executable_extensions; do
40 ac_cv_path_$1="$ac_dir/$ac_word" 69 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
41 break 70 echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
42 fi 71 if [$3]; then
43 fi 72 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
44 done 73 break 2
45 IFS="$ac_save_ifs" 74 fi
75 fi
76 done
77 done
78 IFS="$ac_save_IFS"
46dnl If no 4th arg is given, leave the cache variable unset, 79dnl If no 4th arg is given, leave the cache variable unset,
47dnl so AC_PATH_PROGS will keep looking. 80dnl so AC_PATH_PROGS will keep looking.
48ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" 81ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
49])dnl 82])dnl
50 ;; 83 ;;
51esac])dnl 84esac])dnl
52$1="$ac_cv_path_$1" 85$1="$ac_cv_path_$1"
53if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then 86if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
diff --git a/m4/realloc.m4 b/m4/realloc.m4
deleted file mode 100644
index 9f746f19..00000000
--- a/m4/realloc.m4
+++ /dev/null
@@ -1,25 +0,0 @@
1# realloc.m4 serial 7
2dnl Copyright (C) 2002 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU
4dnl General Public License. As a special exception to the GNU General
5dnl Public License, this file may be distributed as part of a program
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8
9dnl From Jim Meyering.
10dnl Determine whether realloc works when both arguments are 0.
11dnl If it doesn't, arrange to use the replacement function.
12
13AC_DEFUN([jm_FUNC_REALLOC],
14[
15 AC_REQUIRE([AC_FUNC_REALLOC])
16 dnl autoconf < 2.57 used the symbol ac_cv_func_realloc_works.
17 if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
18 gl_PREREQ_REALLOC
19 fi
20])
21
22# Prerequisites of lib/realloc.c.
23AC_DEFUN([gl_PREREQ_REALLOC], [
24 :
25])
diff --git a/m4/signed.m4 b/m4/signed.m4
new file mode 100644
index 00000000..048f5936
--- /dev/null
+++ b/m4/signed.m4
@@ -0,0 +1,17 @@
1# signed.m4 serial 1 (gettext-0.10.40)
2dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl From Bruno Haible.
8
9AC_DEFUN([bh_C_SIGNED],
10[
11 AC_CACHE_CHECK([for signed], bh_cv_c_signed,
12 [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
13 if test $bh_cv_c_signed = no; then
14 AC_DEFINE(signed, ,
15 [Define to empty if the C compiler doesn't support this keyword.])
16 fi
17])
diff --git a/m4/stdbool.m4 b/m4/stdbool.m4
index ed000c81..162f1dfc 100644
--- a/m4/stdbool.m4
+++ b/m4/stdbool.m4
@@ -1,21 +1,9 @@
1# Check for stdbool.h that conforms to C99. 1# Check for stdbool.h that conforms to C99.
2 2
3# Copyright (C) 2002-2003 Free Software Foundation, Inc. 3dnl Copyright (C) 2002-2005 Free Software Foundation, Inc.
4 4dnl This file is free software; the Free Software Foundation
5# This program is free software; you can redistribute it and/or modify 5dnl gives unlimited permission to copy and/or distribute it,
6# it under the terms of the GNU General Public License as published by 6dnl with or without modifications, as long as this notice is preserved.
7# the Free Software Foundation; either version 2, or (at your option)
8# any later version.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18# 02111-1307, USA.
19 7
20# Prepare for substituting <stdbool.h> if it is not supported. 8# Prepare for substituting <stdbool.h> if it is not supported.
21 9
@@ -40,7 +28,10 @@ AC_DEFUN([AM_STDBOOL_H],
40 AC_SUBST([HAVE__BOOL]) 28 AC_SUBST([HAVE__BOOL])
41]) 29])
42 30
43# This macro is only needed in autoconf <= 2.54. Newer versions of autoconf 31# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future.
32AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H])
33
34# This macro is only needed in autoconf <= 2.59. Newer versions of autoconf
44# have this macro built-in. 35# have this macro built-in.
45 36
46AC_DEFUN([AC_HEADER_STDBOOL], 37AC_DEFUN([AC_HEADER_STDBOOL],
@@ -59,7 +50,7 @@ AC_DEFUN([AC_HEADER_STDBOOL],
59 "error: false is not 0" 50 "error: false is not 0"
60 #endif 51 #endif
61 #ifndef true 52 #ifndef true
62 "error: false is not defined" 53 "error: true is not defined"
63 #endif 54 #endif
64 #if true != 1 55 #if true != 1
65 "error: true is not 1" 56 "error: true is not 1"
@@ -79,8 +70,36 @@ AC_DEFUN([AC_HEADER_STDBOOL],
79 char g[true]; 70 char g[true];
80 char h[sizeof (_Bool)]; 71 char h[sizeof (_Bool)];
81 char i[sizeof s.t]; 72 char i[sizeof s.t];
73 enum { j = false, k = true, l = false * true, m = true * 256 };
74 _Bool n[m];
75 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
76 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
77 #if defined __xlc__ || __GNUC__
78 /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
79 reported by James Lemley on 2005-10-05; see
80 <http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html>.
81 This test is not quite right, since xlc is allowed to
82 reject this program, as the initializer for xlcbug is
83 not one of the forms that C requires support for.
84 However, doing the test right would require a run-time
85 test, and that would make cross-compilation harder.
86 Let us hope that IBM fixes the xlc bug, and also adds
87 support for this kind of constant expression. In the
88 meantime, this test will reject xlc, which is OK, since
89 our stdbool.h substitute should suffice. */
90 char digs[] = "0123456789";
91 int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
92 #endif
93 _Bool q = true;
94 _Bool *pq = &q;
95 ],
96 [
97 *pq |= q;
98 *pq |= ! q;
99 /* Refer to every declared value, to avoid compiler optimizations. */
100 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
101 + !m + !n + !o + !p + !q + !pq);
82 ], 102 ],
83 [ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ],
84 [ac_cv_header_stdbool_h=yes], 103 [ac_cv_header_stdbool_h=yes],
85 [ac_cv_header_stdbool_h=no])]) 104 [ac_cv_header_stdbool_h=no])])
86 AC_CHECK_TYPES([_Bool]) 105 AC_CHECK_TYPES([_Bool])
diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4
index 4b5a4ac6..3355f35a 100644
--- a/m4/stdint_h.m4
+++ b/m4/stdint_h.m4
@@ -1,28 +1,26 @@
1# stdint_h.m4 serial 2 (gettext-0.11.4) 1# stdint_h.m4 serial 5
2dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. 2dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software; the Free Software Foundation
4dnl General Public License. As a special exception to the GNU General 4dnl gives unlimited permission to copy and/or distribute it,
5dnl Public License, this file may be distributed as part of a program 5dnl with or without modifications, as long as this notice is preserved.
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8 6
9dnl From Paul Eggert. 7dnl From Paul Eggert.
10 8
11# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists, 9# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
12# doesn't clash with <sys/types.h>, and declares uintmax_t. 10# doesn't clash with <sys/types.h>, and declares uintmax_t.
13 11
14AC_DEFUN([jm_AC_HEADER_STDINT_H], 12AC_DEFUN([gl_AC_HEADER_STDINT_H],
15[ 13[
16 AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h, 14 AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h,
17 [AC_TRY_COMPILE( 15 [AC_TRY_COMPILE(
18 [#include <sys/types.h> 16 [#include <sys/types.h>
19#include <stdint.h>], 17#include <stdint.h>],
20 [uintmax_t i = (uintmax_t) -1;], 18 [uintmax_t i = (uintmax_t) -1;],
21 jm_ac_cv_header_stdint_h=yes, 19 gl_cv_header_stdint_h=yes,
22 jm_ac_cv_header_stdint_h=no)]) 20 gl_cv_header_stdint_h=no)])
23 if test $jm_ac_cv_header_stdint_h = yes; then 21 if test $gl_cv_header_stdint_h = yes; then
24 AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, 22 AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
25[Define if <stdint.h> exists, doesn't clash with <sys/types.h>, 23 [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
26 and declares uintmax_t. ]) 24 and declares uintmax_t. ])
27 fi 25 fi
28]) 26])
diff --git a/m4/uintmax_t.m4 b/m4/uintmax_t.m4
index ec3a8b92..bf83ed74 100644
--- a/m4/uintmax_t.m4
+++ b/m4/uintmax_t.m4
@@ -1,29 +1,30 @@
1# uintmax_t.m4 serial 6 (gettext-0.11) 1# uintmax_t.m4 serial 9
2dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. 2dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software; the Free Software Foundation
4dnl General Public License. As a special exception to the GNU General 4dnl gives unlimited permission to copy and/or distribute it,
5dnl Public License, this file may be distributed as part of a program 5dnl with or without modifications, as long as this notice is preserved.
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8 6
9dnl From Paul Eggert. 7dnl From Paul Eggert.
10 8
11AC_PREREQ(2.13) 9AC_PREREQ(2.13)
12 10
13# Define uintmax_t to `unsigned long' or `unsigned long long' 11# Define uintmax_t to 'unsigned long' or 'unsigned long long'
14# if <inttypes.h> does not exist. 12# if it is not already defined in <stdint.h> or <inttypes.h>.
15 13
16AC_DEFUN([jm_AC_TYPE_UINTMAX_T], 14AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
17[ 15[
18 AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) 16 AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
19 AC_REQUIRE([jm_AC_HEADER_STDINT_H]) 17 AC_REQUIRE([gl_AC_HEADER_STDINT_H])
20 if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then 18 if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
21 AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) 19 AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG])
22 test $ac_cv_type_unsigned_long_long = yes \ 20 test $ac_cv_type_unsigned_long_long = yes \
23 && ac_type='unsigned long long' \ 21 && ac_type='unsigned long long' \
24 || ac_type='unsigned long' 22 || ac_type='unsigned long'
25 AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, 23 AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
26 [Define to unsigned long or unsigned long long 24 [Define to unsigned long or unsigned long long
27 if <inttypes.h> and <stdint.h> don't define.]) 25 if <stdint.h> and <inttypes.h> don't define.])
26 else
27 AC_DEFINE(HAVE_UINTMAX_T, 1,
28 [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
28 fi 29 fi
29]) 30])
diff --git a/m4/ulonglong.m4 b/m4/ulonglong.m4
index c375e474..dee10ccc 100644
--- a/m4/ulonglong.m4
+++ b/m4/ulonglong.m4
@@ -1,23 +1,23 @@
1# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40) 1# ulonglong.m4 serial 4
2dnl Copyright (C) 1999-2002 Free Software Foundation, Inc. 2dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software; the Free Software Foundation
4dnl General Public License. As a special exception to the GNU General 4dnl gives unlimited permission to copy and/or distribute it,
5dnl Public License, this file may be distributed as part of a program 5dnl with or without modifications, as long as this notice is preserved.
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8 6
9dnl From Paul Eggert. 7dnl From Paul Eggert.
10 8
11AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], 9# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
10
11AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG],
12[ 12[
13 AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, 13 AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
14 [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], 14 [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
15 [unsigned long long ullmax = (unsigned long long) -1; 15 [unsigned long long ullmax = (unsigned long long) -1;
16 return ull << i | ull >> i | ullmax / ull | ullmax % ull;], 16 return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
17 ac_cv_type_unsigned_long_long=yes, 17 ac_cv_type_unsigned_long_long=yes,
18 ac_cv_type_unsigned_long_long=no)]) 18 ac_cv_type_unsigned_long_long=no)])
19 if test $ac_cv_type_unsigned_long_long = yes; then 19 if test $ac_cv_type_unsigned_long_long = yes; then
20 AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, 20 AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
21 [Define if you have the unsigned long long type.]) 21 [Define if you have the 'unsigned long long' type.])
22 fi 22 fi
23]) 23])
diff --git a/m4/unlocked-io.m4 b/m4/unlocked-io.m4
index f8e98f1d..6cbacb00 100644
--- a/m4/unlocked-io.m4
+++ b/m4/unlocked-io.m4
@@ -1,4 +1,11 @@
1#serial 8 -*- autoconf -*- 1# unlocked-io.m4 serial 12
2
3# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
4# Foundation, Inc.
5#
6# This file is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it,
8# with or without modifications, as long as this notice is preserved.
2 9
3dnl From Jim Meyering. 10dnl From Jim Meyering.
4dnl 11dnl
@@ -8,8 +15,15 @@ dnl (because some of them were declared in Solaris 2.5.1 but were removed
8dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run 15dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
9dnl on Solaris 2.6). 16dnl on Solaris 2.6).
10 17
11AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO], 18AC_DEFUN([gl_FUNC_GLIBC_UNLOCKED_IO],
12[ 19[
20 AC_LIBSOURCES([unlocked-io.h])
21
22 AC_DEFINE([USE_UNLOCKED_IO], 1,
23 [Define to 1 if you want getc etc. to use unlocked I/O if available.
24 Unlocked I/O can improve performance in unithreaded apps,
25 but it is not safe for multithreaded apps.])
26
13 dnl Persuade glibc and Solaris <stdio.h> to declare 27 dnl Persuade glibc and Solaris <stdio.h> to declare
14 dnl fgets_unlocked(), fputs_unlocked() etc. 28 dnl fgets_unlocked(), fputs_unlocked() etc.
15 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) 29 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4
new file mode 100644
index 00000000..cde2129a
--- /dev/null
+++ b/m4/wchar_t.m4
@@ -0,0 +1,20 @@
1# wchar_t.m4 serial 1 (gettext-0.12)
2dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl From Bruno Haible.
8dnl Test whether <stddef.h> has the 'wchar_t' type.
9dnl Prerequisite: AC_PROG_CC
10
11AC_DEFUN([gt_TYPE_WCHAR_T],
12[
13 AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
14 [AC_TRY_COMPILE([#include <stddef.h>
15 wchar_t foo = (wchar_t)'\0';], ,
16 gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
17 if test $gt_cv_c_wchar_t = yes; then
18 AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
19 fi
20])
diff --git a/m4/wint_t.m4 b/m4/wint_t.m4
new file mode 100644
index 00000000..b8fff9c8
--- /dev/null
+++ b/m4/wint_t.m4
@@ -0,0 +1,20 @@
1# wint_t.m4 serial 1 (gettext-0.12)
2dnl Copyright (C) 2003 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl From Bruno Haible.
8dnl Test whether <wchar.h> has the 'wint_t' type.
9dnl Prerequisite: AC_PROG_CC
10
11AC_DEFUN([gt_TYPE_WINT_T],
12[
13 AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
14 [AC_TRY_COMPILE([#include <wchar.h>
15 wint_t foo = (wchar_t)'\0';], ,
16 gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
17 if test $gt_cv_c_wint_t = yes; then
18 AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
19 fi
20])
diff --git a/m4/xalloc.m4 b/m4/xalloc.m4
index dec84177..c0847dd3 100644
--- a/m4/xalloc.m4
+++ b/m4/xalloc.m4
@@ -1,16 +1,16 @@
1# xalloc.m4 serial 8 1# xalloc.m4 serial 12
2dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. 2dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU 3dnl This file is free software; the Free Software Foundation
4dnl General Public License. As a special exception to the GNU General 4dnl gives unlimited permission to copy and/or distribute it,
5dnl Public License, this file may be distributed as part of a program 5dnl with or without modifications, as long as this notice is preserved.
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8 6
9AC_DEFUN([gl_XALLOC], 7AC_DEFUN([gl_XALLOC],
10[ 8[
9 AC_LIBSOURCES([xmalloc.c, xalloc.h])
10 AC_LIBOBJ([xmalloc])
11
11 gl_PREREQ_XALLOC 12 gl_PREREQ_XALLOC
12 gl_PREREQ_XMALLOC 13 gl_PREREQ_XMALLOC
13 gl_PREREQ_XSTRDUP
14]) 14])
15 15
16# Prerequisites of lib/xalloc.h. 16# Prerequisites of lib/xalloc.h.
@@ -21,12 +21,5 @@ AC_DEFUN([gl_PREREQ_XALLOC], [
21# Prerequisites of lib/xmalloc.c. 21# Prerequisites of lib/xmalloc.c.
22AC_DEFUN([gl_PREREQ_XMALLOC], [ 22AC_DEFUN([gl_PREREQ_XMALLOC], [
23 AC_REQUIRE([AC_C_INLINE]) 23 AC_REQUIRE([AC_C_INLINE])
24 AC_REQUIRE([jm_FUNC_MALLOC])
25 AC_REQUIRE([jm_FUNC_REALLOC])
26 :
27])
28
29# Prerequisites of lib/xstrdup.c.
30AC_DEFUN([gl_PREREQ_XSTRDUP], [
31 : 24 :
32]) 25])