Imported Upstream version 1.5
[debian/gzip] / m4 / gnulib-comp.m4
1 # DO NOT EDIT! GENERATED AUTOMATICALLY!
2 # Copyright (C) 2002-2012 Free Software Foundation, Inc.
3 #
4 # This file is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This file is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this file.  If not, see <http://www.gnu.org/licenses/>.
16 #
17 # As a special exception to the GNU General Public License,
18 # this file may be distributed as part of a program that
19 # contains a configuration script generated by Autoconf, under
20 # the same distribution terms as the rest of that program.
21 #
22 # Generated by gnulib-tool.
23 #
24 # This file represents the compiled summary of the specification in
25 # gnulib-cache.m4. It lists the computed macro invocations that need
26 # to be invoked from configure.ac.
27 # In projects that use version control, this file can be treated like
28 # other built files.
29
30
31 # This macro should be invoked from ./configure.ac, in the section
32 # "Checks for programs", right after AC_PROG_CC, and certainly before
33 # any checks for libraries, header files, types and library functions.
34 AC_DEFUN([gl_EARLY],
35 [
36   m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace
37   m4_pattern_allow([^gl_ES$])dnl a valid locale name
38   m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
39   m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
40   AC_REQUIRE([gl_PROG_AR_RANLIB])
41   AC_REQUIRE([AM_PROG_CC_C_O])
42   # Code from module alloca-opt:
43   # Code from module announce-gen:
44   # Code from module at-internal:
45   # Code from module c-ctype:
46   # Code from module c-strcase:
47   # Code from module c-strcaseeq:
48   # Code from module calloc:
49   # Code from module calloc-gnu:
50   # Code from module calloc-posix:
51   # Code from module chdir:
52   # Code from module chdir-long:
53   # Code from module clock-time:
54   # Code from module cloexec:
55   # Code from module close:
56   # Code from module close-stream:
57   # Code from module closedir:
58   # Code from module closein:
59   # Code from module closeout:
60   # Code from module configmake:
61   # Code from module dirent:
62   # Code from module dirent-safer:
63   # Code from module dirfd:
64   # Code from module dirname-lgpl:
65   # Code from module do-release-commit-and-tag:
66   # Code from module dosname:
67   # Code from module double-slash-root:
68   # Code from module dup:
69   # Code from module dup2:
70   # Code from module errno:
71   # Code from module error:
72   # Code from module exitfail:
73   # Code from module extensions:
74   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
75   # Code from module fchdir:
76   # Code from module fclose:
77   # Code from module fcntl:
78   # Code from module fcntl-h:
79   # Code from module fcntl-safer:
80   # Code from module fd-hook:
81   # Code from module fdl:
82   # Code from module fdopendir:
83   # Code from module fflush:
84   AC_REQUIRE([AC_FUNC_FSEEKO])
85   # Code from module filename:
86   # Code from module filenamecat-lgpl:
87   # Code from module float:
88   # Code from module fpending:
89   # Code from module fpieee:
90   AC_REQUIRE([gl_FP_IEEE])
91   # Code from module fprintf-posix:
92   # Code from module fpucw:
93   # Code from module fpurge:
94   # Code from module freadahead:
95   # Code from module freading:
96   # Code from module frexp-nolibm:
97   # Code from module frexpl-nolibm:
98   # Code from module fseek:
99   # Code from module fseeko:
100   AC_REQUIRE([AC_FUNC_FSEEKO])
101   # Code from module fseterr:
102   # Code from module fstat:
103   # Code from module ftell:
104   # Code from module ftello:
105   AC_REQUIRE([AC_FUNC_FSEEKO])
106   # Code from module gendocs:
107   # Code from module getcwd-lgpl:
108   # Code from module getdtablesize:
109   # Code from module getopt-gnu:
110   # Code from module getopt-posix:
111   # Code from module gettext-h:
112   # Code from module gettime:
113   # Code from module gettimeofday:
114   # Code from module git-version-gen:
115   # Code from module gitlog-to-changelog:
116   # Code from module gnu-make:
117   # Code from module gnu-web-doc-update:
118   # Code from module gnumakefile:
119   # Code from module gnupload:
120   # Code from module havelib:
121   # Code from module ignore-value:
122   # Code from module include_next:
123   # Code from module inline:
124   # Code from module intprops:
125   # Code from module isnand-nolibm:
126   # Code from module isnanf-nolibm:
127   # Code from module isnanl-nolibm:
128   # Code from module largefile:
129   AC_REQUIRE([AC_SYS_LARGEFILE])
130   # Code from module lib-ignore:
131   # Code from module localcharset:
132   # Code from module lock:
133   # Code from module lseek:
134   # Code from module lstat:
135   # Code from module maintainer-makefile:
136   # Code from module malloc-gnu:
137   # Code from module malloc-posix:
138   # Code from module manywarnings:
139   # Code from module math:
140   # Code from module mbrtowc:
141   # Code from module mbsinit:
142   # Code from module memchr:
143   # Code from module mempcpy:
144   # Code from module memrchr:
145   # Code from module msvc-inval:
146   # Code from module msvc-nothrow:
147   # Code from module multiarch:
148   # Code from module nocrash:
149   # Code from module open:
150   # Code from module openat:
151   # Code from module openat-die:
152   # Code from module openat-h:
153   # Code from module opendir:
154   # Code from module pathmax:
155   # Code from module perror:
156   # Code from module printf-frexp:
157   # Code from module printf-frexpl:
158   # Code from module printf-posix:
159   # Code from module printf-safe:
160   # Code from module quotearg:
161   # Code from module quotearg-simple:
162   # Code from module readdir:
163   # Code from module readme-release:
164   # Code from module realloc-gnu:
165   # Code from module realloc-posix:
166   # Code from module save-cwd:
167   # Code from module savedir:
168   # Code from module signbit:
169   # Code from module size_max:
170   # Code from module snippet/_Noreturn:
171   # Code from module snippet/arg-nonnull:
172   # Code from module snippet/c++defs:
173   # Code from module snippet/unused-parameter:
174   # Code from module snippet/warn-on-use:
175   # Code from module ssize_t:
176   # Code from module stat:
177   # Code from module stat-time:
178   # Code from module stdbool:
179   # Code from module stddef:
180   # Code from module stdint:
181   # Code from module stdio:
182   # Code from module stdlib:
183   # Code from module strdup-posix:
184   # Code from module streq:
185   # Code from module strerror:
186   # Code from module strerror-override:
187   # Code from module strerror_r-posix:
188   # Code from module string:
189   # Code from module sys_stat:
190   # Code from module sys_time:
191   # Code from module sys_types:
192   # Code from module threadlib:
193   gl_THREADLIB_EARLY
194   # Code from module time:
195   # Code from module timespec:
196   # Code from module unistd:
197   # Code from module unistd-safer:
198   # Code from module update-copyright:
199   # Code from module useless-if-before-free:
200   # Code from module utimens:
201   # Code from module vasnprintf:
202   # Code from module vc-list-files:
203   # Code from module verify:
204   # Code from module vfprintf-posix:
205   # Code from module warnings:
206   # Code from module wchar:
207   # Code from module wctype-h:
208   # Code from module xalloc:
209   # Code from module xalloc-die:
210   # Code from module xalloc-oversized:
211   # Code from module xsize:
212   # Code from module yesno:
213 ])
214
215 # This macro should be invoked from ./configure.ac, in the section
216 # "Check for header files, types and library functions".
217 AC_DEFUN([gl_INIT],
218 [
219   AM_CONDITIONAL([GL_COND_LIBTOOL], [false])
220   gl_cond_libtool=false
221   gl_libdeps=
222   gl_ltlibdeps=
223   gl_m4_base='m4'
224   m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
225   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
226   m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
227   m4_pushdef([gl_LIBSOURCES_LIST], [])
228   m4_pushdef([gl_LIBSOURCES_DIR], [])
229   gl_COMMON
230   gl_source_base='lib'
231 gl_FUNC_ALLOCA
232 AC_LIBOBJ([openat-proc])
233 gl_FUNC_CALLOC_GNU
234 if test $REPLACE_CALLOC = 1; then
235   AC_LIBOBJ([calloc])
236 fi
237 gl_MODULE_INDICATOR([calloc-gnu])
238 gl_FUNC_CALLOC_POSIX
239 if test $REPLACE_CALLOC = 1; then
240   AC_LIBOBJ([calloc])
241 fi
242 gl_STDLIB_MODULE_INDICATOR([calloc-posix])
243 gl_UNISTD_MODULE_INDICATOR([chdir])
244 gl_FUNC_CHDIR_LONG
245 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
246   AC_LIBOBJ([chdir-long])
247   gl_PREREQ_CHDIR_LONG
248 fi
249 gl_CLOCK_TIME
250 gl_MODULE_INDICATOR_FOR_TESTS([cloexec])
251 gl_FUNC_CLOSE
252 if test $REPLACE_CLOSE = 1; then
253   AC_LIBOBJ([close])
254 fi
255 gl_UNISTD_MODULE_INDICATOR([close])
256 gl_CLOSE_STREAM
257 gl_MODULE_INDICATOR([close-stream])
258 gl_FUNC_CLOSEDIR
259 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
260   AC_LIBOBJ([closedir])
261 fi
262 gl_DIRENT_MODULE_INDICATOR([closedir])
263 gl_CLOSEIN
264 gl_CLOSEOUT
265 gl_CONFIGMAKE_PREP
266 gl_DIRENT_H
267 gl_DIRENT_SAFER
268 gl_MODULE_INDICATOR([dirent-safer])
269 gl_FUNC_DIRFD
270 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
271   AC_LIBOBJ([dirfd])
272   gl_PREREQ_DIRFD
273 fi
274 gl_DIRENT_MODULE_INDICATOR([dirfd])
275 gl_DIRNAME_LGPL
276 gl_DOUBLE_SLASH_ROOT
277 gl_FUNC_DUP
278 if test $REPLACE_DUP = 1; then
279   AC_LIBOBJ([dup])
280   gl_PREREQ_DUP
281 fi
282 gl_UNISTD_MODULE_INDICATOR([dup])
283 gl_FUNC_DUP2
284 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
285   AC_LIBOBJ([dup2])
286   gl_PREREQ_DUP2
287 fi
288 gl_UNISTD_MODULE_INDICATOR([dup2])
289 gl_HEADER_ERRNO_H
290 gl_ERROR
291 if test $ac_cv_lib_error_at_line = no; then
292   AC_LIBOBJ([error])
293   gl_PREREQ_ERROR
294 fi
295 m4_ifdef([AM_XGETTEXT_OPTION],
296   [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
297    AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
298 gl_FUNC_FCHDIR
299 gl_UNISTD_MODULE_INDICATOR([fchdir])
300 gl_FUNC_FCLOSE
301 if test $REPLACE_FCLOSE = 1; then
302   AC_LIBOBJ([fclose])
303 fi
304 gl_STDIO_MODULE_INDICATOR([fclose])
305 gl_FUNC_FCNTL
306 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
307   AC_LIBOBJ([fcntl])
308 fi
309 gl_FCNTL_MODULE_INDICATOR([fcntl])
310 gl_FCNTL_H
311 gl_FCNTL_SAFER
312 gl_MODULE_INDICATOR([fcntl-safer])
313 gl_FUNC_FDOPENDIR
314 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
315   AC_LIBOBJ([fdopendir])
316 fi
317 gl_DIRENT_MODULE_INDICATOR([fdopendir])
318 gl_MODULE_INDICATOR([fdopendir])
319 gl_FUNC_FFLUSH
320 if test $REPLACE_FFLUSH = 1; then
321   AC_LIBOBJ([fflush])
322   gl_PREREQ_FFLUSH
323 fi
324 gl_MODULE_INDICATOR([fflush])
325 gl_STDIO_MODULE_INDICATOR([fflush])
326 gl_FILE_NAME_CONCAT_LGPL
327 gl_FLOAT_H
328 if test $REPLACE_FLOAT_LDBL = 1; then
329   AC_LIBOBJ([float])
330 fi
331 if test $REPLACE_ITOLD = 1; then
332   AC_LIBOBJ([itold])
333 fi
334 gl_FUNC_FPENDING
335 if test $ac_cv_func___fpending = no; then
336   AC_LIBOBJ([fpending])
337   gl_PREREQ_FPENDING
338 fi
339 gl_FUNC_FPRINTF_POSIX
340 gl_STDIO_MODULE_INDICATOR([fprintf-posix])
341 gl_FUNC_FPURGE
342 if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
343   AC_LIBOBJ([fpurge])
344 fi
345 gl_STDIO_MODULE_INDICATOR([fpurge])
346 gl_FUNC_FREADING
347 gl_FUNC_FREXP_NO_LIBM
348 if test $gl_func_frexp_no_libm != yes; then
349   AC_LIBOBJ([frexp])
350 fi
351 gl_MATH_MODULE_INDICATOR([frexp])
352 gl_FUNC_FREXPL_NO_LIBM
353 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
354   AC_LIBOBJ([frexpl])
355 fi
356 gl_MATH_MODULE_INDICATOR([frexpl])
357 gl_FUNC_FSEEK
358 if test $REPLACE_FSEEK = 1; then
359   AC_LIBOBJ([fseek])
360 fi
361 gl_STDIO_MODULE_INDICATOR([fseek])
362 gl_FUNC_FSEEKO
363 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
364   AC_LIBOBJ([fseeko])
365   gl_PREREQ_FSEEKO
366 fi
367 gl_STDIO_MODULE_INDICATOR([fseeko])
368 gl_FUNC_FSTAT
369 if test $REPLACE_FSTAT = 1; then
370   AC_LIBOBJ([fstat])
371   gl_PREREQ_FSTAT
372 fi
373 gl_SYS_STAT_MODULE_INDICATOR([fstat])
374 gl_FUNC_FTELL
375 if test $REPLACE_FTELL = 1; then
376   AC_LIBOBJ([ftell])
377 fi
378 gl_STDIO_MODULE_INDICATOR([ftell])
379 gl_FUNC_FTELLO
380 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
381   AC_LIBOBJ([ftello])
382   gl_PREREQ_FTELLO
383 fi
384 gl_STDIO_MODULE_INDICATOR([ftello])
385 gl_FUNC_GETCWD_LGPL
386 if test $REPLACE_GETCWD = 1; then
387   AC_LIBOBJ([getcwd-lgpl])
388 fi
389 gl_UNISTD_MODULE_INDICATOR([getcwd])
390 gl_FUNC_GETDTABLESIZE
391 if test $HAVE_GETDTABLESIZE = 0; then
392   AC_LIBOBJ([getdtablesize])
393   gl_PREREQ_GETDTABLESIZE
394 fi
395 gl_UNISTD_MODULE_INDICATOR([getdtablesize])
396 gl_FUNC_GETOPT_GNU
397 if test $REPLACE_GETOPT = 1; then
398   AC_LIBOBJ([getopt])
399   AC_LIBOBJ([getopt1])
400   gl_PREREQ_GETOPT
401   dnl Arrange for unistd.h to include getopt.h.
402   GNULIB_GL_UNISTD_H_GETOPT=1
403 fi
404 AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
405 gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
406 gl_FUNC_GETOPT_POSIX
407 if test $REPLACE_GETOPT = 1; then
408   AC_LIBOBJ([getopt])
409   AC_LIBOBJ([getopt1])
410   gl_PREREQ_GETOPT
411   dnl Arrange for unistd.h to include getopt.h.
412   GNULIB_GL_UNISTD_H_GETOPT=1
413 fi
414 AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
415 AC_SUBST([LIBINTL])
416 AC_SUBST([LTLIBINTL])
417 gl_GETTIME
418 gl_FUNC_GETTIMEOFDAY
419 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
420   AC_LIBOBJ([gettimeofday])
421   gl_PREREQ_GETTIMEOFDAY
422 fi
423 gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
424 gl_GNU_MAKE
425 # Autoconf 2.61a.99 and earlier don't support linking a file only
426 # in VPATH builds.  But since GNUmakefile is for maintainer use
427 # only, it does not matter if we skip the link with older autoconf.
428 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
429 # builds, so use a shell variable to bypass this.
430 GNUmakefile=GNUmakefile
431 m4_if(m4_version_compare([2.61a.100],
432         m4_defn([m4_PACKAGE_VERSION])), [1], [],
433       [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
434         [GNUmakefile=$GNUmakefile])])
435 AC_REQUIRE([AC_C_INLINE])
436 gl_INLINE
437 gl_FUNC_ISNAND_NO_LIBM
438 if test $gl_func_isnand_no_libm != yes; then
439   AC_LIBOBJ([isnand])
440   gl_PREREQ_ISNAND
441 fi
442 gl_FUNC_ISNANF_NO_LIBM
443 if test $gl_func_isnanf_no_libm != yes; then
444   AC_LIBOBJ([isnanf])
445   gl_PREREQ_ISNANF
446 fi
447 gl_FUNC_ISNANL_NO_LIBM
448 if test $gl_func_isnanl_no_libm != yes; then
449   AC_LIBOBJ([isnanl])
450   gl_PREREQ_ISNANL
451 fi
452 AC_REQUIRE([gl_LARGEFILE])
453 gl_IGNORE_UNUSED_LIBRARIES
454 gl_LOCALCHARSET
455 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
456 AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
457 gl_LOCK
458 gl_FUNC_LSEEK
459 if test $REPLACE_LSEEK = 1; then
460   AC_LIBOBJ([lseek])
461 fi
462 gl_UNISTD_MODULE_INDICATOR([lseek])
463 gl_FUNC_LSTAT
464 if test $REPLACE_LSTAT = 1; then
465   AC_LIBOBJ([lstat])
466   gl_PREREQ_LSTAT
467 fi
468 gl_SYS_STAT_MODULE_INDICATOR([lstat])
469 AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
470   [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
471 gl_FUNC_MALLOC_GNU
472 if test $REPLACE_MALLOC = 1; then
473   AC_LIBOBJ([malloc])
474 fi
475 gl_MODULE_INDICATOR([malloc-gnu])
476 gl_FUNC_MALLOC_POSIX
477 if test $REPLACE_MALLOC = 1; then
478   AC_LIBOBJ([malloc])
479 fi
480 gl_STDLIB_MODULE_INDICATOR([malloc-posix])
481 gl_MATH_H
482 gl_FUNC_MBRTOWC
483 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
484   AC_LIBOBJ([mbrtowc])
485   gl_PREREQ_MBRTOWC
486 fi
487 gl_WCHAR_MODULE_INDICATOR([mbrtowc])
488 gl_FUNC_MBSINIT
489 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
490   AC_LIBOBJ([mbsinit])
491   gl_PREREQ_MBSINIT
492 fi
493 gl_WCHAR_MODULE_INDICATOR([mbsinit])
494 gl_FUNC_MEMCHR
495 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
496   AC_LIBOBJ([memchr])
497   gl_PREREQ_MEMCHR
498 fi
499 gl_STRING_MODULE_INDICATOR([memchr])
500 gl_FUNC_MEMPCPY
501 if test $HAVE_MEMPCPY = 0; then
502   AC_LIBOBJ([mempcpy])
503   gl_PREREQ_MEMPCPY
504 fi
505 gl_STRING_MODULE_INDICATOR([mempcpy])
506 gl_FUNC_MEMRCHR
507 if test $ac_cv_func_memrchr = no; then
508   AC_LIBOBJ([memrchr])
509   gl_PREREQ_MEMRCHR
510 fi
511 gl_STRING_MODULE_INDICATOR([memrchr])
512 gl_MSVC_INVAL
513 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
514   AC_LIBOBJ([msvc-inval])
515 fi
516 gl_MSVC_NOTHROW
517 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
518   AC_LIBOBJ([msvc-nothrow])
519 fi
520 gl_MULTIARCH
521 gl_FUNC_OPEN
522 if test $REPLACE_OPEN = 1; then
523   AC_LIBOBJ([open])
524   gl_PREREQ_OPEN
525 fi
526 gl_FCNTL_MODULE_INDICATOR([open])
527 gl_FUNC_OPENAT
528 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
529   AC_LIBOBJ([openat])
530   gl_PREREQ_OPENAT
531 fi
532 gl_MODULE_INDICATOR([openat]) dnl for lib/getcwd.c
533 gl_FCNTL_MODULE_INDICATOR([openat])
534 gl_FUNC_OPENDIR
535 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
536   AC_LIBOBJ([opendir])
537 fi
538 gl_DIRENT_MODULE_INDICATOR([opendir])
539 gl_PATHMAX
540 gl_FUNC_PERROR
541 if test $REPLACE_PERROR = 1; then
542   AC_LIBOBJ([perror])
543 fi
544 gl_STRING_MODULE_INDICATOR([perror])
545 gl_FUNC_PRINTF_FREXP
546 gl_FUNC_PRINTF_FREXPL
547 gl_FUNC_PRINTF_POSIX
548 gl_STDIO_MODULE_INDICATOR([printf-posix])
549 m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes])
550 gl_QUOTEARG
551 gl_FUNC_READDIR
552 if test $HAVE_READDIR = 0; then
553   AC_LIBOBJ([readdir])
554 fi
555 gl_DIRENT_MODULE_INDICATOR([readdir])
556 gl_FUNC_REALLOC_GNU
557 if test $REPLACE_REALLOC = 1; then
558   AC_LIBOBJ([realloc])
559 fi
560 gl_MODULE_INDICATOR([realloc-gnu])
561 gl_FUNC_REALLOC_POSIX
562 if test $REPLACE_REALLOC = 1; then
563   AC_LIBOBJ([realloc])
564 fi
565 gl_STDLIB_MODULE_INDICATOR([realloc-posix])
566 gl_SAVE_CWD
567 gl_SAVEDIR
568 gl_SIGNBIT
569 if test $REPLACE_SIGNBIT = 1; then
570   AC_LIBOBJ([signbitf])
571   AC_LIBOBJ([signbitd])
572   AC_LIBOBJ([signbitl])
573 fi
574 gl_MATH_MODULE_INDICATOR([signbit])
575 gl_SIZE_MAX
576 gt_TYPE_SSIZE_T
577 gl_FUNC_STAT
578 if test $REPLACE_STAT = 1; then
579   AC_LIBOBJ([stat])
580   gl_PREREQ_STAT
581 fi
582 gl_SYS_STAT_MODULE_INDICATOR([stat])
583 gl_STAT_TIME
584 gl_STAT_BIRTHTIME
585 AM_STDBOOL_H
586 gl_STDDEF_H
587 gl_STDINT_H
588 gl_STDIO_H
589 gl_STDLIB_H
590 gl_FUNC_STRDUP_POSIX
591 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
592   AC_LIBOBJ([strdup])
593   gl_PREREQ_STRDUP
594 fi
595 gl_STRING_MODULE_INDICATOR([strdup])
596 gl_FUNC_STRERROR
597 if test $REPLACE_STRERROR = 1; then
598   AC_LIBOBJ([strerror])
599 fi
600 gl_MODULE_INDICATOR([strerror])
601 gl_STRING_MODULE_INDICATOR([strerror])
602 AC_REQUIRE([gl_HEADER_ERRNO_H])
603 AC_REQUIRE([gl_FUNC_STRERROR_0])
604 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
605   AC_LIBOBJ([strerror-override])
606   gl_PREREQ_SYS_H_WINSOCK2
607 fi
608 gl_FUNC_STRERROR_R
609 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
610   AC_LIBOBJ([strerror_r])
611   gl_PREREQ_STRERROR_R
612 fi
613 gl_STRING_MODULE_INDICATOR([strerror_r])
614 gl_HEADER_STRING_H
615 gl_HEADER_SYS_STAT_H
616 AC_PROG_MKDIR_P
617 gl_HEADER_SYS_TIME_H
618 AC_PROG_MKDIR_P
619 gl_SYS_TYPES_H
620 AC_PROG_MKDIR_P
621 gl_THREADLIB
622 gl_HEADER_TIME_H
623 gl_TIMESPEC
624 gl_UNISTD_H
625 gl_UNISTD_SAFER
626 gl_UTIMENS
627 gl_FUNC_VASNPRINTF
628 gl_FUNC_VFPRINTF_POSIX
629 gl_STDIO_MODULE_INDICATOR([vfprintf-posix])
630 gl_WCHAR_H
631 gl_WCTYPE_H
632 gl_XALLOC
633 gl_XSIZE
634 gl_YESNO
635   # End of code from modules
636   m4_ifval(gl_LIBSOURCES_LIST, [
637     m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
638       for gl_file in ]gl_LIBSOURCES_LIST[ ; do
639         if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
640           echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
641           exit 1
642         fi
643       done])dnl
644       m4_if(m4_sysval, [0], [],
645         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
646   ])
647   m4_popdef([gl_LIBSOURCES_DIR])
648   m4_popdef([gl_LIBSOURCES_LIST])
649   m4_popdef([AC_LIBSOURCES])
650   m4_popdef([AC_REPLACE_FUNCS])
651   m4_popdef([AC_LIBOBJ])
652   AC_CONFIG_COMMANDS_PRE([
653     gl_libobjs=
654     gl_ltlibobjs=
655     if test -n "$gl_LIBOBJS"; then
656       # Remove the extension.
657       sed_drop_objext='s/\.o$//;s/\.obj$//'
658       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
659         gl_libobjs="$gl_libobjs $i.$ac_objext"
660         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
661       done
662     fi
663     AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
664     AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
665   ])
666   gltests_libdeps=
667   gltests_ltlibdeps=
668   m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
669   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
670   m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
671   m4_pushdef([gltests_LIBSOURCES_LIST], [])
672   m4_pushdef([gltests_LIBSOURCES_DIR], [])
673   gl_COMMON
674   gl_source_base='tests'
675 changequote(,)dnl
676   gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
677 changequote([, ])dnl
678   AC_SUBST([gltests_WITNESS])
679   gl_module_indicator_condition=$gltests_WITNESS
680   m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
681   m4_popdef([gl_MODULE_INDICATOR_CONDITION])
682   m4_ifval(gltests_LIBSOURCES_LIST, [
683     m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
684       for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
685         if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
686           echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
687           exit 1
688         fi
689       done])dnl
690       m4_if(m4_sysval, [0], [],
691         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
692   ])
693   m4_popdef([gltests_LIBSOURCES_DIR])
694   m4_popdef([gltests_LIBSOURCES_LIST])
695   m4_popdef([AC_LIBSOURCES])
696   m4_popdef([AC_REPLACE_FUNCS])
697   m4_popdef([AC_LIBOBJ])
698   AC_CONFIG_COMMANDS_PRE([
699     gltests_libobjs=
700     gltests_ltlibobjs=
701     if test -n "$gltests_LIBOBJS"; then
702       # Remove the extension.
703       sed_drop_objext='s/\.o$//;s/\.obj$//'
704       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
705         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
706         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
707       done
708     fi
709     AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
710     AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
711   ])
712   LIBGZIP_LIBDEPS="$gl_libdeps"
713   AC_SUBST([LIBGZIP_LIBDEPS])
714   LIBGZIP_LTLIBDEPS="$gl_ltlibdeps"
715   AC_SUBST([LIBGZIP_LTLIBDEPS])
716 ])
717
718 # Like AC_LIBOBJ, except that the module name goes
719 # into gl_LIBOBJS instead of into LIBOBJS.
720 AC_DEFUN([gl_LIBOBJ], [
721   AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
722   gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
723 ])
724
725 # Like AC_REPLACE_FUNCS, except that the module name goes
726 # into gl_LIBOBJS instead of into LIBOBJS.
727 AC_DEFUN([gl_REPLACE_FUNCS], [
728   m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
729   AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
730 ])
731
732 # Like AC_LIBSOURCES, except the directory where the source file is
733 # expected is derived from the gnulib-tool parameterization,
734 # and alloca is special cased (for the alloca-opt module).
735 # We could also entirely rely on EXTRA_lib..._SOURCES.
736 AC_DEFUN([gl_LIBSOURCES], [
737   m4_foreach([_gl_NAME], [$1], [
738     m4_if(_gl_NAME, [alloca.c], [], [
739       m4_define([gl_LIBSOURCES_DIR], [lib])
740       m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
741     ])
742   ])
743 ])
744
745 # Like AC_LIBOBJ, except that the module name goes
746 # into gltests_LIBOBJS instead of into LIBOBJS.
747 AC_DEFUN([gltests_LIBOBJ], [
748   AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
749   gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
750 ])
751
752 # Like AC_REPLACE_FUNCS, except that the module name goes
753 # into gltests_LIBOBJS instead of into LIBOBJS.
754 AC_DEFUN([gltests_REPLACE_FUNCS], [
755   m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
756   AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
757 ])
758
759 # Like AC_LIBSOURCES, except the directory where the source file is
760 # expected is derived from the gnulib-tool parameterization,
761 # and alloca is special cased (for the alloca-opt module).
762 # We could also entirely rely on EXTRA_lib..._SOURCES.
763 AC_DEFUN([gltests_LIBSOURCES], [
764   m4_foreach([_gl_NAME], [$1], [
765     m4_if(_gl_NAME, [alloca.c], [], [
766       m4_define([gltests_LIBSOURCES_DIR], [tests])
767       m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
768     ])
769   ])
770 ])
771
772 # This macro records the list of files which have been installed by
773 # gnulib-tool and may be removed by future gnulib-tool invocations.
774 AC_DEFUN([gl_FILE_LIST], [
775   build-aux/announce-gen
776   build-aux/config.rpath
777   build-aux/do-release-commit-and-tag
778   build-aux/gendocs.sh
779   build-aux/git-version-gen
780   build-aux/gitlog-to-changelog
781   build-aux/gnu-web-doc-update
782   build-aux/gnupload
783   build-aux/snippet/_Noreturn.h
784   build-aux/snippet/arg-nonnull.h
785   build-aux/snippet/c++defs.h
786   build-aux/snippet/unused-parameter.h
787   build-aux/snippet/warn-on-use.h
788   build-aux/update-copyright
789   build-aux/useless-if-before-free
790   build-aux/vc-list-files
791   doc/fdl.texi
792   doc/gendocs_template
793   lib/alloca.in.h
794   lib/asnprintf.c
795   lib/basename-lgpl.c
796   lib/c-ctype.c
797   lib/c-ctype.h
798   lib/c-strcase.h
799   lib/c-strcasecmp.c
800   lib/c-strcaseeq.h
801   lib/c-strncasecmp.c
802   lib/calloc.c
803   lib/chdir-long.c
804   lib/chdir-long.h
805   lib/cloexec.c
806   lib/cloexec.h
807   lib/close-stream.c
808   lib/close-stream.h
809   lib/close.c
810   lib/closedir.c
811   lib/closein.c
812   lib/closein.h
813   lib/closeout.c
814   lib/closeout.h
815   lib/config.charset
816   lib/creat-safer.c
817   lib/dirent--.h
818   lib/dirent-private.h
819   lib/dirent-safer.h
820   lib/dirent.in.h
821   lib/dirfd.c
822   lib/dirname-lgpl.c
823   lib/dirname.h
824   lib/dosname.h
825   lib/dup-safer.c
826   lib/dup.c
827   lib/dup2.c
828   lib/errno.in.h
829   lib/error.c
830   lib/error.h
831   lib/exitfail.c
832   lib/exitfail.h
833   lib/fchdir.c
834   lib/fclose.c
835   lib/fcntl--.h
836   lib/fcntl-safer.h
837   lib/fcntl.c
838   lib/fcntl.in.h
839   lib/fd-hook.c
840   lib/fd-hook.h
841   lib/fd-safer.c
842   lib/fdopendir.c
843   lib/fflush.c
844   lib/filename.h
845   lib/filenamecat-lgpl.c
846   lib/filenamecat.h
847   lib/float+.h
848   lib/float.c
849   lib/float.in.h
850   lib/fpending.c
851   lib/fpending.h
852   lib/fprintf.c
853   lib/fpucw.h
854   lib/fpurge.c
855   lib/freadahead.c
856   lib/freadahead.h
857   lib/freading.c
858   lib/freading.h
859   lib/frexp.c
860   lib/frexpl.c
861   lib/fseek.c
862   lib/fseeko.c
863   lib/fseterr.c
864   lib/fseterr.h
865   lib/fstat.c
866   lib/ftell.c
867   lib/ftello.c
868   lib/getcwd-lgpl.c
869   lib/getdtablesize.c
870   lib/getopt.c
871   lib/getopt.in.h
872   lib/getopt1.c
873   lib/getopt_int.h
874   lib/gettext.h
875   lib/gettime.c
876   lib/gettimeofday.c
877   lib/glthread/lock.c
878   lib/glthread/lock.h
879   lib/glthread/threadlib.c
880   lib/ignore-value.h
881   lib/intprops.h
882   lib/isnan.c
883   lib/isnand-nolibm.h
884   lib/isnand.c
885   lib/isnanf-nolibm.h
886   lib/isnanf.c
887   lib/isnanl-nolibm.h
888   lib/isnanl.c
889   lib/itold.c
890   lib/localcharset.c
891   lib/localcharset.h
892   lib/lseek.c
893   lib/lstat.c
894   lib/malloc.c
895   lib/math.in.h
896   lib/mbrtowc.c
897   lib/mbsinit.c
898   lib/memchr.c
899   lib/memchr.valgrind
900   lib/mempcpy.c
901   lib/memrchr.c
902   lib/msvc-inval.c
903   lib/msvc-inval.h
904   lib/msvc-nothrow.c
905   lib/msvc-nothrow.h
906   lib/open-safer.c
907   lib/open.c
908   lib/openat-die.c
909   lib/openat-priv.h
910   lib/openat-proc.c
911   lib/openat.c
912   lib/openat.h
913   lib/opendir-safer.c
914   lib/opendir.c
915   lib/pathmax.h
916   lib/perror.c
917   lib/pipe-safer.c
918   lib/printf-args.c
919   lib/printf-args.h
920   lib/printf-frexp.c
921   lib/printf-frexp.h
922   lib/printf-frexpl.c
923   lib/printf-frexpl.h
924   lib/printf-parse.c
925   lib/printf-parse.h
926   lib/printf.c
927   lib/quote.h
928   lib/quotearg.c
929   lib/quotearg.h
930   lib/readdir.c
931   lib/realloc.c
932   lib/ref-add.sin
933   lib/ref-del.sin
934   lib/save-cwd.c
935   lib/save-cwd.h
936   lib/savedir.c
937   lib/savedir.h
938   lib/signbitd.c
939   lib/signbitf.c
940   lib/signbitl.c
941   lib/size_max.h
942   lib/stat-time.h
943   lib/stat.c
944   lib/stdbool.in.h
945   lib/stddef.in.h
946   lib/stdint.in.h
947   lib/stdio-impl.h
948   lib/stdio.in.h
949   lib/stdlib.in.h
950   lib/strdup.c
951   lib/streq.h
952   lib/strerror-override.c
953   lib/strerror-override.h
954   lib/strerror.c
955   lib/strerror_r.c
956   lib/string.in.h
957   lib/stripslash.c
958   lib/sys_stat.in.h
959   lib/sys_time.in.h
960   lib/sys_types.in.h
961   lib/time.in.h
962   lib/timespec.h
963   lib/unistd--.h
964   lib/unistd-safer.h
965   lib/unistd.in.h
966   lib/utimens.c
967   lib/utimens.h
968   lib/vasnprintf.c
969   lib/vasnprintf.h
970   lib/verify.h
971   lib/vfprintf.c
972   lib/wchar.in.h
973   lib/wctype.in.h
974   lib/xalloc-die.c
975   lib/xalloc-oversized.h
976   lib/xalloc.h
977   lib/xmalloc.c
978   lib/xsize.h
979   lib/yesno.c
980   lib/yesno.h
981   m4/00gnulib.m4
982   m4/alloca.m4
983   m4/asm-underscore.m4
984   m4/calloc.m4
985   m4/chdir-long.m4
986   m4/clock_time.m4
987   m4/close-stream.m4
988   m4/close.m4
989   m4/closedir.m4
990   m4/closein.m4
991   m4/closeout.m4
992   m4/codeset.m4
993   m4/configmake.m4
994   m4/dirent-safer.m4
995   m4/dirent_h.m4
996   m4/dirfd.m4
997   m4/dirname.m4
998   m4/double-slash-root.m4
999   m4/dup.m4
1000   m4/dup2.m4
1001   m4/errno_h.m4
1002   m4/error.m4
1003   m4/exponentd.m4
1004   m4/exponentf.m4
1005   m4/exponentl.m4
1006   m4/extensions.m4
1007   m4/fchdir.m4
1008   m4/fclose.m4
1009   m4/fcntl-o.m4
1010   m4/fcntl-safer.m4
1011   m4/fcntl.m4
1012   m4/fcntl_h.m4
1013   m4/fdopendir.m4
1014   m4/fflush.m4
1015   m4/filenamecat.m4
1016   m4/float_h.m4
1017   m4/fpending.m4
1018   m4/fpieee.m4
1019   m4/fprintf-posix.m4
1020   m4/fpurge.m4
1021   m4/freading.m4
1022   m4/frexp.m4
1023   m4/frexpl.m4
1024   m4/fseek.m4
1025   m4/fseeko.m4
1026   m4/fstat.m4
1027   m4/ftell.m4
1028   m4/ftello.m4
1029   m4/getcwd.m4
1030   m4/getdtablesize.m4
1031   m4/getopt.m4
1032   m4/gettime.m4
1033   m4/gettimeofday.m4
1034   m4/glibc21.m4
1035   m4/gnu-make.m4
1036   m4/gnulib-common.m4
1037   m4/include_next.m4
1038   m4/inline.m4
1039   m4/intmax_t.m4
1040   m4/inttypes_h.m4
1041   m4/isnand.m4
1042   m4/isnanf.m4
1043   m4/isnanl.m4
1044   m4/largefile.m4
1045   m4/ldexpl.m4
1046   m4/lib-ignore.m4
1047   m4/lib-ld.m4
1048   m4/lib-link.m4
1049   m4/lib-prefix.m4
1050   m4/localcharset.m4
1051   m4/locale-fr.m4
1052   m4/locale-ja.m4
1053   m4/locale-zh.m4
1054   m4/lock.m4
1055   m4/longlong.m4
1056   m4/lseek.m4
1057   m4/lstat.m4
1058   m4/malloc.m4
1059   m4/manywarnings.m4
1060   m4/math_h.m4
1061   m4/mbrtowc.m4
1062   m4/mbsinit.m4
1063   m4/mbstate_t.m4
1064   m4/memchr.m4
1065   m4/mempcpy.m4
1066   m4/memrchr.m4
1067   m4/mmap-anon.m4
1068   m4/mode_t.m4
1069   m4/msvc-inval.m4
1070   m4/msvc-nothrow.m4
1071   m4/multiarch.m4
1072   m4/nocrash.m4
1073   m4/off_t.m4
1074   m4/open.m4
1075   m4/openat.m4
1076   m4/opendir.m4
1077   m4/pathmax.m4
1078   m4/perror.m4
1079   m4/printf-frexp.m4
1080   m4/printf-frexpl.m4
1081   m4/printf-posix-rpl.m4
1082   m4/printf.m4
1083   m4/quotearg.m4
1084   m4/readdir.m4
1085   m4/realloc.m4
1086   m4/save-cwd.m4
1087   m4/savedir.m4
1088   m4/signbit.m4
1089   m4/size_max.m4
1090   m4/ssize_t.m4
1091   m4/stat-time.m4
1092   m4/stat.m4
1093   m4/stdbool.m4
1094   m4/stddef_h.m4
1095   m4/stdint.m4
1096   m4/stdint_h.m4
1097   m4/stdio_h.m4
1098   m4/stdlib_h.m4
1099   m4/strdup.m4
1100   m4/strerror.m4
1101   m4/strerror_r.m4
1102   m4/string_h.m4
1103   m4/sys_socket_h.m4
1104   m4/sys_stat_h.m4
1105   m4/sys_time_h.m4
1106   m4/sys_types_h.m4
1107   m4/threadlib.m4
1108   m4/time_h.m4
1109   m4/timespec.m4
1110   m4/unistd-safer.m4
1111   m4/unistd_h.m4
1112   m4/utimbuf.m4
1113   m4/utimens.m4
1114   m4/utimes.m4
1115   m4/vasnprintf.m4
1116   m4/vfprintf-posix.m4
1117   m4/warn-on-use.m4
1118   m4/warnings.m4
1119   m4/wchar_h.m4
1120   m4/wchar_t.m4
1121   m4/wctype_h.m4
1122   m4/wint_t.m4
1123   m4/xalloc.m4
1124   m4/xsize.m4
1125   m4/yesno.m4
1126   top/GNUmakefile
1127   top/README-release
1128   top/maint.mk
1129 ])