Status: | Merged |
---|---|
Merged at revision: | 2637 |
Proposed branch: | lp:~brianaker/drizzle/m4-july |
Merge into: | lp:drizzle |
Diff against target: |
2209 lines (+1955/-71) 26 files modified
docs/include.am (+11/-46) m4/ax_prog_sphinx_build.m4 (+28/-25) m4/ax_with_prog.m4 (+70/-0) m4/codeset.m4 (+21/-0) m4/fcntl-o.m4 (+81/-0) m4/gettext.m4 (+383/-0) m4/glibc2.m4 (+30/-0) m4/glibc21.m4 (+30/-0) m4/intdiv0.m4 (+84/-0) m4/intl.m4 (+294/-0) m4/intldir.m4 (+19/-0) m4/intlmacosx.m4 (+51/-0) m4/intmax.m4 (+33/-0) m4/inttypes-pri.m4 (+36/-0) m4/inttypes_h.m4 (+26/-0) m4/lcmessage.m4 (+31/-0) m4/lock.m4 (+37/-0) m4/longlong.m4 (+106/-0) m4/printf-posix.m4 (+45/-0) m4/size_max.m4 (+75/-0) m4/stdint_h.m4 (+26/-0) m4/threadlib.m4 (+347/-0) m4/uintmax_t.m4 (+30/-0) m4/wchar_t.m4 (+20/-0) m4/wint_t.m4 (+28/-0) m4/xsize.m4 (+13/-0) |
To merge this branch: | bzr merge lp:~brianaker/drizzle/m4-july |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Drizzle Trunk | Pending | ||
Review via email: mp+173324@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'docs/include.am' | |||
2 | --- docs/include.am 2013-01-02 07:47:09 +0000 | |||
3 | +++ docs/include.am 2013-07-06 19:13:27 +0000 | |||
4 | @@ -2,6 +2,9 @@ | |||
5 | 2 | # included from Top Level Makefile.am | 2 | # included from Top Level Makefile.am |
6 | 3 | # All paths should be given relative to the root | 3 | # All paths should be given relative to the root |
7 | 4 | 4 | ||
8 | 5 | # Makefile for Sphinx documentation | ||
9 | 6 | # | ||
10 | 7 | |||
11 | 5 | EXTRA_DIST+= \ | 8 | EXTRA_DIST+= \ |
12 | 6 | ${top_srcdir}/docs/_static \ | 9 | ${top_srcdir}/docs/_static \ |
13 | 7 | ${top_srcdir}/docs/conf.py \ | 10 | ${top_srcdir}/docs/conf.py \ |
14 | @@ -18,49 +21,27 @@ | |||
15 | 18 | ${top_srcdir}/docs/*/*.rst \ | 21 | ${top_srcdir}/docs/*/*.rst \ |
16 | 19 | ${top_srcdir}/docs/*/*/*.rst | 22 | ${top_srcdir}/docs/*/*/*.rst |
17 | 20 | 23 | ||
18 | 21 | # Makefile for Sphinx documentation | ||
19 | 22 | # | ||
20 | 23 | |||
21 | 24 | SPHINXOPTS = ${SPHINX_WARNINGS} -q | 24 | SPHINXOPTS = ${SPHINX_WARNINGS} -q |
22 | 25 | PAPER = | 25 | PAPER = |
24 | 26 | SPHINX_BUILDDIR = ${abs_top_builddir}/docs | 26 | SPHINX_BUILDDIR = ${abs_srcdir}/docs |
25 | 27 | 27 | ||
26 | 28 | # Internal variables. | 28 | # Internal variables. |
27 | 29 | PAPEROPT_a4 = -D latex_paper_size=a4 | 29 | PAPEROPT_a4 = -D latex_paper_size=a4 |
28 | 30 | PAPEROPT_letter = -D latex_paper_size=letter | 30 | PAPEROPT_letter = -D latex_paper_size=letter |
30 | 31 | ALLSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SPHINX_BUILDDIR) | 31 | ALLSPHINXOPTS = -c $(top_builddir)/docs $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SPHINX_BUILDDIR) |
31 | 32 | 32 | ||
32 | 33 | .PHONY: clean-docs-check | 33 | .PHONY: clean-docs-check |
33 | 34 | clean-docs-check: | 34 | clean-docs-check: |
35 | 35 | -rm -rf docs/_build docs/doctrees man/.doctrees/ | 35 | -rm -rf docs/_build docs/doctrees man/.doctrees |
36 | 36 | 36 | ||
37 | 37 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest | 37 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest |
60 | 38 | if HAVE_SPHINX | 38 | |
61 | 39 | 39 | man: docs/conf.py | |
62 | 40 | sphinx-help: | 40 | @PYTHONPATH=$(SPHINX_BUILDDIR)/docs $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) ${top_builddir}/man |
41 | 41 | @echo "Please use \`make <target>' where <target> is one of" | ||
42 | 42 | @echo " html to make standalone HTML files" | ||
43 | 43 | @echo " singlehtml to make a single large HTML file" | ||
44 | 44 | @echo " pickle to make pickle files" | ||
45 | 45 | @echo " json to make JSON files" | ||
46 | 46 | @echo " htmlhelp to make HTML files and a HTML help project" | ||
47 | 47 | @echo " qthelp to make HTML files and a qthelp project" | ||
48 | 48 | @echo " devhelp to make HTML files and a Devhelp project" | ||
49 | 49 | @echo " epub to make an epub" | ||
50 | 50 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" | ||
51 | 51 | @echo " latexpdf to make LaTeX files and run them through pdflatex" | ||
52 | 52 | @echo " text to make text files" | ||
53 | 53 | @echo " man to make manual pages" | ||
54 | 54 | @echo " changes to make an overview of all changed/added/deprecated items" | ||
55 | 55 | @echo " linkcheck to check all external links for integrity" | ||
56 | 56 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" | ||
57 | 57 | |||
58 | 58 | doc_dirs: | ||
59 | 59 | @$(mkdir_p) $(SPHINX_BUILDDIR)/_static | ||
63 | 60 | 41 | ||
64 | 61 | install-html-local: html-local | 42 | install-html-local: html-local |
67 | 62 | @rm -rf $(htmldir)/html | 43 | @$(MKDIR_P) $(htmldir)/html |
68 | 63 | @cp -r ${top_builddir}/html/ $(htmldir) | 44 | @cp -r ${top_builddir}/html $(htmldir)/ |
69 | 64 | 45 | ||
70 | 65 | html-local: docs/conf.py | 46 | html-local: docs/conf.py |
71 | 66 | @PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) ${top_builddir}/html | 47 | @PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) ${top_builddir}/html |
72 | @@ -105,16 +86,6 @@ | |||
73 | 105 | text: docs/conf.py | 86 | text: docs/conf.py |
74 | 106 | @PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/text | 87 | @PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/text |
75 | 107 | 88 | ||
76 | 108 | if HAVE_RECENT_SPHINX | ||
77 | 109 | man: | ||
78 | 110 | @PYTHONPATH=$(SPHINX_BUILDDIR)/docs $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) ${top_builddir}/man | ||
79 | 111 | |||
80 | 112 | else | ||
81 | 113 | |||
82 | 114 | man: | ||
83 | 115 | |||
84 | 116 | endif | ||
85 | 117 | |||
86 | 118 | changes: docs/conf.py | 89 | changes: docs/conf.py |
87 | 119 | @PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/changes | 90 | @PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/changes |
88 | 120 | 91 | ||
89 | @@ -125,9 +96,3 @@ | |||
90 | 125 | PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/doctest | 96 | PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/doctest |
91 | 126 | @echo "Testing of doctests in the sources finished, look at the " \ | 97 | @echo "Testing of doctests in the sources finished, look at the " \ |
92 | 127 | "results in $(SPHINX_BUILDDIR)/doctest/output.txt." | 98 | "results in $(SPHINX_BUILDDIR)/doctest/output.txt." |
93 | 128 | |||
94 | 129 | else | ||
95 | 130 | |||
96 | 131 | man: | ||
97 | 132 | |||
98 | 133 | endif | ||
99 | 134 | 99 | ||
100 | === modified file 'm4/ax_prog_sphinx_build.m4' | |||
101 | --- m4/ax_prog_sphinx_build.m4 2012-12-28 23:09:22 +0000 | |||
102 | +++ m4/ax_prog_sphinx_build.m4 2013-07-06 19:13:27 +0000 | |||
103 | @@ -4,42 +4,45 @@ | |||
104 | 4 | # | 4 | # |
105 | 5 | # SYNOPSIS | 5 | # SYNOPSIS |
106 | 6 | # | 6 | # |
108 | 7 | # AX_PROG_SPHINX_BUILD() | 7 | # AX_PROG_SPHINX_BUILD([ACTION-IF-FOUND], [ACTION-IF-NOT_FOUND]) |
109 | 8 | # | 8 | # |
110 | 9 | # DESCRIPTION | 9 | # DESCRIPTION |
111 | 10 | # | 10 | # |
113 | 11 | # Look for sphinx-build | 11 | # Look for sphinx-build and make sure it is a recent version of it. |
114 | 12 | # | 12 | # |
115 | 13 | # LICENSE | 13 | # LICENSE |
116 | 14 | # | 14 | # |
118 | 15 | # Copyright (c) 2012 Brian Aker <brian@tangent.org> | 15 | # Copyright (c) 2012-2013 Brian Aker <brian@tangent.org> |
119 | 16 | # | 16 | # |
120 | 17 | # Copying and distribution of this file, with or without modification, are | 17 | # Copying and distribution of this file, with or without modification, are |
121 | 18 | # permitted in any medium without royalty provided the copyright notice | 18 | # permitted in any medium without royalty provided the copyright notice |
122 | 19 | # and this notice are preserved. This file is offered as-is, without any | 19 | # and this notice are preserved. This file is offered as-is, without any |
123 | 20 | # warranty. | 20 | # warranty. |
124 | 21 | 21 | ||
126 | 22 | #serial 2 | 22 | #serial 5 |
127 | 23 | 23 | ||
128 | 24 | AC_DEFUN([AX_PROG_SPHINX_BUILD], | 24 | AC_DEFUN([AX_PROG_SPHINX_BUILD], |
150 | 25 | [AC_PREREQ([2.63])dnl | 25 | [AX_WITH_PROG([SPHINXBUILD],[sphinx-build],[:]) |
151 | 26 | AC_CHECK_PROGS([PERL], [perl]) | 26 | AS_IF([test x"SPHINXBUILD" = x":"], |
152 | 27 | AC_CHECK_PROGS([DPKG_GENSYMBOLS], [dpkg-gensymbols], [:]) | 27 | [SPHINXBUILD=], |
153 | 28 | AC_CHECK_PROGS([LCOV], [lcov], [echo lcov not found]) | 28 | [AS_IF([test -x "$SPHINXBUILD"], |
154 | 29 | AC_CHECK_PROGS([LCOV_GENHTML], [genhtml], [echo genhtml not found]) | 29 | [AC_MSG_CHECKING([Checking to see if $SPHINXBUILD is recent]) |
155 | 30 | 30 | junk=`$SPHINXBUILD --version &> version_file` | |
156 | 31 | AC_CHECK_PROGS([SPHINXBUILD], [sphinx-build], [:]) | 31 | AS_IF([test $? -eq 0], |
157 | 32 | AS_IF([test "x${SPHINXBUILD}" != "x:"],[ | 32 | [ax_sphinx_build_version=`head -1 version_file`], |
158 | 33 | AC_CACHE_CHECK([if sphinx is new enough],[ac_cv_recent_sphinx],[ | 33 | [junk=`$SPHINXBUILD &> version_file` |
159 | 34 | 34 | ax_sphinx_build_version=`head -1 version_file` | |
160 | 35 | ${SPHINXBUILD} -Q -C -b man -d conftest.d . . >/dev/null 2>&1 | 35 | rm version_file |
161 | 36 | AS_IF([test $? -eq 0],[ac_cv_recent_sphinx=yes], | 36 | AC_MSG_RESULT([$SPHINXBUILD is version "$ax_sphinx_build_version"]) |
162 | 37 | [ac_cv_recent_sphinx=no]) | 37 | $SPHINXBUILD -Q -C -b man -d conftest.d . . >/dev/null 2>&1 |
163 | 38 | rm -rf conftest.d | 38 | AS_IF([test $? -eq 0], ,[SPHINXBUILD=]) |
164 | 39 | ]) | 39 | rm -rf conftest.d ]) |
165 | 40 | ]) | 40 | ]) |
166 | 41 | 41 | rm -f version_file | |
167 | 42 | AM_CONDITIONAL([HAVE_DPKG_GENSYMBOLS],[test "x${DPKG_GENSYMBOLS}" != "x:"]) | 42 | ]) |
168 | 43 | AM_CONDITIONAL([HAVE_SPHINX],[test "x${SPHINXBUILD}" != "x:"]) | 43 | |
169 | 44 | AM_CONDITIONAL([HAVE_RECENT_SPHINX],[test "x${ac_cv_recent_sphinx}" = "xyes"]) | 44 | AS_IF([test -n "${SPHINXBUILD}"], |
170 | 45 | ]) | 45 | [AC_SUBST([SPHINXBUILD]) |
171 | 46 | ifelse([$1], , :, [$1])], | ||
172 | 47 | [ifelse([$2], , :, [$2])]) | ||
173 | 48 | ]) | ||
174 | 46 | 49 | ||
175 | === added file 'm4/ax_with_prog.m4' | |||
176 | --- m4/ax_with_prog.m4 1970-01-01 00:00:00 +0000 | |||
177 | +++ m4/ax_with_prog.m4 2013-07-06 19:13:27 +0000 | |||
178 | @@ -0,0 +1,70 @@ | |||
179 | 1 | # =========================================================================== | ||
180 | 2 | # http://www.gnu.org/software/autoconf-archive/ax_with_prog.html | ||
181 | 3 | # =========================================================================== | ||
182 | 4 | # | ||
183 | 5 | # SYNOPSIS | ||
184 | 6 | # | ||
185 | 7 | # AX_WITH_PROG([VARIABLE],[program],[VALUE-IF-NOT-FOUND],[PATH]) | ||
186 | 8 | # | ||
187 | 9 | # DESCRIPTION | ||
188 | 10 | # | ||
189 | 11 | # Locates an installed program binary, placing the result in the precious | ||
190 | 12 | # variable VARIABLE. Accepts a present VARIABLE, then --with-program, and | ||
191 | 13 | # failing that searches for program in the given path (which defaults to | ||
192 | 14 | # the system path). If program is found, VARIABLE is set to the full path | ||
193 | 15 | # of the binary; if it is not found VARIABLE is set to VALUE-IF-NOT-FOUND | ||
194 | 16 | # if provided, unchanged otherwise. | ||
195 | 17 | # | ||
196 | 18 | # A typical example could be the following one: | ||
197 | 19 | # | ||
198 | 20 | # AX_WITH_PROG(PERL,perl) | ||
199 | 21 | # | ||
200 | 22 | # NOTE: This macro is based upon the original AX_WITH_PYTHON macro from | ||
201 | 23 | # Dustin J. Mitchell <dustin@cs.uchicago.edu>. | ||
202 | 24 | # | ||
203 | 25 | # LICENSE | ||
204 | 26 | # | ||
205 | 27 | # Copyright (c) 2008 Francesco Salvestrini <salvestrini@users.sourceforge.net> | ||
206 | 28 | # Copyright (c) 2008 Dustin J. Mitchell <dustin@cs.uchicago.edu> | ||
207 | 29 | # | ||
208 | 30 | # Copying and distribution of this file, with or without modification, are | ||
209 | 31 | # permitted in any medium without royalty provided the copyright notice | ||
210 | 32 | # and this notice are preserved. This file is offered as-is, without any | ||
211 | 33 | # warranty. | ||
212 | 34 | |||
213 | 35 | #serial 16 | ||
214 | 36 | |||
215 | 37 | AC_DEFUN([AX_WITH_PROG],[ | ||
216 | 38 | AC_PREREQ([2.61]) | ||
217 | 39 | |||
218 | 40 | pushdef([VARIABLE],$1) | ||
219 | 41 | pushdef([EXECUTABLE],$2) | ||
220 | 42 | pushdef([VALUE_IF_NOT_FOUND],$3) | ||
221 | 43 | pushdef([PATH_PROG],$4) | ||
222 | 44 | |||
223 | 45 | AC_ARG_VAR(VARIABLE,Absolute path to EXECUTABLE executable) | ||
224 | 46 | |||
225 | 47 | AS_IF(test -z "$VARIABLE",[ | ||
226 | 48 | AC_MSG_CHECKING(whether EXECUTABLE executable path has been provided) | ||
227 | 49 | AC_ARG_WITH(EXECUTABLE,AS_HELP_STRING([--with-EXECUTABLE=[[[PATH]]]],absolute path to EXECUTABLE executable), [ | ||
228 | 50 | AS_IF([test "$withval" != yes && test "$withval" != no],[ | ||
229 | 51 | VARIABLE="$withval" | ||
230 | 52 | AC_MSG_RESULT($VARIABLE) | ||
231 | 53 | ],[ | ||
232 | 54 | VARIABLE="" | ||
233 | 55 | AC_MSG_RESULT([no]) | ||
234 | 56 | AS_IF([test "$withval" != no], [ | ||
235 | 57 | AC_PATH_PROG([]VARIABLE[],[]EXECUTABLE[],[]VALUE_IF_NOT_FOUND[],[]PATH_PROG[]) | ||
236 | 58 | ]) | ||
237 | 59 | ]) | ||
238 | 60 | ],[ | ||
239 | 61 | AC_MSG_RESULT([no]) | ||
240 | 62 | AC_PATH_PROG([]VARIABLE[],[]EXECUTABLE[],[]VALUE_IF_NOT_FOUND[],[]PATH_PROG[]) | ||
241 | 63 | ]) | ||
242 | 64 | ]) | ||
243 | 65 | |||
244 | 66 | popdef([PATH_PROG]) | ||
245 | 67 | popdef([VALUE_IF_NOT_FOUND]) | ||
246 | 68 | popdef([EXECUTABLE]) | ||
247 | 69 | popdef([VARIABLE]) | ||
248 | 70 | ]) | ||
249 | 0 | 71 | ||
250 | === added file 'm4/codeset.m4' | |||
251 | --- m4/codeset.m4 1970-01-01 00:00:00 +0000 | |||
252 | +++ m4/codeset.m4 2013-07-06 19:13:27 +0000 | |||
253 | @@ -0,0 +1,21 @@ | |||
254 | 1 | # codeset.m4 serial 4 (gettext-0.18) | ||
255 | 2 | dnl Copyright (C) 2000-2002, 2006, 2008-2010 Free Software Foundation, Inc. | ||
256 | 3 | dnl This file is free software; the Free Software Foundation | ||
257 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
258 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
259 | 6 | |||
260 | 7 | dnl From Bruno Haible. | ||
261 | 8 | |||
262 | 9 | AC_DEFUN([AM_LANGINFO_CODESET], | ||
263 | 10 | [ | ||
264 | 11 | AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], | ||
265 | 12 | [AC_TRY_LINK([#include <langinfo.h>], | ||
266 | 13 | [char* cs = nl_langinfo(CODESET); return !cs;], | ||
267 | 14 | [am_cv_langinfo_codeset=yes], | ||
268 | 15 | [am_cv_langinfo_codeset=no]) | ||
269 | 16 | ]) | ||
270 | 17 | if test $am_cv_langinfo_codeset = yes; then | ||
271 | 18 | AC_DEFINE([HAVE_LANGINFO_CODESET], [1], | ||
272 | 19 | [Define if you have <langinfo.h> and nl_langinfo(CODESET).]) | ||
273 | 20 | fi | ||
274 | 21 | ]) | ||
275 | 0 | 22 | ||
276 | === added file 'm4/fcntl-o.m4' | |||
277 | --- m4/fcntl-o.m4 1970-01-01 00:00:00 +0000 | |||
278 | +++ m4/fcntl-o.m4 2013-07-06 19:13:27 +0000 | |||
279 | @@ -0,0 +1,81 @@ | |||
280 | 1 | # fcntl-o.m4 serial 1 | ||
281 | 2 | dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc. | ||
282 | 3 | dnl This file is free software; the Free Software Foundation | ||
283 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
284 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
285 | 6 | |||
286 | 7 | dnl Written by Paul Eggert. | ||
287 | 8 | |||
288 | 9 | # Test whether the flags O_NOATIME and O_NOFOLLOW actually work. | ||
289 | 10 | # Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise. | ||
290 | 11 | # Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise. | ||
291 | 12 | AC_DEFUN([gl_FCNTL_O_FLAGS], | ||
292 | 13 | [ | ||
293 | 14 | dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW. | ||
294 | 15 | AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) | ||
295 | 16 | AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], | ||
296 | 17 | [AC_RUN_IFELSE( | ||
297 | 18 | [AC_LANG_PROGRAM( | ||
298 | 19 | [[#include <sys/types.h> | ||
299 | 20 | #include <sys/stat.h> | ||
300 | 21 | #include <unistd.h> | ||
301 | 22 | #include <fcntl.h> | ||
302 | 23 | #ifndef O_NOATIME | ||
303 | 24 | #define O_NOATIME 0 | ||
304 | 25 | #endif | ||
305 | 26 | #ifndef O_NOFOLLOW | ||
306 | 27 | #define O_NOFOLLOW 0 | ||
307 | 28 | #endif | ||
308 | 29 | static int const constants[] = | ||
309 | 30 | { | ||
310 | 31 | O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, | ||
311 | 32 | O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY | ||
312 | 33 | }; | ||
313 | 34 | ]], | ||
314 | 35 | [[ | ||
315 | 36 | int status = !constants; | ||
316 | 37 | { | ||
317 | 38 | static char const sym[] = "conftest.sym"; | ||
318 | 39 | if (symlink (".", sym) != 0 | ||
319 | 40 | || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0) | ||
320 | 41 | status |= 32; | ||
321 | 42 | unlink (sym); | ||
322 | 43 | } | ||
323 | 44 | { | ||
324 | 45 | static char const file[] = "confdefs.h"; | ||
325 | 46 | int fd = open (file, O_RDONLY | O_NOATIME); | ||
326 | 47 | char c; | ||
327 | 48 | struct stat st0, st1; | ||
328 | 49 | if (fd < 0 | ||
329 | 50 | || fstat (fd, &st0) != 0 | ||
330 | 51 | || sleep (1) != 0 | ||
331 | 52 | || read (fd, &c, 1) != 1 | ||
332 | 53 | || close (fd) != 0 | ||
333 | 54 | || stat (file, &st1) != 0 | ||
334 | 55 | || st0.st_atime != st1.st_atime) | ||
335 | 56 | status |= 64; | ||
336 | 57 | } | ||
337 | 58 | return status;]])], | ||
338 | 59 | [gl_cv_header_working_fcntl_h=yes], | ||
339 | 60 | [case $? in #( | ||
340 | 61 | 32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( | ||
341 | 62 | 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( | ||
342 | 63 | 96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( | ||
343 | 64 | *) gl_cv_header_working_fcntl_h='no';; | ||
344 | 65 | esac], | ||
345 | 66 | [gl_cv_header_working_fcntl_h=cross-compiling])]) | ||
346 | 67 | |||
347 | 68 | case $gl_cv_header_working_fcntl_h in #( | ||
348 | 69 | *O_NOATIME* | no | cross-compiling) ac_val=0;; #( | ||
349 | 70 | *) ac_val=1;; | ||
350 | 71 | esac | ||
351 | 72 | AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val], | ||
352 | 73 | [Define to 1 if O_NOATIME works.]) | ||
353 | 74 | |||
354 | 75 | case $gl_cv_header_working_fcntl_h in #( | ||
355 | 76 | *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( | ||
356 | 77 | *) ac_val=1;; | ||
357 | 78 | esac | ||
358 | 79 | AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val], | ||
359 | 80 | [Define to 1 if O_NOFOLLOW works.]) | ||
360 | 81 | ]) | ||
361 | 0 | 82 | ||
362 | === added file 'm4/gettext.m4' | |||
363 | --- m4/gettext.m4 1970-01-01 00:00:00 +0000 | |||
364 | +++ m4/gettext.m4 2013-07-06 19:13:27 +0000 | |||
365 | @@ -0,0 +1,383 @@ | |||
366 | 1 | # gettext.m4 serial 63 (gettext-0.18) | ||
367 | 2 | dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. | ||
368 | 3 | dnl This file is free software; the Free Software Foundation | ||
369 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
370 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
371 | 6 | dnl | ||
372 | 7 | dnl This file can can be used in projects which are not available under | ||
373 | 8 | dnl the GNU General Public License or the GNU Library General Public | ||
374 | 9 | dnl License but which still want to provide support for the GNU gettext | ||
375 | 10 | dnl functionality. | ||
376 | 11 | dnl Please note that the actual code of the GNU gettext library is covered | ||
377 | 12 | dnl by the GNU Library General Public License, and the rest of the GNU | ||
378 | 13 | dnl gettext package package is covered by the GNU General Public License. | ||
379 | 14 | dnl They are *not* in the public domain. | ||
380 | 15 | |||
381 | 16 | dnl Authors: | ||
382 | 17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | ||
383 | 18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010. | ||
384 | 19 | |||
385 | 20 | dnl Macro to add for using GNU gettext. | ||
386 | 21 | |||
387 | 22 | dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). | ||
388 | 23 | dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The | ||
389 | 24 | dnl default (if it is not specified or empty) is 'no-libtool'. | ||
390 | 25 | dnl INTLSYMBOL should be 'external' for packages with no intl directory, | ||
391 | 26 | dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. | ||
392 | 27 | dnl If INTLSYMBOL is 'use-libtool', then a libtool library | ||
393 | 28 | dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, | ||
394 | 29 | dnl depending on --{enable,disable}-{shared,static} and on the presence of | ||
395 | 30 | dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library | ||
396 | 31 | dnl $(top_builddir)/intl/libintl.a will be created. | ||
397 | 32 | dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext | ||
398 | 33 | dnl implementations (in libc or libintl) without the ngettext() function | ||
399 | 34 | dnl will be ignored. If NEEDSYMBOL is specified and is | ||
400 | 35 | dnl 'need-formatstring-macros', then GNU gettext implementations that don't | ||
401 | 36 | dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. | ||
402 | 37 | dnl INTLDIR is used to find the intl libraries. If empty, | ||
403 | 38 | dnl the value `$(top_builddir)/intl/' is used. | ||
404 | 39 | dnl | ||
405 | 40 | dnl The result of the configuration is one of three cases: | ||
406 | 41 | dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled | ||
407 | 42 | dnl and used. | ||
408 | 43 | dnl Catalog format: GNU --> install in $(datadir) | ||
409 | 44 | dnl Catalog extension: .mo after installation, .gmo in source tree | ||
410 | 45 | dnl 2) GNU gettext has been found in the system's C library. | ||
411 | 46 | dnl Catalog format: GNU --> install in $(datadir) | ||
412 | 47 | dnl Catalog extension: .mo after installation, .gmo in source tree | ||
413 | 48 | dnl 3) No internationalization, always use English msgid. | ||
414 | 49 | dnl Catalog format: none | ||
415 | 50 | dnl Catalog extension: none | ||
416 | 51 | dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. | ||
417 | 52 | dnl The use of .gmo is historical (it was needed to avoid overwriting the | ||
418 | 53 | dnl GNU format catalogs when building on a platform with an X/Open gettext), | ||
419 | 54 | dnl but we keep it in order not to force irrelevant filename changes on the | ||
420 | 55 | dnl maintainers. | ||
421 | 56 | dnl | ||
422 | 57 | AC_DEFUN([AM_GNU_GETTEXT], | ||
423 | 58 | [ | ||
424 | 59 | dnl Argument checking. | ||
425 | 60 | ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , | ||
426 | 61 | [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT | ||
427 | 62 | ])])])])]) | ||
428 | 63 | ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], | ||
429 | 64 | [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) | ||
430 | 65 | ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , | ||
431 | 66 | [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT | ||
432 | 67 | ])])])]) | ||
433 | 68 | define([gt_included_intl], | ||
434 | 69 | ifelse([$1], [external], | ||
435 | 70 | ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), | ||
436 | 71 | [yes])) | ||
437 | 72 | define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) | ||
438 | 73 | gt_NEEDS_INIT | ||
439 | 74 | AM_GNU_GETTEXT_NEED([$2]) | ||
440 | 75 | |||
441 | 76 | AC_REQUIRE([AM_PO_SUBDIRS])dnl | ||
442 | 77 | ifelse(gt_included_intl, yes, [ | ||
443 | 78 | AC_REQUIRE([AM_INTL_SUBDIR])dnl | ||
444 | 79 | ]) | ||
445 | 80 | |||
446 | 81 | dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. | ||
447 | 82 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
448 | 83 | AC_REQUIRE([AC_LIB_RPATH]) | ||
449 | 84 | |||
450 | 85 | dnl Sometimes libintl requires libiconv, so first search for libiconv. | ||
451 | 86 | dnl Ideally we would do this search only after the | ||
452 | 87 | dnl if test "$USE_NLS" = "yes"; then | ||
453 | 88 | dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then | ||
454 | 89 | dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT | ||
455 | 90 | dnl the configure script would need to contain the same shell code | ||
456 | 91 | dnl again, outside any 'if'. There are two solutions: | ||
457 | 92 | dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. | ||
458 | 93 | dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. | ||
459 | 94 | dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not | ||
460 | 95 | dnl documented, we avoid it. | ||
461 | 96 | ifelse(gt_included_intl, yes, , [ | ||
462 | 97 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) | ||
463 | 98 | ]) | ||
464 | 99 | |||
465 | 100 | dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. | ||
466 | 101 | gt_INTL_MACOSX | ||
467 | 102 | |||
468 | 103 | dnl Set USE_NLS. | ||
469 | 104 | AC_REQUIRE([AM_NLS]) | ||
470 | 105 | |||
471 | 106 | ifelse(gt_included_intl, yes, [ | ||
472 | 107 | BUILD_INCLUDED_LIBINTL=no | ||
473 | 108 | USE_INCLUDED_LIBINTL=no | ||
474 | 109 | ]) | ||
475 | 110 | LIBINTL= | ||
476 | 111 | LTLIBINTL= | ||
477 | 112 | POSUB= | ||
478 | 113 | |||
479 | 114 | dnl Add a version number to the cache macros. | ||
480 | 115 | case " $gt_needs " in | ||
481 | 116 | *" need-formatstring-macros "*) gt_api_version=3 ;; | ||
482 | 117 | *" need-ngettext "*) gt_api_version=2 ;; | ||
483 | 118 | *) gt_api_version=1 ;; | ||
484 | 119 | esac | ||
485 | 120 | gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" | ||
486 | 121 | gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" | ||
487 | 122 | |||
488 | 123 | dnl If we use NLS figure out what method | ||
489 | 124 | if test "$USE_NLS" = "yes"; then | ||
490 | 125 | gt_use_preinstalled_gnugettext=no | ||
491 | 126 | ifelse(gt_included_intl, yes, [ | ||
492 | 127 | AC_MSG_CHECKING([whether included gettext is requested]) | ||
493 | 128 | AC_ARG_WITH([included-gettext], | ||
494 | 129 | [ --with-included-gettext use the GNU gettext library included here], | ||
495 | 130 | nls_cv_force_use_gnu_gettext=$withval, | ||
496 | 131 | nls_cv_force_use_gnu_gettext=no) | ||
497 | 132 | AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) | ||
498 | 133 | |||
499 | 134 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | ||
500 | 135 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | ||
501 | 136 | ]) | ||
502 | 137 | dnl User does not insist on using GNU NLS library. Figure out what | ||
503 | 138 | dnl to use. If GNU gettext is available we use this. Else we have | ||
504 | 139 | dnl to fall back to GNU NLS library. | ||
505 | 140 | |||
506 | 141 | if test $gt_api_version -ge 3; then | ||
507 | 142 | gt_revision_test_code=' | ||
508 | 143 | #ifndef __GNU_GETTEXT_SUPPORTED_REVISION | ||
509 | 144 | #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) | ||
510 | 145 | #endif | ||
511 | 146 | changequote(,)dnl | ||
512 | 147 | typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; | ||
513 | 148 | changequote([,])dnl | ||
514 | 149 | ' | ||
515 | 150 | else | ||
516 | 151 | gt_revision_test_code= | ||
517 | 152 | fi | ||
518 | 153 | if test $gt_api_version -ge 2; then | ||
519 | 154 | gt_expression_test_code=' + * ngettext ("", "", 0)' | ||
520 | 155 | else | ||
521 | 156 | gt_expression_test_code= | ||
522 | 157 | fi | ||
523 | 158 | |||
524 | 159 | AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], | ||
525 | 160 | [AC_TRY_LINK([#include <libintl.h> | ||
526 | 161 | $gt_revision_test_code | ||
527 | 162 | extern int _nl_msg_cat_cntr; | ||
528 | 163 | extern int *_nl_domain_bindings;], | ||
529 | 164 | [bindtextdomain ("", ""); | ||
530 | 165 | return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], | ||
531 | 166 | [eval "$gt_func_gnugettext_libc=yes"], | ||
532 | 167 | [eval "$gt_func_gnugettext_libc=no"])]) | ||
533 | 168 | |||
534 | 169 | if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then | ||
535 | 170 | dnl Sometimes libintl requires libiconv, so first search for libiconv. | ||
536 | 171 | ifelse(gt_included_intl, yes, , [ | ||
537 | 172 | AM_ICONV_LINK | ||
538 | 173 | ]) | ||
539 | 174 | dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL | ||
540 | 175 | dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) | ||
541 | 176 | dnl because that would add "-liconv" to LIBINTL and LTLIBINTL | ||
542 | 177 | dnl even if libiconv doesn't exist. | ||
543 | 178 | AC_LIB_LINKFLAGS_BODY([intl]) | ||
544 | 179 | AC_CACHE_CHECK([for GNU gettext in libintl], | ||
545 | 180 | [$gt_func_gnugettext_libintl], | ||
546 | 181 | [gt_save_CPPFLAGS="$CPPFLAGS" | ||
547 | 182 | CPPFLAGS="$CPPFLAGS $INCINTL" | ||
548 | 183 | gt_save_LIBS="$LIBS" | ||
549 | 184 | LIBS="$LIBS $LIBINTL" | ||
550 | 185 | dnl Now see whether libintl exists and does not depend on libiconv. | ||
551 | 186 | AC_TRY_LINK([#include <libintl.h> | ||
552 | 187 | $gt_revision_test_code | ||
553 | 188 | extern int _nl_msg_cat_cntr; | ||
554 | 189 | extern | ||
555 | 190 | #ifdef __cplusplus | ||
556 | 191 | "C" | ||
557 | 192 | #endif | ||
558 | 193 | const char *_nl_expand_alias (const char *);], | ||
559 | 194 | [bindtextdomain ("", ""); | ||
560 | 195 | return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], | ||
561 | 196 | [eval "$gt_func_gnugettext_libintl=yes"], | ||
562 | 197 | [eval "$gt_func_gnugettext_libintl=no"]) | ||
563 | 198 | dnl Now see whether libintl exists and depends on libiconv. | ||
564 | 199 | if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then | ||
565 | 200 | LIBS="$LIBS $LIBICONV" | ||
566 | 201 | AC_TRY_LINK([#include <libintl.h> | ||
567 | 202 | $gt_revision_test_code | ||
568 | 203 | extern int _nl_msg_cat_cntr; | ||
569 | 204 | extern | ||
570 | 205 | #ifdef __cplusplus | ||
571 | 206 | "C" | ||
572 | 207 | #endif | ||
573 | 208 | const char *_nl_expand_alias (const char *);], | ||
574 | 209 | [bindtextdomain ("", ""); | ||
575 | 210 | return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], | ||
576 | 211 | [LIBINTL="$LIBINTL $LIBICONV" | ||
577 | 212 | LTLIBINTL="$LTLIBINTL $LTLIBICONV" | ||
578 | 213 | eval "$gt_func_gnugettext_libintl=yes" | ||
579 | 214 | ]) | ||
580 | 215 | fi | ||
581 | 216 | CPPFLAGS="$gt_save_CPPFLAGS" | ||
582 | 217 | LIBS="$gt_save_LIBS"]) | ||
583 | 218 | fi | ||
584 | 219 | |||
585 | 220 | dnl If an already present or preinstalled GNU gettext() is found, | ||
586 | 221 | dnl use it. But if this macro is used in GNU gettext, and GNU | ||
587 | 222 | dnl gettext is already preinstalled in libintl, we update this | ||
588 | 223 | dnl libintl. (Cf. the install rule in intl/Makefile.in.) | ||
589 | 224 | if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ | ||
590 | 225 | || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ | ||
591 | 226 | && test "$PACKAGE" != gettext-runtime \ | ||
592 | 227 | && test "$PACKAGE" != gettext-tools; }; then | ||
593 | 228 | gt_use_preinstalled_gnugettext=yes | ||
594 | 229 | else | ||
595 | 230 | dnl Reset the values set by searching for libintl. | ||
596 | 231 | LIBINTL= | ||
597 | 232 | LTLIBINTL= | ||
598 | 233 | INCINTL= | ||
599 | 234 | fi | ||
600 | 235 | |||
601 | 236 | ifelse(gt_included_intl, yes, [ | ||
602 | 237 | if test "$gt_use_preinstalled_gnugettext" != "yes"; then | ||
603 | 238 | dnl GNU gettext is not found in the C library. | ||
604 | 239 | dnl Fall back on included GNU gettext library. | ||
605 | 240 | nls_cv_use_gnu_gettext=yes | ||
606 | 241 | fi | ||
607 | 242 | fi | ||
608 | 243 | |||
609 | 244 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | ||
610 | 245 | dnl Mark actions used to generate GNU NLS library. | ||
611 | 246 | BUILD_INCLUDED_LIBINTL=yes | ||
612 | 247 | USE_INCLUDED_LIBINTL=yes | ||
613 | 248 | LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" | ||
614 | 249 | LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" | ||
615 | 250 | LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` | ||
616 | 251 | fi | ||
617 | 252 | |||
618 | 253 | CATOBJEXT= | ||
619 | 254 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ | ||
620 | 255 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | ||
621 | 256 | dnl Mark actions to use GNU gettext tools. | ||
622 | 257 | CATOBJEXT=.gmo | ||
623 | 258 | fi | ||
624 | 259 | ]) | ||
625 | 260 | |||
626 | 261 | if test -n "$INTL_MACOSX_LIBS"; then | ||
627 | 262 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ | ||
628 | 263 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | ||
629 | 264 | dnl Some extra flags are needed during linking. | ||
630 | 265 | LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" | ||
631 | 266 | LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" | ||
632 | 267 | fi | ||
633 | 268 | fi | ||
634 | 269 | |||
635 | 270 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ | ||
636 | 271 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | ||
637 | 272 | AC_DEFINE([ENABLE_NLS], [1], | ||
638 | 273 | [Define to 1 if translation of program messages to the user's native language | ||
639 | 274 | is requested.]) | ||
640 | 275 | else | ||
641 | 276 | USE_NLS=no | ||
642 | 277 | fi | ||
643 | 278 | fi | ||
644 | 279 | |||
645 | 280 | AC_MSG_CHECKING([whether to use NLS]) | ||
646 | 281 | AC_MSG_RESULT([$USE_NLS]) | ||
647 | 282 | if test "$USE_NLS" = "yes"; then | ||
648 | 283 | AC_MSG_CHECKING([where the gettext function comes from]) | ||
649 | 284 | if test "$gt_use_preinstalled_gnugettext" = "yes"; then | ||
650 | 285 | if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then | ||
651 | 286 | gt_source="external libintl" | ||
652 | 287 | else | ||
653 | 288 | gt_source="libc" | ||
654 | 289 | fi | ||
655 | 290 | else | ||
656 | 291 | gt_source="included intl directory" | ||
657 | 292 | fi | ||
658 | 293 | AC_MSG_RESULT([$gt_source]) | ||
659 | 294 | fi | ||
660 | 295 | |||
661 | 296 | if test "$USE_NLS" = "yes"; then | ||
662 | 297 | |||
663 | 298 | if test "$gt_use_preinstalled_gnugettext" = "yes"; then | ||
664 | 299 | if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then | ||
665 | 300 | AC_MSG_CHECKING([how to link with libintl]) | ||
666 | 301 | AC_MSG_RESULT([$LIBINTL]) | ||
667 | 302 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) | ||
668 | 303 | fi | ||
669 | 304 | |||
670 | 305 | dnl For backward compatibility. Some packages may be using this. | ||
671 | 306 | AC_DEFINE([HAVE_GETTEXT], [1], | ||
672 | 307 | [Define if the GNU gettext() function is already present or preinstalled.]) | ||
673 | 308 | AC_DEFINE([HAVE_DCGETTEXT], [1], | ||
674 | 309 | [Define if the GNU dcgettext() function is already present or preinstalled.]) | ||
675 | 310 | fi | ||
676 | 311 | |||
677 | 312 | dnl We need to process the po/ directory. | ||
678 | 313 | POSUB=po | ||
679 | 314 | fi | ||
680 | 315 | |||
681 | 316 | ifelse(gt_included_intl, yes, [ | ||
682 | 317 | dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL | ||
683 | 318 | dnl to 'yes' because some of the testsuite requires it. | ||
684 | 319 | if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then | ||
685 | 320 | BUILD_INCLUDED_LIBINTL=yes | ||
686 | 321 | fi | ||
687 | 322 | |||
688 | 323 | dnl Make all variables we use known to autoconf. | ||
689 | 324 | AC_SUBST([BUILD_INCLUDED_LIBINTL]) | ||
690 | 325 | AC_SUBST([USE_INCLUDED_LIBINTL]) | ||
691 | 326 | AC_SUBST([CATOBJEXT]) | ||
692 | 327 | |||
693 | 328 | dnl For backward compatibility. Some configure.ins may be using this. | ||
694 | 329 | nls_cv_header_intl= | ||
695 | 330 | nls_cv_header_libgt= | ||
696 | 331 | |||
697 | 332 | dnl For backward compatibility. Some Makefiles may be using this. | ||
698 | 333 | DATADIRNAME=share | ||
699 | 334 | AC_SUBST([DATADIRNAME]) | ||
700 | 335 | |||
701 | 336 | dnl For backward compatibility. Some Makefiles may be using this. | ||
702 | 337 | INSTOBJEXT=.mo | ||
703 | 338 | AC_SUBST([INSTOBJEXT]) | ||
704 | 339 | |||
705 | 340 | dnl For backward compatibility. Some Makefiles may be using this. | ||
706 | 341 | GENCAT=gencat | ||
707 | 342 | AC_SUBST([GENCAT]) | ||
708 | 343 | |||
709 | 344 | dnl For backward compatibility. Some Makefiles may be using this. | ||
710 | 345 | INTLOBJS= | ||
711 | 346 | if test "$USE_INCLUDED_LIBINTL" = yes; then | ||
712 | 347 | INTLOBJS="\$(GETTOBJS)" | ||
713 | 348 | fi | ||
714 | 349 | AC_SUBST([INTLOBJS]) | ||
715 | 350 | |||
716 | 351 | dnl Enable libtool support if the surrounding package wishes it. | ||
717 | 352 | INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix | ||
718 | 353 | AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) | ||
719 | 354 | ]) | ||
720 | 355 | |||
721 | 356 | dnl For backward compatibility. Some Makefiles may be using this. | ||
722 | 357 | INTLLIBS="$LIBINTL" | ||
723 | 358 | AC_SUBST([INTLLIBS]) | ||
724 | 359 | |||
725 | 360 | dnl Make all documented variables known to autoconf. | ||
726 | 361 | AC_SUBST([LIBINTL]) | ||
727 | 362 | AC_SUBST([LTLIBINTL]) | ||
728 | 363 | AC_SUBST([POSUB]) | ||
729 | 364 | ]) | ||
730 | 365 | |||
731 | 366 | |||
732 | 367 | dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. | ||
733 | 368 | m4_define([gt_NEEDS_INIT], | ||
734 | 369 | [ | ||
735 | 370 | m4_divert_text([DEFAULTS], [gt_needs=]) | ||
736 | 371 | m4_define([gt_NEEDS_INIT], []) | ||
737 | 372 | ]) | ||
738 | 373 | |||
739 | 374 | |||
740 | 375 | dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) | ||
741 | 376 | AC_DEFUN([AM_GNU_GETTEXT_NEED], | ||
742 | 377 | [ | ||
743 | 378 | m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) | ||
744 | 379 | ]) | ||
745 | 380 | |||
746 | 381 | |||
747 | 382 | dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) | ||
748 | 383 | AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) | ||
749 | 0 | 384 | ||
750 | === added file 'm4/glibc2.m4' | |||
751 | --- m4/glibc2.m4 1970-01-01 00:00:00 +0000 | |||
752 | +++ m4/glibc2.m4 2013-07-06 19:13:27 +0000 | |||
753 | @@ -0,0 +1,30 @@ | |||
754 | 1 | # glibc2.m4 serial 2 | ||
755 | 2 | dnl Copyright (C) 2000-2002, 2004, 2008-2010 Free Software Foundation, Inc. | ||
756 | 3 | dnl This file is free software; the Free Software Foundation | ||
757 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
758 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
759 | 6 | |||
760 | 7 | # Test for the GNU C Library, version 2.0 or newer. | ||
761 | 8 | # From Bruno Haible. | ||
762 | 9 | |||
763 | 10 | AC_DEFUN([gt_GLIBC2], | ||
764 | 11 | [ | ||
765 | 12 | AC_CACHE_CHECK([whether we are using the GNU C Library 2 or newer], | ||
766 | 13 | [ac_cv_gnu_library_2], | ||
767 | 14 | [AC_EGREP_CPP([Lucky GNU user], | ||
768 | 15 | [ | ||
769 | 16 | #include <features.h> | ||
770 | 17 | #ifdef __GNU_LIBRARY__ | ||
771 | 18 | #if (__GLIBC__ >= 2) | ||
772 | 19 | Lucky GNU user | ||
773 | 20 | #endif | ||
774 | 21 | #endif | ||
775 | 22 | ], | ||
776 | 23 | [ac_cv_gnu_library_2=yes], | ||
777 | 24 | [ac_cv_gnu_library_2=no]) | ||
778 | 25 | ] | ||
779 | 26 | ) | ||
780 | 27 | AC_SUBST([GLIBC2]) | ||
781 | 28 | GLIBC2="$ac_cv_gnu_library_2" | ||
782 | 29 | ] | ||
783 | 30 | ) | ||
784 | 0 | 31 | ||
785 | === added file 'm4/glibc21.m4' | |||
786 | --- m4/glibc21.m4 1970-01-01 00:00:00 +0000 | |||
787 | +++ m4/glibc21.m4 2013-07-06 19:13:27 +0000 | |||
788 | @@ -0,0 +1,30 @@ | |||
789 | 1 | # glibc21.m4 serial 4 | ||
790 | 2 | dnl Copyright (C) 2000-2002, 2004, 2008-2010 Free Software Foundation, Inc. | ||
791 | 3 | dnl This file is free software; the Free Software Foundation | ||
792 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
793 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
794 | 6 | |||
795 | 7 | # Test for the GNU C Library, version 2.1 or newer. | ||
796 | 8 | # From Bruno Haible. | ||
797 | 9 | |||
798 | 10 | AC_DEFUN([gl_GLIBC21], | ||
799 | 11 | [ | ||
800 | 12 | AC_CACHE_CHECK([whether we are using the GNU C Library 2.1 or newer], | ||
801 | 13 | [ac_cv_gnu_library_2_1], | ||
802 | 14 | [AC_EGREP_CPP([Lucky GNU user], | ||
803 | 15 | [ | ||
804 | 16 | #include <features.h> | ||
805 | 17 | #ifdef __GNU_LIBRARY__ | ||
806 | 18 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) | ||
807 | 19 | Lucky GNU user | ||
808 | 20 | #endif | ||
809 | 21 | #endif | ||
810 | 22 | ], | ||
811 | 23 | [ac_cv_gnu_library_2_1=yes], | ||
812 | 24 | [ac_cv_gnu_library_2_1=no]) | ||
813 | 25 | ] | ||
814 | 26 | ) | ||
815 | 27 | AC_SUBST([GLIBC21]) | ||
816 | 28 | GLIBC21="$ac_cv_gnu_library_2_1" | ||
817 | 29 | ] | ||
818 | 30 | ) | ||
819 | 0 | 31 | ||
820 | === added file 'm4/intdiv0.m4' | |||
821 | --- m4/intdiv0.m4 1970-01-01 00:00:00 +0000 | |||
822 | +++ m4/intdiv0.m4 2013-07-06 19:13:27 +0000 | |||
823 | @@ -0,0 +1,84 @@ | |||
824 | 1 | # intdiv0.m4 serial 3 (gettext-0.18) | ||
825 | 2 | dnl Copyright (C) 2002, 2007-2010 Free Software Foundation, Inc. | ||
826 | 3 | dnl This file is free software; the Free Software Foundation | ||
827 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
828 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
829 | 6 | |||
830 | 7 | dnl From Bruno Haible. | ||
831 | 8 | |||
832 | 9 | AC_DEFUN([gt_INTDIV0], | ||
833 | 10 | [ | ||
834 | 11 | AC_REQUIRE([AC_PROG_CC])dnl | ||
835 | 12 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
836 | 13 | |||
837 | 14 | AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], | ||
838 | 15 | gt_cv_int_divbyzero_sigfpe, | ||
839 | 16 | [ | ||
840 | 17 | gt_cv_int_divbyzero_sigfpe= | ||
841 | 18 | changequote(,)dnl | ||
842 | 19 | case "$host_os" in | ||
843 | 20 | macos* | darwin[6-9]* | darwin[1-9][0-9]*) | ||
844 | 21 | # On MacOS X 10.2 or newer, just assume the same as when cross- | ||
845 | 22 | # compiling. If we were to perform the real test, 1 Crash Report | ||
846 | 23 | # dialog window would pop up. | ||
847 | 24 | case "$host_cpu" in | ||
848 | 25 | i[34567]86 | x86_64) | ||
849 | 26 | gt_cv_int_divbyzero_sigfpe="guessing yes" ;; | ||
850 | 27 | esac | ||
851 | 28 | ;; | ||
852 | 29 | esac | ||
853 | 30 | changequote([,])dnl | ||
854 | 31 | if test -z "$gt_cv_int_divbyzero_sigfpe"; then | ||
855 | 32 | AC_TRY_RUN([ | ||
856 | 33 | #include <stdlib.h> | ||
857 | 34 | #include <signal.h> | ||
858 | 35 | |||
859 | 36 | static void | ||
860 | 37 | sigfpe_handler (int sig) | ||
861 | 38 | { | ||
862 | 39 | /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ | ||
863 | 40 | exit (sig != SIGFPE); | ||
864 | 41 | } | ||
865 | 42 | |||
866 | 43 | int x = 1; | ||
867 | 44 | int y = 0; | ||
868 | 45 | int z; | ||
869 | 46 | int nan; | ||
870 | 47 | |||
871 | 48 | int main () | ||
872 | 49 | { | ||
873 | 50 | signal (SIGFPE, sigfpe_handler); | ||
874 | 51 | /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ | ||
875 | 52 | #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) | ||
876 | 53 | signal (SIGTRAP, sigfpe_handler); | ||
877 | 54 | #endif | ||
878 | 55 | /* Linux/SPARC yields signal SIGILL. */ | ||
879 | 56 | #if defined (__sparc__) && defined (__linux__) | ||
880 | 57 | signal (SIGILL, sigfpe_handler); | ||
881 | 58 | #endif | ||
882 | 59 | |||
883 | 60 | z = x / y; | ||
884 | 61 | nan = y / y; | ||
885 | 62 | exit (1); | ||
886 | 63 | } | ||
887 | 64 | ], [gt_cv_int_divbyzero_sigfpe=yes], [gt_cv_int_divbyzero_sigfpe=no], | ||
888 | 65 | [ | ||
889 | 66 | # Guess based on the CPU. | ||
890 | 67 | changequote(,)dnl | ||
891 | 68 | case "$host_cpu" in | ||
892 | 69 | alpha* | i[34567]86 | x86_64 | m68k | s390*) | ||
893 | 70 | gt_cv_int_divbyzero_sigfpe="guessing yes";; | ||
894 | 71 | *) | ||
895 | 72 | gt_cv_int_divbyzero_sigfpe="guessing no";; | ||
896 | 73 | esac | ||
897 | 74 | changequote([,])dnl | ||
898 | 75 | ]) | ||
899 | 76 | fi | ||
900 | 77 | ]) | ||
901 | 78 | case "$gt_cv_int_divbyzero_sigfpe" in | ||
902 | 79 | *yes) value=1;; | ||
903 | 80 | *) value=0;; | ||
904 | 81 | esac | ||
905 | 82 | AC_DEFINE_UNQUOTED([INTDIV0_RAISES_SIGFPE], [$value], | ||
906 | 83 | [Define if integer division by zero raises signal SIGFPE.]) | ||
907 | 84 | ]) | ||
908 | 0 | 85 | ||
909 | === added file 'm4/intl.m4' | |||
910 | --- m4/intl.m4 1970-01-01 00:00:00 +0000 | |||
911 | +++ m4/intl.m4 2013-07-06 19:13:27 +0000 | |||
912 | @@ -0,0 +1,294 @@ | |||
913 | 1 | # intl.m4 serial 17 (gettext-0.18) | ||
914 | 2 | dnl Copyright (C) 1995-2009 Free Software Foundation, Inc. | ||
915 | 3 | dnl This file is free software; the Free Software Foundation | ||
916 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
917 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
918 | 6 | dnl | ||
919 | 7 | dnl This file can can be used in projects which are not available under | ||
920 | 8 | dnl the GNU General Public License or the GNU Library General Public | ||
921 | 9 | dnl License but which still want to provide support for the GNU gettext | ||
922 | 10 | dnl functionality. | ||
923 | 11 | dnl Please note that the actual code of the GNU gettext library is covered | ||
924 | 12 | dnl by the GNU Library General Public License, and the rest of the GNU | ||
925 | 13 | dnl gettext package package is covered by the GNU General Public License. | ||
926 | 14 | dnl They are *not* in the public domain. | ||
927 | 15 | |||
928 | 16 | dnl Authors: | ||
929 | 17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | ||
930 | 18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2009. | ||
931 | 19 | |||
932 | 20 | AC_PREREQ([2.52]) | ||
933 | 21 | |||
934 | 22 | dnl Checks for all prerequisites of the intl subdirectory, | ||
935 | 23 | dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, | ||
936 | 24 | dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. | ||
937 | 25 | AC_DEFUN([AM_INTL_SUBDIR], | ||
938 | 26 | [ | ||
939 | 27 | AC_REQUIRE([AC_PROG_INSTALL])dnl | ||
940 | 28 | AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake | ||
941 | 29 | AC_REQUIRE([AC_PROG_CC])dnl | ||
942 | 30 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
943 | 31 | AC_REQUIRE([gt_GLIBC2])dnl | ||
944 | 32 | AC_REQUIRE([AC_PROG_RANLIB])dnl | ||
945 | 33 | AC_REQUIRE([gl_VISIBILITY])dnl | ||
946 | 34 | AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl | ||
947 | 35 | AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl | ||
948 | 36 | AC_REQUIRE([gt_TYPE_WCHAR_T])dnl | ||
949 | 37 | AC_REQUIRE([gt_TYPE_WINT_T])dnl | ||
950 | 38 | AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) | ||
951 | 39 | AC_REQUIRE([gt_TYPE_INTMAX_T]) | ||
952 | 40 | AC_REQUIRE([gt_PRINTF_POSIX]) | ||
953 | 41 | AC_REQUIRE([gl_GLIBC21])dnl | ||
954 | 42 | AC_REQUIRE([gl_XSIZE])dnl | ||
955 | 43 | AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl | ||
956 | 44 | AC_REQUIRE([gt_INTL_MACOSX])dnl | ||
957 | 45 | |||
958 | 46 | dnl Support for automake's --enable-silent-rules. | ||
959 | 47 | case "$enable_silent_rules" in | ||
960 | 48 | yes) INTL_DEFAULT_VERBOSITY=0;; | ||
961 | 49 | no) INTL_DEFAULT_VERBOSITY=1;; | ||
962 | 50 | *) INTL_DEFAULT_VERBOSITY=1;; | ||
963 | 51 | esac | ||
964 | 52 | AC_SUBST([INTL_DEFAULT_VERBOSITY]) | ||
965 | 53 | |||
966 | 54 | AC_CHECK_TYPE([ptrdiff_t], , | ||
967 | 55 | [AC_DEFINE([ptrdiff_t], [long], | ||
968 | 56 | [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) | ||
969 | 57 | ]) | ||
970 | 58 | AC_CHECK_HEADERS([stddef.h stdlib.h string.h]) | ||
971 | 59 | AC_CHECK_FUNCS([asprintf fwprintf newlocale putenv setenv setlocale \ | ||
972 | 60 | snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) | ||
973 | 61 | |||
974 | 62 | dnl Use the _snprintf function only if it is declared (because on NetBSD it | ||
975 | 63 | dnl is defined as a weak alias of snprintf; we prefer to use the latter). | ||
976 | 64 | gt_CHECK_DECL(_snprintf, [#include <stdio.h>]) | ||
977 | 65 | gt_CHECK_DECL(_snwprintf, [#include <stdio.h>]) | ||
978 | 66 | |||
979 | 67 | dnl Use the *_unlocked functions only if they are declared. | ||
980 | 68 | dnl (because some of them were defined without being declared in Solaris | ||
981 | 69 | dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built | ||
982 | 70 | dnl on Solaris 2.5.1 to run on Solaris 2.6). | ||
983 | 71 | dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. | ||
984 | 72 | gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>]) | ||
985 | 73 | |||
986 | 74 | case $gt_cv_func_printf_posix in | ||
987 | 75 | *yes) HAVE_POSIX_PRINTF=1 ;; | ||
988 | 76 | *) HAVE_POSIX_PRINTF=0 ;; | ||
989 | 77 | esac | ||
990 | 78 | AC_SUBST([HAVE_POSIX_PRINTF]) | ||
991 | 79 | if test "$ac_cv_func_asprintf" = yes; then | ||
992 | 80 | HAVE_ASPRINTF=1 | ||
993 | 81 | else | ||
994 | 82 | HAVE_ASPRINTF=0 | ||
995 | 83 | fi | ||
996 | 84 | AC_SUBST([HAVE_ASPRINTF]) | ||
997 | 85 | if test "$ac_cv_func_snprintf" = yes; then | ||
998 | 86 | HAVE_SNPRINTF=1 | ||
999 | 87 | else | ||
1000 | 88 | HAVE_SNPRINTF=0 | ||
1001 | 89 | fi | ||
1002 | 90 | AC_SUBST([HAVE_SNPRINTF]) | ||
1003 | 91 | if test "$ac_cv_func_newlocale" = yes; then | ||
1004 | 92 | HAVE_NEWLOCALE=1 | ||
1005 | 93 | else | ||
1006 | 94 | HAVE_NEWLOCALE=0 | ||
1007 | 95 | fi | ||
1008 | 96 | AC_SUBST([HAVE_NEWLOCALE]) | ||
1009 | 97 | if test "$ac_cv_func_wprintf" = yes; then | ||
1010 | 98 | HAVE_WPRINTF=1 | ||
1011 | 99 | else | ||
1012 | 100 | HAVE_WPRINTF=0 | ||
1013 | 101 | fi | ||
1014 | 102 | AC_SUBST([HAVE_WPRINTF]) | ||
1015 | 103 | |||
1016 | 104 | AM_LANGINFO_CODESET | ||
1017 | 105 | gt_LC_MESSAGES | ||
1018 | 106 | |||
1019 | 107 | dnl Compilation on mingw and Cygwin needs special Makefile rules, because | ||
1020 | 108 | dnl 1. when we install a shared library, we must arrange to export | ||
1021 | 109 | dnl auxiliary pointer variables for every exported variable, | ||
1022 | 110 | dnl 2. when we install a shared library and a static library simultaneously, | ||
1023 | 111 | dnl the include file specifies __declspec(dllimport) and therefore we | ||
1024 | 112 | dnl must arrange to define the auxiliary pointer variables for the | ||
1025 | 113 | dnl exported variables _also_ in the static library. | ||
1026 | 114 | if test "$enable_shared" = yes; then | ||
1027 | 115 | case "$host_os" in | ||
1028 | 116 | mingw* | cygwin*) is_woe32dll=yes ;; | ||
1029 | 117 | *) is_woe32dll=no ;; | ||
1030 | 118 | esac | ||
1031 | 119 | else | ||
1032 | 120 | is_woe32dll=no | ||
1033 | 121 | fi | ||
1034 | 122 | WOE32DLL=$is_woe32dll | ||
1035 | 123 | AC_SUBST([WOE32DLL]) | ||
1036 | 124 | |||
1037 | 125 | dnl On mingw and Cygwin, we can activate special Makefile rules which add | ||
1038 | 126 | dnl version information to the shared libraries and executables. | ||
1039 | 127 | case "$host_os" in | ||
1040 | 128 | mingw* | cygwin*) is_woe32=yes ;; | ||
1041 | 129 | *) is_woe32=no ;; | ||
1042 | 130 | esac | ||
1043 | 131 | WOE32=$is_woe32 | ||
1044 | 132 | AC_SUBST([WOE32]) | ||
1045 | 133 | if test $WOE32 = yes; then | ||
1046 | 134 | dnl Check for a program that compiles Windows resource files. | ||
1047 | 135 | AC_CHECK_TOOL([WINDRES], [windres]) | ||
1048 | 136 | fi | ||
1049 | 137 | |||
1050 | 138 | dnl Determine whether when creating a library, "-lc" should be passed to | ||
1051 | 139 | dnl libtool or not. On many platforms, it is required for the libtool option | ||
1052 | 140 | dnl -no-undefined to work. On HP-UX, however, the -lc - stored by libtool | ||
1053 | 141 | dnl in the *.la files - makes it impossible to create multithreaded programs, | ||
1054 | 142 | dnl because libtool also reorders the -lc to come before the -pthread, and | ||
1055 | 143 | dnl this disables pthread_create() <http://docs.hp.com/en/1896/pthreads.html>. | ||
1056 | 144 | case "$host_os" in | ||
1057 | 145 | hpux*) LTLIBC="" ;; | ||
1058 | 146 | *) LTLIBC="-lc" ;; | ||
1059 | 147 | esac | ||
1060 | 148 | AC_SUBST([LTLIBC]) | ||
1061 | 149 | |||
1062 | 150 | dnl Rename some macros and functions used for locking. | ||
1063 | 151 | AH_BOTTOM([ | ||
1064 | 152 | #define __libc_lock_t gl_lock_t | ||
1065 | 153 | #define __libc_lock_define gl_lock_define | ||
1066 | 154 | #define __libc_lock_define_initialized gl_lock_define_initialized | ||
1067 | 155 | #define __libc_lock_init gl_lock_init | ||
1068 | 156 | #define __libc_lock_lock gl_lock_lock | ||
1069 | 157 | #define __libc_lock_unlock gl_lock_unlock | ||
1070 | 158 | #define __libc_lock_recursive_t gl_recursive_lock_t | ||
1071 | 159 | #define __libc_lock_define_recursive gl_recursive_lock_define | ||
1072 | 160 | #define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized | ||
1073 | 161 | #define __libc_lock_init_recursive gl_recursive_lock_init | ||
1074 | 162 | #define __libc_lock_lock_recursive gl_recursive_lock_lock | ||
1075 | 163 | #define __libc_lock_unlock_recursive gl_recursive_lock_unlock | ||
1076 | 164 | #define glthread_in_use libintl_thread_in_use | ||
1077 | 165 | #define glthread_lock_init_func libintl_lock_init_func | ||
1078 | 166 | #define glthread_lock_lock_func libintl_lock_lock_func | ||
1079 | 167 | #define glthread_lock_unlock_func libintl_lock_unlock_func | ||
1080 | 168 | #define glthread_lock_destroy_func libintl_lock_destroy_func | ||
1081 | 169 | #define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded | ||
1082 | 170 | #define glthread_rwlock_init_func libintl_rwlock_init_func | ||
1083 | 171 | #define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded | ||
1084 | 172 | #define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func | ||
1085 | 173 | #define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded | ||
1086 | 174 | #define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func | ||
1087 | 175 | #define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded | ||
1088 | 176 | #define glthread_rwlock_unlock_func libintl_rwlock_unlock_func | ||
1089 | 177 | #define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded | ||
1090 | 178 | #define glthread_rwlock_destroy_func libintl_rwlock_destroy_func | ||
1091 | 179 | #define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded | ||
1092 | 180 | #define glthread_recursive_lock_init_func libintl_recursive_lock_init_func | ||
1093 | 181 | #define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded | ||
1094 | 182 | #define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func | ||
1095 | 183 | #define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded | ||
1096 | 184 | #define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func | ||
1097 | 185 | #define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded | ||
1098 | 186 | #define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func | ||
1099 | 187 | #define glthread_once_func libintl_once_func | ||
1100 | 188 | #define glthread_once_singlethreaded libintl_once_singlethreaded | ||
1101 | 189 | #define glthread_once_multithreaded libintl_once_multithreaded | ||
1102 | 190 | ]) | ||
1103 | 191 | ]) | ||
1104 | 192 | |||
1105 | 193 | |||
1106 | 194 | dnl Checks for the core files of the intl subdirectory: | ||
1107 | 195 | dnl dcigettext.c | ||
1108 | 196 | dnl eval-plural.h | ||
1109 | 197 | dnl explodename.c | ||
1110 | 198 | dnl finddomain.c | ||
1111 | 199 | dnl gettextP.h | ||
1112 | 200 | dnl gmo.h | ||
1113 | 201 | dnl hash-string.h hash-string.c | ||
1114 | 202 | dnl l10nflist.c | ||
1115 | 203 | dnl libgnuintl.h.in (except the *printf stuff) | ||
1116 | 204 | dnl loadinfo.h | ||
1117 | 205 | dnl loadmsgcat.c | ||
1118 | 206 | dnl localealias.c | ||
1119 | 207 | dnl log.c | ||
1120 | 208 | dnl plural-exp.h plural-exp.c | ||
1121 | 209 | dnl plural.y | ||
1122 | 210 | dnl Used by libglocale. | ||
1123 | 211 | AC_DEFUN([gt_INTL_SUBDIR_CORE], | ||
1124 | 212 | [ | ||
1125 | 213 | AC_REQUIRE([AC_C_INLINE])dnl | ||
1126 | 214 | AC_REQUIRE([AC_TYPE_SIZE_T])dnl | ||
1127 | 215 | AC_REQUIRE([gl_AC_HEADER_STDINT_H]) | ||
1128 | 216 | AC_REQUIRE([AC_FUNC_ALLOCA])dnl | ||
1129 | 217 | AC_REQUIRE([AC_FUNC_MMAP])dnl | ||
1130 | 218 | AC_REQUIRE([gt_INTDIV0])dnl | ||
1131 | 219 | AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl | ||
1132 | 220 | AC_REQUIRE([gt_INTTYPES_PRI])dnl | ||
1133 | 221 | AC_REQUIRE([gl_LOCK])dnl | ||
1134 | 222 | |||
1135 | 223 | AC_TRY_LINK( | ||
1136 | 224 | [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }], | ||
1137 | 225 | [], | ||
1138 | 226 | [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], | ||
1139 | 227 | [Define to 1 if the compiler understands __builtin_expect.])]) | ||
1140 | 228 | |||
1141 | 229 | AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h]) | ||
1142 | 230 | AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ | ||
1143 | 231 | stpcpy strcasecmp strdup strtoul tsearch uselocale argz_count \ | ||
1144 | 232 | argz_stringify argz_next __fsetlocking]) | ||
1145 | 233 | |||
1146 | 234 | dnl Use the *_unlocked functions only if they are declared. | ||
1147 | 235 | dnl (because some of them were defined without being declared in Solaris | ||
1148 | 236 | dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built | ||
1149 | 237 | dnl on Solaris 2.5.1 to run on Solaris 2.6). | ||
1150 | 238 | dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. | ||
1151 | 239 | gt_CHECK_DECL([feof_unlocked], [#include <stdio.h>]) | ||
1152 | 240 | gt_CHECK_DECL([fgets_unlocked], [#include <stdio.h>]) | ||
1153 | 241 | |||
1154 | 242 | AM_ICONV | ||
1155 | 243 | |||
1156 | 244 | dnl intl/plural.c is generated from intl/plural.y. It requires bison, | ||
1157 | 245 | dnl because plural.y uses bison specific features. It requires at least | ||
1158 | 246 | dnl bison-1.26 because earlier versions generate a plural.c that doesn't | ||
1159 | 247 | dnl compile. | ||
1160 | 248 | dnl bison is only needed for the maintainer (who touches plural.y). But in | ||
1161 | 249 | dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put | ||
1162 | 250 | dnl the rule in general Makefile. Now, some people carelessly touch the | ||
1163 | 251 | dnl files or have a broken "make" program, hence the plural.c rule will | ||
1164 | 252 | dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not | ||
1165 | 253 | dnl present or too old. | ||
1166 | 254 | AC_CHECK_PROGS([INTLBISON], [bison]) | ||
1167 | 255 | if test -z "$INTLBISON"; then | ||
1168 | 256 | ac_verc_fail=yes | ||
1169 | 257 | else | ||
1170 | 258 | dnl Found it, now check the version. | ||
1171 | 259 | AC_MSG_CHECKING([version of bison]) | ||
1172 | 260 | changequote(<<,>>)dnl | ||
1173 | 261 | ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` | ||
1174 | 262 | case $ac_prog_version in | ||
1175 | 263 | '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; | ||
1176 | 264 | 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) | ||
1177 | 265 | changequote([,])dnl | ||
1178 | 266 | ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; | ||
1179 | 267 | *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; | ||
1180 | 268 | esac | ||
1181 | 269 | AC_MSG_RESULT([$ac_prog_version]) | ||
1182 | 270 | fi | ||
1183 | 271 | if test $ac_verc_fail = yes; then | ||
1184 | 272 | INTLBISON=: | ||
1185 | 273 | fi | ||
1186 | 274 | ]) | ||
1187 | 275 | |||
1188 | 276 | |||
1189 | 277 | dnl gt_CHECK_DECL(FUNC, INCLUDES) | ||
1190 | 278 | dnl Check whether a function is declared. | ||
1191 | 279 | AC_DEFUN([gt_CHECK_DECL], | ||
1192 | 280 | [ | ||
1193 | 281 | AC_CACHE_CHECK([whether $1 is declared], [ac_cv_have_decl_$1], | ||
1194 | 282 | [AC_TRY_COMPILE([$2], [ | ||
1195 | 283 | #ifndef $1 | ||
1196 | 284 | char *p = (char *) $1; | ||
1197 | 285 | #endif | ||
1198 | 286 | ], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) | ||
1199 | 287 | if test $ac_cv_have_decl_$1 = yes; then | ||
1200 | 288 | gt_value=1 | ||
1201 | 289 | else | ||
1202 | 290 | gt_value=0 | ||
1203 | 291 | fi | ||
1204 | 292 | AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], | ||
1205 | 293 | [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) | ||
1206 | 294 | ]) | ||
1207 | 0 | 295 | ||
1208 | === added file 'm4/intldir.m4' | |||
1209 | --- m4/intldir.m4 1970-01-01 00:00:00 +0000 | |||
1210 | +++ m4/intldir.m4 2013-07-06 19:13:27 +0000 | |||
1211 | @@ -0,0 +1,19 @@ | |||
1212 | 1 | # intldir.m4 serial 2 (gettext-0.18) | ||
1213 | 2 | dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc. | ||
1214 | 3 | dnl This file is free software; the Free Software Foundation | ||
1215 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
1216 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
1217 | 6 | dnl | ||
1218 | 7 | dnl This file can can be used in projects which are not available under | ||
1219 | 8 | dnl the GNU General Public License or the GNU Library General Public | ||
1220 | 9 | dnl License but which still want to provide support for the GNU gettext | ||
1221 | 10 | dnl functionality. | ||
1222 | 11 | dnl Please note that the actual code of the GNU gettext library is covered | ||
1223 | 12 | dnl by the GNU Library General Public License, and the rest of the GNU | ||
1224 | 13 | dnl gettext package package is covered by the GNU General Public License. | ||
1225 | 14 | dnl They are *not* in the public domain. | ||
1226 | 15 | |||
1227 | 16 | AC_PREREQ([2.52]) | ||
1228 | 17 | |||
1229 | 18 | dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory. | ||
1230 | 19 | AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], []) | ||
1231 | 0 | 20 | ||
1232 | === added file 'm4/intlmacosx.m4' | |||
1233 | --- m4/intlmacosx.m4 1970-01-01 00:00:00 +0000 | |||
1234 | +++ m4/intlmacosx.m4 2013-07-06 19:13:27 +0000 | |||
1235 | @@ -0,0 +1,51 @@ | |||
1236 | 1 | # intlmacosx.m4 serial 3 (gettext-0.18) | ||
1237 | 2 | dnl Copyright (C) 2004-2010 Free Software Foundation, Inc. | ||
1238 | 3 | dnl This file is free software; the Free Software Foundation | ||
1239 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
1240 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
1241 | 6 | dnl | ||
1242 | 7 | dnl This file can can be used in projects which are not available under | ||
1243 | 8 | dnl the GNU General Public License or the GNU Library General Public | ||
1244 | 9 | dnl License but which still want to provide support for the GNU gettext | ||
1245 | 10 | dnl functionality. | ||
1246 | 11 | dnl Please note that the actual code of the GNU gettext library is covered | ||
1247 | 12 | dnl by the GNU Library General Public License, and the rest of the GNU | ||
1248 | 13 | dnl gettext package package is covered by the GNU General Public License. | ||
1249 | 14 | dnl They are *not* in the public domain. | ||
1250 | 15 | |||
1251 | 16 | dnl Checks for special options needed on MacOS X. | ||
1252 | 17 | dnl Defines INTL_MACOSX_LIBS. | ||
1253 | 18 | AC_DEFUN([gt_INTL_MACOSX], | ||
1254 | 19 | [ | ||
1255 | 20 | dnl Check for API introduced in MacOS X 10.2. | ||
1256 | 21 | AC_CACHE_CHECK([for CFPreferencesCopyAppValue], | ||
1257 | 22 | [gt_cv_func_CFPreferencesCopyAppValue], | ||
1258 | 23 | [gt_save_LIBS="$LIBS" | ||
1259 | 24 | LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" | ||
1260 | 25 | AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>], | ||
1261 | 26 | [CFPreferencesCopyAppValue(NULL, NULL)], | ||
1262 | 27 | [gt_cv_func_CFPreferencesCopyAppValue=yes], | ||
1263 | 28 | [gt_cv_func_CFPreferencesCopyAppValue=no]) | ||
1264 | 29 | LIBS="$gt_save_LIBS"]) | ||
1265 | 30 | if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then | ||
1266 | 31 | AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], | ||
1267 | 32 | [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) | ||
1268 | 33 | fi | ||
1269 | 34 | dnl Check for API introduced in MacOS X 10.3. | ||
1270 | 35 | AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], | ||
1271 | 36 | [gt_save_LIBS="$LIBS" | ||
1272 | 37 | LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" | ||
1273 | 38 | AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();], | ||
1274 | 39 | [gt_cv_func_CFLocaleCopyCurrent=yes], | ||
1275 | 40 | [gt_cv_func_CFLocaleCopyCurrent=no]) | ||
1276 | 41 | LIBS="$gt_save_LIBS"]) | ||
1277 | 42 | if test $gt_cv_func_CFLocaleCopyCurrent = yes; then | ||
1278 | 43 | AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], | ||
1279 | 44 | [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) | ||
1280 | 45 | fi | ||
1281 | 46 | INTL_MACOSX_LIBS= | ||
1282 | 47 | if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then | ||
1283 | 48 | INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" | ||
1284 | 49 | fi | ||
1285 | 50 | AC_SUBST([INTL_MACOSX_LIBS]) | ||
1286 | 51 | ]) | ||
1287 | 0 | 52 | ||
1288 | === added file 'm4/intmax.m4' | |||
1289 | --- m4/intmax.m4 1970-01-01 00:00:00 +0000 | |||
1290 | +++ m4/intmax.m4 2013-07-06 19:13:27 +0000 | |||
1291 | @@ -0,0 +1,33 @@ | |||
1292 | 1 | # intmax.m4 serial 5 (gettext-0.18) | ||
1293 | 2 | dnl Copyright (C) 2002-2005, 2008-2010 Free Software Foundation, Inc. | ||
1294 | 3 | dnl This file is free software; the Free Software Foundation | ||
1295 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
1296 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
1297 | 6 | |||
1298 | 7 | dnl From Bruno Haible. | ||
1299 | 8 | dnl Test whether the system has the 'intmax_t' type, but don't attempt to | ||
1300 | 9 | dnl find a replacement if it is lacking. | ||
1301 | 10 | |||
1302 | 11 | AC_DEFUN([gt_TYPE_INTMAX_T], | ||
1303 | 12 | [ | ||
1304 | 13 | AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) | ||
1305 | 14 | AC_REQUIRE([gl_AC_HEADER_STDINT_H]) | ||
1306 | 15 | AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t], | ||
1307 | 16 | [AC_TRY_COMPILE([ | ||
1308 | 17 | #include <stddef.h> | ||
1309 | 18 | #include <stdlib.h> | ||
1310 | 19 | #if HAVE_STDINT_H_WITH_UINTMAX | ||
1311 | 20 | #include <stdint.h> | ||
1312 | 21 | #endif | ||
1313 | 22 | #if HAVE_INTTYPES_H_WITH_UINTMAX | ||
1314 | 23 | #include <inttypes.h> | ||
1315 | 24 | #endif | ||
1316 | 25 | ], [intmax_t x = -1; | ||
1317 | 26 | return !x;], | ||
1318 | 27 | [gt_cv_c_intmax_t=yes], | ||
1319 | 28 | [gt_cv_c_intmax_t=no])]) | ||
1320 | 29 | if test $gt_cv_c_intmax_t = yes; then | ||
1321 | 30 | AC_DEFINE([HAVE_INTMAX_T], [1], | ||
1322 | 31 | [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.]) | ||
1323 | 32 | fi | ||
1324 | 33 | ]) | ||
1325 | 0 | 34 | ||
1326 | === added file 'm4/inttypes-pri.m4' | |||
1327 | --- m4/inttypes-pri.m4 1970-01-01 00:00:00 +0000 | |||
1328 | +++ m4/inttypes-pri.m4 2013-07-06 19:13:27 +0000 | |||
1329 | @@ -0,0 +1,36 @@ | |||
1330 | 1 | # inttypes-pri.m4 serial 6 (gettext-0.18) | ||
1331 | 2 | dnl Copyright (C) 1997-2002, 2006, 2008-2010 Free Software Foundation, Inc. | ||
1332 | 3 | dnl This file is free software; the Free Software Foundation | ||
1333 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
1334 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
1335 | 6 | |||
1336 | 7 | dnl From Bruno Haible. | ||
1337 | 8 | |||
1338 | 9 | AC_PREREQ([2.52]) | ||
1339 | 10 | |||
1340 | 11 | # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI* | ||
1341 | 12 | # macros to non-string values. This is the case on AIX 4.3.3. | ||
1342 | 13 | |||
1343 | 14 | AC_DEFUN([gt_INTTYPES_PRI], | ||
1344 | 15 | [ | ||
1345 | 16 | AC_CHECK_HEADERS([inttypes.h]) | ||
1346 | 17 | if test $ac_cv_header_inttypes_h = yes; then | ||
1347 | 18 | AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], | ||
1348 | 19 | [gt_cv_inttypes_pri_broken], | ||
1349 | 20 | [ | ||
1350 | 21 | AC_TRY_COMPILE([#include <inttypes.h> | ||
1351 | 22 | #ifdef PRId32 | ||
1352 | 23 | char *p = PRId32; | ||
1353 | 24 | #endif | ||
1354 | 25 | ], [], [gt_cv_inttypes_pri_broken=no], [gt_cv_inttypes_pri_broken=yes]) | ||
1355 | 26 | ]) | ||
1356 | 27 | fi | ||
1357 | 28 | if test "$gt_cv_inttypes_pri_broken" = yes; then | ||
1358 | 29 | AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1], | ||
1359 | 30 | [Define if <inttypes.h> exists and defines unusable PRI* macros.]) | ||
1360 | 31 | PRI_MACROS_BROKEN=1 | ||
1361 | 32 | else | ||
1362 | 33 | PRI_MACROS_BROKEN=0 | ||
1363 | 34 | fi | ||
1364 | 35 | AC_SUBST([PRI_MACROS_BROKEN]) | ||
1365 | 36 | ]) | ||
1366 | 0 | 37 | ||
1367 | === added file 'm4/inttypes_h.m4' | |||
1368 | --- m4/inttypes_h.m4 1970-01-01 00:00:00 +0000 | |||
1369 | +++ m4/inttypes_h.m4 2013-07-06 19:13:27 +0000 | |||
1370 | @@ -0,0 +1,26 @@ | |||
1371 | 1 | # inttypes_h.m4 serial 9 | ||
1372 | 2 | dnl Copyright (C) 1997-2004, 2006, 2008-2010 Free Software Foundation, Inc. | ||
1373 | 3 | dnl This file is free software; the Free Software Foundation | ||
1374 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
1375 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
1376 | 6 | |||
1377 | 7 | dnl From Paul Eggert. | ||
1378 | 8 | |||
1379 | 9 | # Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists, | ||
1380 | 10 | # doesn't clash with <sys/types.h>, and declares uintmax_t. | ||
1381 | 11 | |||
1382 | 12 | AC_DEFUN([gl_AC_HEADER_INTTYPES_H], | ||
1383 | 13 | [ | ||
1384 | 14 | AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h], | ||
1385 | 15 | [AC_TRY_COMPILE( | ||
1386 | 16 | [#include <sys/types.h> | ||
1387 | 17 | #include <inttypes.h>], | ||
1388 | 18 | [uintmax_t i = (uintmax_t) -1; return !i;], | ||
1389 | 19 | [gl_cv_header_inttypes_h=yes], | ||
1390 | 20 | [gl_cv_header_inttypes_h=no])]) | ||
1391 | 21 | if test $gl_cv_header_inttypes_h = yes; then | ||
1392 | 22 | AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1], | ||
1393 | 23 | [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, | ||
1394 | 24 | and declares uintmax_t. ]) | ||
1395 | 25 | fi | ||
1396 | 26 | ]) | ||
1397 | 0 | 27 | ||
1398 | === added file 'm4/lcmessage.m4' | |||
1399 | --- m4/lcmessage.m4 1970-01-01 00:00:00 +0000 | |||
1400 | +++ m4/lcmessage.m4 2013-07-06 19:13:27 +0000 | |||
1401 | @@ -0,0 +1,31 @@ | |||
1402 | 1 | # lcmessage.m4 serial 6 (gettext-0.18) | ||
1403 | 2 | dnl Copyright (C) 1995-2002, 2004-2005, 2008-2010 Free Software Foundation, | ||
1404 | 3 | dnl Inc. | ||
1405 | 4 | dnl This file is free software; the Free Software Foundation | ||
1406 | 5 | dnl gives unlimited permission to copy and/or distribute it, | ||
1407 | 6 | dnl with or without modifications, as long as this notice is preserved. | ||
1408 | 7 | dnl | ||
1409 | 8 | dnl This file can can be used in projects which are not available under | ||
1410 | 9 | dnl the GNU General Public License or the GNU Library General Public | ||
1411 | 10 | dnl License but which still want to provide support for the GNU gettext | ||
1412 | 11 | dnl functionality. | ||
1413 | 12 | dnl Please note that the actual code of the GNU gettext library is covered | ||
1414 | 13 | dnl by the GNU Library General Public License, and the rest of the GNU | ||
1415 | 14 | dnl gettext package package is covered by the GNU General Public License. | ||
1416 | 15 | dnl They are *not* in the public domain. | ||
1417 | 16 | |||
1418 | 17 | dnl Authors: | ||
1419 | 18 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995. | ||
1420 | 19 | |||
1421 | 20 | # Check whether LC_MESSAGES is available in <locale.h>. | ||
1422 | 21 | |||
1423 | 22 | AC_DEFUN([gt_LC_MESSAGES], | ||
1424 | 23 | [ | ||
1425 | 24 | AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES], | ||
1426 | 25 | [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], | ||
1427 | 26 | [gt_cv_val_LC_MESSAGES=yes], [gt_cv_val_LC_MESSAGES=no])]) | ||
1428 | 27 | if test $gt_cv_val_LC_MESSAGES = yes; then | ||
1429 | 28 | AC_DEFINE([HAVE_LC_MESSAGES], [1], | ||
1430 | 29 | [Define if your <locale.h> file defines LC_MESSAGES.]) | ||
1431 | 30 | fi | ||
1432 | 31 | ]) | ||
1433 | 0 | 32 | ||
1434 | === added file 'm4/lock.m4' | |||
1435 | --- m4/lock.m4 1970-01-01 00:00:00 +0000 | |||
1436 | +++ m4/lock.m4 2013-07-06 19:13:27 +0000 | |||
1437 | @@ -0,0 +1,37 @@ | |||
1438 | 1 | # lock.m4 serial 10 (gettext-0.18) | ||
1439 | 2 | dnl Copyright (C) 2005-2010 Free Software Foundation, Inc. | ||
1440 | 3 | dnl This file is free software; the Free Software Foundation | ||
1441 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
1442 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
1443 | 6 | |||
1444 | 7 | dnl From Bruno Haible. | ||
1445 | 8 | |||
1446 | 9 | AC_DEFUN([gl_LOCK], | ||
1447 | 10 | [ | ||
1448 | 11 | AC_REQUIRE([gl_THREADLIB]) | ||
1449 | 12 | if test "$gl_threads_api" = posix; then | ||
1450 | 13 | # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the | ||
1451 | 14 | # pthread_rwlock_* functions. | ||
1452 | 15 | AC_CHECK_TYPE([pthread_rwlock_t], | ||
1453 | 16 | [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], | ||
1454 | 17 | [Define if the POSIX multithreading library has read/write locks.])], | ||
1455 | 18 | [], | ||
1456 | 19 | [#include <pthread.h>]) | ||
1457 | 20 | # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. | ||
1458 | 21 | AC_TRY_COMPILE([#include <pthread.h>], | ||
1459 | 22 | [#if __FreeBSD__ == 4 | ||
1460 | 23 | error "No, in FreeBSD 4.0 recursive mutexes actually don't work." | ||
1461 | 24 | #else | ||
1462 | 25 | int x = (int)PTHREAD_MUTEX_RECURSIVE; | ||
1463 | 26 | return !x; | ||
1464 | 27 | #endif], | ||
1465 | 28 | [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1], | ||
1466 | 29 | [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])]) | ||
1467 | 30 | fi | ||
1468 | 31 | gl_PREREQ_LOCK | ||
1469 | 32 | ]) | ||
1470 | 33 | |||
1471 | 34 | # Prerequisites of lib/lock.c. | ||
1472 | 35 | AC_DEFUN([gl_PREREQ_LOCK], [ | ||
1473 | 36 | AC_REQUIRE([AC_C_INLINE]) | ||
1474 | 37 | ]) | ||
1475 | 0 | 38 | ||
1476 | === added file 'm4/longlong.m4' | |||
1477 | --- m4/longlong.m4 1970-01-01 00:00:00 +0000 | |||
1478 | +++ m4/longlong.m4 2013-07-06 19:13:27 +0000 | |||
1479 | @@ -0,0 +1,106 @@ | |||
1480 | 1 | # longlong.m4 serial 14 | ||
1481 | 2 | dnl Copyright (C) 1999-2007, 2009-2010 Free Software Foundation, Inc. | ||
1482 | 3 | dnl This file is free software; the Free Software Foundation | ||
1483 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
1484 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
1485 | 6 | |||
1486 | 7 | dnl From Paul Eggert. | ||
1487 | 8 | |||
1488 | 9 | # Define HAVE_LONG_LONG_INT if 'long long int' works. | ||
1489 | 10 | # This fixes a bug in Autoconf 2.61, but can be removed once we | ||
1490 | 11 | # assume 2.62 everywhere. | ||
1491 | 12 | |||
1492 | 13 | # Note: If the type 'long long int' exists but is only 32 bits large | ||
1493 | 14 | # (as on some very old compilers), HAVE_LONG_LONG_INT will not be | ||
1494 | 15 | # defined. In this case you can treat 'long long int' like 'long int'. | ||
1495 | 16 | |||
1496 | 17 | AC_DEFUN([AC_TYPE_LONG_LONG_INT], | ||
1497 | 18 | [ | ||
1498 | 19 | AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], | ||
1499 | 20 | [AC_LINK_IFELSE( | ||
1500 | 21 | [_AC_TYPE_LONG_LONG_SNIPPET], | ||
1501 | 22 | [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. | ||
1502 | 23 | dnl If cross compiling, assume the bug isn't important, since | ||
1503 | 24 | dnl nobody cross compiles for this platform as far as we know. | ||
1504 | 25 | AC_RUN_IFELSE( | ||
1505 | 26 | [AC_LANG_PROGRAM( | ||
1506 | 27 | [[@%:@include <limits.h> | ||
1507 | 28 | @%:@ifndef LLONG_MAX | ||
1508 | 29 | @%:@ define HALF \ | ||
1509 | 30 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) | ||
1510 | 31 | @%:@ define LLONG_MAX (HALF - 1 + HALF) | ||
1511 | 32 | @%:@endif]], | ||
1512 | 33 | [[long long int n = 1; | ||
1513 | 34 | int i; | ||
1514 | 35 | for (i = 0; ; i++) | ||
1515 | 36 | { | ||
1516 | 37 | long long int m = n << i; | ||
1517 | 38 | if (m >> i != n) | ||
1518 | 39 | return 1; | ||
1519 | 40 | if (LLONG_MAX / 2 < m) | ||
1520 | 41 | break; | ||
1521 | 42 | } | ||
1522 | 43 | return 0;]])], | ||
1523 | 44 | [ac_cv_type_long_long_int=yes], | ||
1524 | 45 | [ac_cv_type_long_long_int=no], | ||
1525 | 46 | [ac_cv_type_long_long_int=yes])], | ||
1526 | 47 | [ac_cv_type_long_long_int=no])]) | ||
1527 | 48 | if test $ac_cv_type_long_long_int = yes; then | ||
1528 | 49 | AC_DEFINE([HAVE_LONG_LONG_INT], [1], | ||
1529 | 50 | [Define to 1 if the system has the type `long long int'.]) | ||
1530 | 51 | fi | ||
1531 | 52 | ]) | ||
1532 | 53 | |||
1533 | 54 | # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. | ||
1534 | 55 | # This fixes a bug in Autoconf 2.61, but can be removed once we | ||
1535 | 56 | # assume 2.62 everywhere. | ||
1536 | 57 | |||
1537 | 58 | # Note: If the type 'unsigned long long int' exists but is only 32 bits | ||
1538 | 59 | # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT | ||
1539 | 60 | # will not be defined. In this case you can treat 'unsigned long long int' | ||
1540 | 61 | # like 'unsigned long int'. | ||
1541 | 62 | |||
1542 | 63 | AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], | ||
1543 | 64 | [ | ||
1544 | 65 | AC_CACHE_CHECK([for unsigned long long int], | ||
1545 | 66 | [ac_cv_type_unsigned_long_long_int], | ||
1546 | 67 | [AC_LINK_IFELSE( | ||
1547 | 68 | [_AC_TYPE_LONG_LONG_SNIPPET], | ||
1548 | 69 | [ac_cv_type_unsigned_long_long_int=yes], | ||
1549 | 70 | [ac_cv_type_unsigned_long_long_int=no])]) | ||
1550 | 71 | if test $ac_cv_type_unsigned_long_long_int = yes; then | ||
1551 | 72 | AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], | ||
1552 | 73 | [Define to 1 if the system has the type `unsigned long long int'.]) | ||
1553 | 74 | fi | ||
1554 | 75 | ]) | ||
1555 | 76 | |||
1556 | 77 | # Expands to a C program that can be used to test for simultaneous support | ||
1557 | 78 | # of 'long long' and 'unsigned long long'. We don't want to say that | ||
1558 | 79 | # 'long long' is available if 'unsigned long long' is not, or vice versa, | ||
1559 | 80 | # because too many programs rely on the symmetry between signed and unsigned | ||
1560 | 81 | # integer types (excluding 'bool'). | ||
1561 | 82 | AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], | ||
1562 | 83 | [ | ||
1563 | 84 | AC_LANG_PROGRAM( | ||
1564 | 85 | [[/* For now, do not test the preprocessor; as of 2007 there are too many | ||
1565 | 86 | implementations with broken preprocessors. Perhaps this can | ||
1566 | 87 | be revisited in 2012. In the meantime, code should not expect | ||
1567 | 88 | #if to work with literals wider than 32 bits. */ | ||
1568 | 89 | /* Test literals. */ | ||
1569 | 90 | long long int ll = 9223372036854775807ll; | ||
1570 | 91 | long long int nll = -9223372036854775807LL; | ||
1571 | 92 | unsigned long long int ull = 18446744073709551615ULL; | ||
1572 | 93 | /* Test constant expressions. */ | ||
1573 | 94 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | ||
1574 | 95 | ? 1 : -1)]; | ||
1575 | 96 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | ||
1576 | 97 | ? 1 : -1)]; | ||
1577 | 98 | int i = 63;]], | ||
1578 | 99 | [[/* Test availability of runtime routines for shift and division. */ | ||
1579 | 100 | long long int llmax = 9223372036854775807ll; | ||
1580 | 101 | unsigned long long int ullmax = 18446744073709551615ull; | ||
1581 | 102 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | ||
1582 | 103 | | (llmax / ll) | (llmax % ll) | ||
1583 | 104 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | ||
1584 | 105 | | (ullmax / ull) | (ullmax % ull));]]) | ||
1585 | 106 | ]) | ||
1586 | 0 | 107 | ||
1587 | === added file 'm4/printf-posix.m4' | |||
1588 | --- m4/printf-posix.m4 1970-01-01 00:00:00 +0000 | |||
1589 | +++ m4/printf-posix.m4 2013-07-06 19:13:27 +0000 | |||
1590 | @@ -0,0 +1,45 @@ | |||
1591 | 1 | # printf-posix.m4 serial 5 (gettext-0.18) | ||
1592 | 2 | dnl Copyright (C) 2003, 2007, 2009-2010 Free Software Foundation, Inc. | ||
1593 | 3 | dnl This file is free software; the Free Software Foundation | ||
1594 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
1595 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
1596 | 6 | |||
1597 | 7 | dnl From Bruno Haible. | ||
1598 | 8 | dnl Test whether the printf() function supports POSIX/XSI format strings with | ||
1599 | 9 | dnl positions. | ||
1600 | 10 | |||
1601 | 11 | AC_DEFUN([gt_PRINTF_POSIX], | ||
1602 | 12 | [ | ||
1603 | 13 | AC_REQUIRE([AC_PROG_CC]) | ||
1604 | 14 | AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings], | ||
1605 | 15 | gt_cv_func_printf_posix, | ||
1606 | 16 | [ | ||
1607 | 17 | AC_TRY_RUN([ | ||
1608 | 18 | #include <stdio.h> | ||
1609 | 19 | #include <string.h> | ||
1610 | 20 | /* The string "%2$d %1$d", with dollar characters protected from the shell's | ||
1611 | 21 | dollar expansion (possibly an autoconf bug). */ | ||
1612 | 22 | static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; | ||
1613 | 23 | static char buf[100]; | ||
1614 | 24 | int main () | ||
1615 | 25 | { | ||
1616 | 26 | sprintf (buf, format, 33, 55); | ||
1617 | 27 | return (strcmp (buf, "55 33") != 0); | ||
1618 | 28 | }], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no, | ||
1619 | 29 | [ | ||
1620 | 30 | AC_EGREP_CPP([notposix], [ | ||
1621 | 31 | #if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ | ||
1622 | 32 | notposix | ||
1623 | 33 | #endif | ||
1624 | 34 | ], | ||
1625 | 35 | [gt_cv_func_printf_posix="guessing no"], | ||
1626 | 36 | [gt_cv_func_printf_posix="guessing yes"]) | ||
1627 | 37 | ]) | ||
1628 | 38 | ]) | ||
1629 | 39 | case $gt_cv_func_printf_posix in | ||
1630 | 40 | *yes) | ||
1631 | 41 | AC_DEFINE([HAVE_POSIX_PRINTF], [1], | ||
1632 | 42 | [Define if your printf() function supports format strings with positions.]) | ||
1633 | 43 | ;; | ||
1634 | 44 | esac | ||
1635 | 45 | ]) | ||
1636 | 0 | 46 | ||
1637 | === added file 'm4/size_max.m4' | |||
1638 | --- m4/size_max.m4 1970-01-01 00:00:00 +0000 | |||
1639 | +++ m4/size_max.m4 2013-07-06 19:13:27 +0000 | |||
1640 | @@ -0,0 +1,75 @@ | |||
1641 | 1 | # size_max.m4 serial 9 | ||
1642 | 2 | dnl Copyright (C) 2003, 2005-2006, 2008-2010 Free Software Foundation, Inc. | ||
1643 | 3 | dnl This file is free software; the Free Software Foundation | ||
1644 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
1645 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
1646 | 6 | |||
1647 | 7 | dnl From Bruno Haible. | ||
1648 | 8 | |||
1649 | 9 | AC_DEFUN([gl_SIZE_MAX], | ||
1650 | 10 | [ | ||
1651 | 11 | AC_CHECK_HEADERS([stdint.h]) | ||
1652 | 12 | dnl First test whether the system already has SIZE_MAX. | ||
1653 | 13 | AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [ | ||
1654 | 14 | gl_cv_size_max= | ||
1655 | 15 | AC_EGREP_CPP([Found it], [ | ||
1656 | 16 | #include <limits.h> | ||
1657 | 17 | #if HAVE_STDINT_H | ||
1658 | 18 | #include <stdint.h> | ||
1659 | 19 | #endif | ||
1660 | 20 | #ifdef SIZE_MAX | ||
1661 | 21 | Found it | ||
1662 | 22 | #endif | ||
1663 | 23 | ], [gl_cv_size_max=yes]) | ||
1664 | 24 | if test -z "$gl_cv_size_max"; then | ||
1665 | 25 | dnl Define it ourselves. Here we assume that the type 'size_t' is not wider | ||
1666 | 26 | dnl than the type 'unsigned long'. Try hard to find a definition that can | ||
1667 | 27 | dnl be used in a preprocessor #if, i.e. doesn't contain a cast. | ||
1668 | 28 | AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], | ||
1669 | 29 | [#include <stddef.h> | ||
1670 | 30 | #include <limits.h>], [size_t_bits_minus_1=]) | ||
1671 | 31 | AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], | ||
1672 | 32 | [#include <stddef.h>], [fits_in_uint=]) | ||
1673 | 33 | if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then | ||
1674 | 34 | if test $fits_in_uint = 1; then | ||
1675 | 35 | dnl Even though SIZE_MAX fits in an unsigned int, it must be of type | ||
1676 | 36 | dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. | ||
1677 | 37 | AC_TRY_COMPILE([#include <stddef.h> | ||
1678 | 38 | extern size_t foo; | ||
1679 | 39 | extern unsigned long foo; | ||
1680 | 40 | ], [], [fits_in_uint=0]) | ||
1681 | 41 | fi | ||
1682 | 42 | dnl We cannot use 'expr' to simplify this expression, because 'expr' | ||
1683 | 43 | dnl works only with 'long' integers in the host environment, while we | ||
1684 | 44 | dnl might be cross-compiling from a 32-bit platform to a 64-bit platform. | ||
1685 | 45 | if test $fits_in_uint = 1; then | ||
1686 | 46 | gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" | ||
1687 | 47 | else | ||
1688 | 48 | gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" | ||
1689 | 49 | fi | ||
1690 | 50 | else | ||
1691 | 51 | dnl Shouldn't happen, but who knows... | ||
1692 | 52 | gl_cv_size_max='((size_t)~(size_t)0)' | ||
1693 | 53 | fi | ||
1694 | 54 | fi | ||
1695 | 55 | ]) | ||
1696 | 56 | if test "$gl_cv_size_max" != yes; then | ||
1697 | 57 | AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], | ||
1698 | 58 | [Define as the maximum value of type 'size_t', if the system doesn't define it.]) | ||
1699 | 59 | fi | ||
1700 | 60 | dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after | ||
1701 | 61 | dnl <stdint.h>. Remember that the #undef in AH_VERBATIM gets replaced with | ||
1702 | 62 | dnl #define by AC_DEFINE_UNQUOTED. | ||
1703 | 63 | AH_VERBATIM([SIZE_MAX], | ||
1704 | 64 | [/* Define as the maximum value of type 'size_t', if the system doesn't define | ||
1705 | 65 | it. */ | ||
1706 | 66 | #ifndef SIZE_MAX | ||
1707 | 67 | # undef SIZE_MAX | ||
1708 | 68 | #endif]) | ||
1709 | 69 | ]) | ||
1710 | 70 | |||
1711 | 71 | dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. | ||
1712 | 72 | dnl Remove this when we can assume autoconf >= 2.61. | ||
1713 | 73 | m4_ifdef([AC_COMPUTE_INT], [], [ | ||
1714 | 74 | AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) | ||
1715 | 75 | ]) | ||
1716 | 0 | 76 | ||
1717 | === added file 'm4/stdint_h.m4' | |||
1718 | --- m4/stdint_h.m4 1970-01-01 00:00:00 +0000 | |||
1719 | +++ m4/stdint_h.m4 2013-07-06 19:13:27 +0000 | |||
1720 | @@ -0,0 +1,26 @@ | |||
1721 | 1 | # stdint_h.m4 serial 8 | ||
1722 | 2 | dnl Copyright (C) 1997-2004, 2006, 2008-2010 Free Software Foundation, Inc. | ||
1723 | 3 | dnl This file is free software; the Free Software Foundation | ||
1724 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
1725 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
1726 | 6 | |||
1727 | 7 | dnl From Paul Eggert. | ||
1728 | 8 | |||
1729 | 9 | # Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists, | ||
1730 | 10 | # doesn't clash with <sys/types.h>, and declares uintmax_t. | ||
1731 | 11 | |||
1732 | 12 | AC_DEFUN([gl_AC_HEADER_STDINT_H], | ||
1733 | 13 | [ | ||
1734 | 14 | AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h], | ||
1735 | 15 | [AC_TRY_COMPILE( | ||
1736 | 16 | [#include <sys/types.h> | ||
1737 | 17 | #include <stdint.h>], | ||
1738 | 18 | [uintmax_t i = (uintmax_t) -1; return !i;], | ||
1739 | 19 | [gl_cv_header_stdint_h=yes], | ||
1740 | 20 | [gl_cv_header_stdint_h=no])]) | ||
1741 | 21 | if test $gl_cv_header_stdint_h = yes; then | ||
1742 | 22 | AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1], | ||
1743 | 23 | [Define if <stdint.h> exists, doesn't clash with <sys/types.h>, | ||
1744 | 24 | and declares uintmax_t. ]) | ||
1745 | 25 | fi | ||
1746 | 26 | ]) | ||
1747 | 0 | 27 | ||
1748 | === added file 'm4/threadlib.m4' | |||
1749 | --- m4/threadlib.m4 1970-01-01 00:00:00 +0000 | |||
1750 | +++ m4/threadlib.m4 2013-07-06 19:13:27 +0000 | |||
1751 | @@ -0,0 +1,347 @@ | |||
1752 | 1 | # threadlib.m4 serial 5 (gettext-0.18) | ||
1753 | 2 | dnl Copyright (C) 2005-2010 Free Software Foundation, Inc. | ||
1754 | 3 | dnl This file is free software; the Free Software Foundation | ||
1755 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
1756 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
1757 | 6 | |||
1758 | 7 | dnl From Bruno Haible. | ||
1759 | 8 | |||
1760 | 9 | dnl gl_THREADLIB | ||
1761 | 10 | dnl ------------ | ||
1762 | 11 | dnl Tests for a multithreading library to be used. | ||
1763 | 12 | dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS, | ||
1764 | 13 | dnl USE_PTH_THREADS, USE_WIN32_THREADS | ||
1765 | 14 | dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use | ||
1766 | 15 | dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with | ||
1767 | 16 | dnl libtool). | ||
1768 | 17 | dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for | ||
1769 | 18 | dnl programs that really need multithread functionality. The difference | ||
1770 | 19 | dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak | ||
1771 | 20 | dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread". | ||
1772 | 21 | dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for | ||
1773 | 22 | dnl multithread-safe programs. | ||
1774 | 23 | |||
1775 | 24 | AC_DEFUN([gl_THREADLIB_EARLY], | ||
1776 | 25 | [ | ||
1777 | 26 | AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) | ||
1778 | 27 | ]) | ||
1779 | 28 | |||
1780 | 29 | dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once. | ||
1781 | 30 | |||
1782 | 31 | AC_DEFUN([gl_THREADLIB_EARLY_BODY], | ||
1783 | 32 | [ | ||
1784 | 33 | dnl Ordering constraints: This macro modifies CPPFLAGS in a way that | ||
1785 | 34 | dnl influences the result of the autoconf tests that test for *_unlocked | ||
1786 | 35 | dnl declarations, on AIX 5 at least. Therefore it must come early. | ||
1787 | 36 | AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl | ||
1788 | 37 | AC_BEFORE([$0], [gl_ARGP])dnl | ||
1789 | 38 | |||
1790 | 39 | AC_REQUIRE([AC_CANONICAL_HOST]) | ||
1791 | 40 | dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems. | ||
1792 | 41 | dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes | ||
1793 | 42 | dnl AC_GNU_SOURCE. | ||
1794 | 43 | m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], | ||
1795 | 44 | [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], | ||
1796 | 45 | [AC_REQUIRE([AC_GNU_SOURCE])]) | ||
1797 | 46 | dnl Check for multithreading. | ||
1798 | 47 | m4_divert_text([DEFAULTS], [gl_use_threads_default=]) | ||
1799 | 48 | AC_ARG_ENABLE([threads], | ||
1800 | 49 | AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API]) | ||
1801 | 50 | AC_HELP_STRING([--disable-threads], [build without multithread safety]), | ||
1802 | 51 | [gl_use_threads=$enableval], | ||
1803 | 52 | [if test -n "$gl_use_threads_default"; then | ||
1804 | 53 | gl_use_threads="$gl_use_threads_default" | ||
1805 | 54 | else | ||
1806 | 55 | changequote(,)dnl | ||
1807 | 56 | case "$host_os" in | ||
1808 | 57 | dnl Disable multithreading by default on OSF/1, because it interferes | ||
1809 | 58 | dnl with fork()/exec(): When msgexec is linked with -lpthread, its | ||
1810 | 59 | dnl child process gets an endless segmentation fault inside execvp(). | ||
1811 | 60 | dnl Disable multithreading by default on Cygwin 1.5.x, because it has | ||
1812 | 61 | dnl bugs that lead to endless loops or crashes. See | ||
1813 | 62 | dnl <http://cygwin.com/ml/cygwin/2009-08/msg00283.html>. | ||
1814 | 63 | osf*) gl_use_threads=no ;; | ||
1815 | 64 | cygwin*) | ||
1816 | 65 | case `uname -r` in | ||
1817 | 66 | 1.[0-5].*) gl_use_threads=no ;; | ||
1818 | 67 | *) gl_use_threads=yes ;; | ||
1819 | 68 | esac | ||
1820 | 69 | ;; | ||
1821 | 70 | *) gl_use_threads=yes ;; | ||
1822 | 71 | esac | ||
1823 | 72 | changequote([,])dnl | ||
1824 | 73 | fi | ||
1825 | 74 | ]) | ||
1826 | 75 | if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then | ||
1827 | 76 | # For using <pthread.h>: | ||
1828 | 77 | case "$host_os" in | ||
1829 | 78 | osf*) | ||
1830 | 79 | # On OSF/1, the compiler needs the flag -D_REENTRANT so that it | ||
1831 | 80 | # groks <pthread.h>. cc also understands the flag -pthread, but | ||
1832 | 81 | # we don't use it because 1. gcc-2.95 doesn't understand -pthread, | ||
1833 | 82 | # 2. putting a flag into CPPFLAGS that has an effect on the linker | ||
1834 | 83 | # causes the AC_TRY_LINK test below to succeed unexpectedly, | ||
1835 | 84 | # leading to wrong values of LIBTHREAD and LTLIBTHREAD. | ||
1836 | 85 | CPPFLAGS="$CPPFLAGS -D_REENTRANT" | ||
1837 | 86 | ;; | ||
1838 | 87 | esac | ||
1839 | 88 | # Some systems optimize for single-threaded programs by default, and | ||
1840 | 89 | # need special flags to disable these optimizations. For example, the | ||
1841 | 90 | # definition of 'errno' in <errno.h>. | ||
1842 | 91 | case "$host_os" in | ||
1843 | 92 | aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; | ||
1844 | 93 | solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; | ||
1845 | 94 | esac | ||
1846 | 95 | fi | ||
1847 | 96 | ]) | ||
1848 | 97 | |||
1849 | 98 | dnl The guts of gl_THREADLIB. Needs to be expanded only once. | ||
1850 | 99 | |||
1851 | 100 | AC_DEFUN([gl_THREADLIB_BODY], | ||
1852 | 101 | [ | ||
1853 | 102 | AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) | ||
1854 | 103 | gl_threads_api=none | ||
1855 | 104 | LIBTHREAD= | ||
1856 | 105 | LTLIBTHREAD= | ||
1857 | 106 | LIBMULTITHREAD= | ||
1858 | 107 | LTLIBMULTITHREAD= | ||
1859 | 108 | if test "$gl_use_threads" != no; then | ||
1860 | 109 | dnl Check whether the compiler and linker support weak declarations. | ||
1861 | 110 | AC_CACHE_CHECK([whether imported symbols can be declared weak], | ||
1862 | 111 | [gl_cv_have_weak], | ||
1863 | 112 | [gl_cv_have_weak=no | ||
1864 | 113 | dnl First, test whether the compiler accepts it syntactically. | ||
1865 | 114 | AC_TRY_LINK([extern void xyzzy (); | ||
1866 | 115 | #pragma weak xyzzy], [xyzzy();], [gl_cv_have_weak=maybe]) | ||
1867 | 116 | if test $gl_cv_have_weak = maybe; then | ||
1868 | 117 | dnl Second, test whether it actually works. On Cygwin 1.7.2, with | ||
1869 | 118 | dnl gcc 4.3, symbols declared weak always evaluate to the address 0. | ||
1870 | 119 | AC_TRY_RUN([ | ||
1871 | 120 | #include <stdio.h> | ||
1872 | 121 | #pragma weak fputs | ||
1873 | 122 | int main () | ||
1874 | 123 | { | ||
1875 | 124 | return (fputs == NULL); | ||
1876 | 125 | }], [gl_cv_have_weak=yes], [gl_cv_have_weak=no], | ||
1877 | 126 | [dnl When cross-compiling, assume that only ELF platforms support | ||
1878 | 127 | dnl weak symbols. | ||
1879 | 128 | AC_EGREP_CPP([Extensible Linking Format], | ||
1880 | 129 | [#ifdef __ELF__ | ||
1881 | 130 | Extensible Linking Format | ||
1882 | 131 | #endif | ||
1883 | 132 | ], | ||
1884 | 133 | [gl_cv_have_weak="guessing yes"], | ||
1885 | 134 | [gl_cv_have_weak="guessing no"]) | ||
1886 | 135 | ]) | ||
1887 | 136 | fi | ||
1888 | 137 | ]) | ||
1889 | 138 | if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then | ||
1890 | 139 | # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that | ||
1891 | 140 | # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY. | ||
1892 | 141 | AC_CHECK_HEADER([pthread.h], | ||
1893 | 142 | [gl_have_pthread_h=yes], [gl_have_pthread_h=no]) | ||
1894 | 143 | if test "$gl_have_pthread_h" = yes; then | ||
1895 | 144 | # Other possible tests: | ||
1896 | 145 | # -lpthreads (FSU threads, PCthreads) | ||
1897 | 146 | # -lgthreads | ||
1898 | 147 | gl_have_pthread= | ||
1899 | 148 | # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist | ||
1900 | 149 | # in libc. IRIX 6.5 has the first one in both libc and libpthread, but | ||
1901 | 150 | # the second one only in libpthread, and lock.c needs it. | ||
1902 | 151 | AC_TRY_LINK([#include <pthread.h>], | ||
1903 | 152 | [pthread_mutex_lock((pthread_mutex_t*)0); | ||
1904 | 153 | pthread_mutexattr_init((pthread_mutexattr_t*)0);], | ||
1905 | 154 | [gl_have_pthread=yes]) | ||
1906 | 155 | # Test for libpthread by looking for pthread_kill. (Not pthread_self, | ||
1907 | 156 | # since it is defined as a macro on OSF/1.) | ||
1908 | 157 | if test -n "$gl_have_pthread"; then | ||
1909 | 158 | # The program links fine without libpthread. But it may actually | ||
1910 | 159 | # need to link with libpthread in order to create multiple threads. | ||
1911 | 160 | AC_CHECK_LIB([pthread], [pthread_kill], | ||
1912 | 161 | [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread | ||
1913 | 162 | # On Solaris and HP-UX, most pthread functions exist also in libc. | ||
1914 | 163 | # Therefore pthread_in_use() needs to actually try to create a | ||
1915 | 164 | # thread: pthread_create from libc will fail, whereas | ||
1916 | 165 | # pthread_create will actually create a thread. | ||
1917 | 166 | case "$host_os" in | ||
1918 | 167 | solaris* | hpux*) | ||
1919 | 168 | AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1], | ||
1920 | 169 | [Define if the pthread_in_use() detection is hard.]) | ||
1921 | 170 | esac | ||
1922 | 171 | ]) | ||
1923 | 172 | else | ||
1924 | 173 | # Some library is needed. Try libpthread and libc_r. | ||
1925 | 174 | AC_CHECK_LIB([pthread], [pthread_kill], | ||
1926 | 175 | [gl_have_pthread=yes | ||
1927 | 176 | LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread | ||
1928 | 177 | LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) | ||
1929 | 178 | if test -z "$gl_have_pthread"; then | ||
1930 | 179 | # For FreeBSD 4. | ||
1931 | 180 | AC_CHECK_LIB([c_r], [pthread_kill], | ||
1932 | 181 | [gl_have_pthread=yes | ||
1933 | 182 | LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r | ||
1934 | 183 | LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) | ||
1935 | 184 | fi | ||
1936 | 185 | fi | ||
1937 | 186 | if test -n "$gl_have_pthread"; then | ||
1938 | 187 | gl_threads_api=posix | ||
1939 | 188 | AC_DEFINE([USE_POSIX_THREADS], [1], | ||
1940 | 189 | [Define if the POSIX multithreading library can be used.]) | ||
1941 | 190 | if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then | ||
1942 | 191 | if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then | ||
1943 | 192 | AC_DEFINE([USE_POSIX_THREADS_WEAK], [1], | ||
1944 | 193 | [Define if references to the POSIX multithreading library should be made weak.]) | ||
1945 | 194 | LIBTHREAD= | ||
1946 | 195 | LTLIBTHREAD= | ||
1947 | 196 | fi | ||
1948 | 197 | fi | ||
1949 | 198 | fi | ||
1950 | 199 | fi | ||
1951 | 200 | fi | ||
1952 | 201 | if test -z "$gl_have_pthread"; then | ||
1953 | 202 | if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then | ||
1954 | 203 | gl_have_solaristhread= | ||
1955 | 204 | gl_save_LIBS="$LIBS" | ||
1956 | 205 | LIBS="$LIBS -lthread" | ||
1957 | 206 | AC_TRY_LINK([#include <thread.h> | ||
1958 | 207 | #include <synch.h>], | ||
1959 | 208 | [thr_self();], | ||
1960 | 209 | [gl_have_solaristhread=yes]) | ||
1961 | 210 | LIBS="$gl_save_LIBS" | ||
1962 | 211 | if test -n "$gl_have_solaristhread"; then | ||
1963 | 212 | gl_threads_api=solaris | ||
1964 | 213 | LIBTHREAD=-lthread | ||
1965 | 214 | LTLIBTHREAD=-lthread | ||
1966 | 215 | LIBMULTITHREAD="$LIBTHREAD" | ||
1967 | 216 | LTLIBMULTITHREAD="$LTLIBTHREAD" | ||
1968 | 217 | AC_DEFINE([USE_SOLARIS_THREADS], [1], | ||
1969 | 218 | [Define if the old Solaris multithreading library can be used.]) | ||
1970 | 219 | if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then | ||
1971 | 220 | AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1], | ||
1972 | 221 | [Define if references to the old Solaris multithreading library should be made weak.]) | ||
1973 | 222 | LIBTHREAD= | ||
1974 | 223 | LTLIBTHREAD= | ||
1975 | 224 | fi | ||
1976 | 225 | fi | ||
1977 | 226 | fi | ||
1978 | 227 | fi | ||
1979 | 228 | if test "$gl_use_threads" = pth; then | ||
1980 | 229 | gl_save_CPPFLAGS="$CPPFLAGS" | ||
1981 | 230 | AC_LIB_LINKFLAGS([pth]) | ||
1982 | 231 | gl_have_pth= | ||
1983 | 232 | gl_save_LIBS="$LIBS" | ||
1984 | 233 | LIBS="$LIBS -lpth" | ||
1985 | 234 | AC_TRY_LINK([#include <pth.h>], [pth_self();], [gl_have_pth=yes]) | ||
1986 | 235 | LIBS="$gl_save_LIBS" | ||
1987 | 236 | if test -n "$gl_have_pth"; then | ||
1988 | 237 | gl_threads_api=pth | ||
1989 | 238 | LIBTHREAD="$LIBPTH" | ||
1990 | 239 | LTLIBTHREAD="$LTLIBPTH" | ||
1991 | 240 | LIBMULTITHREAD="$LIBTHREAD" | ||
1992 | 241 | LTLIBMULTITHREAD="$LTLIBTHREAD" | ||
1993 | 242 | AC_DEFINE([USE_PTH_THREADS], [1], | ||
1994 | 243 | [Define if the GNU Pth multithreading library can be used.]) | ||
1995 | 244 | if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then | ||
1996 | 245 | if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then | ||
1997 | 246 | AC_DEFINE([USE_PTH_THREADS_WEAK], [1], | ||
1998 | 247 | [Define if references to the GNU Pth multithreading library should be made weak.]) | ||
1999 | 248 | LIBTHREAD= | ||
2000 | 249 | LTLIBTHREAD= | ||
2001 | 250 | fi | ||
2002 | 251 | fi | ||
2003 | 252 | else | ||
2004 | 253 | CPPFLAGS="$gl_save_CPPFLAGS" | ||
2005 | 254 | fi | ||
2006 | 255 | fi | ||
2007 | 256 | if test -z "$gl_have_pthread"; then | ||
2008 | 257 | if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then | ||
2009 | 258 | if { case "$host_os" in | ||
2010 | 259 | mingw*) true;; | ||
2011 | 260 | *) false;; | ||
2012 | 261 | esac | ||
2013 | 262 | }; then | ||
2014 | 263 | gl_threads_api=win32 | ||
2015 | 264 | AC_DEFINE([USE_WIN32_THREADS], [1], | ||
2016 | 265 | [Define if the Win32 multithreading API can be used.]) | ||
2017 | 266 | fi | ||
2018 | 267 | fi | ||
2019 | 268 | fi | ||
2020 | 269 | fi | ||
2021 | 270 | AC_MSG_CHECKING([for multithread API to use]) | ||
2022 | 271 | AC_MSG_RESULT([$gl_threads_api]) | ||
2023 | 272 | AC_SUBST([LIBTHREAD]) | ||
2024 | 273 | AC_SUBST([LTLIBTHREAD]) | ||
2025 | 274 | AC_SUBST([LIBMULTITHREAD]) | ||
2026 | 275 | AC_SUBST([LTLIBMULTITHREAD]) | ||
2027 | 276 | ]) | ||
2028 | 277 | |||
2029 | 278 | AC_DEFUN([gl_THREADLIB], | ||
2030 | 279 | [ | ||
2031 | 280 | AC_REQUIRE([gl_THREADLIB_EARLY]) | ||
2032 | 281 | AC_REQUIRE([gl_THREADLIB_BODY]) | ||
2033 | 282 | ]) | ||
2034 | 283 | |||
2035 | 284 | |||
2036 | 285 | dnl gl_DISABLE_THREADS | ||
2037 | 286 | dnl ------------------ | ||
2038 | 287 | dnl Sets the gl_THREADLIB default so that threads are not used by default. | ||
2039 | 288 | dnl The user can still override it at installation time, by using the | ||
2040 | 289 | dnl configure option '--enable-threads'. | ||
2041 | 290 | |||
2042 | 291 | AC_DEFUN([gl_DISABLE_THREADS], [ | ||
2043 | 292 | m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no]) | ||
2044 | 293 | ]) | ||
2045 | 294 | |||
2046 | 295 | |||
2047 | 296 | dnl Survey of platforms: | ||
2048 | 297 | dnl | ||
2049 | 298 | dnl Platform Available Compiler Supports test-lock | ||
2050 | 299 | dnl flavours option weak result | ||
2051 | 300 | dnl --------------- --------- --------- -------- --------- | ||
2052 | 301 | dnl Linux 2.4/glibc posix -lpthread Y OK | ||
2053 | 302 | dnl | ||
2054 | 303 | dnl GNU Hurd/glibc posix | ||
2055 | 304 | dnl | ||
2056 | 305 | dnl FreeBSD 5.3 posix -lc_r Y | ||
2057 | 306 | dnl posix -lkse ? Y | ||
2058 | 307 | dnl posix -lpthread ? Y | ||
2059 | 308 | dnl posix -lthr Y | ||
2060 | 309 | dnl | ||
2061 | 310 | dnl FreeBSD 5.2 posix -lc_r Y | ||
2062 | 311 | dnl posix -lkse Y | ||
2063 | 312 | dnl posix -lthr Y | ||
2064 | 313 | dnl | ||
2065 | 314 | dnl FreeBSD 4.0,4.10 posix -lc_r Y OK | ||
2066 | 315 | dnl | ||
2067 | 316 | dnl NetBSD 1.6 -- | ||
2068 | 317 | dnl | ||
2069 | 318 | dnl OpenBSD 3.4 posix -lpthread Y OK | ||
2070 | 319 | dnl | ||
2071 | 320 | dnl MacOS X 10.[123] posix -lpthread Y OK | ||
2072 | 321 | dnl | ||
2073 | 322 | dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK | ||
2074 | 323 | dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK | ||
2075 | 324 | dnl | ||
2076 | 325 | dnl HP-UX 11 posix -lpthread N (cc) OK | ||
2077 | 326 | dnl Y (gcc) | ||
2078 | 327 | dnl | ||
2079 | 328 | dnl IRIX 6.5 posix -lpthread Y 0.5 | ||
2080 | 329 | dnl | ||
2081 | 330 | dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK | ||
2082 | 331 | dnl | ||
2083 | 332 | dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK | ||
2084 | 333 | dnl -lpthread (gcc) Y | ||
2085 | 334 | dnl | ||
2086 | 335 | dnl Cygwin posix -lpthread Y OK | ||
2087 | 336 | dnl | ||
2088 | 337 | dnl Any of the above pth -lpth 0.0 | ||
2089 | 338 | dnl | ||
2090 | 339 | dnl Mingw win32 N OK | ||
2091 | 340 | dnl | ||
2092 | 341 | dnl BeOS 5 -- | ||
2093 | 342 | dnl | ||
2094 | 343 | dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is | ||
2095 | 344 | dnl turned off: | ||
2096 | 345 | dnl OK if all three tests terminate OK, | ||
2097 | 346 | dnl 0.5 if the first test terminates OK but the second one loops endlessly, | ||
2098 | 347 | dnl 0.0 if the first test already loops endlessly. | ||
2099 | 0 | 348 | ||
2100 | === added file 'm4/uintmax_t.m4' | |||
2101 | --- m4/uintmax_t.m4 1970-01-01 00:00:00 +0000 | |||
2102 | +++ m4/uintmax_t.m4 2013-07-06 19:13:27 +0000 | |||
2103 | @@ -0,0 +1,30 @@ | |||
2104 | 1 | # uintmax_t.m4 serial 12 | ||
2105 | 2 | dnl Copyright (C) 1997-2004, 2007-2010 Free Software Foundation, Inc. | ||
2106 | 3 | dnl This file is free software; the Free Software Foundation | ||
2107 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
2108 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
2109 | 6 | |||
2110 | 7 | dnl From Paul Eggert. | ||
2111 | 8 | |||
2112 | 9 | AC_PREREQ([2.13]) | ||
2113 | 10 | |||
2114 | 11 | # Define uintmax_t to 'unsigned long' or 'unsigned long long' | ||
2115 | 12 | # if it is not already defined in <stdint.h> or <inttypes.h>. | ||
2116 | 13 | |||
2117 | 14 | AC_DEFUN([gl_AC_TYPE_UINTMAX_T], | ||
2118 | 15 | [ | ||
2119 | 16 | AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) | ||
2120 | 17 | AC_REQUIRE([gl_AC_HEADER_STDINT_H]) | ||
2121 | 18 | if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then | ||
2122 | 19 | AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) | ||
2123 | 20 | test $ac_cv_type_unsigned_long_long_int = yes \ | ||
2124 | 21 | && ac_type='unsigned long long' \ | ||
2125 | 22 | || ac_type='unsigned long' | ||
2126 | 23 | AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type], | ||
2127 | 24 | [Define to unsigned long or unsigned long long | ||
2128 | 25 | if <stdint.h> and <inttypes.h> don't define.]) | ||
2129 | 26 | else | ||
2130 | 27 | AC_DEFINE([HAVE_UINTMAX_T], [1], | ||
2131 | 28 | [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.]) | ||
2132 | 29 | fi | ||
2133 | 30 | ]) | ||
2134 | 0 | 31 | ||
2135 | === added file 'm4/wchar_t.m4' | |||
2136 | --- m4/wchar_t.m4 1970-01-01 00:00:00 +0000 | |||
2137 | +++ m4/wchar_t.m4 2013-07-06 19:13:27 +0000 | |||
2138 | @@ -0,0 +1,20 @@ | |||
2139 | 1 | # wchar_t.m4 serial 3 (gettext-0.18) | ||
2140 | 2 | dnl Copyright (C) 2002-2003, 2008-2010 Free Software Foundation, Inc. | ||
2141 | 3 | dnl This file is free software; the Free Software Foundation | ||
2142 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
2143 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
2144 | 6 | |||
2145 | 7 | dnl From Bruno Haible. | ||
2146 | 8 | dnl Test whether <stddef.h> has the 'wchar_t' type. | ||
2147 | 9 | dnl Prerequisite: AC_PROG_CC | ||
2148 | 10 | |||
2149 | 11 | AC_DEFUN([gt_TYPE_WCHAR_T], | ||
2150 | 12 | [ | ||
2151 | 13 | AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], | ||
2152 | 14 | [AC_TRY_COMPILE([#include <stddef.h> | ||
2153 | 15 | wchar_t foo = (wchar_t)'\0';], , | ||
2154 | 16 | [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])]) | ||
2155 | 17 | if test $gt_cv_c_wchar_t = yes; then | ||
2156 | 18 | AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) | ||
2157 | 19 | fi | ||
2158 | 20 | ]) | ||
2159 | 0 | 21 | ||
2160 | === added file 'm4/wint_t.m4' | |||
2161 | --- m4/wint_t.m4 1970-01-01 00:00:00 +0000 | |||
2162 | +++ m4/wint_t.m4 2013-07-06 19:13:27 +0000 | |||
2163 | @@ -0,0 +1,28 @@ | |||
2164 | 1 | # wint_t.m4 serial 4 (gettext-0.18) | ||
2165 | 2 | dnl Copyright (C) 2003, 2007-2010 Free Software Foundation, Inc. | ||
2166 | 3 | dnl This file is free software; the Free Software Foundation | ||
2167 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
2168 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
2169 | 6 | |||
2170 | 7 | dnl From Bruno Haible. | ||
2171 | 8 | dnl Test whether <wchar.h> has the 'wint_t' type. | ||
2172 | 9 | dnl Prerequisite: AC_PROG_CC | ||
2173 | 10 | |||
2174 | 11 | AC_DEFUN([gt_TYPE_WINT_T], | ||
2175 | 12 | [ | ||
2176 | 13 | AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], | ||
2177 | 14 | [AC_TRY_COMPILE([ | ||
2178 | 15 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | ||
2179 | 16 | <wchar.h>. | ||
2180 | 17 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included | ||
2181 | 18 | before <wchar.h>. */ | ||
2182 | 19 | #include <stddef.h> | ||
2183 | 20 | #include <stdio.h> | ||
2184 | 21 | #include <time.h> | ||
2185 | 22 | #include <wchar.h> | ||
2186 | 23 | wint_t foo = (wchar_t)'\0';], , | ||
2187 | 24 | [gt_cv_c_wint_t=yes], [gt_cv_c_wint_t=no])]) | ||
2188 | 25 | if test $gt_cv_c_wint_t = yes; then | ||
2189 | 26 | AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) | ||
2190 | 27 | fi | ||
2191 | 28 | ]) | ||
2192 | 0 | 29 | ||
2193 | === added file 'm4/xsize.m4' | |||
2194 | --- m4/xsize.m4 1970-01-01 00:00:00 +0000 | |||
2195 | +++ m4/xsize.m4 2013-07-06 19:13:27 +0000 | |||
2196 | @@ -0,0 +1,13 @@ | |||
2197 | 1 | # xsize.m4 serial 4 | ||
2198 | 2 | dnl Copyright (C) 2003-2004, 2008-2010 Free Software Foundation, Inc. | ||
2199 | 3 | dnl This file is free software; the Free Software Foundation | ||
2200 | 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
2201 | 5 | dnl with or without modifications, as long as this notice is preserved. | ||
2202 | 6 | |||
2203 | 7 | AC_DEFUN([gl_XSIZE], | ||
2204 | 8 | [ | ||
2205 | 9 | dnl Prerequisites of lib/xsize.h. | ||
2206 | 10 | AC_REQUIRE([gl_SIZE_MAX]) | ||
2207 | 11 | AC_REQUIRE([AC_C_INLINE]) | ||
2208 | 12 | AC_CHECK_HEADERS([stdint.h]) | ||
2209 | 13 | ]) |