Debian Codegraph @

m4/gnulib-comp.m4

raw
1 # DO NOT EDIT! GENERATED AUTOMATICALLY!
2 # Copyright (C) 2002-2023 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 alloca:
46 # Code from module alloca-opt:
47 # Code from module c99:
48 # Code from module concat-filename:
49 # Code from module extensions:
50 # Code from module fdl:
51 # Code from module filename:
52 # Code from module findprog-in:
53 # Code from module gen-header:
54 # Code from module getloadavg:
55 # Code from module host-cpu-c-abi:
56 # Code from module intprops:
57 # Code from module largefile:
58 AC_REQUIRE([AC_SYS_LARGEFILE])
59 # Code from module make-glob:
60 # Code from module make-macros:
61 # Code from module snippet/warn-on-use:
62 # Code from module std-gnu11:
63 # Code from module stdbool:
64 ])
65
66 # This macro should be invoked from ./configure.ac, in the section
67 # "Check for header files, types and library functions".
68 AC_DEFUN([gl_INIT],
69 [
70 AC_CONFIG_LIBOBJ_DIR([lib])
71 AM_CONDITIONAL([GL_COND_LIBTOOL], [false])
72 gl_cond_libtool=false
73 gl_libdeps=
74 gl_ltlibdeps=
75 gl_m4_base='m4'
76 m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
77 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
78 m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
79 m4_pushdef([gl_LIBSOURCES_LIST], [])
80 m4_pushdef([gl_LIBSOURCES_DIR], [])
81 m4_pushdef([GL_MACRO_PREFIX], [gl])
82 m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL])
83 gl_COMMON
84 gl_source_base='lib'
85 gl_source_base_prefix=
86 gl_FUNC_ALLOCA
87 gl_CONDITIONAL_HEADER([alloca.h])
88 AC_PROG_MKDIR_P
89 gl_FINDPROG_IN
90 gl_STDLIB_H
91 gl_STDLIB_H_REQUIRE_DEFAULTS
92 AC_REQUIRE([AC_CANONICAL_HOST])
93 gl_GETLOADAVG
94 gl_CONDITIONAL([GL_COND_OBJ_GETLOADAVG], [test $HAVE_GETLOADAVG = 0])
95 AM_COND_IF([GL_COND_OBJ_GETLOADAVG], [
96 gl_PREREQ_GETLOADAVG
97 ])
98 gl_STDLIB_MODULE_INDICATOR([getloadavg])
99 AC_REQUIRE([gl_HOST_CPU_C_ABI])
100 AC_REQUIRE([gl_LARGEFILE])
101 # Check the system to see if it provides GNU glob. If not, use our
102 # local version. Also avoid versions of glibc which have symlink bug
103 # https://sourceware.org/bugzilla/show_bug.cgi?id=866 (test from gnulib)
104 AC_CACHE_CHECK([if system libc has working GNU glob], [make_cv_sys_gnu_glob],[
105 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
106 make_check_symlink=yes
107 else
108 make_check_symlink=no
109 fi
110 if test $cross_compiling = yes || test $make_check_symlink = no; then
111 # When cross-compiling or without symlink support, check the version
112 AC_COMPILE_IFELSE(
113 [AC_LANG_PROGRAM(
114 [[#include <features.h>
115 #include <gnu-versions.h>
116 #include <glob.h>
117 #include <fnmatch.h>
118 ]],
119 [[
120 #if _GNU_GLOB_INTERFACE_VERSION == 0
121 GNU glob not available in libc
122 #elif __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 27)
123 GNU glob in libc has dangling symlink bug
124 #endif
125 ]])],
126 [make_cv_sys_gnu_glob=yes],
127 [make_cv_sys_gnu_glob=no])
128 else
129 # Check for GNU glob, and that it handles dangling symlinks properly
130 AC_RUN_IFELSE(
131 [AC_LANG_PROGRAM(
132 [[#include <features.h>
133 #include <gnu-versions.h>
134 #include <glob.h>
135 #include <fnmatch.h>
136 ]],
137 [[
138 #if _GNU_GLOB_INTERFACE_VERSION == 0
139 return 1;
140 #else
141 glob_t found;
142 if (glob ("conf*-globtest", 0, 0, &found) == GLOB_NOMATCH)
143 return 1;
144 globfree (&found);
145 #endif
146 ]])],
147 [make_cv_sys_gnu_glob=yes],
148 [make_cv_sys_gnu_glob=no],
149 [dnl We don't get here.
150 :
151 ])
152 fi
153 test $make_check_symlink = no || rm -f conf$$-globtest
154 ])
155 # Tell automake about this, so it can build the right .c files.
156 AM_CONDITIONAL([USE_SYSTEM_GLOB], [test "$make_cv_sys_gnu_glob" = yes])
157 # Tell build.sh which to use
158 USE_SYSTEM_GLOB="$make_cv_sys_gnu_glob"
159 AC_SUBST([USE_SYSTEM_GLOB])
160 # Check for DOS-style pathnames.
161 pds_AC_DOS_PATHS
162 gl_C_BOOL
163 # End of code from modules
164 m4_ifval(gl_LIBSOURCES_LIST, [
165 m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
166 for gl_file in ]gl_LIBSOURCES_LIST[ ; do
167 if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
168 echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
169 exit 1
170 fi
171 done])dnl
172 m4_if(m4_sysval, [0], [],
173 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
174 ])
175 m4_popdef([GL_MODULE_INDICATOR_PREFIX])
176 m4_popdef([GL_MACRO_PREFIX])
177 m4_popdef([gl_LIBSOURCES_DIR])
178 m4_popdef([gl_LIBSOURCES_LIST])
179 m4_popdef([AC_LIBSOURCES])
180 m4_popdef([AC_REPLACE_FUNCS])
181 m4_popdef([AC_LIBOBJ])
182 AC_CONFIG_COMMANDS_PRE([
183 gl_libobjs=
184 gl_ltlibobjs=
185 gl_libobjdeps=
186 if test -n "$gl_LIBOBJS"; then
187 # Remove the extension.
188 changequote(,)dnl
189 sed_drop_objext='s/\.o$//;s/\.obj$//'
190 sed_dirname1='s,//*,/,g'
191 sed_dirname2='s,\(.\)/$,\1,'
192 sed_dirname3='s,^[^/]*$,.,'
193 sed_dirname4='s,\(.\)/[^/]*$,\1,'
194 sed_basename1='s,.*/,,'
195 changequote([, ])dnl
196 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
197 gl_libobjs="$gl_libobjs $i.$ac_objext"
198 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
199 i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
200 i_base=`echo "$i" | sed -e "$sed_basename1"`
201 gl_libobjdeps="$gl_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
202 done
203 fi
204 AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
205 AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
206 AC_SUBST([gl_LIBOBJDEPS], [$gl_libobjdeps])
207 ])
208 gltests_libdeps=
209 gltests_ltlibdeps=
210 m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
211 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
212 m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
213 m4_pushdef([gltests_LIBSOURCES_LIST], [])
214 m4_pushdef([gltests_LIBSOURCES_DIR], [])
215 m4_pushdef([GL_MACRO_PREFIX], [gltests])
216 m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL])
217 gl_COMMON
218 gl_source_base='tests'
219 gl_source_base_prefix=
220 changequote(,)dnl
221 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
222 changequote([, ])dnl
223 AC_SUBST([gltests_WITNESS])
224 gl_module_indicator_condition=$gltests_WITNESS
225 m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
226 m4_popdef([gl_MODULE_INDICATOR_CONDITION])
227 m4_ifval(gltests_LIBSOURCES_LIST, [
228 m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
229 for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
230 if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
231 echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
232 exit 1
233 fi
234 done])dnl
235 m4_if(m4_sysval, [0], [],
236 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
237 ])
238 m4_popdef([GL_MODULE_INDICATOR_PREFIX])
239 m4_popdef([GL_MACRO_PREFIX])
240 m4_popdef([gltests_LIBSOURCES_DIR])
241 m4_popdef([gltests_LIBSOURCES_LIST])
242 m4_popdef([AC_LIBSOURCES])
243 m4_popdef([AC_REPLACE_FUNCS])
244 m4_popdef([AC_LIBOBJ])
245 AC_CONFIG_COMMANDS_PRE([
246 gltests_libobjs=
247 gltests_ltlibobjs=
248 gltests_libobjdeps=
249 if test -n "$gltests_LIBOBJS"; then
250 # Remove the extension.
251 changequote(,)dnl
252 sed_drop_objext='s/\.o$//;s/\.obj$//'
253 sed_dirname1='s,//*,/,g'
254 sed_dirname2='s,\(.\)/$,\1,'
255 sed_dirname3='s,^[^/]*$,.,'
256 sed_dirname4='s,\(.\)/[^/]*$,\1,'
257 sed_basename1='s,.*/,,'
258 changequote([, ])dnl
259 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
260 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
261 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
262 i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
263 i_base=`echo "$i" | sed -e "$sed_basename1"`
264 gltests_libobjdeps="$gltests_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
265 done
266 fi
267 AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
268 AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
269 AC_SUBST([gltests_LIBOBJDEPS], [$gltests_libobjdeps])
270 ])
271 AC_REQUIRE([gl_CC_GNULIB_WARNINGS])
272 LIBGNU_LIBDEPS="$gl_libdeps"
273 AC_SUBST([LIBGNU_LIBDEPS])
274 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
275 AC_SUBST([LIBGNU_LTLIBDEPS])
276 ])
277
278 # Like AC_LIBOBJ, except that the module name goes
279 # into gl_LIBOBJS instead of into LIBOBJS.
280 AC_DEFUN([gl_LIBOBJ], [
281 AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
282 gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
283 ])
284
285 # Like AC_REPLACE_FUNCS, except that the module name goes
286 # into gl_LIBOBJS instead of into LIBOBJS.
287 AC_DEFUN([gl_REPLACE_FUNCS], [
288 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
289 AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
290 ])
291
292 # Like AC_LIBSOURCES, except the directory where the source file is
293 # expected is derived from the gnulib-tool parameterization,
294 # and alloca is special cased (for the alloca-opt module).
295 # We could also entirely rely on EXTRA_lib..._SOURCES.
296 AC_DEFUN([gl_LIBSOURCES], [
297 m4_foreach([_gl_NAME], [$1], [
298 m4_if(_gl_NAME, [alloca.c], [], [
299 m4_define([gl_LIBSOURCES_DIR], [lib])
300 m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
301 ])
302 ])
303 ])
304
305 # Like AC_LIBOBJ, except that the module name goes
306 # into gltests_LIBOBJS instead of into LIBOBJS.
307 AC_DEFUN([gltests_LIBOBJ], [
308 AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
309 gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
310 ])
311
312 # Like AC_REPLACE_FUNCS, except that the module name goes
313 # into gltests_LIBOBJS instead of into LIBOBJS.
314 AC_DEFUN([gltests_REPLACE_FUNCS], [
315 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
316 AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
317 ])
318
319 # Like AC_LIBSOURCES, except the directory where the source file is
320 # expected is derived from the gnulib-tool parameterization,
321 # and alloca is special cased (for the alloca-opt module).
322 # We could also entirely rely on EXTRA_lib..._SOURCES.
323 AC_DEFUN([gltests_LIBSOURCES], [
324 m4_foreach([_gl_NAME], [$1], [
325 m4_if(_gl_NAME, [alloca.c], [], [
326 m4_define([gltests_LIBSOURCES_DIR], [tests])
327 m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
328 ])
329 ])
330 ])
331
332 # This macro records the list of files which have been installed by
333 # gnulib-tool and may be removed by future gnulib-tool invocations.
334 AC_DEFUN([gl_FILE_LIST], [
335 doc/fdl.texi
336 lib/alloca.c
337 lib/alloca.in.h
338 lib/concat-filename.c
339 lib/concat-filename.h
340 lib/filename.h
341 lib/findprog-in.c
342 lib/findprog.h
343 lib/fnmatch.c
344 lib/fnmatch.in.h
345 lib/getloadavg.c
346 lib/glob.c
347 lib/glob.in.h
348 lib/intprops-internal.h
349 lib/intprops.h
350 lib/warn-on-use.h
351 m4/00gnulib.m4
352 m4/acinclude.m4
353 m4/alloca.m4
354 m4/asm-underscore.m4
355 m4/c-bool.m4
356 m4/dospaths.m4
357 m4/eaccess.m4
358 m4/extensions.m4
359 m4/findprog-in.m4
360 m4/getloadavg.m4
361 m4/gnulib-common.m4
362 m4/host-cpu-c-abi.m4
363 m4/largefile.m4
364 m4/std-gnu11.m4
365 m4/warn-on-use.m4
366 m4/zzgnulib.m4
367 ])