Update gnulib files. Drop slow test-lock check.
[gnutls:gnutls.git] / gl / 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   # Code from module accept:
42   # Code from module accept-tests:
43   # Code from module alloca:
44   # Code from module alloca-opt:
45   # Code from module alloca-opt-tests:
46   # Code from module alphasort:
47   # Code from module argp:
48   # Code from module argp-tests:
49   # Code from module arpa_inet:
50   # Code from module arpa_inet-tests:
51   # Code from module binary-io:
52   # Code from module binary-io-tests:
53   # Code from module bind:
54   # Code from module bind-tests:
55   # Code from module byteswap:
56   # Code from module byteswap-tests:
57   # Code from module c-ctype:
58   # Code from module c-ctype-tests:
59   # Code from module clock-time:
60   # Code from module close:
61   # Code from module close-tests:
62   # Code from module closedir:
63   # Code from module connect:
64   # Code from module connect-tests:
65   # Code from module dirent:
66   # Code from module dirent-tests:
67   # Code from module dirname-lgpl:
68   # Code from module dosname:
69   # Code from module double-slash-root:
70   # Code from module dup2:
71   # Code from module dup2-tests:
72   # Code from module environ:
73   # Code from module environ-tests:
74   # Code from module errno:
75   # Code from module errno-tests:
76   # Code from module error:
77   # Code from module extensions:
78   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
79   # Code from module fcntl-h:
80   # Code from module fcntl-h-tests:
81   # Code from module fd-hook:
82   # Code from module fdopen:
83   # Code from module fdopen-tests:
84   # Code from module fgetc-tests:
85   # Code from module filename:
86   # Code from module float:
87   # Code from module float-tests:
88   # Code from module fpieee:
89   AC_REQUIRE([gl_FP_IEEE])
90   # Code from module fpucw:
91   # Code from module fputc-tests:
92   # Code from module fread-tests:
93   # Code from module frexp-nolibm:
94   # Code from module frexp-nolibm-tests:
95   # Code from module frexpl-nolibm:
96   # Code from module frexpl-nolibm-tests:
97   # Code from module fseek:
98   # Code from module fseek-tests:
99   # Code from module fseeko:
100   AC_REQUIRE([AC_FUNC_FSEEKO])
101   # Code from module fseeko-tests:
102   # Code from module fseterr:
103   # Code from module fseterr-tests:
104   # Code from module fstat:
105   # Code from module fstat-tests:
106   # Code from module ftell:
107   # Code from module ftell-tests:
108   # Code from module ftello:
109   AC_REQUIRE([AC_FUNC_FSEEKO])
110   # Code from module ftello-tests:
111   # Code from module ftruncate:
112   # Code from module ftruncate-tests:
113   # Code from module func:
114   # Code from module func-tests:
115   # Code from module fwrite-tests:
116   # Code from module gendocs:
117   # Code from module getaddrinfo:
118   # Code from module getaddrinfo-tests:
119   # Code from module getcwd-lgpl:
120   # Code from module getcwd-lgpl-tests:
121   # Code from module getdelim:
122   # Code from module getdelim-tests:
123   # Code from module getline:
124   # Code from module getline-tests:
125   # Code from module getopt-gnu:
126   # Code from module getopt-posix:
127   # Code from module getopt-posix-tests:
128   # Code from module getpagesize:
129   # Code from module getpass:
130   # Code from module getpeername:
131   # Code from module getpeername-tests:
132   # Code from module getsubopt:
133   # Code from module gettext:
134   # Code from module gettext-h:
135   # Code from module gettime:
136   # Code from module gettimeofday:
137   # Code from module gettimeofday-tests:
138   # Code from module gnumakefile:
139   # Code from module havelib:
140   # Code from module hostent:
141   # Code from module ignore-value:
142   # Code from module ignore-value-tests:
143   # Code from module include_next:
144   # Code from module inet_ntop:
145   # Code from module inet_ntop-tests:
146   # Code from module inet_pton:
147   # Code from module inet_pton-tests:
148   # Code from module intprops:
149   # Code from module intprops-tests:
150   # Code from module inttypes:
151   # Code from module inttypes-incomplete:
152   # Code from module inttypes-tests:
153   # Code from module ioctl:
154   # Code from module ioctl-tests:
155   # Code from module isnand-nolibm:
156   # Code from module isnand-nolibm-tests:
157   # Code from module isnanf-nolibm:
158   # Code from module isnanf-nolibm-tests:
159   # Code from module isnanl-nolibm:
160   # Code from module isnanl-nolibm-tests:
161   # Code from module largefile:
162   AC_REQUIRE([AC_SYS_LARGEFILE])
163   # Code from module lib-msvc-compat:
164   # Code from module lib-symbol-versions:
165   # Code from module listen:
166   # Code from module listen-tests:
167   # Code from module lock:
168   # Code from module lseek:
169   # Code from module lstat:
170   # Code from module lstat-tests:
171   # Code from module maintainer-makefile:
172   # Code from module malloc-gnu:
173   # Code from module malloc-gnu-tests:
174   # Code from module malloc-posix:
175   # Code from module malloca:
176   # Code from module malloca-tests:
177   # Code from module manywarnings:
178   # Code from module math:
179   # Code from module math-tests:
180   # Code from module memchr:
181   # Code from module memchr-tests:
182   # Code from module memmem-simple:
183   # Code from module mempcpy:
184   # Code from module minmax:
185   # Code from module msvc-inval:
186   # Code from module msvc-nothrow:
187   # Code from module multiarch:
188   # Code from module netdb:
189   # Code from module netdb-tests:
190   # Code from module netinet_in:
191   # Code from module netinet_in-tests:
192   # Code from module nocrash:
193   # Code from module open:
194   # Code from module open-tests:
195   # Code from module opendir:
196   # Code from module pathmax:
197   # Code from module pathmax-tests:
198   # Code from module perror:
199   # Code from module perror-tests:
200   # Code from module pipe-posix:
201   # Code from module pipe-posix-tests:
202   # Code from module pmccabe2html:
203   # Code from module printf-frexp:
204   # Code from module printf-frexp-tests:
205   # Code from module printf-frexpl:
206   # Code from module printf-frexpl-tests:
207   # Code from module printf-safe:
208   # Code from module progname:
209   # Code from module putenv:
210   # Code from module rawmemchr:
211   # Code from module rawmemchr-tests:
212   # Code from module read-file:
213   # Code from module read-file-tests:
214   # Code from module readdir:
215   # Code from module realloc-posix:
216   # Code from module recv:
217   # Code from module recv-tests:
218   # Code from module recvfrom:
219   # Code from module recvfrom-tests:
220   # Code from module same-inode:
221   # Code from module scandir:
222   # Code from module select:
223   # Code from module select-tests:
224   # Code from module send:
225   # Code from module send-tests:
226   # Code from module sendto:
227   # Code from module sendto-tests:
228   # Code from module servent:
229   # Code from module setenv:
230   # Code from module setenv-tests:
231   # Code from module setsockopt:
232   # Code from module setsockopt-tests:
233   # Code from module shutdown:
234   # Code from module shutdown-tests:
235   # Code from module signal-h:
236   # Code from module signal-h-tests:
237   # Code from module signbit:
238   # Code from module signbit-tests:
239   # Code from module size_max:
240   # Code from module sleep:
241   # Code from module sleep-tests:
242   # Code from module snippet/_Noreturn:
243   # Code from module snippet/arg-nonnull:
244   # Code from module snippet/c++defs:
245   # Code from module snippet/warn-on-use:
246   # Code from module snprintf:
247   # Code from module snprintf-tests:
248   # Code from module socket:
249   # Code from module socketlib:
250   # Code from module sockets:
251   # Code from module sockets-tests:
252   # Code from module socklen:
253   # Code from module ssize_t:
254   # Code from module stat:
255   # Code from module stat-tests:
256   # Code from module stdalign:
257   # Code from module stdalign-tests:
258   # Code from module stdarg:
259   dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
260   dnl for the builtin va_copy to work.  With Autoconf 2.60 or later,
261   dnl gl_PROG_CC_C99 arranges for this.  With older Autoconf gl_PROG_CC_C99
262   dnl shouldn't hurt, though installers are on their own to set c99 mode.
263   gl_PROG_CC_C99
264   # Code from module stdbool:
265   # Code from module stdbool-tests:
266   # Code from module stddef:
267   # Code from module stddef-tests:
268   # Code from module stdint:
269   # Code from module stdint-tests:
270   # Code from module stdio:
271   # Code from module stdio-tests:
272   # Code from module stdlib:
273   # Code from module stdlib-tests:
274   # Code from module strcase:
275   # Code from module strchrnul:
276   # Code from module strchrnul-tests:
277   # Code from module strdup-posix:
278   # Code from module strerror:
279   # Code from module strerror-override:
280   # Code from module strerror-tests:
281   # Code from module strerror_r-posix:
282   # Code from module strerror_r-posix-tests:
283   # Code from module string:
284   # Code from module string-tests:
285   # Code from module strings:
286   # Code from module strings-tests:
287   # Code from module strndup:
288   # Code from module strnlen:
289   # Code from module strnlen-tests:
290   # Code from module strverscmp:
291   # Code from module strverscmp-tests:
292   # Code from module symlink:
293   # Code from module symlink-tests:
294   # Code from module sys_ioctl:
295   # Code from module sys_ioctl-tests:
296   # Code from module sys_select:
297   # Code from module sys_select-tests:
298   # Code from module sys_socket:
299   # Code from module sys_socket-tests:
300   # Code from module sys_stat:
301   # Code from module sys_stat-tests:
302   # Code from module sys_time:
303   # Code from module sys_time-tests:
304   # Code from module sys_types:
305   # Code from module sys_types-tests:
306   # Code from module sys_uio:
307   # Code from module sys_uio-tests:
308   # Code from module sysexits:
309   # Code from module sysexits-tests:
310   # Code from module test-framework-sh:
311   # Code from module test-framework-sh-tests:
312   # Code from module threadlib:
313   gl_THREADLIB_EARLY
314   # Code from module time:
315   # Code from module time-tests:
316   # Code from module time_r:
317   # Code from module timespec:
318   # Code from module u64:
319   # Code from module u64-tests:
320   # Code from module unistd:
321   # Code from module unistd-tests:
322   # Code from module unsetenv:
323   # Code from module unsetenv-tests:
324   # Code from module useless-if-before-free:
325   # Code from module valgrind-tests:
326   # Code from module vasnprintf:
327   # Code from module vasnprintf-tests:
328   # Code from module vasprintf:
329   # Code from module vasprintf-tests:
330   # Code from module vc-list-files:
331   # Code from module vc-list-files-tests:
332   # Code from module verify:
333   # Code from module verify-tests:
334   # Code from module version-etc:
335   # Code from module version-etc-fsf:
336   # Code from module version-etc-tests:
337   # Code from module vfprintf-posix:
338   # Code from module vfprintf-posix-tests:
339   # Code from module vprintf-posix:
340   # Code from module vprintf-posix-tests:
341   # Code from module vsnprintf:
342   # Code from module vsnprintf-tests:
343   # Code from module warnings:
344   # Code from module wchar:
345   # Code from module wchar-tests:
346   # Code from module xsize:
347 ])
348
349 # This macro should be invoked from ./configure.ac, in the section
350 # "Check for header files, types and library functions".
351 AC_DEFUN([gl_INIT],
352 [
353   AM_CONDITIONAL([GL_COND_LIBTOOL], [true])
354   gl_cond_libtool=true
355   gl_m4_base='gl/m4'
356   m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
357   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
358   m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
359   m4_pushdef([gl_LIBSOURCES_LIST], [])
360   m4_pushdef([gl_LIBSOURCES_DIR], [])
361   gl_COMMON
362   gl_source_base='gl'
363 AC_REQUIRE([gl_HEADER_SYS_SOCKET])
364 if test "$ac_cv_header_winsock2_h" = yes; then
365   AC_LIBOBJ([accept])
366 fi
367 gl_SYS_SOCKET_MODULE_INDICATOR([accept])
368 changequote(,)dnl
369 LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
370 changequote([, ])dnl
371 AC_SUBST([LTALLOCA])
372 gl_FUNC_ALLOCA
373 gl_FUNC_ALPHASORT
374 if test $HAVE_ALPHASORT = 0; then
375   AC_LIBOBJ([alphasort])
376   gl_PREREQ_ALPHASORT
377 fi
378 gl_DIRENT_MODULE_INDICATOR([alphasort])
379 gl_ARGP
380 m4_ifdef([AM_XGETTEXT_OPTION],
381   [AM_][XGETTEXT_OPTION([--flag=argp_error:2:c-format])
382    AM_][XGETTEXT_OPTION([--flag=argp_failure:4:c-format])])
383 gl_HEADER_ARPA_INET
384 AC_PROG_MKDIR_P
385 AC_REQUIRE([gl_HEADER_SYS_SOCKET])
386 if test "$ac_cv_header_winsock2_h" = yes; then
387   AC_LIBOBJ([bind])
388 fi
389 gl_SYS_SOCKET_MODULE_INDICATOR([bind])
390 gl_BYTESWAP
391 gl_CLOCK_TIME
392 gl_FUNC_CLOSE
393 if test $REPLACE_CLOSE = 1; then
394   AC_LIBOBJ([close])
395 fi
396 gl_UNISTD_MODULE_INDICATOR([close])
397 gl_FUNC_CLOSEDIR
398 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
399   AC_LIBOBJ([closedir])
400 fi
401 gl_DIRENT_MODULE_INDICATOR([closedir])
402 AC_REQUIRE([gl_HEADER_SYS_SOCKET])
403 if test "$ac_cv_header_winsock2_h" = yes; then
404   AC_LIBOBJ([connect])
405 fi
406 gl_SYS_SOCKET_MODULE_INDICATOR([connect])
407 gl_DIRENT_H
408 gl_DIRNAME_LGPL
409 gl_DOUBLE_SLASH_ROOT
410 gl_HEADER_ERRNO_H
411 gl_ERROR
412 if test $ac_cv_lib_error_at_line = no; then
413   AC_LIBOBJ([error])
414   gl_PREREQ_ERROR
415 fi
416 m4_ifdef([AM_XGETTEXT_OPTION],
417   [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
418    AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
419 gl_FLOAT_H
420 if test $REPLACE_FLOAT_LDBL = 1; then
421   AC_LIBOBJ([float])
422 fi
423 if test $REPLACE_ITOLD = 1; then
424   AC_LIBOBJ([itold])
425 fi
426 gl_FUNC_FREXP_NO_LIBM
427 if test $gl_func_frexp_no_libm != yes; then
428   AC_LIBOBJ([frexp])
429 fi
430 gl_MATH_MODULE_INDICATOR([frexp])
431 gl_FUNC_FREXPL_NO_LIBM
432 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
433   AC_LIBOBJ([frexpl])
434 fi
435 gl_MATH_MODULE_INDICATOR([frexpl])
436 gl_FUNC_FSEEK
437 if test $REPLACE_FSEEK = 1; then
438   AC_LIBOBJ([fseek])
439 fi
440 gl_STDIO_MODULE_INDICATOR([fseek])
441 gl_FUNC_FSEEKO
442 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
443   AC_LIBOBJ([fseeko])
444 fi
445 gl_STDIO_MODULE_INDICATOR([fseeko])
446 gl_FUNC_FSTAT
447 if test $REPLACE_FSTAT = 1; then
448   AC_LIBOBJ([fstat])
449   gl_PREREQ_FSTAT
450 fi
451 gl_SYS_STAT_MODULE_INDICATOR([fstat])
452 gl_FUNC_FTELL
453 if test $REPLACE_FTELL = 1; then
454   AC_LIBOBJ([ftell])
455 fi
456 gl_STDIO_MODULE_INDICATOR([ftell])
457 gl_FUNC_FTELLO
458 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
459   AC_LIBOBJ([ftello])
460 fi
461 gl_STDIO_MODULE_INDICATOR([ftello])
462 gl_FUNC
463 gl_GETADDRINFO
464 if test $HAVE_GETADDRINFO = 0; then
465   AC_LIBOBJ([getaddrinfo])
466 fi
467 if test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1; then
468   AC_LIBOBJ([gai_strerror])
469 fi
470 gl_NETDB_MODULE_INDICATOR([getaddrinfo])
471 gl_FUNC_GETDELIM
472 if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
473   AC_LIBOBJ([getdelim])
474   gl_PREREQ_GETDELIM
475 fi
476 gl_STDIO_MODULE_INDICATOR([getdelim])
477 gl_FUNC_GETLINE
478 if test $REPLACE_GETLINE = 1; then
479   AC_LIBOBJ([getline])
480   gl_PREREQ_GETLINE
481 fi
482 gl_STDIO_MODULE_INDICATOR([getline])
483 gl_FUNC_GETOPT_GNU
484 if test $REPLACE_GETOPT = 1; then
485   AC_LIBOBJ([getopt])
486   AC_LIBOBJ([getopt1])
487   gl_PREREQ_GETOPT
488   dnl Arrange for unistd.h to include getopt.h.
489   GNULIB_GL_UNISTD_H_GETOPT=1
490 fi
491 AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
492 gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
493 gl_FUNC_GETOPT_POSIX
494 if test $REPLACE_GETOPT = 1; then
495   AC_LIBOBJ([getopt])
496   AC_LIBOBJ([getopt1])
497   gl_PREREQ_GETOPT
498   dnl Arrange for unistd.h to include getopt.h.
499   GNULIB_GL_UNISTD_H_GETOPT=1
500 fi
501 AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
502 gl_FUNC_GETPASS
503 if test $HAVE_GETPASS = 0; then
504   AC_LIBOBJ([getpass])
505   gl_PREREQ_GETPASS
506 fi
507 AC_REQUIRE([gl_HEADER_SYS_SOCKET])
508 if test "$ac_cv_header_winsock2_h" = yes; then
509   AC_LIBOBJ([getpeername])
510 fi
511 gl_SYS_SOCKET_MODULE_INDICATOR([getpeername])
512 gl_FUNC_GETSUBOPT
513 if test $HAVE_GETSUBOPT = 0; then
514   AC_LIBOBJ([getsubopt])
515   gl_PREREQ_GETSUBOPT
516 fi
517 gl_STDLIB_MODULE_INDICATOR([getsubopt])
518 dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
519 AM_GNU_GETTEXT_VERSION([0.18.1])
520 AC_SUBST([LIBINTL])
521 AC_SUBST([LTLIBINTL])
522 gl_GETTIME
523 gl_FUNC_GETTIMEOFDAY
524 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
525   AC_LIBOBJ([gettimeofday])
526   gl_PREREQ_GETTIMEOFDAY
527 fi
528 gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
529 # Autoconf 2.61a.99 and earlier don't support linking a file only
530 # in VPATH builds.  But since GNUmakefile is for maintainer use
531 # only, it does not matter if we skip the link with older autoconf.
532 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
533 # builds, so use a shell variable to bypass this.
534 GNUmakefile=GNUmakefile
535 m4_if(m4_version_compare([2.61a.100],
536         m4_defn([m4_PACKAGE_VERSION])), [1], [],
537       [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
538         [GNUmakefile=$GNUmakefile])])
539 gl_HOSTENT
540 gl_FUNC_INET_NTOP
541 if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
542   AC_LIBOBJ([inet_ntop])
543   gl_PREREQ_INET_NTOP
544 fi
545 gl_ARPA_INET_MODULE_INDICATOR([inet_ntop])
546 gl_FUNC_INET_PTON
547 if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1; then
548   AC_LIBOBJ([inet_pton])
549   gl_PREREQ_INET_PTON
550 fi
551 gl_ARPA_INET_MODULE_INDICATOR([inet_pton])
552 gl_FUNC_ISNAND_NO_LIBM
553 if test $gl_func_isnand_no_libm != yes; then
554   AC_LIBOBJ([isnand])
555   gl_PREREQ_ISNAND
556 fi
557 gl_FUNC_ISNANF_NO_LIBM
558 if test $gl_func_isnanf_no_libm != yes; then
559   AC_LIBOBJ([isnanf])
560   gl_PREREQ_ISNANF
561 fi
562 gl_FUNC_ISNANL_NO_LIBM
563 if test $gl_func_isnanl_no_libm != yes; then
564   AC_LIBOBJ([isnanl])
565   gl_PREREQ_ISNANL
566 fi
567 gl_LD_OUTPUT_DEF
568 gl_LD_VERSION_SCRIPT
569 AC_REQUIRE([gl_HEADER_SYS_SOCKET])
570 if test "$ac_cv_header_winsock2_h" = yes; then
571   AC_LIBOBJ([listen])
572 fi
573 gl_SYS_SOCKET_MODULE_INDICATOR([listen])
574 gl_FUNC_LSEEK
575 if test $REPLACE_LSEEK = 1; then
576   AC_LIBOBJ([lseek])
577 fi
578 gl_UNISTD_MODULE_INDICATOR([lseek])
579 AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
580   [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
581 gl_FUNC_MALLOC_GNU
582 if test $REPLACE_MALLOC = 1; then
583   AC_LIBOBJ([malloc])
584 fi
585 gl_MODULE_INDICATOR([malloc-gnu])
586 gl_FUNC_MALLOC_POSIX
587 if test $REPLACE_MALLOC = 1; then
588   AC_LIBOBJ([malloc])
589 fi
590 gl_STDLIB_MODULE_INDICATOR([malloc-posix])
591 gl_MATH_H
592 gl_FUNC_MEMCHR
593 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
594   AC_LIBOBJ([memchr])
595   gl_PREREQ_MEMCHR
596 fi
597 gl_STRING_MODULE_INDICATOR([memchr])
598 gl_FUNC_MEMMEM_SIMPLE
599 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
600   AC_LIBOBJ([memmem])
601 fi
602 gl_STRING_MODULE_INDICATOR([memmem])
603 gl_FUNC_MEMPCPY
604 if test $HAVE_MEMPCPY = 0; then
605   AC_LIBOBJ([mempcpy])
606   gl_PREREQ_MEMPCPY
607 fi
608 gl_STRING_MODULE_INDICATOR([mempcpy])
609 gl_MINMAX
610 gl_MSVC_INVAL
611 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
612   AC_LIBOBJ([msvc-inval])
613 fi
614 gl_MSVC_NOTHROW
615 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
616   AC_LIBOBJ([msvc-nothrow])
617 fi
618 gl_MULTIARCH
619 gl_HEADER_NETDB
620 gl_HEADER_NETINET_IN
621 AC_PROG_MKDIR_P
622 gl_FUNC_OPENDIR
623 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
624   AC_LIBOBJ([opendir])
625 fi
626 gl_DIRENT_MODULE_INDICATOR([opendir])
627 AC_PATH_PROG([PMCCABE], [pmccabe], [false])
628 gl_FUNC_PRINTF_FREXP
629 gl_FUNC_PRINTF_FREXPL
630 m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes])
631 AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
632 AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
633 gl_FUNC_RAWMEMCHR
634 if test $HAVE_RAWMEMCHR = 0; then
635   AC_LIBOBJ([rawmemchr])
636   gl_PREREQ_RAWMEMCHR
637 fi
638 gl_STRING_MODULE_INDICATOR([rawmemchr])
639 gl_PREREQ_READ_FILE
640 gl_FUNC_READDIR
641 if test $HAVE_READDIR = 0; then
642   AC_LIBOBJ([readdir])
643 fi
644 gl_DIRENT_MODULE_INDICATOR([readdir])
645 gl_FUNC_REALLOC_POSIX
646 if test $REPLACE_REALLOC = 1; then
647   AC_LIBOBJ([realloc])
648 fi
649 gl_STDLIB_MODULE_INDICATOR([realloc-posix])
650 AC_REQUIRE([gl_HEADER_SYS_SOCKET])
651 if test "$ac_cv_header_winsock2_h" = yes; then
652   AC_LIBOBJ([recv])
653 fi
654 gl_SYS_SOCKET_MODULE_INDICATOR([recv])
655 AC_REQUIRE([gl_HEADER_SYS_SOCKET])
656 if test "$ac_cv_header_winsock2_h" = yes; then
657   AC_LIBOBJ([recvfrom])
658 fi
659 gl_SYS_SOCKET_MODULE_INDICATOR([recvfrom])
660 gl_FUNC_SCANDIR
661 if test $HAVE_SCANDIR = 0; then
662   AC_LIBOBJ([scandir])
663   gl_PREREQ_SCANDIR
664 fi
665 gl_DIRENT_MODULE_INDICATOR([scandir])
666 gl_FUNC_SELECT
667 if test $REPLACE_SELECT = 1; then
668   AC_LIBOBJ([select])
669 fi
670 gl_SYS_SELECT_MODULE_INDICATOR([select])
671 AC_REQUIRE([gl_HEADER_SYS_SOCKET])
672 if test "$ac_cv_header_winsock2_h" = yes; then
673   AC_LIBOBJ([send])
674 fi
675 gl_SYS_SOCKET_MODULE_INDICATOR([send])
676 AC_REQUIRE([gl_HEADER_SYS_SOCKET])
677 if test "$ac_cv_header_winsock2_h" = yes; then
678   AC_LIBOBJ([sendto])
679 fi
680 gl_SYS_SOCKET_MODULE_INDICATOR([sendto])
681 gl_SERVENT
682 AC_REQUIRE([gl_HEADER_SYS_SOCKET])
683 if test "$ac_cv_header_winsock2_h" = yes; then
684   AC_LIBOBJ([setsockopt])
685 fi
686 gl_SYS_SOCKET_MODULE_INDICATOR([setsockopt])
687 AC_REQUIRE([gl_HEADER_SYS_SOCKET])
688 if test "$ac_cv_header_winsock2_h" = yes; then
689   AC_LIBOBJ([shutdown])
690 fi
691 gl_SYS_SOCKET_MODULE_INDICATOR([shutdown])
692 gl_SIGNAL_H
693 gl_SIGNBIT
694 if test $REPLACE_SIGNBIT = 1; then
695   AC_LIBOBJ([signbitf])
696   AC_LIBOBJ([signbitd])
697   AC_LIBOBJ([signbitl])
698 fi
699 gl_MATH_MODULE_INDICATOR([signbit])
700 gl_SIZE_MAX
701 gl_FUNC_SLEEP
702 if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
703   AC_LIBOBJ([sleep])
704 fi
705 gl_UNISTD_MODULE_INDICATOR([sleep])
706 gl_FUNC_SNPRINTF
707 gl_STDIO_MODULE_INDICATOR([snprintf])
708 gl_MODULE_INDICATOR([snprintf])
709 AC_REQUIRE([gl_HEADER_SYS_SOCKET])
710 if test "$ac_cv_header_winsock2_h" = yes; then
711   AC_LIBOBJ([socket])
712 fi
713 # When this module is used, sockets may actually occur as file descriptors,
714 # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
715 m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])])
716 m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])])
717 AC_REQUIRE([gl_PREREQ_SYS_H_WINSOCK2])
718 if test "$ac_cv_header_winsock2_h" = yes; then
719   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
720   SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
721 fi
722 gl_SYS_SOCKET_MODULE_INDICATOR([socket])
723 gl_SOCKETLIB
724 gl_SOCKETS
725 gl_TYPE_SOCKLEN_T
726 gt_TYPE_SSIZE_T
727 gl_STDALIGN_H
728 gl_STDARG_H
729 AM_STDBOOL_H
730 gl_STDDEF_H
731 gl_STDINT_H
732 gl_STDIO_H
733 gl_STDLIB_H
734 gl_STRCASE
735 if test $HAVE_STRCASECMP = 0; then
736   AC_LIBOBJ([strcasecmp])
737   gl_PREREQ_STRCASECMP
738 fi
739 if test $HAVE_STRNCASECMP = 0; then
740   AC_LIBOBJ([strncasecmp])
741   gl_PREREQ_STRNCASECMP
742 fi
743 gl_FUNC_STRCHRNUL
744 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
745   AC_LIBOBJ([strchrnul])
746   gl_PREREQ_STRCHRNUL
747 fi
748 gl_STRING_MODULE_INDICATOR([strchrnul])
749 gl_FUNC_STRDUP_POSIX
750 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
751   AC_LIBOBJ([strdup])
752   gl_PREREQ_STRDUP
753 fi
754 gl_STRING_MODULE_INDICATOR([strdup])
755 gl_FUNC_STRERROR
756 if test $REPLACE_STRERROR = 1; then
757   AC_LIBOBJ([strerror])
758 fi
759 gl_MODULE_INDICATOR([strerror])
760 gl_STRING_MODULE_INDICATOR([strerror])
761 AC_REQUIRE([gl_HEADER_ERRNO_H])
762 AC_REQUIRE([gl_FUNC_STRERROR_0])
763 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
764   AC_LIBOBJ([strerror-override])
765   gl_PREREQ_SYS_H_WINSOCK2
766 fi
767 gl_HEADER_STRING_H
768 gl_HEADER_STRINGS_H
769 gl_FUNC_STRNDUP
770 if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
771   AC_LIBOBJ([strndup])
772 fi
773 gl_STRING_MODULE_INDICATOR([strndup])
774 gl_FUNC_STRNLEN
775 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
776   AC_LIBOBJ([strnlen])
777   gl_PREREQ_STRNLEN
778 fi
779 gl_STRING_MODULE_INDICATOR([strnlen])
780 gl_FUNC_STRVERSCMP
781 if test $HAVE_STRVERSCMP = 0; then
782   AC_LIBOBJ([strverscmp])
783   gl_PREREQ_STRVERSCMP
784 fi
785 gl_STRING_MODULE_INDICATOR([strverscmp])
786 gl_HEADER_SYS_SELECT
787 AC_PROG_MKDIR_P
788 gl_HEADER_SYS_SOCKET
789 AC_PROG_MKDIR_P
790 gl_HEADER_SYS_STAT_H
791 AC_PROG_MKDIR_P
792 gl_HEADER_SYS_TIME_H
793 AC_PROG_MKDIR_P
794 gl_SYS_TYPES_H
795 AC_PROG_MKDIR_P
796 gl_HEADER_SYS_UIO
797 AC_PROG_MKDIR_P
798 gl_SYSEXITS
799 gl_HEADER_TIME_H
800 gl_TIME_R
801 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
802   AC_LIBOBJ([time_r])
803   gl_PREREQ_TIME_R
804 fi
805 gl_TIME_MODULE_INDICATOR([time_r])
806 gl_TIMESPEC
807 AC_REQUIRE([AC_C_INLINE])
808 gl_UNISTD_H
809 gl_VALGRIND_TESTS
810 gl_FUNC_VASNPRINTF
811 gl_FUNC_VASPRINTF
812 gl_STDIO_MODULE_INDICATOR([vasprintf])
813 m4_ifdef([AM_XGETTEXT_OPTION],
814   [AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format])
815    AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
816 gl_VERSION_ETC
817 gl_FUNC_VFPRINTF_POSIX
818 gl_STDIO_MODULE_INDICATOR([vfprintf-posix])
819 gl_FUNC_VPRINTF_POSIX
820 gl_STDIO_MODULE_INDICATOR([vprintf-posix])
821 gl_FUNC_VSNPRINTF
822 gl_STDIO_MODULE_INDICATOR([vsnprintf])
823 AC_SUBST([WARN_CFLAGS])
824 gl_WCHAR_H
825 gl_XSIZE
826   # End of code from modules
827   m4_ifval(gl_LIBSOURCES_LIST, [
828     m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
829       for gl_file in ]gl_LIBSOURCES_LIST[ ; do
830         if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
831           echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
832           exit 1
833         fi
834       done])dnl
835       m4_if(m4_sysval, [0], [],
836         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
837   ])
838   m4_popdef([gl_LIBSOURCES_DIR])
839   m4_popdef([gl_LIBSOURCES_LIST])
840   m4_popdef([AC_LIBSOURCES])
841   m4_popdef([AC_REPLACE_FUNCS])
842   m4_popdef([AC_LIBOBJ])
843   AC_CONFIG_COMMANDS_PRE([
844     gl_libobjs=
845     gl_ltlibobjs=
846     if test -n "$gl_LIBOBJS"; then
847       # Remove the extension.
848       sed_drop_objext='s/\.o$//;s/\.obj$//'
849       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
850         gl_libobjs="$gl_libobjs $i.$ac_objext"
851         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
852       done
853     fi
854     AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
855     AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
856   ])
857   gltests_libdeps=
858   gltests_ltlibdeps=
859   m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
860   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
861   m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
862   m4_pushdef([gltests_LIBSOURCES_LIST], [])
863   m4_pushdef([gltests_LIBSOURCES_DIR], [])
864   gl_COMMON
865   gl_source_base='gl/tests'
866 changequote(,)dnl
867   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
868 changequote([, ])dnl
869   AC_SUBST([gltests_WITNESS])
870   gl_module_indicator_condition=$gltests_WITNESS
871   m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
872 gl_FUNC_DUP2
873 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
874   AC_LIBOBJ([dup2])
875   gl_PREREQ_DUP2
876 fi
877 gl_UNISTD_MODULE_INDICATOR([dup2])
878 gl_ENVIRON
879 gl_UNISTD_MODULE_INDICATOR([environ])
880 gl_FCNTL_H
881 gl_FUNC_FDOPEN
882 if test $REPLACE_FDOPEN = 1; then
883   AC_LIBOBJ([fdopen])
884   gl_PREREQ_FDOPEN
885 fi
886 gl_STDIO_MODULE_INDICATOR([fdopen])
887 gl_FUNC_UNGETC_WORKS
888 gl_FUNC_UNGETC_WORKS
889 gl_FUNC_UNGETC_WORKS
890 gl_FUNC_UNGETC_WORKS
891 gl_FUNC_FTRUNCATE
892 if test $HAVE_FTRUNCATE = 0; then
893   AC_LIBOBJ([ftruncate])
894   gl_PREREQ_FTRUNCATE
895 fi
896 gl_UNISTD_MODULE_INDICATOR([ftruncate])
897 gl_FUNC_GETCWD_LGPL
898 if test $REPLACE_GETCWD = 1; then
899   AC_LIBOBJ([getcwd-lgpl])
900 fi
901 gl_UNISTD_MODULE_INDICATOR([getcwd])
902 gl_FUNC_GETPAGESIZE
903 if test $REPLACE_GETPAGESIZE = 1; then
904   AC_LIBOBJ([getpagesize])
905 fi
906 gl_UNISTD_MODULE_INDICATOR([getpagesize])
907 AC_REQUIRE([AC_C_INLINE])
908 AC_C_BIGENDIAN
909 AC_C_BIGENDIAN
910 gl_INTTYPES_H
911 gl_INTTYPES_INCOMPLETE
912 gl_FUNC_IOCTL
913 if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
914   AC_LIBOBJ([ioctl])
915 fi
916 gl_SYS_IOCTL_MODULE_INDICATOR([ioctl])
917 gl_DOUBLE_EXPONENT_LOCATION
918 gl_FLOAT_EXPONENT_LOCATION
919 gl_LONG_DOUBLE_EXPONENT_LOCATION
920 AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
921 gl_LOCK
922 gl_FUNC_LSTAT
923 if test $REPLACE_LSTAT = 1; then
924   AC_LIBOBJ([lstat])
925   gl_PREREQ_LSTAT
926 fi
927 gl_SYS_STAT_MODULE_INDICATOR([lstat])
928 gl_MALLOCA
929 dnl Check for prerequisites for memory fence checks.
930 gl_FUNC_MMAP_ANON
931 AC_CHECK_HEADERS_ONCE([sys/mman.h])
932 AC_CHECK_FUNCS_ONCE([mprotect])
933 gl_FUNC_OPEN
934 if test $REPLACE_OPEN = 1; then
935   AC_LIBOBJ([open])
936   gl_PREREQ_OPEN
937 fi
938 gl_FCNTL_MODULE_INDICATOR([open])
939 gl_PATHMAX
940 gl_FUNC_PERROR
941 if test $REPLACE_PERROR = 1; then
942   AC_LIBOBJ([perror])
943 fi
944 gl_STRING_MODULE_INDICATOR([perror])
945 gl_FUNC_PIPE
946 if test $HAVE_PIPE = 0; then
947   AC_LIBOBJ([pipe])
948 fi
949 gl_UNISTD_MODULE_INDICATOR([pipe])
950 gl_FUNC_PUTENV
951 if test $REPLACE_PUTENV = 1; then
952   AC_LIBOBJ([putenv])
953 fi
954 gl_STDLIB_MODULE_INDICATOR([putenv])
955 dnl Check for prerequisites for memory fence checks.
956 gl_FUNC_MMAP_ANON
957 AC_CHECK_HEADERS_ONCE([sys/mman.h])
958 AC_CHECK_FUNCS_ONCE([mprotect])
959 AC_CHECK_HEADERS_ONCE([sys/wait.h])
960 gl_FUNC_SETENV
961 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
962   AC_LIBOBJ([setenv])
963 fi
964 gl_STDLIB_MODULE_INDICATOR([setenv])
965 AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION])
966 AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION])
967 AC_REQUIRE([gl_LONG_DOUBLE_EXPONENT_LOCATION])
968 AC_CHECK_DECLS_ONCE([alarm])
969 gl_FUNC_STAT
970 if test $REPLACE_STAT = 1; then
971   AC_LIBOBJ([stat])
972   gl_PREREQ_STAT
973 fi
974 gl_SYS_STAT_MODULE_INDICATOR([stat])
975 gt_TYPE_WCHAR_T
976 gt_TYPE_WINT_T
977 gl_FUNC_STRERROR_R
978 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
979   AC_LIBOBJ([strerror_r])
980   gl_PREREQ_STRERROR_R
981 fi
982 gl_STRING_MODULE_INDICATOR([strerror_r])
983 dnl Check for prerequisites for memory fence checks.
984 gl_FUNC_MMAP_ANON
985 AC_CHECK_HEADERS_ONCE([sys/mman.h])
986 AC_CHECK_FUNCS_ONCE([mprotect])
987 gl_FUNC_SYMLINK
988 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
989   AC_LIBOBJ([symlink])
990 fi
991 gl_UNISTD_MODULE_INDICATOR([symlink])
992 gl_SYS_IOCTL_H
993 AC_PROG_MKDIR_P
994 AC_CHECK_FUNCS_ONCE([shutdown])
995 gl_THREADLIB
996 gl_FUNC_UNSETENV
997 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
998   AC_LIBOBJ([unsetenv])
999   gl_PREREQ_UNSETENV
1000 fi
1001 gl_STDLIB_MODULE_INDICATOR([unsetenv])
1002 gl_VALGRIND_TESTS
1003 abs_aux_dir=`cd "$ac_aux_dir"; pwd`
1004 AC_SUBST([abs_aux_dir])
1005   m4_popdef([gl_MODULE_INDICATOR_CONDITION])
1006   m4_ifval(gltests_LIBSOURCES_LIST, [
1007     m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
1008       for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
1009         if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
1010           echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
1011           exit 1
1012         fi
1013       done])dnl
1014       m4_if(m4_sysval, [0], [],
1015         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
1016   ])
1017   m4_popdef([gltests_LIBSOURCES_DIR])
1018   m4_popdef([gltests_LIBSOURCES_LIST])
1019   m4_popdef([AC_LIBSOURCES])
1020   m4_popdef([AC_REPLACE_FUNCS])
1021   m4_popdef([AC_LIBOBJ])
1022   AC_CONFIG_COMMANDS_PRE([
1023     gltests_libobjs=
1024     gltests_ltlibobjs=
1025     if test -n "$gltests_LIBOBJS"; then
1026       # Remove the extension.
1027       sed_drop_objext='s/\.o$//;s/\.obj$//'
1028       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
1029         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
1030         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
1031       done
1032     fi
1033     AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
1034     AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
1035   ])
1036   LIBTESTS_LIBDEPS="$gltests_libdeps"
1037   AC_SUBST([LIBTESTS_LIBDEPS])
1038 ])
1039
1040 # Like AC_LIBOBJ, except that the module name goes
1041 # into gl_LIBOBJS instead of into LIBOBJS.
1042 AC_DEFUN([gl_LIBOBJ], [
1043   AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
1044   gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
1045 ])
1046
1047 # Like AC_REPLACE_FUNCS, except that the module name goes
1048 # into gl_LIBOBJS instead of into LIBOBJS.
1049 AC_DEFUN([gl_REPLACE_FUNCS], [
1050   m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
1051   AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
1052 ])
1053
1054 # Like AC_LIBSOURCES, except the directory where the source file is
1055 # expected is derived from the gnulib-tool parameterization,
1056 # and alloca is special cased (for the alloca-opt module).
1057 # We could also entirely rely on EXTRA_lib..._SOURCES.
1058 AC_DEFUN([gl_LIBSOURCES], [
1059   m4_foreach([_gl_NAME], [$1], [
1060     m4_if(_gl_NAME, [alloca.c], [], [
1061       m4_define([gl_LIBSOURCES_DIR], [gl])
1062       m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
1063     ])
1064   ])
1065 ])
1066
1067 # Like AC_LIBOBJ, except that the module name goes
1068 # into gltests_LIBOBJS instead of into LIBOBJS.
1069 AC_DEFUN([gltests_LIBOBJ], [
1070   AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
1071   gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
1072 ])
1073
1074 # Like AC_REPLACE_FUNCS, except that the module name goes
1075 # into gltests_LIBOBJS instead of into LIBOBJS.
1076 AC_DEFUN([gltests_REPLACE_FUNCS], [
1077   m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
1078   AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
1079 ])
1080
1081 # Like AC_LIBSOURCES, except the directory where the source file is
1082 # expected is derived from the gnulib-tool parameterization,
1083 # and alloca is special cased (for the alloca-opt module).
1084 # We could also entirely rely on EXTRA_lib..._SOURCES.
1085 AC_DEFUN([gltests_LIBSOURCES], [
1086   m4_foreach([_gl_NAME], [$1], [
1087     m4_if(_gl_NAME, [alloca.c], [], [
1088       m4_define([gltests_LIBSOURCES_DIR], [gl/tests])
1089       m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
1090     ])
1091   ])
1092 ])
1093
1094 # This macro records the list of files which have been installed by
1095 # gnulib-tool and may be removed by future gnulib-tool invocations.
1096 AC_DEFUN([gl_FILE_LIST], [
1097   build-aux/config.rpath
1098   build-aux/gendocs.sh
1099   build-aux/pmccabe.css
1100   build-aux/pmccabe2html
1101   build-aux/snippet/_Noreturn.h
1102   build-aux/snippet/arg-nonnull.h
1103   build-aux/snippet/c++defs.h
1104   build-aux/snippet/warn-on-use.h
1105   build-aux/useless-if-before-free
1106   build-aux/vc-list-files
1107   doc/gendocs_template
1108   lib/accept.c
1109   lib/alloca.c
1110   lib/alloca.in.h
1111   lib/alphasort.c
1112   lib/argp-ba.c
1113   lib/argp-eexst.c
1114   lib/argp-fmtstream.c
1115   lib/argp-fmtstream.h
1116   lib/argp-fs-xinl.c
1117   lib/argp-help.c
1118   lib/argp-namefrob.h
1119   lib/argp-parse.c
1120   lib/argp-pin.c
1121   lib/argp-pv.c
1122   lib/argp-pvh.c
1123   lib/argp-xinl.c
1124   lib/argp.h
1125   lib/arpa_inet.in.h
1126   lib/asnprintf.c
1127   lib/asprintf.c
1128   lib/basename-lgpl.c
1129   lib/bind.c
1130   lib/byteswap.in.h
1131   lib/c-ctype.c
1132   lib/c-ctype.h
1133   lib/close.c
1134   lib/closedir.c
1135   lib/connect.c
1136   lib/dirent-private.h
1137   lib/dirent.in.h
1138   lib/dirname-lgpl.c
1139   lib/dirname.h
1140   lib/dosname.h
1141   lib/errno.in.h
1142   lib/error.c
1143   lib/error.h
1144   lib/fd-hook.c
1145   lib/fd-hook.h
1146   lib/filename.h
1147   lib/float+.h
1148   lib/float.c
1149   lib/float.in.h
1150   lib/fpucw.h
1151   lib/frexp.c
1152   lib/frexpl.c
1153   lib/fseek.c
1154   lib/fseeko.c
1155   lib/fseterr.c
1156   lib/fseterr.h
1157   lib/fstat.c
1158   lib/ftell.c
1159   lib/ftello.c
1160   lib/gai_strerror.c
1161   lib/getaddrinfo.c
1162   lib/getdelim.c
1163   lib/getline.c
1164   lib/getopt.c
1165   lib/getopt.in.h
1166   lib/getopt1.c
1167   lib/getopt_int.h
1168   lib/getpass.c
1169   lib/getpass.h
1170   lib/getpeername.c
1171   lib/getsubopt.c
1172   lib/gettext.h
1173   lib/gettime.c
1174   lib/gettimeofday.c
1175   lib/inet_ntop.c
1176   lib/inet_pton.c
1177   lib/intprops.h
1178   lib/isnan.c
1179   lib/isnand-nolibm.h
1180   lib/isnand.c
1181   lib/isnanf-nolibm.h
1182   lib/isnanf.c
1183   lib/isnanl-nolibm.h
1184   lib/isnanl.c
1185   lib/itold.c
1186   lib/listen.c
1187   lib/lseek.c
1188   lib/malloc.c
1189   lib/math.in.h
1190   lib/memchr.c
1191   lib/memchr.valgrind
1192   lib/memmem.c
1193   lib/mempcpy.c
1194   lib/minmax.h
1195   lib/msvc-inval.c
1196   lib/msvc-inval.h
1197   lib/msvc-nothrow.c
1198   lib/msvc-nothrow.h
1199   lib/netdb.in.h
1200   lib/netinet_in.in.h
1201   lib/opendir.c
1202   lib/printf-args.c
1203   lib/printf-args.h
1204   lib/printf-frexp.c
1205   lib/printf-frexp.h
1206   lib/printf-frexpl.c
1207   lib/printf-frexpl.h
1208   lib/printf-parse.c
1209   lib/printf-parse.h
1210   lib/progname.c
1211   lib/progname.h
1212   lib/rawmemchr.c
1213   lib/rawmemchr.valgrind
1214   lib/read-file.c
1215   lib/read-file.h
1216   lib/readdir.c
1217   lib/realloc.c
1218   lib/recv.c
1219   lib/recvfrom.c
1220   lib/scandir.c
1221   lib/select.c
1222   lib/send.c
1223   lib/sendto.c
1224   lib/setsockopt.c
1225   lib/shutdown.c
1226   lib/signal.in.h
1227   lib/signbitd.c
1228   lib/signbitf.c
1229   lib/signbitl.c
1230   lib/size_max.h
1231   lib/sleep.c
1232   lib/snprintf.c
1233   lib/socket.c
1234   lib/sockets.c
1235   lib/sockets.h
1236   lib/stdalign.in.h
1237   lib/stdarg.in.h
1238   lib/stdbool.in.h
1239   lib/stddef.in.h
1240   lib/stdint.in.h
1241   lib/stdio-impl.h
1242   lib/stdio.in.h
1243   lib/stdlib.in.h
1244   lib/str-two-way.h
1245   lib/strcasecmp.c
1246   lib/strchrnul.c
1247   lib/strchrnul.valgrind
1248   lib/strdup.c
1249   lib/strerror-override.c
1250   lib/strerror-override.h
1251   lib/strerror.c
1252   lib/string.in.h
1253   lib/strings.in.h
1254   lib/stripslash.c
1255   lib/strncasecmp.c
1256   lib/strndup.c
1257   lib/strnlen.c
1258   lib/strverscmp.c
1259   lib/sys_select.in.h
1260   lib/sys_socket.in.h
1261   lib/sys_stat.in.h
1262   lib/sys_time.in.h
1263   lib/sys_types.in.h
1264   lib/sys_uio.in.h
1265   lib/sysexits.in.h
1266   lib/time.in.h
1267   lib/time_r.c
1268   lib/timespec.h
1269   lib/u64.h
1270   lib/unistd.in.h
1271   lib/vasnprintf.c
1272   lib/vasnprintf.h
1273   lib/vasprintf.c
1274   lib/verify.h
1275   lib/version-etc-fsf.c
1276   lib/version-etc.c
1277   lib/version-etc.h
1278   lib/vfprintf.c
1279   lib/vprintf.c
1280   lib/vsnprintf.c
1281   lib/w32sock.h
1282   lib/wchar.in.h
1283   lib/xsize.h
1284   m4/00gnulib.m4
1285   m4/alloca.m4
1286   m4/alphasort.m4
1287   m4/argp.m4
1288   m4/arpa_inet_h.m4
1289   m4/byteswap.m4
1290   m4/clock_time.m4
1291   m4/close.m4
1292   m4/closedir.m4
1293   m4/codeset.m4
1294   m4/dirent_h.m4
1295   m4/dirname.m4
1296   m4/double-slash-root.m4
1297   m4/dup2.m4
1298   m4/eealloc.m4
1299   m4/environ.m4
1300   m4/errno_h.m4
1301   m4/error.m4
1302   m4/exponentd.m4
1303   m4/exponentf.m4
1304   m4/exponentl.m4
1305   m4/extensions.m4
1306   m4/fcntl-o.m4
1307   m4/fcntl_h.m4
1308   m4/fdopen.m4
1309   m4/float_h.m4
1310   m4/fpieee.m4
1311   m4/frexp.m4
1312   m4/frexpl.m4
1313   m4/fseek.m4
1314   m4/fseeko.m4
1315   m4/fstat.m4
1316   m4/ftell.m4
1317   m4/ftello.m4
1318   m4/ftruncate.m4
1319   m4/func.m4
1320   m4/getaddrinfo.m4
1321   m4/getcwd.m4
1322   m4/getdelim.m4
1323   m4/getline.m4
1324   m4/getopt.m4
1325   m4/getpagesize.m4
1326   m4/getpass.m4
1327   m4/getsubopt.m4
1328   m4/gettext.m4
1329   m4/gettime.m4
1330   m4/gettimeofday.m4
1331   m4/glibc2.m4
1332   m4/glibc21.m4
1333   m4/gnulib-common.m4
1334   m4/hostent.m4
1335   m4/iconv.m4
1336   m4/include_next.m4
1337   m4/inet_ntop.m4
1338   m4/inet_pton.m4
1339   m4/intdiv0.m4
1340   m4/intl.m4
1341   m4/intldir.m4
1342   m4/intlmacosx.m4
1343   m4/intmax.m4
1344   m4/intmax_t.m4
1345   m4/inttypes-pri.m4
1346   m4/inttypes.m4
1347   m4/inttypes_h.m4
1348   m4/ioctl.m4
1349   m4/isnand.m4
1350   m4/isnanf.m4
1351   m4/isnanl.m4
1352   m4/largefile.m4
1353   m4/lcmessage.m4
1354   m4/ld-output-def.m4
1355   m4/ld-version-script.m4
1356   m4/ldexpl.m4
1357   m4/lib-ld.m4
1358   m4/lib-link.m4
1359   m4/lib-prefix.m4
1360   m4/lock.m4
1361   m4/longlong.m4
1362   m4/lseek.m4
1363   m4/lstat.m4
1364   m4/malloc.m4
1365   m4/malloca.m4
1366   m4/manywarnings.m4
1367   m4/math_h.m4
1368   m4/memchr.m4
1369   m4/memmem.m4
1370   m4/mempcpy.m4
1371   m4/minmax.m4
1372   m4/mmap-anon.m4
1373   m4/mode_t.m4
1374   m4/msvc-inval.m4
1375   m4/msvc-nothrow.m4
1376   m4/multiarch.m4
1377   m4/netdb_h.m4
1378   m4/netinet_in_h.m4
1379   m4/nls.m4
1380   m4/nocrash.m4
1381   m4/open.m4
1382   m4/opendir.m4
1383   m4/pathmax.m4
1384   m4/perror.m4
1385   m4/pipe.m4
1386   m4/po.m4
1387   m4/printf-frexp.m4
1388   m4/printf-frexpl.m4
1389   m4/printf-posix.m4
1390   m4/printf.m4
1391   m4/progtest.m4
1392   m4/putenv.m4
1393   m4/rawmemchr.m4
1394   m4/read-file.m4
1395   m4/readdir.m4
1396   m4/realloc.m4
1397   m4/scandir.m4
1398   m4/select.m4
1399   m4/servent.m4
1400   m4/setenv.m4
1401   m4/signal_h.m4
1402   m4/signbit.m4
1403   m4/size_max.m4
1404   m4/sleep.m4
1405   m4/snprintf.m4
1406   m4/socketlib.m4
1407   m4/sockets.m4
1408   m4/socklen.m4
1409   m4/sockpfaf.m4
1410   m4/ssize_t.m4
1411   m4/stat.m4
1412   m4/stdalign.m4
1413   m4/stdarg.m4
1414   m4/stdbool.m4
1415   m4/stddef_h.m4
1416   m4/stdint.m4
1417   m4/stdint_h.m4
1418   m4/stdio_h.m4
1419   m4/stdlib_h.m4
1420   m4/strcase.m4
1421   m4/strchrnul.m4
1422   m4/strdup.m4
1423   m4/strerror.m4
1424   m4/strerror_r.m4
1425   m4/string_h.m4
1426   m4/strings_h.m4
1427   m4/strndup.m4
1428   m4/strnlen.m4
1429   m4/strverscmp.m4
1430   m4/symlink.m4
1431   m4/sys_ioctl_h.m4
1432   m4/sys_select_h.m4
1433   m4/sys_socket_h.m4
1434   m4/sys_stat_h.m4
1435   m4/sys_time_h.m4
1436   m4/sys_types_h.m4
1437   m4/sys_uio_h.m4
1438   m4/sysexits.m4
1439   m4/threadlib.m4
1440   m4/time_h.m4
1441   m4/time_r.m4
1442   m4/timespec.m4
1443   m4/uintmax_t.m4
1444   m4/ungetc.m4
1445   m4/unistd_h.m4
1446   m4/valgrind-tests.m4
1447   m4/vasnprintf.m4
1448   m4/vasprintf.m4
1449   m4/version-etc.m4
1450   m4/vfprintf-posix.m4
1451   m4/visibility.m4
1452   m4/vprintf-posix.m4
1453   m4/vsnprintf.m4
1454   m4/warn-on-use.m4
1455   m4/warnings.m4
1456   m4/wchar_h.m4
1457   m4/wchar_t.m4
1458   m4/wint_t.m4
1459   m4/xsize.m4
1460   tests/infinity.h
1461   tests/init.sh
1462   tests/macros.h
1463   tests/minus-zero.h
1464   tests/nan.h
1465   tests/signature.h
1466   tests/test-accept.c
1467   tests/test-alloca-opt.c
1468   tests/test-argp-2.sh
1469   tests/test-argp.c
1470   tests/test-arpa_inet.c
1471   tests/test-binary-io.c
1472   tests/test-binary-io.sh
1473   tests/test-bind.c
1474   tests/test-byteswap.c
1475   tests/test-c-ctype.c
1476   tests/test-close.c
1477   tests/test-connect.c
1478   tests/test-dirent.c
1479   tests/test-dup2.c
1480   tests/test-environ.c
1481   tests/test-errno.c
1482   tests/test-fcntl-h.c
1483   tests/test-fdopen.c
1484   tests/test-fgetc.c
1485   tests/test-float.c
1486   tests/test-fprintf-posix.h
1487   tests/test-fputc.c
1488   tests/test-fread.c
1489   tests/test-frexp.c
1490   tests/test-frexpl.c
1491   tests/test-fseek.c
1492   tests/test-fseek.sh
1493   tests/test-fseek2.sh
1494   tests/test-fseeko.c
1495   tests/test-fseeko.sh
1496   tests/test-fseeko2.sh
1497   tests/test-fseeko3.c
1498   tests/test-fseeko3.sh
1499   tests/test-fseeko4.c
1500   tests/test-fseeko4.sh
1501   tests/test-fseterr.c
1502   tests/test-fstat.c
1503   tests/test-ftell.c
1504   tests/test-ftell.sh
1505   tests/test-ftell2.sh
1506   tests/test-ftell3.c
1507   tests/test-ftello.c
1508   tests/test-ftello.sh
1509   tests/test-ftello2.sh
1510   tests/test-ftello3.c
1511   tests/test-ftello4.c
1512   tests/test-ftello4.sh
1513   tests/test-ftruncate.c
1514   tests/test-ftruncate.sh
1515   tests/test-func.c
1516   tests/test-fwrite.c
1517   tests/test-getaddrinfo.c
1518   tests/test-getcwd-lgpl.c
1519   tests/test-getdelim.c
1520   tests/test-getline.c
1521   tests/test-getopt.c
1522   tests/test-getopt.h
1523   tests/test-getopt_long.h
1524   tests/test-getpeername.c
1525   tests/test-gettimeofday.c
1526   tests/test-ignore-value.c
1527   tests/test-inet_ntop.c
1528   tests/test-inet_pton.c
1529   tests/test-init.sh
1530   tests/test-intprops.c
1531   tests/test-inttypes.c
1532   tests/test-ioctl.c
1533   tests/test-isnand-nolibm.c
1534   tests/test-isnand.h
1535   tests/test-isnanf-nolibm.c
1536   tests/test-isnanf.h
1537   tests/test-isnanl-nolibm.c
1538   tests/test-isnanl.h
1539   tests/test-listen.c
1540   tests/test-lstat.c
1541   tests/test-lstat.h
1542   tests/test-malloc-gnu.c
1543   tests/test-malloca.c
1544   tests/test-math.c
1545   tests/test-memchr.c
1546   tests/test-netdb.c
1547   tests/test-netinet_in.c
1548   tests/test-open.c
1549   tests/test-open.h
1550   tests/test-pathmax.c
1551   tests/test-perror.c
1552   tests/test-perror.sh
1553   tests/test-perror2.c
1554   tests/test-pipe.c
1555   tests/test-printf-frexp.c
1556   tests/test-printf-frexpl.c
1557   tests/test-printf-posix.h
1558   tests/test-printf-posix.output
1559   tests/test-rawmemchr.c
1560   tests/test-read-file.c
1561   tests/test-recv.c
1562   tests/test-recvfrom.c
1563   tests/test-select-fd.c
1564   tests/test-select-in.sh
1565   tests/test-select-out.sh
1566   tests/test-select-stdin.c
1567   tests/test-select.c
1568   tests/test-select.h
1569   tests/test-send.c
1570   tests/test-sendto.c
1571   tests/test-setenv.c
1572   tests/test-setsockopt.c
1573   tests/test-shutdown.c
1574   tests/test-signal-h.c
1575   tests/test-signbit.c
1576   tests/test-sleep.c
1577   tests/test-snprintf.c
1578   tests/test-sockets.c
1579   tests/test-stat.c
1580   tests/test-stat.h
1581   tests/test-stdalign.c
1582   tests/test-stdbool.c
1583   tests/test-stddef.c
1584   tests/test-stdint.c
1585   tests/test-stdio.c
1586   tests/test-stdlib.c
1587   tests/test-strchrnul.c
1588   tests/test-strerror.c
1589   tests/test-strerror_r.c
1590   tests/test-string.c
1591   tests/test-strings.c
1592   tests/test-strnlen.c
1593   tests/test-strverscmp.c
1594   tests/test-symlink.c
1595   tests/test-symlink.h
1596   tests/test-sys_ioctl.c
1597   tests/test-sys_select.c
1598   tests/test-sys_socket.c
1599   tests/test-sys_stat.c
1600   tests/test-sys_time.c
1601   tests/test-sys_types.c
1602   tests/test-sys_uio.c
1603   tests/test-sys_wait.h
1604   tests/test-sysexits.c
1605   tests/test-time.c
1606   tests/test-u64.c
1607   tests/test-unistd.c
1608   tests/test-unsetenv.c
1609   tests/test-vasnprintf.c
1610   tests/test-vasprintf.c
1611   tests/test-vc-list-files-cvs.sh
1612   tests/test-vc-list-files-git.sh
1613   tests/test-verify.c
1614   tests/test-verify.sh
1615   tests/test-version-etc.c
1616   tests/test-version-etc.sh
1617   tests/test-vfprintf-posix.c
1618   tests/test-vfprintf-posix.sh
1619   tests/test-vprintf-posix.c
1620   tests/test-vprintf-posix.sh
1621   tests/test-vsnprintf.c
1622   tests/test-wchar.c
1623   tests/zerosize-ptr.h
1624   tests=lib/binary-io.h
1625   tests=lib/dup2.c
1626   tests=lib/fcntl.in.h
1627   tests=lib/fdopen.c
1628   tests=lib/ftruncate.c
1629   tests=lib/getcwd-lgpl.c
1630   tests=lib/getpagesize.c
1631   tests=lib/glthread/lock.c
1632   tests=lib/glthread/lock.h
1633   tests=lib/glthread/threadlib.c
1634   tests=lib/ignore-value.h
1635   tests=lib/inttypes.in.h
1636   tests=lib/ioctl.c
1637   tests=lib/lstat.c
1638   tests=lib/malloca.c
1639   tests=lib/malloca.h
1640   tests=lib/malloca.valgrind
1641   tests=lib/open.c
1642   tests=lib/pathmax.h
1643   tests=lib/perror.c
1644   tests=lib/pipe.c
1645   tests=lib/putenv.c
1646   tests=lib/same-inode.h
1647   tests=lib/setenv.c
1648   tests=lib/stat.c
1649   tests=lib/strerror_r.c
1650   tests=lib/symlink.c
1651   tests=lib/sys_ioctl.in.h
1652   tests=lib/unsetenv.c
1653   tests=lib/w32sock.h
1654   top/GNUmakefile
1655   top/maint.mk
1656 ])