1 # DO NOT EDIT! GENERATED AUTOMATICALLY!
2 # Copyright (C) 2002-2024 Free Software Foundation, Inc.
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.
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.
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/>.
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.
22 # Generated by gnulib-tool.
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
31 # This macro should be invoked from gettext-runtime/libasprintf/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.
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
42 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
43 AC_REQUIRE([gl_PROG_AR_RANLIB])
45 # Code from module absolute-header:
46 # Code from module alloca:
47 # Code from module alloca-opt:
48 # Code from module assert-h:
49 # Code from module attribute:
50 # Code from module errno:
51 # Code from module extensions:
52 # Code from module extern-inline:
53 # Code from module float:
54 # Code from module free-posix:
55 # Code from module gen-header:
56 # Code from module include_next:
57 # Code from module inttypes-incomplete:
58 # Code from module limits-h:
59 # Code from module manywarnings:
60 # Code from module mbszero:
61 # Code from module memchr:
62 # Code from module multiarch:
63 # Code from module size_max:
64 # Code from module snippet/_Noreturn:
65 # Code from module snippet/arg-nonnull:
66 # Code from module snippet/c++defs:
67 # Code from module snippet/warn-on-use:
68 # Code from module ssize_t:
69 # Code from module stddef:
70 # Code from module stdint:
71 # Code from module stdio:
73 # Code from module stdlib:
74 # Code from module string:
75 # Code from module sys_types:
76 # Code from module unistd:
77 # Code from module vasnprintf:
78 # Code from module warnings:
79 # Code from module wchar:
80 # Code from module xsize:
83 # This macro should be invoked from gettext-runtime/libasprintf/configure.ac, in the section
84 # "Check for header files, types and library functions".
87 AC_CONFIG_LIBOBJ_DIR([gnulib-lib])
88 AM_CONDITIONAL([GL_COND_LIBTOOL], [true])
90 gl_m4_base='gnulib-m4'
91 m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
92 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
93 m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
94 m4_pushdef([gl_LIBSOURCES_LIST], [])
95 m4_pushdef([gl_LIBSOURCES_DIR], [])
96 m4_pushdef([GL_MACRO_PREFIX], [gl])
97 m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL])
99 gl_source_base='gnulib-lib'
100 gl_source_base_prefix=
102 LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
106 gl_CONDITIONAL_HEADER([alloca.h])
109 gl_CONDITIONAL_HEADER([assert.h])
112 gl_CONDITIONAL_HEADER([errno.h])
114 AC_REQUIRE([gl_EXTERN_INLINE])
116 gl_CONDITIONAL_HEADER([float.h])
118 gl_CONDITIONAL([GL_COND_OBJ_FLOAT], [test $REPLACE_FLOAT_LDBL = 1])
119 gl_CONDITIONAL([GL_COND_OBJ_ITOLD], [test $REPLACE_ITOLD = 1])
121 gl_CONDITIONAL([GL_COND_OBJ_FREE], [test $REPLACE_FREE = 1])
122 AM_COND_IF([GL_COND_OBJ_FREE], [
125 gl_STDLIB_MODULE_INDICATOR([free-posix])
126 gl_INTTYPES_INCOMPLETE
127 gl_INTTYPES_H_REQUIRE_DEFAULTS
130 gl_CONDITIONAL_HEADER([limits.h])
132 AC_REQUIRE([AC_TYPE_MBSTATE_T])
135 gl_WCHAR_MODULE_INDICATOR([mbszero])
137 gl_CONDITIONAL([GL_COND_OBJ_MEMCHR], [test $REPLACE_MEMCHR = 1])
138 AM_COND_IF([GL_COND_OBJ_MEMCHR], [
141 gl_STRING_MODULE_INDICATOR([memchr])
146 gl_STDDEF_H_REQUIRE_DEFAULTS
147 gl_CONDITIONAL_HEADER([stddef.h])
150 gl_CONDITIONAL_HEADER([stdint.h])
151 dnl Because of gl_REPLACE_LIMITS_H:
152 gl_CONDITIONAL_HEADER([limits.h])
155 gl_STDIO_H_REQUIRE_DEFAULTS
157 gl_CONDITIONAL([GL_COND_OBJ_STDIO_READ], [test $REPLACE_STDIO_READ_FUNCS = 1])
158 gl_CONDITIONAL([GL_COND_OBJ_STDIO_WRITE], [test $REPLACE_STDIO_WRITE_FUNCS = 1])
159 dnl No need to create extra modules for these functions. Everyone who uses
160 dnl <stdio.h> likely needs them.
161 gl_STDIO_MODULE_INDICATOR([fscanf])
162 gl_MODULE_INDICATOR([fscanf])
163 gl_STDIO_MODULE_INDICATOR([scanf])
164 gl_MODULE_INDICATOR([scanf])
165 gl_STDIO_MODULE_INDICATOR([fgetc])
166 gl_STDIO_MODULE_INDICATOR([getc])
167 gl_STDIO_MODULE_INDICATOR([getchar])
168 gl_STDIO_MODULE_INDICATOR([fgets])
169 gl_STDIO_MODULE_INDICATOR([fread])
170 dnl No need to create extra modules for these functions. Everyone who uses
171 dnl <stdio.h> likely needs them.
172 gl_STDIO_MODULE_INDICATOR([fprintf])
173 gl_STDIO_MODULE_INDICATOR([printf])
174 gl_STDIO_MODULE_INDICATOR([vfprintf])
175 gl_STDIO_MODULE_INDICATOR([vprintf])
176 gl_STDIO_MODULE_INDICATOR([fputc])
177 gl_STDIO_MODULE_INDICATOR([putc])
178 gl_STDIO_MODULE_INDICATOR([putchar])
179 gl_STDIO_MODULE_INDICATOR([fputs])
180 gl_STDIO_MODULE_INDICATOR([puts])
181 gl_STDIO_MODULE_INDICATOR([fwrite])
183 gl_STDLIB_H_REQUIRE_DEFAULTS
186 gl_STRING_H_REQUIRE_DEFAULTS
189 gl_SYS_TYPES_H_REQUIRE_DEFAULTS
192 gl_UNISTD_H_REQUIRE_DEFAULTS
194 AC_REQUIRE([AC_C_RESTRICT])
197 gl_WCHAR_H_REQUIRE_DEFAULTS
200 # End of code from modules
201 m4_ifval(gl_LIBSOURCES_LIST, [
202 m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
203 for gl_file in ]gl_LIBSOURCES_LIST[ ; do
204 if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
205 echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
209 m4_if(m4_sysval, [0], [],
210 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
212 m4_popdef([GL_MODULE_INDICATOR_PREFIX])
213 m4_popdef([GL_MACRO_PREFIX])
214 m4_popdef([gl_LIBSOURCES_DIR])
215 m4_popdef([gl_LIBSOURCES_LIST])
216 m4_popdef([AC_LIBSOURCES])
217 m4_popdef([AC_REPLACE_FUNCS])
218 m4_popdef([AC_LIBOBJ])
219 AC_CONFIG_COMMANDS_PRE([
223 if test -n "$gl_LIBOBJS"; then
224 # Remove the extension.
226 sed_drop_objext='s/\.o$//;s/\.obj$//'
227 sed_dirname1='s,//*,/,g'
228 sed_dirname2='s,\(.\)/$,\1,'
229 sed_dirname3='s,^[^/]*$,.,'
230 sed_dirname4='s,\(.\)/[^/]*$,\1,'
231 sed_basename1='s,.*/,,'
233 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
234 gl_libobjs="$gl_libobjs $i.$ac_objext"
235 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
236 i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
237 i_base=`echo "$i" | sed -e "$sed_basename1"`
238 gl_libobjdeps="$gl_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Plo"
241 AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
242 AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
243 AC_SUBST([gl_LIBOBJDEPS], [$gl_libobjdeps])
247 m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
248 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
249 m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
250 m4_pushdef([gltests_LIBSOURCES_LIST], [])
251 m4_pushdef([gltests_LIBSOURCES_DIR], [])
252 m4_pushdef([GL_MACRO_PREFIX], [gltests])
253 m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL])
255 gl_source_base='tests'
256 gl_source_base_prefix=
258 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
260 AC_SUBST([gltests_WITNESS])
261 gl_module_indicator_condition=$gltests_WITNESS
262 m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
263 m4_popdef([gl_MODULE_INDICATOR_CONDITION])
264 m4_ifval(gltests_LIBSOURCES_LIST, [
265 m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
266 for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
267 if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
268 echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
272 m4_if(m4_sysval, [0], [],
273 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
275 m4_popdef([GL_MODULE_INDICATOR_PREFIX])
276 m4_popdef([GL_MACRO_PREFIX])
277 m4_popdef([gltests_LIBSOURCES_DIR])
278 m4_popdef([gltests_LIBSOURCES_LIST])
279 m4_popdef([AC_LIBSOURCES])
280 m4_popdef([AC_REPLACE_FUNCS])
281 m4_popdef([AC_LIBOBJ])
282 AC_CONFIG_COMMANDS_PRE([
286 if test -n "$gltests_LIBOBJS"; then
287 # Remove the extension.
289 sed_drop_objext='s/\.o$//;s/\.obj$//'
290 sed_dirname1='s,//*,/,g'
291 sed_dirname2='s,\(.\)/$,\1,'
292 sed_dirname3='s,^[^/]*$,.,'
293 sed_dirname4='s,\(.\)/[^/]*$,\1,'
294 sed_basename1='s,.*/,,'
296 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
297 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
298 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
299 i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
300 i_base=`echo "$i" | sed -e "$sed_basename1"`
301 gltests_libobjdeps="$gltests_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Plo"
304 AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
305 AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
306 AC_SUBST([gltests_LIBOBJDEPS], [$gltests_libobjdeps])
308 AC_REQUIRE([gl_CC_GNULIB_WARNINGS])
311 # Like AC_LIBOBJ, except that the module name goes
312 # into gl_LIBOBJS instead of into LIBOBJS.
313 AC_DEFUN([gl_LIBOBJ], [
314 AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
315 gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
318 # Like AC_REPLACE_FUNCS, except that the module name goes
319 # into gl_LIBOBJS instead of into LIBOBJS.
320 AC_DEFUN([gl_REPLACE_FUNCS], [
321 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
322 AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
325 # Like AC_LIBSOURCES, except the directory where the source file is
326 # expected is derived from the gnulib-tool parameterization,
327 # and alloca is special cased (for the alloca-opt module).
328 # We could also entirely rely on EXTRA_lib..._SOURCES.
329 AC_DEFUN([gl_LIBSOURCES], [
330 m4_foreach([_gl_NAME], [$1], [
331 m4_if(_gl_NAME, [alloca.c], [], [
332 m4_define([gl_LIBSOURCES_DIR], [gnulib-lib])
333 m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
338 # Like AC_LIBOBJ, except that the module name goes
339 # into gltests_LIBOBJS instead of into LIBOBJS.
340 AC_DEFUN([gltests_LIBOBJ], [
341 AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
342 gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
345 # Like AC_REPLACE_FUNCS, except that the module name goes
346 # into gltests_LIBOBJS instead of into LIBOBJS.
347 AC_DEFUN([gltests_REPLACE_FUNCS], [
348 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
349 AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
352 # Like AC_LIBSOURCES, except the directory where the source file is
353 # expected is derived from the gnulib-tool parameterization,
354 # and alloca is special cased (for the alloca-opt module).
355 # We could also entirely rely on EXTRA_lib..._SOURCES.
356 AC_DEFUN([gltests_LIBSOURCES], [
357 m4_foreach([_gl_NAME], [$1], [
358 m4_if(_gl_NAME, [alloca.c], [], [
359 m4_define([gltests_LIBSOURCES_DIR], [tests])
360 m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
365 # This macro records the list of files which have been installed by
366 # gnulib-tool and may be removed by future gnulib-tool invocations.
367 AC_DEFUN([gl_FILE_LIST], [
410 m4/absolute-header.m4
429 m4/manywarnings-c++.m4