Debian Codegraph @

gnulib/m4/gnulib-comp.m4

raw
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 alloca-opt:
47 # Code from module assert-h:
48 # Code from module c99:
49 # Code from module dirent:
50 # Code from module environ:
51 # Code from module extensions:
52 # Code from module extern-inline:
53 # Code from module free-posix:
54 # Code from module gen-header:
55 # Code from module idx:
56 # Code from module include_next:
57 # Code from module inttypes-incomplete:
58 # Code from module lib-msvc-compat:
59 # Code from module limits-h:
60 # Code from module malloc-gnu:
61 # Code from module malloc-posix:
62 # Code from module malloca:
63 # Code from module multiarch:
64 # Code from module realloc-posix:
65 # Code from module setenv:
66 # Code from module snippet/_Noreturn:
67 # Code from module snippet/arg-nonnull:
68 # Code from module snippet/c++defs:
69 # Code from module snippet/warn-on-use:
70 # Code from module ssize_t:
71 # Code from module std-gnu11:
72 # Code from module stdbool:
73 # Code from module stdckdint:
74 # Code from module stddef:
75 # Code from module stdint:
76 # Code from module stdlib:
77 # Code from module strcase:
78 # Code from module string:
79 # Code from module strings:
80 # Code from module strndup:
81 # Code from module strnlen:
82 # Code from module sys_types:
83 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
84 # Code from module unistd:
85 # Code from module wchar:
86 # Code from module xalloc-oversized:
87 ])
88
89 # This macro should be invoked from ./configure.ac, in the section
90 # "Check for header files, types and library functions".
91 AC_DEFUN([gl_INIT],
92 [
93 AM_CONDITIONAL([GL_COND_LIBTOOL], [true])
94 gl_cond_libtool=true
95 gl_m4_base='gnulib/m4'
96 m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
97 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
98 m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
99 m4_pushdef([gl_LIBSOURCES_LIST], [])
100 m4_pushdef([gl_LIBSOURCES_DIR], [])
101 m4_pushdef([GL_MACRO_PREFIX], [gl])
102 m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL])
103 gl_COMMON
104 gl_source_base='gnulib'
105 gl_source_base_prefix=
106 gl_FUNC_ALLOCA
107 gl_CONDITIONAL_HEADER([alloca.h])
108 AC_PROG_MKDIR_P
109 gl_ASSERT_H
110 gl_CONDITIONAL_HEADER([assert.h])
111 AC_PROG_MKDIR_P
112 gl_DIRENT_H
113 gl_DIRENT_H_REQUIRE_DEFAULTS
114 AC_PROG_MKDIR_P
115 gl_ENVIRON
116 gl_UNISTD_MODULE_INDICATOR([environ])
117 AC_REQUIRE([gl_EXTERN_INLINE])
118 gl_FUNC_FREE
119 gl_CONDITIONAL([GL_COND_OBJ_FREE], [test $REPLACE_FREE = 1])
120 AM_COND_IF([GL_COND_OBJ_FREE], [
121 gl_PREREQ_FREE
122 ])
123 gl_STDLIB_MODULE_INDICATOR([free-posix])
124 gl_INTTYPES_INCOMPLETE
125 gl_INTTYPES_H_REQUIRE_DEFAULTS
126 AC_PROG_MKDIR_P
127 gl_LD_OUTPUT_DEF
128 gl_LIMITS_H
129 gl_CONDITIONAL_HEADER([limits.h])
130 AC_PROG_MKDIR_P
131 gl_FUNC_MALLOC_GNU
132 if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 1; then
133 AC_LIBOBJ([malloc])
134 fi
135 gl_STDLIB_MODULE_INDICATOR([malloc-gnu])
136 AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
137 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
138 AC_LIBOBJ([malloc])
139 fi
140 gl_STDLIB_MODULE_INDICATOR([malloc-posix])
141 gl_MALLOCA
142 gl_MULTIARCH
143 gl_FUNC_REALLOC_POSIX
144 if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then
145 AC_LIBOBJ([realloc])
146 fi
147 gl_STDLIB_MODULE_INDICATOR([realloc-posix])
148 gl_FUNC_SETENV
149 gl_CONDITIONAL([GL_COND_OBJ_SETENV],
150 [test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1])
151 gl_STDLIB_MODULE_INDICATOR([setenv])
152 gt_TYPE_SSIZE_T
153 gl_C_BOOL
154 AC_CHECK_HEADERS_ONCE([stdckdint.h])
155 if test $ac_cv_header_stdckdint_h = yes; then
156 GL_GENERATE_STDCKDINT_H=false
157 else
158 GL_GENERATE_STDCKDINT_H=true
159 fi
160 gl_CONDITIONAL_HEADER([stdckdint.h])
161 AC_PROG_MKDIR_P
162 gl_STDDEF_H
163 gl_STDDEF_H_REQUIRE_DEFAULTS
164 gl_CONDITIONAL_HEADER([stddef.h])
165 AC_PROG_MKDIR_P
166 gl_STDINT_H
167 gl_CONDITIONAL_HEADER([stdint.h])
168 dnl Because of gl_REPLACE_LIMITS_H:
169 gl_CONDITIONAL_HEADER([limits.h])
170 AC_PROG_MKDIR_P
171 gl_STDLIB_H
172 gl_STDLIB_H_REQUIRE_DEFAULTS
173 AC_PROG_MKDIR_P
174 gl_STRCASE
175 gl_CONDITIONAL([GL_COND_OBJ_STRCASECMP], [test $HAVE_STRCASECMP = 0])
176 AM_COND_IF([GL_COND_OBJ_STRCASECMP], [
177 gl_PREREQ_STRCASECMP
178 ])
179 gl_CONDITIONAL([GL_COND_OBJ_STRNCASECMP], [test $HAVE_STRNCASECMP = 0])
180 AM_COND_IF([GL_COND_OBJ_STRNCASECMP], [
181 gl_PREREQ_STRNCASECMP
182 ])
183 gl_STRING_H
184 gl_STRING_H_REQUIRE_DEFAULTS
185 AC_PROG_MKDIR_P
186 gl_STRINGS_H
187 gl_STRINGS_H_REQUIRE_DEFAULTS
188 AC_PROG_MKDIR_P
189 gl_FUNC_STRNDUP
190 gl_CONDITIONAL([GL_COND_OBJ_STRNDUP],
191 [test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1])
192 gl_STRING_MODULE_INDICATOR([strndup])
193 gl_FUNC_STRNLEN
194 gl_CONDITIONAL([GL_COND_OBJ_STRNLEN],
195 [test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1])
196 AM_COND_IF([GL_COND_OBJ_STRNLEN], [
197 gl_PREREQ_STRNLEN
198 ])
199 gl_STRING_MODULE_INDICATOR([strnlen])
200 gl_SYS_TYPES_H
201 gl_SYS_TYPES_H_REQUIRE_DEFAULTS
202 AC_PROG_MKDIR_P
203 gl_UNISTD_H
204 gl_UNISTD_H_REQUIRE_DEFAULTS
205 AC_PROG_MKDIR_P
206 gl_WCHAR_H
207 gl_WCHAR_H_REQUIRE_DEFAULTS
208 AC_PROG_MKDIR_P
209 # End of code from modules
210 m4_ifval(gl_LIBSOURCES_LIST, [
211 m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
212 for gl_file in ]gl_LIBSOURCES_LIST[ ; do
213 if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
214 echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
215 exit 1
216 fi
217 done])dnl
218 m4_if(m4_sysval, [0], [],
219 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
220 ])
221 m4_popdef([GL_MODULE_INDICATOR_PREFIX])
222 m4_popdef([GL_MACRO_PREFIX])
223 m4_popdef([gl_LIBSOURCES_DIR])
224 m4_popdef([gl_LIBSOURCES_LIST])
225 m4_popdef([AC_LIBSOURCES])
226 m4_popdef([AC_REPLACE_FUNCS])
227 m4_popdef([AC_LIBOBJ])
228 AC_CONFIG_COMMANDS_PRE([
229 gl_libobjs=
230 gl_ltlibobjs=
231 gl_libobjdeps=
232 if test -n "$gl_LIBOBJS"; then
233 # Remove the extension.
234 changequote(,)dnl
235 sed_drop_objext='s/\.o$//;s/\.obj$//'
236 sed_dirname1='s,//*,/,g'
237 sed_dirname2='s,\(.\)/$,\1,'
238 sed_dirname3='s,^[^/]*$,.,'
239 sed_dirname4='s,\(.\)/[^/]*$,\1,'
240 sed_basename1='s,.*/,,'
241 changequote([, ])dnl
242 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
243 gl_libobjs="$gl_libobjs $i.$ac_objext"
244 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
245 i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
246 i_base=`echo "$i" | sed -e "$sed_basename1"`
247 gl_libobjdeps="$gl_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Plo"
248 done
249 fi
250 AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
251 AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
252 AC_SUBST([gl_LIBOBJDEPS], [$gl_libobjdeps])
253 ])
254 gltests_libdeps=
255 gltests_ltlibdeps=
256 m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
257 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
258 m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
259 m4_pushdef([gltests_LIBSOURCES_LIST], [])
260 m4_pushdef([gltests_LIBSOURCES_DIR], [])
261 m4_pushdef([GL_MACRO_PREFIX], [gltests])
262 m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL])
263 gl_COMMON
264 gl_source_base='tests'
265 gl_source_base_prefix=
266 changequote(,)dnl
267 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
268 changequote([, ])dnl
269 AC_SUBST([gltests_WITNESS])
270 gl_module_indicator_condition=$gltests_WITNESS
271 m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
272 m4_popdef([gl_MODULE_INDICATOR_CONDITION])
273 m4_ifval(gltests_LIBSOURCES_LIST, [
274 m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
275 for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
276 if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
277 echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
278 exit 1
279 fi
280 done])dnl
281 m4_if(m4_sysval, [0], [],
282 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
283 ])
284 m4_popdef([GL_MODULE_INDICATOR_PREFIX])
285 m4_popdef([GL_MACRO_PREFIX])
286 m4_popdef([gltests_LIBSOURCES_DIR])
287 m4_popdef([gltests_LIBSOURCES_LIST])
288 m4_popdef([AC_LIBSOURCES])
289 m4_popdef([AC_REPLACE_FUNCS])
290 m4_popdef([AC_LIBOBJ])
291 AC_CONFIG_COMMANDS_PRE([
292 gltests_libobjs=
293 gltests_ltlibobjs=
294 gltests_libobjdeps=
295 if test -n "$gltests_LIBOBJS"; then
296 # Remove the extension.
297 changequote(,)dnl
298 sed_drop_objext='s/\.o$//;s/\.obj$//'
299 sed_dirname1='s,//*,/,g'
300 sed_dirname2='s,\(.\)/$,\1,'
301 sed_dirname3='s,^[^/]*$,.,'
302 sed_dirname4='s,\(.\)/[^/]*$,\1,'
303 sed_basename1='s,.*/,,'
304 changequote([, ])dnl
305 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
306 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
307 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
308 i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
309 i_base=`echo "$i" | sed -e "$sed_basename1"`
310 gltests_libobjdeps="$gltests_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Plo"
311 done
312 fi
313 AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
314 AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
315 AC_SUBST([gltests_LIBOBJDEPS], [$gltests_libobjdeps])
316 ])
317 AC_REQUIRE([gl_CC_GNULIB_WARNINGS])
318 ])
319
320 # Like AC_LIBOBJ, except that the module name goes
321 # into gl_LIBOBJS instead of into LIBOBJS.
322 AC_DEFUN([gl_LIBOBJ], [
323 AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
324 gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
325 ])
326
327 # Like AC_REPLACE_FUNCS, except that the module name goes
328 # into gl_LIBOBJS instead of into LIBOBJS.
329 AC_DEFUN([gl_REPLACE_FUNCS], [
330 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
331 AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
332 ])
333
334 # Like AC_LIBSOURCES, except the directory where the source file is
335 # expected is derived from the gnulib-tool parameterization,
336 # and alloca is special cased (for the alloca-opt module).
337 # We could also entirely rely on EXTRA_lib..._SOURCES.
338 AC_DEFUN([gl_LIBSOURCES], [
339 m4_foreach([_gl_NAME], [$1], [
340 m4_if(_gl_NAME, [alloca.c], [], [
341 m4_define([gl_LIBSOURCES_DIR], [gnulib])
342 m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
343 ])
344 ])
345 ])
346
347 # Like AC_LIBOBJ, except that the module name goes
348 # into gltests_LIBOBJS instead of into LIBOBJS.
349 AC_DEFUN([gltests_LIBOBJ], [
350 AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
351 gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
352 ])
353
354 # Like AC_REPLACE_FUNCS, except that the module name goes
355 # into gltests_LIBOBJS instead of into LIBOBJS.
356 AC_DEFUN([gltests_REPLACE_FUNCS], [
357 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
358 AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
359 ])
360
361 # Like AC_LIBSOURCES, except the directory where the source file is
362 # expected is derived from the gnulib-tool parameterization,
363 # and alloca is special cased (for the alloca-opt module).
364 # We could also entirely rely on EXTRA_lib..._SOURCES.
365 AC_DEFUN([gltests_LIBSOURCES], [
366 m4_foreach([_gl_NAME], [$1], [
367 m4_if(_gl_NAME, [alloca.c], [], [
368 m4_define([gltests_LIBSOURCES_DIR], [tests])
369 m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
370 ])
371 ])
372 ])
373
374 # This macro records the list of files which have been installed by
375 # gnulib-tool and may be removed by future gnulib-tool invocations.
376 AC_DEFUN([gl_FILE_LIST], [
377 lib/_Noreturn.h
378 lib/alloca.in.h
379 lib/arg-nonnull.h
380 lib/assert.in.h
381 lib/c++defs.h
382 lib/dirent.in.h
383 lib/free.c
384 lib/idx.h
385 lib/intprops-internal.h
386 lib/inttypes.in.h
387 lib/limits.in.h
388 lib/malloc.c
389 lib/malloca.c
390 lib/malloca.h
391 lib/realloc.c
392 lib/setenv.c
393 lib/stdckdint.in.h
394 lib/stddef.in.h
395 lib/stdint.in.h
396 lib/stdlib.in.h
397 lib/strcasecmp.c
398 lib/string.in.h
399 lib/strings.in.h
400 lib/strncasecmp.c
401 lib/strndup.c
402 lib/strnlen.c
403 lib/sys_types.in.h
404 lib/unistd.c
405 lib/unistd.in.h
406 lib/verify.h
407 lib/warn-on-use.h
408 lib/wchar.in.h
409 lib/xalloc-oversized.h
410 m4/00gnulib.m4
411 m4/absolute-header.m4
412 m4/alloca.m4
413 m4/assert_h.m4
414 m4/c-bool.m4
415 m4/codeset.m4
416 m4/dirent_h.m4
417 m4/eealloc.m4
418 m4/environ.m4
419 m4/extensions.m4
420 m4/extern-inline.m4
421 m4/free.m4
422 m4/gnulib-common.m4
423 m4/include_next.m4
424 m4/inttypes.m4
425 m4/ld-output-def.m4
426 m4/limits-h.m4
427 m4/locale-fr.m4
428 m4/malloc.m4
429 m4/malloca.m4
430 m4/multiarch.m4
431 m4/off64_t.m4
432 m4/off_t.m4
433 m4/pid_t.m4
434 m4/realloc.m4
435 m4/setenv.m4
436 m4/ssize_t.m4
437 m4/std-gnu11.m4
438 m4/stddef_h.m4
439 m4/stdint.m4
440 m4/stdlib_h.m4
441 m4/strcase.m4
442 m4/string_h.m4
443 m4/strings_h.m4
444 m4/strndup.m4
445 m4/strnlen.m4
446 m4/sys_types_h.m4
447 m4/unistd_h.m4
448 m4/warn-on-use.m4
449 m4/wchar_h.m4
450 m4/wint_t.m4
451 m4/zzgnulib.m4
452 ])