Debian Codegraph @

m4/gnulib-comp.m4

raw
1 # DO NOT EDIT! GENERATED AUTOMATICALLY!
2 # Copyright (C) 2002-2020 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 access:
47 # Code from module alloca:
48 # Code from module alloca-opt:
49 # Code from module close:
50 # Code from module concat-filename:
51 # Code from module dirname-lgpl:
52 # Code from module dosname:
53 # Code from module double-slash-root:
54 # Code from module dup2:
55 # Code from module errno:
56 # Code from module error:
57 # Code from module exitfail:
58 # Code from module extensions:
59 # Code from module extern-inline:
60 # Code from module fcntl:
61 # Code from module fcntl-h:
62 # Code from module fd-hook:
63 # Code from module fdl:
64 # Code from module filename:
65 # Code from module findprog-in:
66 # Code from module getdtablesize:
67 # Code from module getloadavg:
68 # Code from module getprogname:
69 # Code from module gettext-h:
70 # Code from module host-cpu-c-abi:
71 # Code from module include_next:
72 # Code from module intprops:
73 # Code from module limits-h:
74 # Code from module make-glob:
75 # Code from module malloc-posix:
76 # Code from module msvc-inval:
77 # Code from module msvc-nothrow:
78 # Code from module multiarch:
79 # Code from module snippet/_Noreturn:
80 # Code from module snippet/arg-nonnull:
81 # Code from module snippet/c++defs:
82 # Code from module snippet/warn-on-use:
83 # Code from module ssize_t:
84 # Code from module stdbool:
85 # Code from module stddef:
86 # Code from module stdint:
87 # Code from module stdio:
88 # Code from module stdlib:
89 # Code from module stpcpy:
90 # Code from module strerror:
91 # Code from module strerror-override:
92 # Code from module string:
93 # Code from module sys_types:
94 # Code from module unistd:
95 # Code from module verify:
96 # Code from module xalloc:
97 # Code from module xalloc-die:
98 # Code from module xalloc-oversized:
99 # Code from module xconcat-filename:
100 ])
101
102 # This macro should be invoked from ./configure.ac, in the section
103 # "Check for header files, types and library functions".
104 AC_DEFUN([gl_INIT],
105 [
106 AM_CONDITIONAL([GL_COND_LIBTOOL], [false])
107 gl_cond_libtool=false
108 gl_libdeps=
109 gl_ltlibdeps=
110 gl_m4_base='m4'
111 m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
112 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
113 m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
114 m4_pushdef([gl_LIBSOURCES_LIST], [])
115 m4_pushdef([gl_LIBSOURCES_DIR], [])
116 gl_COMMON
117 gl_source_base='lib'
118 gl_FUNC_ACCESS
119 if test $REPLACE_ACCESS = 1; then
120 AC_LIBOBJ([access])
121 fi
122 gl_UNISTD_MODULE_INDICATOR([access])
123 gl_FUNC_ALLOCA
124 gl_FUNC_CLOSE
125 if test $REPLACE_CLOSE = 1; then
126 AC_LIBOBJ([close])
127 fi
128 gl_UNISTD_MODULE_INDICATOR([close])
129 gl_DIRNAME_LGPL
130 gl_DOUBLE_SLASH_ROOT
131 gl_FUNC_DUP2
132 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
133 AC_LIBOBJ([dup2])
134 gl_PREREQ_DUP2
135 fi
136 gl_UNISTD_MODULE_INDICATOR([dup2])
137 gl_HEADER_ERRNO_H
138 gl_ERROR
139 if test $ac_cv_lib_error_at_line = no; then
140 AC_LIBOBJ([error])
141 gl_PREREQ_ERROR
142 fi
143 m4_ifdef([AM_XGETTEXT_OPTION],
144 [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
145 AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
146 AC_REQUIRE([gl_EXTERN_INLINE])
147 gl_FUNC_FCNTL
148 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
149 AC_LIBOBJ([fcntl])
150 fi
151 gl_FCNTL_MODULE_INDICATOR([fcntl])
152 gl_FCNTL_H
153 gl_FINDPROG_IN
154 gl_FUNC_GETDTABLESIZE
155 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
156 AC_LIBOBJ([getdtablesize])
157 gl_PREREQ_GETDTABLESIZE
158 fi
159 gl_UNISTD_MODULE_INDICATOR([getdtablesize])
160 gl_GETLOADAVG
161 if test $HAVE_GETLOADAVG = 0; then
162 AC_LIBOBJ([getloadavg])
163 gl_PREREQ_GETLOADAVG
164 fi
165 gl_STDLIB_MODULE_INDICATOR([getloadavg])
166 gl_FUNC_GETPROGNAME
167 AC_SUBST([LIBINTL])
168 AC_SUBST([LTLIBINTL])
169 AC_REQUIRE([gl_HOST_CPU_C_ABI])
170 gl_LIMITS_H
171 # Check the system to see if it provides GNU glob. If not, use our
172 # local version.
173 AC_CACHE_CHECK([if system libc has GNU glob], [make_cv_sys_gnu_glob],
174 [ AC_EGREP_CPP([gnu glob],[
175 #include <features.h>
176 #include <glob.h>
177 #include <fnmatch.h>
178 #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
179 # include <gnu-versions.h>
180 # if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2
181 gnu glob
182 # endif
183 #endif],
184 [make_cv_sys_gnu_glob=yes],
185 [make_cv_sys_gnu_glob=no])])
186 # Tell automake about this, so it can build the right .c files.
187 AM_CONDITIONAL([USE_SYSTEM_GLOB], [test "$make_cv_sys_gnu_glob" = yes])
188 # Tell build.sh which to use
189 USE_SYSTEM_GLOB="$make_cv_sys_gnu_glob"
190 AC_SUBST([USE_SYSTEM_GLOB])
191 gl_FUNC_MALLOC_POSIX
192 if test $REPLACE_MALLOC = 1; then
193 AC_LIBOBJ([malloc])
194 fi
195 gl_STDLIB_MODULE_INDICATOR([malloc-posix])
196 AC_REQUIRE([gl_MSVC_INVAL])
197 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
198 AC_LIBOBJ([msvc-inval])
199 fi
200 AC_REQUIRE([gl_MSVC_NOTHROW])
201 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
202 AC_LIBOBJ([msvc-nothrow])
203 fi
204 gl_MODULE_INDICATOR([msvc-nothrow])
205 gl_MULTIARCH
206 gt_TYPE_SSIZE_T
207 AM_STDBOOL_H
208 gl_STDDEF_H
209 gl_STDINT_H
210 gl_STDIO_H
211 gl_STDLIB_H
212 gl_FUNC_STPCPY
213 if test $HAVE_STPCPY = 0; then
214 AC_LIBOBJ([stpcpy])
215 gl_PREREQ_STPCPY
216 fi
217 gl_STRING_MODULE_INDICATOR([stpcpy])
218 gl_FUNC_STRERROR
219 if test $REPLACE_STRERROR = 1; then
220 AC_LIBOBJ([strerror])
221 fi
222 gl_MODULE_INDICATOR([strerror])
223 gl_STRING_MODULE_INDICATOR([strerror])
224 AC_REQUIRE([gl_HEADER_ERRNO_H])
225 AC_REQUIRE([gl_FUNC_STRERROR_0])
226 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
227 AC_LIBOBJ([strerror-override])
228 gl_PREREQ_SYS_H_WINSOCK2
229 fi
230 gl_HEADER_STRING_H
231 gl_SYS_TYPES_H
232 AC_PROG_MKDIR_P
233 gl_UNISTD_H
234 gl_XALLOC
235 # End of code from modules
236 m4_ifval(gl_LIBSOURCES_LIST, [
237 m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
238 for gl_file in ]gl_LIBSOURCES_LIST[ ; do
239 if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
240 echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
241 exit 1
242 fi
243 done])dnl
244 m4_if(m4_sysval, [0], [],
245 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
246 ])
247 m4_popdef([gl_LIBSOURCES_DIR])
248 m4_popdef([gl_LIBSOURCES_LIST])
249 m4_popdef([AC_LIBSOURCES])
250 m4_popdef([AC_REPLACE_FUNCS])
251 m4_popdef([AC_LIBOBJ])
252 AC_CONFIG_COMMANDS_PRE([
253 gl_libobjs=
254 gl_ltlibobjs=
255 if test -n "$gl_LIBOBJS"; then
256 # Remove the extension.
257 sed_drop_objext='s/\.o$//;s/\.obj$//'
258 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
259 gl_libobjs="$gl_libobjs $i.$ac_objext"
260 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
261 done
262 fi
263 AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
264 AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
265 ])
266 gltests_libdeps=
267 gltests_ltlibdeps=
268 m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
269 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
270 m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
271 m4_pushdef([gltests_LIBSOURCES_LIST], [])
272 m4_pushdef([gltests_LIBSOURCES_DIR], [])
273 gl_COMMON
274 gl_source_base='tests'
275 changequote(,)dnl
276 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
277 changequote([, ])dnl
278 AC_SUBST([gltests_WITNESS])
279 gl_module_indicator_condition=$gltests_WITNESS
280 m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
281 m4_popdef([gl_MODULE_INDICATOR_CONDITION])
282 m4_ifval(gltests_LIBSOURCES_LIST, [
283 m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
284 for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
285 if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
286 echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
287 exit 1
288 fi
289 done])dnl
290 m4_if(m4_sysval, [0], [],
291 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
292 ])
293 m4_popdef([gltests_LIBSOURCES_DIR])
294 m4_popdef([gltests_LIBSOURCES_LIST])
295 m4_popdef([AC_LIBSOURCES])
296 m4_popdef([AC_REPLACE_FUNCS])
297 m4_popdef([AC_LIBOBJ])
298 AC_CONFIG_COMMANDS_PRE([
299 gltests_libobjs=
300 gltests_ltlibobjs=
301 if test -n "$gltests_LIBOBJS"; then
302 # Remove the extension.
303 sed_drop_objext='s/\.o$//;s/\.obj$//'
304 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
305 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
306 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
307 done
308 fi
309 AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
310 AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
311 ])
312 LIBGNU_LIBDEPS="$gl_libdeps"
313 AC_SUBST([LIBGNU_LIBDEPS])
314 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
315 AC_SUBST([LIBGNU_LTLIBDEPS])
316 ])
317
318 # Like AC_LIBOBJ, except that the module name goes
319 # into gl_LIBOBJS instead of into LIBOBJS.
320 AC_DEFUN([gl_LIBOBJ], [
321 AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
322 gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
323 ])
324
325 # Like AC_REPLACE_FUNCS, except that the module name goes
326 # into gl_LIBOBJS instead of into LIBOBJS.
327 AC_DEFUN([gl_REPLACE_FUNCS], [
328 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
329 AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
330 ])
331
332 # Like AC_LIBSOURCES, except the directory where the source file is
333 # expected is derived from the gnulib-tool parameterization,
334 # and alloca is special cased (for the alloca-opt module).
335 # We could also entirely rely on EXTRA_lib..._SOURCES.
336 AC_DEFUN([gl_LIBSOURCES], [
337 m4_foreach([_gl_NAME], [$1], [
338 m4_if(_gl_NAME, [alloca.c], [], [
339 m4_define([gl_LIBSOURCES_DIR], [lib])
340 m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
341 ])
342 ])
343 ])
344
345 # Like AC_LIBOBJ, except that the module name goes
346 # into gltests_LIBOBJS instead of into LIBOBJS.
347 AC_DEFUN([gltests_LIBOBJ], [
348 AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
349 gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
350 ])
351
352 # Like AC_REPLACE_FUNCS, except that the module name goes
353 # into gltests_LIBOBJS instead of into LIBOBJS.
354 AC_DEFUN([gltests_REPLACE_FUNCS], [
355 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
356 AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
357 ])
358
359 # Like AC_LIBSOURCES, except the directory where the source file is
360 # expected is derived from the gnulib-tool parameterization,
361 # and alloca is special cased (for the alloca-opt module).
362 # We could also entirely rely on EXTRA_lib..._SOURCES.
363 AC_DEFUN([gltests_LIBSOURCES], [
364 m4_foreach([_gl_NAME], [$1], [
365 m4_if(_gl_NAME, [alloca.c], [], [
366 m4_define([gltests_LIBSOURCES_DIR], [tests])
367 m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
368 ])
369 ])
370 ])
371
372 # This macro records the list of files which have been installed by
373 # gnulib-tool and may be removed by future gnulib-tool invocations.
374 AC_DEFUN([gl_FILE_LIST], [
375 doc/fdl.texi
376 lib/_Noreturn.h
377 lib/access.c
378 lib/alloca.c
379 lib/alloca.in.h
380 lib/arg-nonnull.h
381 lib/basename-lgpl.c
382 lib/c++defs.h
383 lib/close.c
384 lib/concat-filename.c
385 lib/concat-filename.h
386 lib/dirname-lgpl.c
387 lib/dirname.h
388 lib/dosname.h
389 lib/dup2.c
390 lib/errno.in.h
391 lib/error.c
392 lib/error.h
393 lib/exitfail.c
394 lib/exitfail.h
395 lib/fcntl.c
396 lib/fcntl.in.h
397 lib/fd-hook.c
398 lib/fd-hook.h
399 lib/filename.h
400 lib/findprog-in.c
401 lib/findprog.h
402 lib/getdtablesize.c
403 lib/getloadavg.c
404 lib/getprogname.c
405 lib/getprogname.h
406 lib/gettext.h
407 lib/intprops.h
408 lib/limits.in.h
409 lib/malloc.c
410 lib/msvc-inval.c
411 lib/msvc-inval.h
412 lib/msvc-nothrow.c
413 lib/msvc-nothrow.h
414 lib/stdbool.in.h
415 lib/stddef.in.h
416 lib/stdint.in.h
417 lib/stdio.in.h
418 lib/stdlib.in.h
419 lib/stpcpy.c
420 lib/strerror-override.c
421 lib/strerror-override.h
422 lib/strerror.c
423 lib/string.in.h
424 lib/stripslash.c
425 lib/sys_types.in.h
426 lib/unistd.c
427 lib/unistd.in.h
428 lib/verify.h
429 lib/warn-on-use.h
430 lib/xalloc-die.c
431 lib/xalloc-oversized.h
432 lib/xalloc.h
433 lib/xconcat-filename.c
434 lib/xmalloc.c
435 m4/00gnulib.m4
436 m4/absolute-header.m4
437 m4/access.m4
438 m4/alloca.m4
439 m4/asm-underscore.m4
440 m4/close.m4
441 m4/dirname.m4
442 m4/double-slash-root.m4
443 m4/dup2.m4
444 m4/eaccess.m4
445 m4/errno_h.m4
446 m4/error.m4
447 m4/extensions.m4
448 m4/extern-inline.m4
449 m4/fcntl-o.m4
450 m4/fcntl.m4
451 m4/fcntl_h.m4
452 m4/findprog-in.m4
453 m4/getdtablesize.m4
454 m4/getloadavg.m4
455 m4/getprogname.m4
456 m4/gnulib-common.m4
457 m4/host-cpu-c-abi.m4
458 m4/include_next.m4
459 m4/limits-h.m4
460 m4/malloc.m4
461 m4/msvc-inval.m4
462 m4/msvc-nothrow.m4
463 m4/multiarch.m4
464 m4/off_t.m4
465 m4/ssize_t.m4
466 m4/stdbool.m4
467 m4/stddef_h.m4
468 m4/stdint.m4
469 m4/stdio_h.m4
470 m4/stdlib_h.m4
471 m4/stpcpy.m4
472 m4/strerror.m4
473 m4/string_h.m4
474 m4/sys_socket_h.m4
475 m4/sys_types_h.m4
476 m4/unistd_h.m4
477 m4/warn-on-use.m4
478 m4/wchar_t.m4
479 m4/wint_t.m4
480 m4/xalloc.m4
481 ])