Imported Upstream version 1.6
[debian/gzip] / m4 / gnulib-comp.m4
1 # DO NOT EDIT! GENERATED AUTOMATICALLY!
2 # Copyright (C) 2002-2013 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 extern-inline:
76   # Code from module fchdir:
77   # Code from module fclose:
78   # Code from module fcntl:
79   # Code from module fcntl-h:
80   # Code from module fcntl-safer:
81   # Code from module fd-hook:
82   # Code from module fdl:
83   # Code from module fdopendir:
84   # Code from module fflush:
85   AC_REQUIRE([AC_FUNC_FSEEKO])
86   # Code from module filename:
87   # Code from module filenamecat-lgpl:
88   # Code from module float:
89   # Code from module fpending:
90   # Code from module fpieee:
91   AC_REQUIRE([gl_FP_IEEE])
92   # Code from module fprintf-posix:
93   # Code from module fpucw:
94   # Code from module fpurge:
95   # Code from module freadahead:
96   # Code from module freading:
97   # Code from module frexp-nolibm:
98   # Code from module frexpl-nolibm:
99   # Code from module fseek:
100   # Code from module fseeko:
101   AC_REQUIRE([AC_FUNC_FSEEKO])
102   # Code from module fseterr:
103   # Code from module fstat:
104   # Code from module ftell:
105   # Code from module ftello:
106   AC_REQUIRE([AC_FUNC_FSEEKO])
107   # Code from module gendocs:
108   # Code from module getcwd-lgpl:
109   # Code from module getdtablesize:
110   # Code from module getopt-gnu:
111   # Code from module getopt-posix:
112   # Code from module gettext-h:
113   # Code from module gettime:
114   # Code from module gettimeofday:
115   # Code from module git-version-gen:
116   # Code from module gitlog-to-changelog:
117   # Code from module gnu-make:
118   # Code from module gnu-web-doc-update:
119   # Code from module gnumakefile:
120   # Code from module gnupload:
121   # Code from module havelib:
122   # Code from module ignore-value:
123   # Code from module include_next:
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   AC_REQUIRE([gl_EXTERN_INLINE])
299   gl_FUNC_FCHDIR
300   gl_UNISTD_MODULE_INDICATOR([fchdir])
301   gl_FUNC_FCLOSE
302   if test $REPLACE_FCLOSE = 1; then
303     AC_LIBOBJ([fclose])
304   fi
305   gl_STDIO_MODULE_INDICATOR([fclose])
306   gl_FUNC_FCNTL
307   if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
308     AC_LIBOBJ([fcntl])
309   fi
310   gl_FCNTL_MODULE_INDICATOR([fcntl])
311   gl_FCNTL_H
312   gl_FCNTL_SAFER
313   gl_MODULE_INDICATOR([fcntl-safer])
314   gl_FUNC_FDOPENDIR
315   if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
316     AC_LIBOBJ([fdopendir])
317   fi
318   gl_DIRENT_MODULE_INDICATOR([fdopendir])
319   gl_MODULE_INDICATOR([fdopendir])
320   gl_FUNC_FFLUSH
321   if test $REPLACE_FFLUSH = 1; then
322     AC_LIBOBJ([fflush])
323     gl_PREREQ_FFLUSH
324   fi
325   gl_MODULE_INDICATOR([fflush])
326   gl_STDIO_MODULE_INDICATOR([fflush])
327   gl_FILE_NAME_CONCAT_LGPL
328   gl_FLOAT_H
329   if test $REPLACE_FLOAT_LDBL = 1; then
330     AC_LIBOBJ([float])
331   fi
332   if test $REPLACE_ITOLD = 1; then
333     AC_LIBOBJ([itold])
334   fi
335   gl_FUNC_FPENDING
336   if test $ac_cv_func___fpending = no; then
337     AC_LIBOBJ([fpending])
338     gl_PREREQ_FPENDING
339   fi
340   gl_FUNC_FPRINTF_POSIX
341   gl_STDIO_MODULE_INDICATOR([fprintf-posix])
342   gl_FUNC_FPURGE
343   if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
344     AC_LIBOBJ([fpurge])
345   fi
346   gl_STDIO_MODULE_INDICATOR([fpurge])
347   gl_FUNC_FREADAHEAD
348   if test $ac_cv_func___freadahead = no; then
349     AC_LIBOBJ([freadahead])
350   fi
351   gl_FUNC_FREADING
352   gl_FUNC_FREXP_NO_LIBM
353   if test $gl_func_frexp_no_libm != yes; then
354     AC_LIBOBJ([frexp])
355   fi
356   gl_MATH_MODULE_INDICATOR([frexp])
357   gl_FUNC_FREXPL_NO_LIBM
358   if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
359     AC_LIBOBJ([frexpl])
360   fi
361   gl_MATH_MODULE_INDICATOR([frexpl])
362   gl_FUNC_FSEEK
363   if test $REPLACE_FSEEK = 1; then
364     AC_LIBOBJ([fseek])
365   fi
366   gl_STDIO_MODULE_INDICATOR([fseek])
367   gl_FUNC_FSEEKO
368   if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
369     AC_LIBOBJ([fseeko])
370     gl_PREREQ_FSEEKO
371   fi
372   gl_STDIO_MODULE_INDICATOR([fseeko])
373   gl_FUNC_FSETERR
374   if test $ac_cv_func___fseterr = no; then
375     AC_LIBOBJ([fseterr])
376   fi
377   gl_FUNC_FSTAT
378   if test $REPLACE_FSTAT = 1; then
379     AC_LIBOBJ([fstat])
380     gl_PREREQ_FSTAT
381   fi
382   gl_SYS_STAT_MODULE_INDICATOR([fstat])
383   gl_FUNC_FTELL
384   if test $REPLACE_FTELL = 1; then
385     AC_LIBOBJ([ftell])
386   fi
387   gl_STDIO_MODULE_INDICATOR([ftell])
388   gl_FUNC_FTELLO
389   if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
390     AC_LIBOBJ([ftello])
391     gl_PREREQ_FTELLO
392   fi
393   gl_STDIO_MODULE_INDICATOR([ftello])
394   gl_FUNC_GETCWD_LGPL
395   if test $REPLACE_GETCWD = 1; then
396     AC_LIBOBJ([getcwd-lgpl])
397   fi
398   gl_UNISTD_MODULE_INDICATOR([getcwd])
399   gl_FUNC_GETDTABLESIZE
400   if test $HAVE_GETDTABLESIZE = 0; then
401     AC_LIBOBJ([getdtablesize])
402     gl_PREREQ_GETDTABLESIZE
403   fi
404   gl_UNISTD_MODULE_INDICATOR([getdtablesize])
405   gl_FUNC_GETOPT_GNU
406   if test $REPLACE_GETOPT = 1; then
407     AC_LIBOBJ([getopt])
408     AC_LIBOBJ([getopt1])
409     gl_PREREQ_GETOPT
410     dnl Arrange for unistd.h to include getopt.h.
411     GNULIB_GL_UNISTD_H_GETOPT=1
412   fi
413   AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
414   gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
415   gl_FUNC_GETOPT_POSIX
416   if test $REPLACE_GETOPT = 1; then
417     AC_LIBOBJ([getopt])
418     AC_LIBOBJ([getopt1])
419     gl_PREREQ_GETOPT
420     dnl Arrange for unistd.h to include getopt.h.
421     GNULIB_GL_UNISTD_H_GETOPT=1
422   fi
423   AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
424   AC_SUBST([LIBINTL])
425   AC_SUBST([LTLIBINTL])
426   gl_GETTIME
427   gl_FUNC_GETTIMEOFDAY
428   if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
429     AC_LIBOBJ([gettimeofday])
430     gl_PREREQ_GETTIMEOFDAY
431   fi
432   gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
433   gl_GNU_MAKE
434   # Autoconf 2.61a.99 and earlier don't support linking a file only
435   # in VPATH builds.  But since GNUmakefile is for maintainer use
436   # only, it does not matter if we skip the link with older autoconf.
437   # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
438   # builds, so use a shell variable to bypass this.
439   GNUmakefile=GNUmakefile
440   m4_if(m4_version_compare([2.61a.100],
441           m4_defn([m4_PACKAGE_VERSION])), [1], [],
442         [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
443           [GNUmakefile=$GNUmakefile])])
444   gl_FUNC_ISNAND_NO_LIBM
445   if test $gl_func_isnand_no_libm != yes; then
446     AC_LIBOBJ([isnand])
447     gl_PREREQ_ISNAND
448   fi
449   gl_FUNC_ISNANF_NO_LIBM
450   if test $gl_func_isnanf_no_libm != yes; then
451     AC_LIBOBJ([isnanf])
452     gl_PREREQ_ISNANF
453   fi
454   gl_FUNC_ISNANL_NO_LIBM
455   if test $gl_func_isnanl_no_libm != yes; then
456     AC_LIBOBJ([isnanl])
457     gl_PREREQ_ISNANL
458   fi
459   AC_REQUIRE([gl_LARGEFILE])
460   gl_IGNORE_UNUSED_LIBRARIES
461   gl_LOCALCHARSET
462   LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
463   AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
464   gl_LOCK
465   gl_MODULE_INDICATOR([lock])
466   gl_FUNC_LSEEK
467   if test $REPLACE_LSEEK = 1; then
468     AC_LIBOBJ([lseek])
469   fi
470   gl_UNISTD_MODULE_INDICATOR([lseek])
471   gl_FUNC_LSTAT
472   if test $REPLACE_LSTAT = 1; then
473     AC_LIBOBJ([lstat])
474     gl_PREREQ_LSTAT
475   fi
476   gl_SYS_STAT_MODULE_INDICATOR([lstat])
477   AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
478     [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
479   gl_FUNC_MALLOC_GNU
480   if test $REPLACE_MALLOC = 1; then
481     AC_LIBOBJ([malloc])
482   fi
483   gl_MODULE_INDICATOR([malloc-gnu])
484   gl_FUNC_MALLOC_POSIX
485   if test $REPLACE_MALLOC = 1; then
486     AC_LIBOBJ([malloc])
487   fi
488   gl_STDLIB_MODULE_INDICATOR([malloc-posix])
489   gl_MATH_H
490   gl_FUNC_MBRTOWC
491   if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
492     AC_LIBOBJ([mbrtowc])
493     gl_PREREQ_MBRTOWC
494   fi
495   gl_WCHAR_MODULE_INDICATOR([mbrtowc])
496   gl_FUNC_MBSINIT
497   if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
498     AC_LIBOBJ([mbsinit])
499     gl_PREREQ_MBSINIT
500   fi
501   gl_WCHAR_MODULE_INDICATOR([mbsinit])
502   gl_FUNC_MEMCHR
503   if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
504     AC_LIBOBJ([memchr])
505     gl_PREREQ_MEMCHR
506   fi
507   gl_STRING_MODULE_INDICATOR([memchr])
508   gl_FUNC_MEMPCPY
509   if test $HAVE_MEMPCPY = 0; then
510     AC_LIBOBJ([mempcpy])
511     gl_PREREQ_MEMPCPY
512   fi
513   gl_STRING_MODULE_INDICATOR([mempcpy])
514   gl_FUNC_MEMRCHR
515   if test $ac_cv_func_memrchr = no; then
516     AC_LIBOBJ([memrchr])
517     gl_PREREQ_MEMRCHR
518   fi
519   gl_STRING_MODULE_INDICATOR([memrchr])
520   gl_MSVC_INVAL
521   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
522     AC_LIBOBJ([msvc-inval])
523   fi
524   gl_MSVC_NOTHROW
525   if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
526     AC_LIBOBJ([msvc-nothrow])
527   fi
528   gl_MULTIARCH
529   gl_FUNC_OPEN
530   if test $REPLACE_OPEN = 1; then
531     AC_LIBOBJ([open])
532     gl_PREREQ_OPEN
533   fi
534   gl_FCNTL_MODULE_INDICATOR([open])
535   gl_FUNC_OPENAT
536   if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
537     AC_LIBOBJ([openat])
538     gl_PREREQ_OPENAT
539   fi
540   gl_MODULE_INDICATOR([openat]) dnl for lib/getcwd.c
541   gl_FCNTL_MODULE_INDICATOR([openat])
542   gl_FUNC_OPENDIR
543   if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
544     AC_LIBOBJ([opendir])
545   fi
546   gl_DIRENT_MODULE_INDICATOR([opendir])
547   gl_PATHMAX
548   gl_FUNC_PERROR
549   if test $REPLACE_PERROR = 1; then
550     AC_LIBOBJ([perror])
551   fi
552   gl_STRING_MODULE_INDICATOR([perror])
553   gl_FUNC_PRINTF_FREXP
554   gl_FUNC_PRINTF_FREXPL
555   gl_FUNC_PRINTF_POSIX
556   gl_STDIO_MODULE_INDICATOR([printf-posix])
557   m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes])
558   gl_QUOTEARG
559   gl_FUNC_READDIR
560   if test $HAVE_READDIR = 0; then
561     AC_LIBOBJ([readdir])
562   fi
563   gl_DIRENT_MODULE_INDICATOR([readdir])
564   gl_FUNC_REALLOC_GNU
565   if test $REPLACE_REALLOC = 1; then
566     AC_LIBOBJ([realloc])
567   fi
568   gl_MODULE_INDICATOR([realloc-gnu])
569   gl_FUNC_REALLOC_POSIX
570   if test $REPLACE_REALLOC = 1; then
571     AC_LIBOBJ([realloc])
572   fi
573   gl_STDLIB_MODULE_INDICATOR([realloc-posix])
574   gl_SAVE_CWD
575   gl_SAVEDIR
576   gl_SIGNBIT
577   if test $REPLACE_SIGNBIT = 1; then
578     AC_LIBOBJ([signbitf])
579     AC_LIBOBJ([signbitd])
580     AC_LIBOBJ([signbitl])
581   fi
582   gl_MATH_MODULE_INDICATOR([signbit])
583   gl_SIZE_MAX
584   gt_TYPE_SSIZE_T
585   gl_FUNC_STAT
586   if test $REPLACE_STAT = 1; then
587     AC_LIBOBJ([stat])
588     gl_PREREQ_STAT
589   fi
590   gl_SYS_STAT_MODULE_INDICATOR([stat])
591   gl_STAT_TIME
592   gl_STAT_BIRTHTIME
593   AM_STDBOOL_H
594   gl_STDDEF_H
595   gl_STDINT_H
596   gl_STDIO_H
597   gl_STDLIB_H
598   gl_FUNC_STRDUP_POSIX
599   if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
600     AC_LIBOBJ([strdup])
601     gl_PREREQ_STRDUP
602   fi
603   gl_STRING_MODULE_INDICATOR([strdup])
604   gl_FUNC_STRERROR
605   if test $REPLACE_STRERROR = 1; then
606     AC_LIBOBJ([strerror])
607   fi
608   gl_MODULE_INDICATOR([strerror])
609   gl_STRING_MODULE_INDICATOR([strerror])
610   AC_REQUIRE([gl_HEADER_ERRNO_H])
611   AC_REQUIRE([gl_FUNC_STRERROR_0])
612   if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
613     AC_LIBOBJ([strerror-override])
614     gl_PREREQ_SYS_H_WINSOCK2
615   fi
616   gl_FUNC_STRERROR_R
617   if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
618     AC_LIBOBJ([strerror_r])
619     gl_PREREQ_STRERROR_R
620   fi
621   gl_STRING_MODULE_INDICATOR([strerror_r])
622   gl_HEADER_STRING_H
623   gl_HEADER_SYS_STAT_H
624   AC_PROG_MKDIR_P
625   gl_HEADER_SYS_TIME_H
626   AC_PROG_MKDIR_P
627   gl_SYS_TYPES_H
628   AC_PROG_MKDIR_P
629   gl_THREADLIB
630   gl_HEADER_TIME_H
631   gl_TIMESPEC
632   gl_UNISTD_H
633   gl_UNISTD_SAFER
634   gl_UTIMENS
635   gl_FUNC_VASNPRINTF
636   gl_FUNC_VFPRINTF_POSIX
637   gl_STDIO_MODULE_INDICATOR([vfprintf-posix])
638   gl_WCHAR_H
639   gl_WCTYPE_H
640   gl_XALLOC
641   gl_XSIZE
642   gl_YESNO
643   # End of code from modules
644   m4_ifval(gl_LIBSOURCES_LIST, [
645     m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
646       for gl_file in ]gl_LIBSOURCES_LIST[ ; do
647         if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
648           echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
649           exit 1
650         fi
651       done])dnl
652       m4_if(m4_sysval, [0], [],
653         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
654   ])
655   m4_popdef([gl_LIBSOURCES_DIR])
656   m4_popdef([gl_LIBSOURCES_LIST])
657   m4_popdef([AC_LIBSOURCES])
658   m4_popdef([AC_REPLACE_FUNCS])
659   m4_popdef([AC_LIBOBJ])
660   AC_CONFIG_COMMANDS_PRE([
661     gl_libobjs=
662     gl_ltlibobjs=
663     if test -n "$gl_LIBOBJS"; then
664       # Remove the extension.
665       sed_drop_objext='s/\.o$//;s/\.obj$//'
666       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
667         gl_libobjs="$gl_libobjs $i.$ac_objext"
668         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
669       done
670     fi
671     AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
672     AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
673   ])
674   gltests_libdeps=
675   gltests_ltlibdeps=
676   m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
677   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
678   m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
679   m4_pushdef([gltests_LIBSOURCES_LIST], [])
680   m4_pushdef([gltests_LIBSOURCES_DIR], [])
681   gl_COMMON
682   gl_source_base='tests'
683 changequote(,)dnl
684   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
685 changequote([, ])dnl
686   AC_SUBST([gltests_WITNESS])
687   gl_module_indicator_condition=$gltests_WITNESS
688   m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
689   m4_popdef([gl_MODULE_INDICATOR_CONDITION])
690   m4_ifval(gltests_LIBSOURCES_LIST, [
691     m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
692       for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
693         if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
694           echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
695           exit 1
696         fi
697       done])dnl
698       m4_if(m4_sysval, [0], [],
699         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
700   ])
701   m4_popdef([gltests_LIBSOURCES_DIR])
702   m4_popdef([gltests_LIBSOURCES_LIST])
703   m4_popdef([AC_LIBSOURCES])
704   m4_popdef([AC_REPLACE_FUNCS])
705   m4_popdef([AC_LIBOBJ])
706   AC_CONFIG_COMMANDS_PRE([
707     gltests_libobjs=
708     gltests_ltlibobjs=
709     if test -n "$gltests_LIBOBJS"; then
710       # Remove the extension.
711       sed_drop_objext='s/\.o$//;s/\.obj$//'
712       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
713         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
714         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
715       done
716     fi
717     AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
718     AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
719   ])
720   LIBGZIP_LIBDEPS="$gl_libdeps"
721   AC_SUBST([LIBGZIP_LIBDEPS])
722   LIBGZIP_LTLIBDEPS="$gl_ltlibdeps"
723   AC_SUBST([LIBGZIP_LTLIBDEPS])
724 ])
725
726 # Like AC_LIBOBJ, except that the module name goes
727 # into gl_LIBOBJS instead of into LIBOBJS.
728 AC_DEFUN([gl_LIBOBJ], [
729   AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
730   gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
731 ])
732
733 # Like AC_REPLACE_FUNCS, except that the module name goes
734 # into gl_LIBOBJS instead of into LIBOBJS.
735 AC_DEFUN([gl_REPLACE_FUNCS], [
736   m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
737   AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
738 ])
739
740 # Like AC_LIBSOURCES, except the directory where the source file is
741 # expected is derived from the gnulib-tool parameterization,
742 # and alloca is special cased (for the alloca-opt module).
743 # We could also entirely rely on EXTRA_lib..._SOURCES.
744 AC_DEFUN([gl_LIBSOURCES], [
745   m4_foreach([_gl_NAME], [$1], [
746     m4_if(_gl_NAME, [alloca.c], [], [
747       m4_define([gl_LIBSOURCES_DIR], [lib])
748       m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
749     ])
750   ])
751 ])
752
753 # Like AC_LIBOBJ, except that the module name goes
754 # into gltests_LIBOBJS instead of into LIBOBJS.
755 AC_DEFUN([gltests_LIBOBJ], [
756   AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
757   gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
758 ])
759
760 # Like AC_REPLACE_FUNCS, except that the module name goes
761 # into gltests_LIBOBJS instead of into LIBOBJS.
762 AC_DEFUN([gltests_REPLACE_FUNCS], [
763   m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
764   AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
765 ])
766
767 # Like AC_LIBSOURCES, except the directory where the source file is
768 # expected is derived from the gnulib-tool parameterization,
769 # and alloca is special cased (for the alloca-opt module).
770 # We could also entirely rely on EXTRA_lib..._SOURCES.
771 AC_DEFUN([gltests_LIBSOURCES], [
772   m4_foreach([_gl_NAME], [$1], [
773     m4_if(_gl_NAME, [alloca.c], [], [
774       m4_define([gltests_LIBSOURCES_DIR], [tests])
775       m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
776     ])
777   ])
778 ])
779
780 # This macro records the list of files which have been installed by
781 # gnulib-tool and may be removed by future gnulib-tool invocations.
782 AC_DEFUN([gl_FILE_LIST], [
783   build-aux/announce-gen
784   build-aux/config.rpath
785   build-aux/do-release-commit-and-tag
786   build-aux/gendocs.sh
787   build-aux/git-version-gen
788   build-aux/gitlog-to-changelog
789   build-aux/gnu-web-doc-update
790   build-aux/gnupload
791   build-aux/snippet/_Noreturn.h
792   build-aux/snippet/arg-nonnull.h
793   build-aux/snippet/c++defs.h
794   build-aux/snippet/unused-parameter.h
795   build-aux/snippet/warn-on-use.h
796   build-aux/update-copyright
797   build-aux/useless-if-before-free
798   build-aux/vc-list-files
799   doc/fdl.texi
800   doc/gendocs_template
801   lib/alloca.in.h
802   lib/asnprintf.c
803   lib/basename-lgpl.c
804   lib/c-ctype.c
805   lib/c-ctype.h
806   lib/c-strcase.h
807   lib/c-strcasecmp.c
808   lib/c-strcaseeq.h
809   lib/c-strncasecmp.c
810   lib/calloc.c
811   lib/chdir-long.c
812   lib/chdir-long.h
813   lib/cloexec.c
814   lib/cloexec.h
815   lib/close-stream.c
816   lib/close-stream.h
817   lib/close.c
818   lib/closedir.c
819   lib/closein.c
820   lib/closein.h
821   lib/closeout.c
822   lib/closeout.h
823   lib/config.charset
824   lib/creat-safer.c
825   lib/dirent--.h
826   lib/dirent-private.h
827   lib/dirent-safer.h
828   lib/dirent.in.h
829   lib/dirfd.c
830   lib/dirname-lgpl.c
831   lib/dirname.h
832   lib/dosname.h
833   lib/dup-safer.c
834   lib/dup.c
835   lib/dup2.c
836   lib/errno.in.h
837   lib/error.c
838   lib/error.h
839   lib/exitfail.c
840   lib/exitfail.h
841   lib/fchdir.c
842   lib/fclose.c
843   lib/fcntl--.h
844   lib/fcntl-safer.h
845   lib/fcntl.c
846   lib/fcntl.in.h
847   lib/fd-hook.c
848   lib/fd-hook.h
849   lib/fd-safer.c
850   lib/fdopendir.c
851   lib/fflush.c
852   lib/filename.h
853   lib/filenamecat-lgpl.c
854   lib/filenamecat.h
855   lib/float+.h
856   lib/float.c
857   lib/float.in.h
858   lib/fpending.c
859   lib/fpending.h
860   lib/fprintf.c
861   lib/fpucw.h
862   lib/fpurge.c
863   lib/freadahead.c
864   lib/freadahead.h
865   lib/freading.c
866   lib/freading.h
867   lib/frexp.c
868   lib/frexpl.c
869   lib/fseek.c
870   lib/fseeko.c
871   lib/fseterr.c
872   lib/fseterr.h
873   lib/fstat.c
874   lib/ftell.c
875   lib/ftello.c
876   lib/getcwd-lgpl.c
877   lib/getdtablesize.c
878   lib/getopt.c
879   lib/getopt.in.h
880   lib/getopt1.c
881   lib/getopt_int.h
882   lib/gettext.h
883   lib/gettime.c
884   lib/gettimeofday.c
885   lib/glthread/lock.c
886   lib/glthread/lock.h
887   lib/glthread/threadlib.c
888   lib/ignore-value.h
889   lib/intprops.h
890   lib/isnan.c
891   lib/isnand-nolibm.h
892   lib/isnand.c
893   lib/isnanf-nolibm.h
894   lib/isnanf.c
895   lib/isnanl-nolibm.h
896   lib/isnanl.c
897   lib/itold.c
898   lib/localcharset.c
899   lib/localcharset.h
900   lib/lseek.c
901   lib/lstat.c
902   lib/malloc.c
903   lib/math.c
904   lib/math.in.h
905   lib/mbrtowc.c
906   lib/mbsinit.c
907   lib/memchr.c
908   lib/memchr.valgrind
909   lib/mempcpy.c
910   lib/memrchr.c
911   lib/msvc-inval.c
912   lib/msvc-inval.h
913   lib/msvc-nothrow.c
914   lib/msvc-nothrow.h
915   lib/open-safer.c
916   lib/open.c
917   lib/openat-die.c
918   lib/openat-priv.h
919   lib/openat-proc.c
920   lib/openat.c
921   lib/openat.h
922   lib/opendir-safer.c
923   lib/opendir.c
924   lib/pathmax.h
925   lib/perror.c
926   lib/pipe-safer.c
927   lib/printf-args.c
928   lib/printf-args.h
929   lib/printf-frexp.c
930   lib/printf-frexp.h
931   lib/printf-frexpl.c
932   lib/printf-frexpl.h
933   lib/printf-parse.c
934   lib/printf-parse.h
935   lib/printf.c
936   lib/quote.h
937   lib/quotearg.c
938   lib/quotearg.h
939   lib/readdir.c
940   lib/realloc.c
941   lib/ref-add.sin
942   lib/ref-del.sin
943   lib/save-cwd.c
944   lib/save-cwd.h
945   lib/savedir.c
946   lib/savedir.h
947   lib/signbitd.c
948   lib/signbitf.c
949   lib/signbitl.c
950   lib/size_max.h
951   lib/stat-time.c
952   lib/stat-time.h
953   lib/stat.c
954   lib/stdbool.in.h
955   lib/stddef.in.h
956   lib/stdint.in.h
957   lib/stdio-impl.h
958   lib/stdio.in.h
959   lib/stdlib.in.h
960   lib/strdup.c
961   lib/streq.h
962   lib/strerror-override.c
963   lib/strerror-override.h
964   lib/strerror.c
965   lib/strerror_r.c
966   lib/string.in.h
967   lib/stripslash.c
968   lib/sys_stat.in.h
969   lib/sys_time.in.h
970   lib/sys_types.in.h
971   lib/time.in.h
972   lib/timespec.c
973   lib/timespec.h
974   lib/unistd--.h
975   lib/unistd-safer.h
976   lib/unistd.c
977   lib/unistd.in.h
978   lib/utimens.c
979   lib/utimens.h
980   lib/vasnprintf.c
981   lib/vasnprintf.h
982   lib/verify.h
983   lib/vfprintf.c
984   lib/wchar.in.h
985   lib/wctype-h.c
986   lib/wctype.in.h
987   lib/xalloc-die.c
988   lib/xalloc-oversized.h
989   lib/xalloc.h
990   lib/xmalloc.c
991   lib/xsize.c
992   lib/xsize.h
993   lib/yesno.c
994   lib/yesno.h
995   m4/00gnulib.m4
996   m4/alloca.m4
997   m4/asm-underscore.m4
998   m4/calloc.m4
999   m4/chdir-long.m4
1000   m4/clock_time.m4
1001   m4/close-stream.m4
1002   m4/close.m4
1003   m4/closedir.m4
1004   m4/closein.m4
1005   m4/closeout.m4
1006   m4/codeset.m4
1007   m4/configmake.m4
1008   m4/dirent-safer.m4
1009   m4/dirent_h.m4
1010   m4/dirfd.m4
1011   m4/dirname.m4
1012   m4/double-slash-root.m4
1013   m4/dup.m4
1014   m4/dup2.m4
1015   m4/errno_h.m4
1016   m4/error.m4
1017   m4/exponentd.m4
1018   m4/exponentf.m4
1019   m4/exponentl.m4
1020   m4/extensions.m4
1021   m4/extern-inline.m4
1022   m4/fchdir.m4
1023   m4/fclose.m4
1024   m4/fcntl-o.m4
1025   m4/fcntl-safer.m4
1026   m4/fcntl.m4
1027   m4/fcntl_h.m4
1028   m4/fdopendir.m4
1029   m4/fflush.m4
1030   m4/filenamecat.m4
1031   m4/float_h.m4
1032   m4/fpending.m4
1033   m4/fpieee.m4
1034   m4/fprintf-posix.m4
1035   m4/fpurge.m4
1036   m4/freadahead.m4
1037   m4/freading.m4
1038   m4/frexp.m4
1039   m4/frexpl.m4
1040   m4/fseek.m4
1041   m4/fseeko.m4
1042   m4/fseterr.m4
1043   m4/fstat.m4
1044   m4/ftell.m4
1045   m4/ftello.m4
1046   m4/getcwd.m4
1047   m4/getdtablesize.m4
1048   m4/getopt.m4
1049   m4/gettime.m4
1050   m4/gettimeofday.m4
1051   m4/glibc21.m4
1052   m4/gnu-make.m4
1053   m4/gnulib-common.m4
1054   m4/include_next.m4
1055   m4/intmax_t.m4
1056   m4/inttypes_h.m4
1057   m4/isnand.m4
1058   m4/isnanf.m4
1059   m4/isnanl.m4
1060   m4/largefile.m4
1061   m4/ldexpl.m4
1062   m4/lib-ignore.m4
1063   m4/lib-ld.m4
1064   m4/lib-link.m4
1065   m4/lib-prefix.m4
1066   m4/localcharset.m4
1067   m4/locale-fr.m4
1068   m4/locale-ja.m4
1069   m4/locale-zh.m4
1070   m4/lock.m4
1071   m4/longlong.m4
1072   m4/lseek.m4
1073   m4/lstat.m4
1074   m4/malloc.m4
1075   m4/manywarnings.m4
1076   m4/math_h.m4
1077   m4/mbrtowc.m4
1078   m4/mbsinit.m4
1079   m4/mbstate_t.m4
1080   m4/memchr.m4
1081   m4/mempcpy.m4
1082   m4/memrchr.m4
1083   m4/mmap-anon.m4
1084   m4/mode_t.m4
1085   m4/msvc-inval.m4
1086   m4/msvc-nothrow.m4
1087   m4/multiarch.m4
1088   m4/nocrash.m4
1089   m4/off_t.m4
1090   m4/open.m4
1091   m4/openat.m4
1092   m4/opendir.m4
1093   m4/pathmax.m4
1094   m4/perror.m4
1095   m4/printf-frexp.m4
1096   m4/printf-frexpl.m4
1097   m4/printf-posix-rpl.m4
1098   m4/printf.m4
1099   m4/quotearg.m4
1100   m4/readdir.m4
1101   m4/realloc.m4
1102   m4/save-cwd.m4
1103   m4/savedir.m4
1104   m4/signbit.m4
1105   m4/size_max.m4
1106   m4/ssize_t.m4
1107   m4/stat-time.m4
1108   m4/stat.m4
1109   m4/stdbool.m4
1110   m4/stddef_h.m4
1111   m4/stdint.m4
1112   m4/stdint_h.m4
1113   m4/stdio_h.m4
1114   m4/stdlib_h.m4
1115   m4/strdup.m4
1116   m4/strerror.m4
1117   m4/strerror_r.m4
1118   m4/string_h.m4
1119   m4/sys_socket_h.m4
1120   m4/sys_stat_h.m4
1121   m4/sys_time_h.m4
1122   m4/sys_types_h.m4
1123   m4/threadlib.m4
1124   m4/time_h.m4
1125   m4/timespec.m4
1126   m4/unistd-safer.m4
1127   m4/unistd_h.m4
1128   m4/utimbuf.m4
1129   m4/utimens.m4
1130   m4/utimes.m4
1131   m4/vasnprintf.m4
1132   m4/vfprintf-posix.m4
1133   m4/warn-on-use.m4
1134   m4/warnings.m4
1135   m4/wchar_h.m4
1136   m4/wchar_t.m4
1137   m4/wctype_h.m4
1138   m4/wint_t.m4
1139   m4/xalloc.m4
1140   m4/xsize.m4
1141   m4/yesno.m4
1142   top/GNUmakefile
1143   top/README-release
1144   top/maint.mk
1145 ])