]> Savannah Git Hosting - gnulib/maint-tools.git/blob
5b3705996b8c28ac2cbdc980ba72616ca29b8565
[gnulib/maint-tools.git] /
1 # DO NOT EDIT! GENERATED AUTOMATICALLY!
2 # Copyright (C) 2002-2024 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 <https://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
41   # Pre-early section.
42   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
43   AC_REQUIRE([gl_PROG_AR_RANLIB])
44
45   # Code from module absolute-header:
46   # Code from module accept:
47   # Code from module accept-tests:
48   # Code from module alignasof:
49   # Code from module alignasof-tests:
50   # Code from module alloca:
51   # Code from module alloca-opt:
52   # Code from module alloca-opt-tests:
53   # Code from module arpa_inet:
54   # Code from module arpa_inet-tests:
55   # Code from module assert-h:
56   # Code from module assert-h-tests:
57   # Code from module attribute:
58   # Code from module basename-lgpl:
59   # Code from module binary-io:
60   # Code from module binary-io-tests:
61   # Code from module bind:
62   # Code from module bind-tests:
63   # Code from module c-ctype:
64   # Code from module c-ctype-tests:
65   # Code from module c99:
66   # Code from module calloc-gnu:
67   # Code from module calloc-gnu-tests:
68   # Code from module calloc-posix:
69   # Code from module cloexec:
70   # Code from module cloexec-tests:
71   # Code from module close:
72   # Code from module close-tests:
73   # Code from module connect:
74   # Code from module connect-tests:
75   # Code from module ctype:
76   # Code from module ctype-tests:
77   # Code from module double-slash-root:
78   # Code from module dup2:
79   # Code from module dup2-tests:
80   # Code from module environ:
81   # Code from module environ-tests:
82   # Code from module errno:
83   # Code from module errno-tests:
84   # Code from module error:
85   # Code from module error-h:
86   # Code from module error-tests:
87   # Code from module exitfail:
88   # Code from module extensions:
89   # Code from module extern-inline:
90   # Code from module fcntl:
91   # Code from module fcntl-h:
92   # Code from module fcntl-h-tests:
93   # Code from module fcntl-tests:
94   # Code from module fd-hook:
95   # Code from module fdopen:
96   # Code from module fdopen-tests:
97   # Code from module fgetc-tests:
98   # Code from module filename:
99   # Code from module float:
100   # Code from module float-tests:
101   # Code from module fpieee:
102   AC_REQUIRE([gl_FP_IEEE])
103   # Code from module fpucw:
104   # Code from module fputc-tests:
105   # Code from module fread-tests:
106   # Code from module free-posix:
107   # Code from module free-posix-tests:
108   # Code from module fstat:
109   # Code from module fstat-tests:
110   # Code from module ftruncate:
111   # Code from module ftruncate-tests:
112   # Code from module fwrite-tests:
113   # Code from module gen-header:
114   # Code from module get_ppid_of:
115   # Code from module getcwd-lgpl:
116   # Code from module getcwd-lgpl-tests:
117   # Code from module getdtablesize:
118   # Code from module getdtablesize-tests:
119   # Code from module getprogname:
120   # Code from module getprogname-tests:
121   # Code from module gettext-h:
122   # Code from module gettimeofday:
123   # Code from module gettimeofday-tests:
124   # Code from module ialloc:
125   # Code from module idx:
126   # Code from module ignore-value:
127   # Code from module ignore-value-tests:
128   # Code from module include_next:
129   # Code from module inet_pton:
130   # Code from module inet_pton-tests:
131   # Code from module intprops:
132   # Code from module intprops-tests:
133   # Code from module inttypes:
134   # Code from module inttypes-incomplete:
135   # Code from module inttypes-tests:
136   # Code from module ioctl:
137   # Code from module ioctl-tests:
138   # Code from module isblank:
139   # Code from module isblank-tests:
140   # Code from module isnand-nolibm:
141   # Code from module isnand-nolibm-tests:
142   # Code from module isnanf-nolibm:
143   # Code from module isnanf-nolibm-tests:
144   # Code from module isnanl-nolibm:
145   # Code from module isnanl-nolibm-tests:
146   # Code from module largefile:
147   AC_REQUIRE([AC_SYS_LARGEFILE])
148   # Code from module largefile-tests:
149   # Code from module libc-config:
150   # Code from module limits-h:
151   # Code from module limits-h-tests:
152   # Code from module listen:
153   # Code from module listen-tests:
154   # Code from module lock:
155   # Code from module lock-tests:
156   # Code from module lstat:
157   # Code from module lstat-tests:
158   # Code from module malloc-gnu:
159   # Code from module malloc-gnu-tests:
160   # Code from module malloc-posix:
161   # Code from module malloca:
162   # Code from module malloca-tests:
163   # Code from module math:
164   # Code from module math-tests:
165   # Code from module minmax:
166   # Code from module msvc-inval:
167   # Code from module msvc-nothrow:
168   # Code from module multiarch:
169   # Code from module nan:
170   # Code from module nanosleep:
171   # Code from module nanosleep-tests:
172   # Code from module netinet_in:
173   # Code from module netinet_in-tests:
174   # Code from module open:
175   # Code from module open-tests:
176   # Code from module pathmax:
177   # Code from module pathmax-tests:
178   # Code from module perror:
179   # Code from module perror-tests:
180   # Code from module pipe-posix:
181   # Code from module pipe-posix-tests:
182   # Code from module pselect:
183   # Code from module pselect-tests:
184   # Code from module pthread-h:
185   gl_ANYTHREADLIB_EARLY
186   # Code from module pthread-h-tests:
187   # Code from module pthread-thread:
188   # Code from module pthread-thread-tests:
189   # Code from module pthread_sigmask:
190   # Code from module pthread_sigmask-tests:
191   # Code from module putenv:
192   # Code from module raise:
193   # Code from module raise-tests:
194   # Code from module random:
195   # Code from module random-tests:
196   # Code from module random_r:
197   # Code from module random_r-tests:
198   # Code from module realloc-gnu:
199   # Code from module realloc-gnu-tests:
200   # Code from module realloc-posix:
201   # Code from module reallocarray:
202   # Code from module reallocarray-tests:
203   # Code from module same-inode:
204   # Code from module sched:
205   # Code from module sched-tests:
206   # Code from module sched_yield:
207   # Code from module select:
208   # Code from module select-tests:
209   # Code from module setsockopt:
210   # Code from module setsockopt-tests:
211   # Code from module signal-h:
212   # Code from module signal-h-tests:
213   # Code from module signbit:
214   # Code from module signbit-tests:
215   # Code from module signed-nan:
216   # Code from module signed-snan:
217   # Code from module sigprocmask:
218   # Code from module sigprocmask-tests:
219   # Code from module sleep:
220   # Code from module sleep-tests:
221   # Code from module snan:
222   # Code from module snippet/_Noreturn:
223   # Code from module snippet/arg-nonnull:
224   # Code from module snippet/c++defs:
225   # Code from module snippet/warn-on-use:
226   # Code from module socket:
227   # Code from module socketlib:
228   # Code from module sockets:
229   # Code from module sockets-tests:
230   # Code from module socklen:
231   # Code from module ssize_t:
232   # Code from module stat:
233   # Code from module stat-tests:
234   # Code from module stat-time:
235   # Code from module stat-time-tests:
236   # Code from module std-gnu11:
237   # Code from module stdbool:
238   # Code from module stdbool-tests:
239   # Code from module stdckdint:
240   # Code from module stdckdint-tests:
241   # Code from module stddef:
242   # Code from module stddef-tests:
243   # Code from module stdint:
244   # Code from module stdint-tests:
245   # Code from module stdio:
246   gl_STDIO_H_EARLY
247   # Code from module stdio-tests:
248   # Code from module stdlib:
249   # Code from module stdlib-tests:
250   # Code from module strerror:
251   # Code from module strerror-override:
252   # Code from module strerror-tests:
253   # Code from module strerror_r-posix:
254   # Code from module strerror_r-posix-tests:
255   # Code from module string:
256   # Code from module string-tests:
257   # Code from module symlink:
258   # Code from module symlink-tests:
259   # Code from module sys_ioctl:
260   # Code from module sys_ioctl-tests:
261   # Code from module sys_select:
262   # Code from module sys_select-tests:
263   # Code from module sys_socket:
264   # Code from module sys_socket-tests:
265   # Code from module sys_stat:
266   # Code from module sys_stat-tests:
267   # Code from module sys_time:
268   # Code from module sys_time-tests:
269   # Code from module sys_types:
270   # Code from module sys_types-tests:
271   # Code from module sys_uio:
272   # Code from module sys_uio-tests:
273   # Code from module test-framework-sh:
274   # Code from module test-framework-sh-tests:
275   # Code from module thread:
276   # Code from module thread-tests:
277   # Code from module threadlib:
278   gl_THREADLIB_EARLY
279   # Code from module time:
280   # Code from module time-h:
281   # Code from module time-h-tests:
282   # Code from module time-tests:
283   # Code from module unistd:
284   # Code from module unistd-tests:
285   # Code from module unsetenv:
286   # Code from module unsetenv-tests:
287   # Code from module usleep:
288   # Code from module usleep-tests:
289   # Code from module vararrays:
290   # Code from module verify:
291   # Code from module verify-tests:
292   # Code from module wchar:
293   # Code from module wchar-tests:
294   # Code from module windows-mutex:
295   # Code from module windows-once:
296   # Code from module windows-recmutex:
297   # Code from module windows-rwlock:
298   # Code from module windows-thread:
299   # Code from module windows-tls:
300   # Code from module xalloc:
301   # Code from module xalloc-die:
302   # Code from module xalloc-die-tests:
303   # Code from module xalloc-oversized:
304   # Code from module yield:
305 ])
306
307 # This macro should be invoked from ./configure.ac, in the section
308 # "Check for header files, types and library functions".
309 AC_DEFUN([gl_INIT],
310 [
311   AC_CONFIG_LIBOBJ_DIR([tests])
312   AM_CONDITIONAL([GL_COND_LIBTOOL], [false])
313   gl_cond_libtool=false
314   gl_libdeps=
315   gl_ltlibdeps=
316   gl_m4_base='gnulib-m4'
317   m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
318   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
319   m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
320   m4_pushdef([gl_LIBSOURCES_LIST], [])
321   m4_pushdef([gl_LIBSOURCES_DIR], [])
322   m4_pushdef([GL_MACRO_PREFIX], [gl])
323   m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL])
324   gl_COMMON
325   gl_source_base='lib'
326   gl_source_base_prefix='$(top_build_prefix)lib/'
327   gl_FUNC_ALLOCA
328   gl_CONDITIONAL_HEADER([alloca.h])
329   AC_PROG_MKDIR_P
330   gl_ASSERT_H
331   gl_CONDITIONAL_HEADER([assert.h])
332   AC_PROG_MKDIR_P
333   gl_MODULE_INDICATOR_FOR_TESTS([cloexec])
334   gl_FUNC_CLOSE
335   gl_CONDITIONAL([GL_COND_OBJ_CLOSE], [test $REPLACE_CLOSE = 1])
336   gl_UNISTD_MODULE_INDICATOR([close])
337   gl_FUNC_DUP2
338   gl_CONDITIONAL([GL_COND_OBJ_DUP2], [test $REPLACE_DUP2 = 1])
339   AM_COND_IF([GL_COND_OBJ_DUP2], [
340     gl_PREREQ_DUP2
341   ])
342   gl_UNISTD_MODULE_INDICATOR([dup2])
343   gl_HEADER_ERRNO_H
344   gl_CONDITIONAL_HEADER([errno.h])
345   AC_PROG_MKDIR_P
346   AC_REQUIRE([gl_EXTERN_INLINE])
347   gl_FUNC_FCNTL
348   gl_CONDITIONAL([GL_COND_OBJ_FCNTL],
349                  [test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1])
350   gl_FCNTL_MODULE_INDICATOR([fcntl])
351   gl_FCNTL_H
352   gl_FCNTL_H_REQUIRE_DEFAULTS
353   AC_PROG_MKDIR_P
354   gl_FUNC_FSTAT
355   gl_CONDITIONAL([GL_COND_OBJ_FSTAT], [test $REPLACE_FSTAT = 1])
356   AM_COND_IF([GL_COND_OBJ_FSTAT], [
357     case "$host_os" in
358       mingw* | windows*)
359         AC_LIBOBJ([stat-w32])
360         ;;
361     esac
362     gl_PREREQ_FSTAT
363   ])
364   gl_SYS_STAT_MODULE_INDICATOR([fstat])
365   gl_FUNC_GETDTABLESIZE
366   gl_CONDITIONAL([GL_COND_OBJ_GETDTABLESIZE],
367                  [test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1])
368   AM_COND_IF([GL_COND_OBJ_GETDTABLESIZE], [
369     gl_PREREQ_GETDTABLESIZE
370   ])
371   gl_UNISTD_MODULE_INDICATOR([getdtablesize])
372   AC_REQUIRE([gl_LARGEFILE])
373   gl_LIMITS_H
374   gl_CONDITIONAL_HEADER([limits.h])
375   AC_PROG_MKDIR_P
376   gl_MALLOCA
377   AC_REQUIRE([gl_MSVC_INVAL])
378   gl_CONDITIONAL([GL_COND_OBJ_MSVC_INVAL],
379                  [test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1])
380   AC_REQUIRE([gl_MSVC_NOTHROW])
381   gl_CONDITIONAL([GL_COND_OBJ_MSVC_NOTHROW],
382                  [test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1])
383   gl_MODULE_INDICATOR([msvc-nothrow])
384   gl_MULTIARCH
385   gl_FUNC_OPEN
386   gl_CONDITIONAL([GL_COND_OBJ_OPEN], [test $REPLACE_OPEN = 1])
387   AM_COND_IF([GL_COND_OBJ_OPEN], [
388     gl_PREREQ_OPEN
389   ])
390   gl_FCNTL_MODULE_INDICATOR([open])
391   gl_PATHMAX
392   gt_TYPE_SSIZE_T
393   gl_FUNC_STAT
394   gl_CONDITIONAL([GL_COND_OBJ_STAT], [test $REPLACE_STAT = 1])
395   AM_COND_IF([GL_COND_OBJ_STAT], [
396     case "$host_os" in
397       mingw* | windows*)
398         AC_LIBOBJ([stat-w32])
399         ;;
400     esac
401     gl_PREREQ_STAT
402   ])
403   gl_SYS_STAT_MODULE_INDICATOR([stat])
404   gl_STAT_TIME
405   gl_STAT_BIRTHTIME
406   gl_C_BOOL
407   AC_CHECK_HEADERS_ONCE([stdckdint.h])
408   if test $ac_cv_header_stdckdint_h = yes; then
409     GL_GENERATE_STDCKDINT_H=false
410   else
411     GL_GENERATE_STDCKDINT_H=true
412   fi
413   gl_CONDITIONAL_HEADER([stdckdint.h])
414   AC_PROG_MKDIR_P
415   gl_STDDEF_H
416   gl_STDDEF_H_REQUIRE_DEFAULTS
417   gl_CONDITIONAL_HEADER([stddef.h])
418   AC_PROG_MKDIR_P
419   gl_STDINT_H
420   gl_CONDITIONAL_HEADER([stdint.h])
421   dnl Because of gl_REPLACE_LIMITS_H:
422   gl_CONDITIONAL_HEADER([limits.h])
423   AC_PROG_MKDIR_P
424   gl_SYS_STAT_H
425   gl_SYS_STAT_H_REQUIRE_DEFAULTS
426   AC_PROG_MKDIR_P
427   gl_SYS_TYPES_H
428   gl_SYS_TYPES_H_REQUIRE_DEFAULTS
429   AC_PROG_MKDIR_P
430   gl_TIME_H
431   gl_TIME_H_REQUIRE_DEFAULTS
432   AC_PROG_MKDIR_P
433   gl_UNISTD_H
434   gl_UNISTD_H_REQUIRE_DEFAULTS
435   AC_PROG_MKDIR_P
436   # End of code from modules
437   m4_ifval(gl_LIBSOURCES_LIST, [
438     m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
439       for gl_file in ]gl_LIBSOURCES_LIST[ ; do
440         if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
441           echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
442           exit 1
443         fi
444       done])dnl
445       m4_if(m4_sysval, [0], [],
446         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
447   ])
448   m4_popdef([GL_MODULE_INDICATOR_PREFIX])
449   m4_popdef([GL_MACRO_PREFIX])
450   m4_popdef([gl_LIBSOURCES_DIR])
451   m4_popdef([gl_LIBSOURCES_LIST])
452   m4_popdef([AC_LIBSOURCES])
453   m4_popdef([AC_REPLACE_FUNCS])
454   m4_popdef([AC_LIBOBJ])
455   AC_CONFIG_COMMANDS_PRE([
456     gl_libobjs=
457     gl_ltlibobjs=
458     gl_libobjdeps=
459     if test -n "$gl_LIBOBJS"; then
460       # Remove the extension.
461 changequote(,)dnl
462       sed_drop_objext='s/\.o$//;s/\.obj$//'
463       sed_dirname1='s,//*,/,g'
464       sed_dirname2='s,\(.\)/$,\1,'
465       sed_dirname3='s,^[^/]*$,.,'
466       sed_dirname4='s,\(.\)/[^/]*$,\1,'
467       sed_basename1='s,.*/,,'
468 changequote([, ])dnl
469       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
470         gl_libobjs="$gl_libobjs lib/$i.$ac_objext"
471         gl_ltlibobjs="$gl_ltlibobjs lib/$i.lo"
472         i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
473         i_base=`echo "$i" | sed -e "$sed_basename1"`
474         gl_libobjdeps="$gl_libobjdeps lib/$i_dir/\$(DEPDIR)/$i_base.Po"
475       done
476     fi
477     AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
478     AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
479     AC_SUBST([gl_LIBOBJDEPS], [$gl_libobjdeps])
480   ])
481   gltests_libdeps=
482   gltests_ltlibdeps=
483   m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
484   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
485   m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
486   m4_pushdef([gltests_LIBSOURCES_LIST], [])
487   m4_pushdef([gltests_LIBSOURCES_DIR], [])
488   m4_pushdef([GL_MACRO_PREFIX], [gltests])
489   m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL])
490   gl_COMMON
491   AC_REQUIRE([gl_CC_ALLOW_WARNINGS])
492   AC_REQUIRE([gl_CXX_ALLOW_WARNINGS])
493   gl_source_base='tests'
494   gl_source_base_prefix=
495 changequote(,)dnl
496   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
497 changequote([, ])dnl
498   AC_SUBST([gltests_WITNESS])
499   gl_module_indicator_condition=$gltests_WITNESS
500   m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
501   AC_REQUIRE([gl_SYS_SOCKET_H])
502   gl_CONDITIONAL([GL_COND_OBJ_ACCEPT], [test "$ac_cv_header_winsock2_h" = yes])
503   gl_SYS_SOCKET_MODULE_INDICATOR([accept])
504   gl_ALIGNASOF
505   gl_ARPA_INET_H
506   gl_ARPA_INET_H_REQUIRE_DEFAULTS
507   AC_PROG_MKDIR_P
508   AC_REQUIRE([gl_SYS_SOCKET_H])
509   gl_CONDITIONAL([GL_COND_OBJ_BIND], [test "$ac_cv_header_winsock2_h" = yes])
510   gl_SYS_SOCKET_MODULE_INDICATOR([bind])
511   gl_FUNC_CALLOC_GNU
512   if test $REPLACE_CALLOC_FOR_CALLOC_GNU = 1; then
513     AC_LIBOBJ([calloc])
514   fi
515   gl_STDLIB_MODULE_INDICATOR([calloc-gnu])
516   gl_FUNC_CALLOC_POSIX
517   if test $REPLACE_CALLOC_FOR_CALLOC_POSIX = 1; then
518     AC_LIBOBJ([calloc])
519   fi
520   gl_STDLIB_MODULE_INDICATOR([calloc-posix])
521   AC_REQUIRE([gl_SYS_SOCKET_H])
522   gl_CONDITIONAL([GL_COND_OBJ_CONNECT], [test "$ac_cv_header_winsock2_h" = yes])
523   gl_SYS_SOCKET_MODULE_INDICATOR([connect])
524   gl_CTYPE_H
525   gl_CTYPE_H_REQUIRE_DEFAULTS
526   AC_PROG_MKDIR_P
527   gl_DOUBLE_SLASH_ROOT
528   gl_ENVIRON
529   gl_UNISTD_MODULE_INDICATOR([environ])
530   AC_REQUIRE([gl_ERROR_H])
531   gl_ERROR
532   gl_CONDITIONAL([GL_COND_OBJ_ERROR], [test $COMPILE_ERROR_C = 1])
533   AM_COND_IF([GL_COND_OBJ_ERROR], [
534     gl_PREREQ_ERROR
535   ])
536   m4_ifdef([AM_XGETTEXT_OPTION],
537     [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
538      AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
539   gl_ERROR_H
540   AC_PROG_MKDIR_P
541   gl_FUNC_FDOPEN
542   gl_CONDITIONAL([GL_COND_OBJ_FDOPEN], [test $REPLACE_FDOPEN = 1])
543   AM_COND_IF([GL_COND_OBJ_FDOPEN], [
544     gl_PREREQ_FDOPEN
545   ])
546   gl_STDIO_MODULE_INDICATOR([fdopen])
547   gl_FLOAT_H
548   gl_CONDITIONAL_HEADER([float.h])
549   AC_PROG_MKDIR_P
550   gl_CONDITIONAL([GL_COND_OBJ_FLOAT], [test $REPLACE_FLOAT_LDBL = 1])
551   gl_CONDITIONAL([GL_COND_OBJ_ITOLD], [test $REPLACE_ITOLD = 1])
552   gl_FUNC_FREE
553   gl_CONDITIONAL([GL_COND_OBJ_FREE], [test $REPLACE_FREE = 1])
554   AM_COND_IF([GL_COND_OBJ_FREE], [
555     gl_PREREQ_FREE
556   ])
557   gl_STDLIB_MODULE_INDICATOR([free-posix])
558   gl_FUNC_FTRUNCATE
559   gl_CONDITIONAL([GL_COND_OBJ_FTRUNCATE],
560                  [test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1])
561   AM_COND_IF([GL_COND_OBJ_FTRUNCATE], [
562     gl_PREREQ_FTRUNCATE
563   ])
564   gl_UNISTD_MODULE_INDICATOR([ftruncate])
565   gl_FUNC_GETCWD_LGPL
566   gl_CONDITIONAL([GL_COND_OBJ_GETCWD_LGPL], [test $REPLACE_GETCWD = 1])
567   gl_UNISTD_MODULE_INDICATOR([getcwd])
568   gl_FUNC_GETPROGNAME
569   gl_CONDITIONAL([GL_COND_OBJ_GETPROGNAME],
570                  [test $HAVE_GETPROGNAME = 0 || test $REPLACE_GETPROGNAME = 1])
571   AM_COND_IF([GL_COND_OBJ_GETPROGNAME], [
572     gl_PREREQ_GETPROGNAME
573   ])
574   gl_STDLIB_MODULE_INDICATOR([getprogname])
575   AC_SUBST([LIBINTL])
576   AC_SUBST([LTLIBINTL])
577   gl_FUNC_GETTIMEOFDAY
578   gl_CONDITIONAL([GL_COND_OBJ_GETTIMEOFDAY],
579                  [test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1])
580   AM_COND_IF([GL_COND_OBJ_GETTIMEOFDAY], [
581     gl_PREREQ_GETTIMEOFDAY
582   ])
583   gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
584   gl_FUNC_INET_PTON
585   gl_CONDITIONAL([GL_COND_OBJ_INET_PTON],
586                  [test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1])
587   AM_COND_IF([GL_COND_OBJ_INET_PTON], [
588     gl_PREREQ_INET_PTON
589   ])
590   gl_ARPA_INET_MODULE_INDICATOR([inet_pton])
591   AC_C_BIGENDIAN
592   gl_INTTYPES_H
593   gl_INTTYPES_INCOMPLETE
594   gl_INTTYPES_H_REQUIRE_DEFAULTS
595   AC_PROG_MKDIR_P
596   gl_FUNC_IOCTL
597   gl_CONDITIONAL([GL_COND_OBJ_IOCTL],
598                  [test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1])
599   gl_SYS_IOCTL_MODULE_INDICATOR([ioctl])
600   gl_FUNC_ISBLANK
601   gl_CONDITIONAL([GL_COND_OBJ_ISBLANK], [test $HAVE_ISBLANK = 0])
602   gl_MODULE_INDICATOR([isblank])
603   gl_CTYPE_MODULE_INDICATOR([isblank])
604   gl_FUNC_ISNAND_NO_LIBM
605   if test $gl_func_isnand_no_libm != yes; then
606     AC_LIBOBJ([isnand])
607     gl_PREREQ_ISNAND
608   fi
609   gl_FUNC_ISNANF_NO_LIBM
610   if test $gl_func_isnanf_no_libm != yes; then
611     AC_LIBOBJ([isnanf])
612     gl_PREREQ_ISNANF
613   fi
614   gl_FUNC_ISNANL_NO_LIBM
615   if test $gl_func_isnanl_no_libm != yes; then
616     AC_LIBOBJ([isnanl])
617     gl_PREREQ_ISNANL
618   fi
619   AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
620   gl___INLINE
621   AC_REQUIRE([gl_SYS_SOCKET_H])
622   gl_CONDITIONAL([GL_COND_OBJ_LISTEN], [test "$ac_cv_header_winsock2_h" = yes])
623   gl_SYS_SOCKET_MODULE_INDICATOR([listen])
624   gl_LOCK
625   gl_MODULE_INDICATOR([lock])
626   AC_CHECK_HEADERS_ONCE([semaphore.h])
627   AC_CHECK_DECLS_ONCE([alarm])
628   AC_REQUIRE([gl_SEMAPHORE])
629   gl_FUNC_LSTAT
630   gl_CONDITIONAL([GL_COND_OBJ_LSTAT], [test $REPLACE_LSTAT = 1])
631   AM_COND_IF([GL_COND_OBJ_LSTAT], [
632     gl_PREREQ_LSTAT
633   ])
634   gl_SYS_STAT_MODULE_INDICATOR([lstat])
635   gl_FUNC_MALLOC_GNU
636   if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 1; then
637     AC_LIBOBJ([malloc])
638   fi
639   gl_STDLIB_MODULE_INDICATOR([malloc-gnu])
640   AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
641   if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
642     AC_LIBOBJ([malloc])
643   fi
644   gl_STDLIB_MODULE_INDICATOR([malloc-posix])
645   gl_MATH_H
646   gl_MATH_H_REQUIRE_DEFAULTS
647   AC_PROG_MKDIR_P
648   gl_MINMAX
649   gl_FUNC_NANOSLEEP
650   gl_CONDITIONAL([GL_COND_OBJ_NANOSLEEP],
651                  [test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1])
652   gl_TIME_MODULE_INDICATOR([nanosleep])
653   AC_CHECK_DECLS_ONCE([alarm])
654   gl_HEADER_NETINET_IN
655   gl_CONDITIONAL_HEADER([netinet/in.h])
656   AC_PROG_MKDIR_P
657   gl_FUNC_PERROR
658   gl_CONDITIONAL([GL_COND_OBJ_PERROR], [test $REPLACE_PERROR = 1])
659   gl_STRING_MODULE_INDICATOR([perror])
660   gl_FUNC_PIPE
661   gl_CONDITIONAL([GL_COND_OBJ_PIPE], [test $HAVE_PIPE = 0])
662   gl_UNISTD_MODULE_INDICATOR([pipe])
663   gl_FUNC_PSELECT
664   gl_CONDITIONAL([GL_COND_OBJ_PSELECT],
665                  [test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1])
666   gl_SYS_SELECT_MODULE_INDICATOR([pselect])
667   AC_CHECK_HEADERS_ONCE([sys/wait.h])
668   gl_PTHREAD_H
669   gl_PTHREAD_H_REQUIRE_DEFAULTS
670   AC_PROG_MKDIR_P
671   gl_PTHREAD_THREAD
672   gl_CONDITIONAL([GL_COND_OBJ_PTHREAD_THREAD],
673                  [test $HAVE_PTHREAD_CREATE = 0 || test $REPLACE_PTHREAD_CREATE = 1])
674   gl_PTHREAD_MODULE_INDICATOR([pthread-thread])
675   gl_FUNC_PTHREAD_SIGMASK
676   gl_CONDITIONAL([GL_COND_OBJ_PTHREAD_SIGMASK],
677                  [test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1])
678   AM_COND_IF([GL_COND_OBJ_PTHREAD_SIGMASK], [
679     gl_PREREQ_PTHREAD_SIGMASK
680   ])
681   gl_SIGNAL_MODULE_INDICATOR([pthread_sigmask])
682   gl_FUNC_PUTENV
683   gl_CONDITIONAL([GL_COND_OBJ_PUTENV], [test $REPLACE_PUTENV = 1])
684   AM_COND_IF([GL_COND_OBJ_PUTENV], [
685     gl_PREREQ_PUTENV
686   ])
687   gl_STDLIB_MODULE_INDICATOR([putenv])
688   gl_FUNC_RAISE
689   gl_CONDITIONAL([GL_COND_OBJ_RAISE],
690                  [test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1])
691   AM_COND_IF([GL_COND_OBJ_RAISE], [
692     gl_PREREQ_RAISE
693   ])
694   gl_SIGNAL_MODULE_INDICATOR([raise])
695   gl_FUNC_RANDOM
696   gl_CONDITIONAL([GL_COND_OBJ_RANDOM],
697                  [test $HAVE_RANDOM = 0 || test $REPLACE_RANDOM = 1 || test $REPLACE_INITSTATE = 1 || test $REPLACE_SETSTATE = 1])
698   AM_COND_IF([GL_COND_OBJ_RANDOM], [
699     gl_PREREQ_RANDOM
700   ])
701   gl_STDLIB_MODULE_INDICATOR([random])
702   gl_FUNC_RANDOM_R
703   gl_CONDITIONAL([GL_COND_OBJ_RANDOM_R],
704                  [test $HAVE_RANDOM_R = 0 || test $REPLACE_RANDOM_R = 1])
705   AM_COND_IF([GL_COND_OBJ_RANDOM_R], [
706     gl_PREREQ_RANDOM_R
707   ])
708   gl_STDLIB_MODULE_INDICATOR([random_r])
709   gl_FUNC_REALLOC_GNU
710   if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then
711     AC_LIBOBJ([realloc])
712   fi
713   gl_STDLIB_MODULE_INDICATOR([realloc-gnu])
714   gl_FUNC_REALLOC_POSIX
715   if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then
716     AC_LIBOBJ([realloc])
717   fi
718   gl_STDLIB_MODULE_INDICATOR([realloc-posix])
719   gl_FUNC_REALLOCARRAY
720   gl_CONDITIONAL([GL_COND_OBJ_REALLOCARRAY],
721                  [test $HAVE_REALLOCARRAY = 0 || test $REPLACE_REALLOCARRAY = 1])
722   AM_COND_IF([GL_COND_OBJ_REALLOCARRAY], [
723     gl_PREREQ_REALLOCARRAY
724   ])
725   gl_MODULE_INDICATOR([reallocarray])
726   gl_STDLIB_MODULE_INDICATOR([reallocarray])
727   gl_SCHED_H
728   gl_SCHED_H_REQUIRE_DEFAULTS
729   AC_PROG_MKDIR_P
730   gl_FUNC_SCHED_YIELD
731   gl_CONDITIONAL([GL_COND_OBJ_SCHED_YIELD],
732                  [test $HAVE_SCHED_YIELD = 0 || test $REPLACE_SCHED_YIELD = 1])
733   gl_SCHED_MODULE_INDICATOR([sched_yield])
734   gl_FUNC_SELECT
735   gl_CONDITIONAL([GL_COND_OBJ_SELECT], [test $REPLACE_SELECT = 1])
736   gl_SYS_SELECT_MODULE_INDICATOR([select])
737   AC_CHECK_HEADERS_ONCE([sys/wait.h])
738   AC_REQUIRE([gl_SYS_SOCKET_H])
739   gl_CONDITIONAL([GL_COND_OBJ_SETSOCKOPT],
740                  [test "$ac_cv_header_winsock2_h" = yes])
741   gl_SYS_SOCKET_MODULE_INDICATOR([setsockopt])
742   gl_SIGNAL_H
743   gl_SIGNAL_H_REQUIRE_DEFAULTS
744   AC_PROG_MKDIR_P
745   gl_SIGNBIT
746   gl_CONDITIONAL([GL_COND_OBJ_SIGNBIT3], [test $REPLACE_SIGNBIT = 1])
747   gl_MATH_MODULE_INDICATOR([signbit])
748   gl_SIGNALBLOCKING
749   gl_CONDITIONAL([GL_COND_OBJ_SIGPROCMASK], [test $HAVE_POSIX_SIGNALBLOCKING = 0])
750   AM_COND_IF([GL_COND_OBJ_SIGPROCMASK], [
751     gl_PREREQ_SIGPROCMASK
752   ])
753   gl_SIGNAL_MODULE_INDICATOR([sigprocmask])
754   gl_FUNC_SLEEP
755   gl_CONDITIONAL([GL_COND_OBJ_SLEEP],
756                  [test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1])
757   gl_UNISTD_MODULE_INDICATOR([sleep])
758   AC_CHECK_DECLS_ONCE([alarm])
759   gl_SNAN
760   gl_NAN_MIPS
761   AC_REQUIRE([gl_SYS_SOCKET_H])
762   gl_CONDITIONAL([GL_COND_OBJ_SOCKET], [test "$ac_cv_header_winsock2_h" = yes])
763   # When this module is used, sockets may actually occur as file descriptors,
764   # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
765   m4_ifdef([gl_UNISTD_H_DEFAULTS], [gl_UNISTD_H_REQUIRE_DEFAULTS])
766   m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [gl_SYS_IOCTL_H_REQUIRE_DEFAULTS])
767   AC_REQUIRE([gl_PREREQ_SYS_H_WINSOCK2])
768   if test "$ac_cv_header_winsock2_h" = yes; then
769     UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
770     SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
771   fi
772   gl_SYS_SOCKET_MODULE_INDICATOR([socket])
773   AC_REQUIRE([gl_SOCKETLIB])
774   AC_REQUIRE([gl_SOCKETS])
775   gl_TYPE_SOCKLEN_T
776   AC_REQUIRE([gt_TYPE_WCHAR_T])
777   AC_REQUIRE([gt_TYPE_WINT_T])
778   gl_STDIO_H
779   gl_STDIO_H_REQUIRE_DEFAULTS
780   AC_PROG_MKDIR_P
781   gl_CONDITIONAL([GL_COND_OBJ_STDIO_READ], [test $REPLACE_STDIO_READ_FUNCS = 1])
782   gl_CONDITIONAL([GL_COND_OBJ_STDIO_WRITE], [test $REPLACE_STDIO_WRITE_FUNCS = 1])
783   dnl No need to create extra modules for these functions. Everyone who uses
784   dnl <stdio.h> likely needs them.
785   gl_STDIO_MODULE_INDICATOR([fscanf])
786   gl_MODULE_INDICATOR([fscanf])
787   gl_STDIO_MODULE_INDICATOR([scanf])
788   gl_MODULE_INDICATOR([scanf])
789   gl_STDIO_MODULE_INDICATOR([fgetc])
790   gl_STDIO_MODULE_INDICATOR([getc])
791   gl_STDIO_MODULE_INDICATOR([getchar])
792   gl_STDIO_MODULE_INDICATOR([fgets])
793   gl_STDIO_MODULE_INDICATOR([fread])
794   dnl No need to create extra modules for these functions. Everyone who uses
795   dnl <stdio.h> likely needs them.
796   gl_STDIO_MODULE_INDICATOR([fprintf])
797   gl_STDIO_MODULE_INDICATOR([printf])
798   gl_STDIO_MODULE_INDICATOR([vfprintf])
799   gl_STDIO_MODULE_INDICATOR([vprintf])
800   gl_STDIO_MODULE_INDICATOR([fputc])
801   gl_STDIO_MODULE_INDICATOR([putc])
802   gl_STDIO_MODULE_INDICATOR([putchar])
803   gl_STDIO_MODULE_INDICATOR([fputs])
804   gl_STDIO_MODULE_INDICATOR([puts])
805   gl_STDIO_MODULE_INDICATOR([fwrite])
806   gl_DOUBLE_EXPONENT_LOCATION
807   gl_STDLIB_H
808   gl_STDLIB_H_REQUIRE_DEFAULTS
809   AC_PROG_MKDIR_P
810   gl_FUNC_STRERROR
811   gl_CONDITIONAL([GL_COND_OBJ_STRERROR], [test $REPLACE_STRERROR = 1])
812   gl_MODULE_INDICATOR([strerror])
813   gl_STRING_MODULE_INDICATOR([strerror])
814   AC_REQUIRE([gl_HEADER_ERRNO_H])
815   AC_REQUIRE([gl_FUNC_STRERROR_0])
816   gl_CONDITIONAL([GL_COND_OBJ_STRERROR_OVERRIDE],
817                  [test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1])
818   AM_COND_IF([GL_COND_OBJ_STRERROR_OVERRIDE], [
819     gl_PREREQ_SYS_H_WINSOCK2
820   ])
821   gl_FUNC_STRERROR_R
822   AS_IF([test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1], [
823     AC_LIBOBJ([strerror_r])
824     gl_PREREQ_STRERROR_R
825   ])
826   gl_STRING_MODULE_INDICATOR([strerror_r])
827   dnl For the modules argp, error, xstrerror.
828   gl_MODULE_INDICATOR([strerror_r-posix])
829   gl_STRING_H
830   gl_STRING_H_REQUIRE_DEFAULTS
831   AC_PROG_MKDIR_P
832   gl_FUNC_SYMLINK
833   gl_CONDITIONAL([GL_COND_OBJ_SYMLINK],
834                  [test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1])
835   gl_UNISTD_MODULE_INDICATOR([symlink])
836   gl_SYS_IOCTL_H
837   gl_SYS_IOCTL_H_REQUIRE_DEFAULTS
838   AC_PROG_MKDIR_P
839   gl_SYS_SELECT_H
840   gl_SYS_SELECT_H_REQUIRE_DEFAULTS
841   AC_PROG_MKDIR_P
842   gl_SYS_SOCKET_H
843   gl_SYS_SOCKET_H_REQUIRE_DEFAULTS
844   AC_PROG_MKDIR_P
845   AC_CHECK_FUNCS_ONCE([shutdown])
846   gl_SYS_TIME_H
847   gl_SYS_TIME_H_REQUIRE_DEFAULTS
848   AC_PROG_MKDIR_P
849   gl_SYS_UIO_H
850   gl_SYS_UIO_H_REQUIRE_DEFAULTS
851   AC_PROG_MKDIR_P
852   gl_THREAD
853   AC_REQUIRE([gl_THREADLIB])
854   gl_FUNC_TIME
855   gl_CONDITIONAL([GL_COND_OBJ_TIME], [test $REPLACE_TIME = 1])
856   AM_COND_IF([GL_COND_OBJ_TIME], [
857     gl_PREREQ_TIME
858   ])
859   gl_TIME_MODULE_INDICATOR([time])
860   gl_FUNC_UNSETENV
861   gl_CONDITIONAL([GL_COND_OBJ_UNSETENV],
862                  [test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1])
863   AM_COND_IF([GL_COND_OBJ_UNSETENV], [
864     gl_PREREQ_UNSETENV
865   ])
866   gl_STDLIB_MODULE_INDICATOR([unsetenv])
867   gl_FUNC_USLEEP
868   gl_CONDITIONAL([GL_COND_OBJ_USLEEP],
869                  [test $HAVE_USLEEP = 0 || test $REPLACE_USLEEP = 1])
870   gl_UNISTD_MODULE_INDICATOR([usleep])
871   AC_C_VARARRAYS
872   gl_WCHAR_H
873   gl_WCHAR_H_REQUIRE_DEFAULTS
874   AC_PROG_MKDIR_P
875   AC_REQUIRE([AC_CANONICAL_HOST])
876   gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_MUTEX],
877                  [case "$host_os" in mingw* | windows*) true;; *) false;; esac])
878   AC_REQUIRE([AC_CANONICAL_HOST])
879   gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_ONCE],
880                  [case "$host_os" in mingw* | windows*) true;; *) false;; esac])
881   AC_REQUIRE([AC_CANONICAL_HOST])
882   gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_RECMUTEX],
883                  [case "$host_os" in mingw* | windows*) true;; *) false;; esac])
884   AC_REQUIRE([AC_CANONICAL_HOST])
885   gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_RWLOCK],
886                  [case "$host_os" in mingw* | windows*) true;; *) false;; esac])
887   AC_REQUIRE([AC_CANONICAL_HOST])
888   gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_THREAD],
889                  [case "$host_os" in mingw* | windows*) true;; *) false;; esac])
890   AC_REQUIRE([AC_CANONICAL_HOST])
891   gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_TLS],
892                  [case "$host_os" in mingw* | windows*) true;; *) false;; esac])
893   gl_XALLOC
894   gl_MODULE_INDICATOR([xalloc])
895   gl_MODULE_INDICATOR([xalloc-die])
896   AC_REQUIRE([gl_YIELD])
897   m4_popdef([gl_MODULE_INDICATOR_CONDITION])
898   m4_ifval(gltests_LIBSOURCES_LIST, [
899     m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
900       for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
901         if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
902           echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
903           exit 1
904         fi
905       done])dnl
906       m4_if(m4_sysval, [0], [],
907         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
908   ])
909   m4_popdef([GL_MODULE_INDICATOR_PREFIX])
910   m4_popdef([GL_MACRO_PREFIX])
911   m4_popdef([gltests_LIBSOURCES_DIR])
912   m4_popdef([gltests_LIBSOURCES_LIST])
913   m4_popdef([AC_LIBSOURCES])
914   m4_popdef([AC_REPLACE_FUNCS])
915   m4_popdef([AC_LIBOBJ])
916   AC_CONFIG_COMMANDS_PRE([
917     gltests_libobjs=
918     gltests_ltlibobjs=
919     gltests_libobjdeps=
920     if test -n "$gltests_LIBOBJS"; then
921       # Remove the extension.
922 changequote(,)dnl
923       sed_drop_objext='s/\.o$//;s/\.obj$//'
924       sed_dirname1='s,//*,/,g'
925       sed_dirname2='s,\(.\)/$,\1,'
926       sed_dirname3='s,^[^/]*$,.,'
927       sed_dirname4='s,\(.\)/[^/]*$,\1,'
928       sed_basename1='s,.*/,,'
929 changequote([, ])dnl
930       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
931         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
932         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
933         i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
934         i_base=`echo "$i" | sed -e "$sed_basename1"`
935         gltests_libobjdeps="$gltests_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
936       done
937     fi
938     AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
939     AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
940     AC_SUBST([gltests_LIBOBJDEPS], [$gltests_libobjdeps])
941   ])
942   AC_REQUIRE([gl_CC_GNULIB_WARNINGS])
943   LIBGNU_LIBDEPS="$gl_libdeps"
944   AC_SUBST([LIBGNU_LIBDEPS])
945   LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
946   AC_SUBST([LIBGNU_LTLIBDEPS])
947   LIBTESTS_LIBDEPS="$gltests_libdeps"
948   AC_SUBST([LIBTESTS_LIBDEPS])
949 ])
950
951 # Like AC_LIBOBJ, except that the module name goes
952 # into gl_LIBOBJS instead of into LIBOBJS.
953 AC_DEFUN([gl_LIBOBJ], [
954   AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
955   gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
956 ])
957
958 # Like AC_REPLACE_FUNCS, except that the module name goes
959 # into gl_LIBOBJS instead of into LIBOBJS.
960 AC_DEFUN([gl_REPLACE_FUNCS], [
961   m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
962   AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
963 ])
964
965 # Like AC_LIBSOURCES, except the directory where the source file is
966 # expected is derived from the gnulib-tool parameterization,
967 # and alloca is special cased (for the alloca-opt module).
968 # We could also entirely rely on EXTRA_lib..._SOURCES.
969 AC_DEFUN([gl_LIBSOURCES], [
970   m4_foreach([_gl_NAME], [$1], [
971     m4_if(_gl_NAME, [alloca.c], [], [
972       m4_define([gl_LIBSOURCES_DIR], [lib])
973       m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
974     ])
975   ])
976 ])
977
978 # Like AC_LIBOBJ, except that the module name goes
979 # into gltests_LIBOBJS instead of into LIBOBJS.
980 AC_DEFUN([gltests_LIBOBJ], [
981   AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
982   gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
983 ])
984
985 # Like AC_REPLACE_FUNCS, except that the module name goes
986 # into gltests_LIBOBJS instead of into LIBOBJS.
987 AC_DEFUN([gltests_REPLACE_FUNCS], [
988   m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
989   AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
990 ])
991
992 # Like AC_LIBSOURCES, except the directory where the source file is
993 # expected is derived from the gnulib-tool parameterization,
994 # and alloca is special cased (for the alloca-opt module).
995 # We could also entirely rely on EXTRA_lib..._SOURCES.
996 AC_DEFUN([gltests_LIBSOURCES], [
997   m4_foreach([_gl_NAME], [$1], [
998     m4_if(_gl_NAME, [alloca.c], [], [
999       m4_define([gltests_LIBSOURCES_DIR], [tests])
1000       m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
1001     ])
1002   ])
1003 ])
1004
1005 # This macro records the list of files which have been installed by
1006 # gnulib-tool and may be removed by future gnulib-tool invocations.
1007 AC_DEFUN([gl_FILE_LIST], [
1008   lib/alloca.in.h
1009   lib/arg-nonnull.h
1010   lib/assert.in.h
1011   lib/c++defs.h
1012   lib/cloexec.c
1013   lib/cloexec.h
1014   lib/close.c
1015   lib/dup2.c
1016   lib/errno.in.h
1017   lib/fcntl.c
1018   lib/fcntl.in.h
1019   lib/fd-hook.c
1020   lib/fd-hook.h
1021   lib/filename.h
1022   lib/fstat.c
1023   lib/get_ppid_of.c
1024   lib/get_ppid_of.h
1025   lib/getdtablesize.c
1026   lib/idx.h
1027   lib/intprops-internal.h
1028   lib/limits.in.h
1029   lib/malloca.c
1030   lib/malloca.h
1031   lib/msvc-inval.c
1032   lib/msvc-inval.h
1033   lib/msvc-nothrow.c
1034   lib/msvc-nothrow.h
1035   lib/open.c
1036   lib/pathmax.h
1037   lib/stat-time.c
1038   lib/stat-time.h
1039   lib/stat-w32.c
1040   lib/stat-w32.h
1041   lib/stat.c
1042   lib/stdckdint.in.h
1043   lib/stddef.in.h
1044   lib/stdint.in.h
1045   lib/sys_stat.in.h
1046   lib/sys_types.in.h
1047   lib/time.in.h
1048   lib/unistd.c
1049   lib/unistd.in.h
1050   lib/verify.h
1051   lib/warn-on-use.h
1052   lib/xalloc-oversized.h
1053   m4/00gnulib.m4
1054   m4/__inline.m4
1055   m4/absolute-header.m4
1056   m4/alloca.m4
1057   m4/arpa_inet_h.m4
1058   m4/assert_h.m4
1059   m4/c-bool.m4
1060   m4/calloc.m4
1061   m4/close.m4
1062   m4/codeset.m4
1063   m4/ctype_h.m4
1064   m4/double-slash-root.m4
1065   m4/dup2.m4
1066   m4/eealloc.m4
1067   m4/environ.m4
1068   m4/errno_h.m4
1069   m4/error.m4
1070   m4/error_h.m4
1071   m4/exponentd.m4
1072   m4/exponentf.m4
1073   m4/exponentl.m4
1074   m4/extensions.m4
1075   m4/extern-inline.m4
1076   m4/fcntl-o.m4
1077   m4/fcntl.m4
1078   m4/fcntl_h.m4
1079   m4/fdopen.m4
1080   m4/float_h.m4
1081   m4/fpieee.m4
1082   m4/free.m4
1083   m4/fstat.m4
1084   m4/ftruncate.m4
1085   m4/getcwd.m4
1086   m4/getdtablesize.m4
1087   m4/getprogname.m4
1088   m4/gettimeofday.m4
1089   m4/gnulib-common.m4
1090   m4/include_next.m4
1091   m4/inet_pton.m4
1092   m4/inttypes.m4
1093   m4/ioctl.m4
1094   m4/isblank.m4
1095   m4/isnand.m4
1096   m4/isnanf.m4
1097   m4/isnanl.m4
1098   m4/largefile.m4
1099   m4/limits-h.m4
1100   m4/locale-fr.m4
1101   m4/lock.m4
1102   m4/lstat.m4
1103   m4/malloc.m4
1104   m4/malloca.m4
1105   m4/math_h.m4
1106   m4/minmax.m4
1107   m4/mode_t.m4
1108   m4/msvc-inval.m4
1109   m4/msvc-nothrow.m4
1110   m4/multiarch.m4
1111   m4/musl.m4
1112   m4/nan-mips.m4
1113   m4/nanosleep.m4
1114   m4/netinet_in_h.m4
1115   m4/off_t.m4
1116   m4/open-cloexec.m4
1117   m4/open-slash.m4
1118   m4/open.m4
1119   m4/pathmax.m4
1120   m4/perror.m4
1121   m4/pid_t.m4
1122   m4/pipe.m4
1123   m4/pselect.m4
1124   m4/pthread-thread.m4
1125   m4/pthread_h.m4
1126   m4/pthread_rwlock_rdlock.m4
1127   m4/pthread_sigmask.m4
1128   m4/putenv.m4
1129   m4/raise.m4
1130   m4/random.m4
1131   m4/random_r.m4
1132   m4/realloc.m4
1133   m4/reallocarray.m4
1134   m4/sched_h.m4
1135   m4/sched_yield.m4
1136   m4/select.m4
1137   m4/semaphore.m4
1138   m4/setenv.m4
1139   m4/signal_h.m4
1140   m4/signalblocking.m4
1141   m4/signbit.m4
1142   m4/sleep.m4
1143   m4/snan.m4
1144   m4/socketlib.m4
1145   m4/sockets.m4
1146   m4/socklen.m4
1147   m4/sockpfaf.m4
1148   m4/ssize_t.m4
1149   m4/stat-time.m4
1150   m4/stat.m4
1151   m4/std-gnu11.m4
1152   m4/stdalign.m4
1153   m4/stddef_h.m4
1154   m4/stdint.m4
1155   m4/stdio_h.m4
1156   m4/stdlib_h.m4
1157   m4/strerror.m4
1158   m4/strerror_r.m4
1159   m4/string_h.m4
1160   m4/symlink.m4
1161   m4/sys_ioctl_h.m4
1162   m4/sys_select_h.m4
1163   m4/sys_socket_h.m4
1164   m4/sys_stat_h.m4
1165   m4/sys_time_h.m4
1166   m4/sys_types_h.m4
1167   m4/sys_uio_h.m4
1168   m4/thread.m4
1169   m4/threadlib.m4
1170   m4/time.m4
1171   m4/time_h.m4
1172   m4/unistd_h.m4
1173   m4/usleep.m4
1174   m4/vararrays.m4
1175   m4/warn-on-use.m4
1176   m4/wchar_h.m4
1177   m4/wchar_t.m4
1178   m4/wint_t.m4
1179   m4/xalloc.m4
1180   m4/yield.m4
1181   m4/zzgnulib.m4
1182   tests/atomic-int-gnulib.h
1183   tests/infinity.h
1184   tests/init.sh
1185   tests/macros.h
1186   tests/minus-zero.h
1187   tests/nap.h
1188   tests/signature.h
1189   tests/test-accept.c
1190   tests/test-alignasof.c
1191   tests/test-alloca-opt.c
1192   tests/test-arpa_inet.c
1193   tests/test-assert.c
1194   tests/test-binary-io.c
1195   tests/test-binary-io.sh
1196   tests/test-bind.c
1197   tests/test-c-ctype.c
1198   tests/test-calloc-gnu.c
1199   tests/test-cloexec.c
1200   tests/test-close.c
1201   tests/test-connect.c
1202   tests/test-ctype.c
1203   tests/test-dup2.c
1204   tests/test-environ.c
1205   tests/test-errno.c
1206   tests/test-error.c
1207   tests/test-error.sh
1208   tests/test-fcntl-h.c
1209   tests/test-fcntl.c
1210   tests/test-fdopen.c
1211   tests/test-fgetc.c
1212   tests/test-float.c
1213   tests/test-fputc.c
1214   tests/test-fread.c
1215   tests/test-free.c
1216   tests/test-fstat.c
1217   tests/test-ftruncate.c
1218   tests/test-ftruncate.sh
1219   tests/test-fwrite.c
1220   tests/test-getcwd-lgpl.c
1221   tests/test-getdtablesize.c
1222   tests/test-getprogname.c
1223   tests/test-gettimeofday.c
1224   tests/test-ignore-value.c
1225   tests/test-inet_pton.c
1226   tests/test-init.sh
1227   tests/test-intprops.c
1228   tests/test-inttypes.c
1229   tests/test-ioctl.c
1230   tests/test-isblank.c
1231   tests/test-isnand-nolibm.c
1232   tests/test-isnand.h
1233   tests/test-isnanf-nolibm.c
1234   tests/test-isnanf.h
1235   tests/test-isnanl-nolibm.c
1236   tests/test-isnanl.h
1237   tests/test-largefile.c
1238   tests/test-limits-h.c
1239   tests/test-listen.c
1240   tests/test-lock.c
1241   tests/test-lstat.c
1242   tests/test-lstat.h
1243   tests/test-malloc-gnu.c
1244   tests/test-malloca.c
1245   tests/test-math.c
1246   tests/test-nanosleep.c
1247   tests/test-netinet_in.c
1248   tests/test-once.c
1249   tests/test-open.c
1250   tests/test-open.h
1251   tests/test-pathmax.c
1252   tests/test-perror.c
1253   tests/test-perror.sh
1254   tests/test-perror2.c
1255   tests/test-pipe.c
1256   tests/test-pselect.c
1257   tests/test-pthread-thread.c
1258   tests/test-pthread.c
1259   tests/test-pthread_sigmask1.c
1260   tests/test-pthread_sigmask2.c
1261   tests/test-raise.c
1262   tests/test-random-mt.c
1263   tests/test-random.c
1264   tests/test-random_r.c
1265   tests/test-realloc-gnu.c
1266   tests/test-reallocarray.c
1267   tests/test-rwlock1.c
1268   tests/test-sched.c
1269   tests/test-select-fd.c
1270   tests/test-select-in.sh
1271   tests/test-select-out.sh
1272   tests/test-select-stdin.c
1273   tests/test-select.c
1274   tests/test-select.h
1275   tests/test-setsockopt.c
1276   tests/test-signal-h.c
1277   tests/test-signbit.c
1278   tests/test-sigprocmask.c
1279   tests/test-sleep.c
1280   tests/test-sockets.c
1281   tests/test-stat-time.c
1282   tests/test-stat.c
1283   tests/test-stat.h
1284   tests/test-stdbool.c
1285   tests/test-stdckdint.c
1286   tests/test-stddef.c
1287   tests/test-stdint.c
1288   tests/test-stdio.c
1289   tests/test-stdlib.c
1290   tests/test-strerror.c
1291   tests/test-strerror_r.c
1292   tests/test-string.c
1293   tests/test-symlink.c
1294   tests/test-symlink.h
1295   tests/test-sys_ioctl.c
1296   tests/test-sys_select.c
1297   tests/test-sys_socket.c
1298   tests/test-sys_stat.c
1299   tests/test-sys_time.c
1300   tests/test-sys_types.c
1301   tests/test-sys_uio.c
1302   tests/test-sys_wait.h
1303   tests/test-thread_create.c
1304   tests/test-thread_self.c
1305   tests/test-time-h.c
1306   tests/test-time.c
1307   tests/test-unistd.c
1308   tests/test-unsetenv.c
1309   tests/test-usleep.c
1310   tests/test-verify-try.c
1311   tests/test-verify.c
1312   tests/test-verify.sh
1313   tests/test-wchar.c
1314   tests/test-xalloc-die.c
1315   tests/test-xalloc-die.sh
1316   tests=lib/_Noreturn.h
1317   tests=lib/accept.c
1318   tests=lib/alloca.c
1319   tests=lib/arg-nonnull.h
1320   tests=lib/arpa_inet.in.h
1321   tests=lib/attribute.h
1322   tests=lib/basename-lgpl.c
1323   tests=lib/basename-lgpl.h
1324   tests=lib/binary-io.c
1325   tests=lib/binary-io.h
1326   tests=lib/bind.c
1327   tests=lib/c++defs.h
1328   tests=lib/c-ctype.c
1329   tests=lib/c-ctype.h
1330   tests=lib/calloc.c
1331   tests=lib/cdefs.h
1332   tests=lib/connect.c
1333   tests=lib/ctype.in.h
1334   tests=lib/error.c
1335   tests=lib/error.in.h
1336   tests=lib/exitfail.c
1337   tests=lib/exitfail.h
1338   tests=lib/fdopen.c
1339   tests=lib/float+.h
1340   tests=lib/float.c
1341   tests=lib/float.in.h
1342   tests=lib/fpucw.h
1343   tests=lib/free.c
1344   tests=lib/ftruncate.c
1345   tests=lib/getcwd-lgpl.c
1346   tests=lib/getprogname.c
1347   tests=lib/getprogname.h
1348   tests=lib/gettext.h
1349   tests=lib/gettimeofday.c
1350   tests=lib/glthread/lock.c
1351   tests=lib/glthread/lock.h
1352   tests=lib/glthread/thread.c
1353   tests=lib/glthread/thread.h
1354   tests=lib/glthread/threadlib.c
1355   tests=lib/glthread/yield.h
1356   tests=lib/ialloc.c
1357   tests=lib/ialloc.h
1358   tests=lib/ignore-value.h
1359   tests=lib/inet_pton.c
1360   tests=lib/intprops-internal.h
1361   tests=lib/intprops.h
1362   tests=lib/inttypes.in.h
1363   tests=lib/ioctl.c
1364   tests=lib/isblank.c
1365   tests=lib/isnan.c
1366   tests=lib/isnand-nolibm.h
1367   tests=lib/isnand.c
1368   tests=lib/isnanf-nolibm.h
1369   tests=lib/isnanf.c
1370   tests=lib/isnanl-nolibm.h
1371   tests=lib/isnanl.c
1372   tests=lib/itold.c
1373   tests=lib/libc-config.h
1374   tests=lib/listen.c
1375   tests=lib/lstat.c
1376   tests=lib/malloc.c
1377   tests=lib/math.c
1378   tests=lib/math.in.h
1379   tests=lib/minmax.h
1380   tests=lib/nan.h
1381   tests=lib/nanosleep.c
1382   tests=lib/netinet_in.in.h
1383   tests=lib/perror.c
1384   tests=lib/pipe.c
1385   tests=lib/pselect.c
1386   tests=lib/pthread-thread.c
1387   tests=lib/pthread.in.h
1388   tests=lib/pthread_sigmask.c
1389   tests=lib/putenv.c
1390   tests=lib/raise.c
1391   tests=lib/random.c
1392   tests=lib/random_r.c
1393   tests=lib/realloc.c
1394   tests=lib/reallocarray.c
1395   tests=lib/same-inode.c
1396   tests=lib/same-inode.h
1397   tests=lib/sched.in.h
1398   tests=lib/sched_yield.c
1399   tests=lib/select.c
1400   tests=lib/setsockopt.c
1401   tests=lib/signal.in.h
1402   tests=lib/signbitd.c
1403   tests=lib/signbitf.c
1404   tests=lib/signbitl.c
1405   tests=lib/signed-nan.h
1406   tests=lib/signed-snan.h
1407   tests=lib/sigprocmask.c
1408   tests=lib/sleep.c
1409   tests=lib/snan.h
1410   tests=lib/socket.c
1411   tests=lib/sockets.c
1412   tests=lib/sockets.h
1413   tests=lib/stdio-read.c
1414   tests=lib/stdio-write.c
1415   tests=lib/stdio.in.h
1416   tests=lib/stdlib.in.h
1417   tests=lib/strerror-override.c
1418   tests=lib/strerror-override.h
1419   tests=lib/strerror.c
1420   tests=lib/strerror_r.c
1421   tests=lib/string.in.h
1422   tests=lib/symlink.c
1423   tests=lib/sys_ioctl.in.h
1424   tests=lib/sys_select.in.h
1425   tests=lib/sys_socket.c
1426   tests=lib/sys_socket.in.h
1427   tests=lib/sys_time.in.h
1428   tests=lib/sys_uio.in.h
1429   tests=lib/time.c
1430   tests=lib/unsetenv.c
1431   tests=lib/usleep.c
1432   tests=lib/verify.h
1433   tests=lib/w32sock.h
1434   tests=lib/warn-on-use.h
1435   tests=lib/wchar.in.h
1436   tests=lib/windows-initguard.h
1437   tests=lib/windows-mutex.c
1438   tests=lib/windows-mutex.h
1439   tests=lib/windows-once.c
1440   tests=lib/windows-once.h
1441   tests=lib/windows-recmutex.c
1442   tests=lib/windows-recmutex.h
1443   tests=lib/windows-rwlock.c
1444   tests=lib/windows-rwlock.h
1445   tests=lib/windows-thread.c
1446   tests=lib/windows-thread.h
1447   tests=lib/windows-tls.c
1448   tests=lib/windows-tls.h
1449   tests=lib/xalloc-die.c
1450   tests=lib/xalloc.h
1451   tests=lib/xmalloc.c
1452 ])