Imported Upstream version 1.22.4
[platform/upstream/groff.git] / gnulib_m4 / gnulib-comp.m4
1 # DO NOT EDIT! GENERATED AUTOMATICALLY!
2 # Copyright (C) 2002-2018 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   AC_REQUIRE([AM_PROG_CC_C_O])
46   # Code from module absolute-header:
47   # Code from module alloca-opt:
48   # Code from module errno:
49   # Code from module extensions:
50   # Code from module extern-inline:
51   # Code from module float:
52   # Code from module fpieee:
53   AC_REQUIRE([gl_FP_IEEE])
54   # Code from module fprintf-posix:
55   # Code from module fpucw:
56   # Code from module frexp-nolibm:
57   # Code from module frexpl-nolibm:
58   # Code from module fseterr:
59   # Code from module git-version-gen:
60   # Code from module havelib:
61   # Code from module host-cpu-c-abi:
62   # Code from module include_next:
63   # Code from module isnand-nolibm:
64   # Code from module isnanf-nolibm:
65   # Code from module isnanl-nolibm:
66   # Code from module limits-h:
67   # Code from module localcharset:
68   # Code from module math:
69   # Code from module memchr:
70   # Code from module multiarch:
71   # Code from module nocrash:
72   # Code from module non-recursive-gnulib-prefix-hack:
73   # Code from module printf-frexp:
74   # Code from module printf-frexpl:
75   # Code from module printf-safe:
76   # Code from module signbit:
77   # Code from module size_max:
78   # Code from module snippet/arg-nonnull:
79   # Code from module snippet/c++defs:
80   # Code from module snippet/warn-on-use:
81   # Code from module snprintf:
82   # Code from module ssize_t:
83   # Code from module stddef:
84   # Code from module stdint:
85   # Code from module stdio:
86   # Code from module streq:
87   # Code from module string:
88   # Code from module sys_types:
89   # Code from module unitypes:
90   # Code from module uniwidth/base:
91   # Code from module uniwidth/width:
92   # Code from module vasnprintf:
93   # Code from module verify:
94   # Code from module vsnprintf:
95   # Code from module wchar:
96   # Code from module wctype-h:
97   # Code from module wcwidth:
98   # Code from module xsize:
99 ])
100
101 # This macro should be invoked from ./configure.ac, in the section
102 # "Check for header files, types and library functions".
103 AC_DEFUN([gl_INIT],
104 [
105   AM_CONDITIONAL([GL_COND_LIBTOOL], [false])
106   gl_cond_libtool=false
107   gl_libdeps=
108   gl_ltlibdeps=
109   gl_m4_base='gnulib_m4'
110   m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
111   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
112   m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
113   m4_pushdef([gl_LIBSOURCES_LIST], [])
114   m4_pushdef([gl_LIBSOURCES_DIR], [])
115   gl_COMMON
116   gl_source_base='lib'
117   gl_FUNC_ALLOCA
118   gl_HEADER_ERRNO_H
119   AC_REQUIRE([gl_EXTERN_INLINE])
120   gl_FLOAT_H
121   if test $REPLACE_FLOAT_LDBL = 1; then
122     AC_LIBOBJ([float])
123   fi
124   if test $REPLACE_ITOLD = 1; then
125     AC_LIBOBJ([itold])
126   fi
127   gl_FUNC_FPRINTF_POSIX
128   gl_STDIO_MODULE_INDICATOR([fprintf-posix])
129   gl_FUNC_FREXP_NO_LIBM
130   if test $gl_func_frexp_no_libm != yes; then
131     AC_LIBOBJ([frexp])
132   fi
133   gl_MATH_MODULE_INDICATOR([frexp])
134   gl_FUNC_FREXPL_NO_LIBM
135   if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
136     AC_LIBOBJ([frexpl])
137   fi
138   gl_MATH_MODULE_INDICATOR([frexpl])
139   gl_FUNC_FSETERR
140   if test $ac_cv_func___fseterr = no; then
141     AC_LIBOBJ([fseterr])
142   fi
143   AC_REQUIRE([gl_HOST_CPU_C_ABI])
144   gl_FUNC_ISNAND_NO_LIBM
145   if test $gl_func_isnand_no_libm != yes; then
146     AC_LIBOBJ([isnand])
147     gl_PREREQ_ISNAND
148   fi
149   gl_FUNC_ISNANF_NO_LIBM
150   if test $gl_func_isnanf_no_libm != yes; then
151     AC_LIBOBJ([isnanf])
152     gl_PREREQ_ISNANF
153   fi
154   gl_FUNC_ISNANL_NO_LIBM
155   if test $gl_func_isnanl_no_libm != yes; then
156     AC_LIBOBJ([isnanl])
157     gl_PREREQ_ISNANL
158   fi
159   gl_LIMITS_H
160   gl_LOCALCHARSET
161   dnl For backward compatibility. Some packages still use this.
162   LOCALCHARSET_TESTS_ENVIRONMENT=
163   AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
164   gl_MATH_H
165   gl_FUNC_MEMCHR
166   if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
167     AC_LIBOBJ([memchr])
168     gl_PREREQ_MEMCHR
169   fi
170   gl_STRING_MODULE_INDICATOR([memchr])
171   gl_MULTIARCH
172   dnl Run our hack near the end, just before config.status creation.
173   dnl It must happen late, i.e., after gl_LIBOBJS has been finalized.
174   AC_CONFIG_COMMANDS_PRE([
175     dnl Note we can't currently pass $gl_source_base instead of 'lib',
176     dnl because $gl_source_base is unset or the wrong value in the references
177     dnl generated in m4/non-recursive-gnulib-prefix-hack.m4
178     gl_NON_RECURSIVE_GNULIB_PREFIX_HACK([lib])
179     ])
180   gl_FUNC_PRINTF_FREXP
181   gl_FUNC_PRINTF_FREXPL
182   m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes])
183   gl_SIGNBIT
184   if test $REPLACE_SIGNBIT = 1; then
185     AC_LIBOBJ([signbitf])
186     AC_LIBOBJ([signbitd])
187     AC_LIBOBJ([signbitl])
188   fi
189   gl_MATH_MODULE_INDICATOR([signbit])
190   gl_SIZE_MAX
191   gl_FUNC_SNPRINTF
192   gl_STDIO_MODULE_INDICATOR([snprintf])
193   gl_MODULE_INDICATOR([snprintf])
194   gt_TYPE_SSIZE_T
195   gl_STDDEF_H
196   gl_STDINT_H
197   gl_STDIO_H
198   gl_HEADER_STRING_H
199   gl_SYS_TYPES_H
200   AC_PROG_MKDIR_P
201   gl_LIBUNISTRING_LIBHEADER([0.9.4], [unitypes.h])
202   gl_LIBUNISTRING_LIBHEADER([0.9.4], [uniwidth.h])
203   gl_LIBUNISTRING_MODULE([0.9.8], [uniwidth/width])
204   gl_FUNC_VASNPRINTF
205   gl_FUNC_VSNPRINTF
206   gl_STDIO_MODULE_INDICATOR([vsnprintf])
207   gl_WCHAR_H
208   gl_WCTYPE_H
209   gl_FUNC_WCWIDTH
210   if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
211     AC_LIBOBJ([wcwidth])
212     gl_PREREQ_WCWIDTH
213   fi
214   gl_WCHAR_MODULE_INDICATOR([wcwidth])
215   gl_XSIZE
216   # End of code from modules
217   m4_ifval(gl_LIBSOURCES_LIST, [
218     m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
219       for gl_file in ]gl_LIBSOURCES_LIST[ ; do
220         if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
221           echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
222           exit 1
223         fi
224       done])dnl
225       m4_if(m4_sysval, [0], [],
226         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
227   ])
228   m4_popdef([gl_LIBSOURCES_DIR])
229   m4_popdef([gl_LIBSOURCES_LIST])
230   m4_popdef([AC_LIBSOURCES])
231   m4_popdef([AC_REPLACE_FUNCS])
232   m4_popdef([AC_LIBOBJ])
233   AC_CONFIG_COMMANDS_PRE([
234     gl_libobjs=
235     gl_ltlibobjs=
236     if test -n "$gl_LIBOBJS"; then
237       # Remove the extension.
238       sed_drop_objext='s/\.o$//;s/\.obj$//'
239       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
240         gl_libobjs="$gl_libobjs $i.$ac_objext"
241         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
242       done
243     fi
244     AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
245     AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
246   ])
247   gltests_libdeps=
248   gltests_ltlibdeps=
249   m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
250   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
251   m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
252   m4_pushdef([gltests_LIBSOURCES_LIST], [])
253   m4_pushdef([gltests_LIBSOURCES_DIR], [])
254   gl_COMMON
255   gl_source_base='tests'
256 changequote(,)dnl
257   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
258 changequote([, ])dnl
259   AC_SUBST([gltests_WITNESS])
260   gl_module_indicator_condition=$gltests_WITNESS
261   m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
262   m4_popdef([gl_MODULE_INDICATOR_CONDITION])
263   m4_ifval(gltests_LIBSOURCES_LIST, [
264     m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
265       for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
266         if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
267           echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
268           exit 1
269         fi
270       done])dnl
271       m4_if(m4_sysval, [0], [],
272         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
273   ])
274   m4_popdef([gltests_LIBSOURCES_DIR])
275   m4_popdef([gltests_LIBSOURCES_LIST])
276   m4_popdef([AC_LIBSOURCES])
277   m4_popdef([AC_REPLACE_FUNCS])
278   m4_popdef([AC_LIBOBJ])
279   AC_CONFIG_COMMANDS_PRE([
280     gltests_libobjs=
281     gltests_ltlibobjs=
282     if test -n "$gltests_LIBOBJS"; then
283       # Remove the extension.
284       sed_drop_objext='s/\.o$//;s/\.obj$//'
285       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
286         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
287         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
288       done
289     fi
290     AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
291     AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
292   ])
293   LIBGNU_LIBDEPS="$gl_libdeps"
294   AC_SUBST([LIBGNU_LIBDEPS])
295   LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
296   AC_SUBST([LIBGNU_LTLIBDEPS])
297 ])
298
299 # Like AC_LIBOBJ, except that the module name goes
300 # into gl_LIBOBJS instead of into LIBOBJS.
301 AC_DEFUN([gl_LIBOBJ], [
302   AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
303   gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
304 ])
305
306 # Like AC_REPLACE_FUNCS, except that the module name goes
307 # into gl_LIBOBJS instead of into LIBOBJS.
308 AC_DEFUN([gl_REPLACE_FUNCS], [
309   m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
310   AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
311 ])
312
313 # Like AC_LIBSOURCES, except the directory where the source file is
314 # expected is derived from the gnulib-tool parameterization,
315 # and alloca is special cased (for the alloca-opt module).
316 # We could also entirely rely on EXTRA_lib..._SOURCES.
317 AC_DEFUN([gl_LIBSOURCES], [
318   m4_foreach([_gl_NAME], [$1], [
319     m4_if(_gl_NAME, [alloca.c], [], [
320       m4_define([gl_LIBSOURCES_DIR], [lib])
321       m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
322     ])
323   ])
324 ])
325
326 # Like AC_LIBOBJ, except that the module name goes
327 # into gltests_LIBOBJS instead of into LIBOBJS.
328 AC_DEFUN([gltests_LIBOBJ], [
329   AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
330   gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
331 ])
332
333 # Like AC_REPLACE_FUNCS, except that the module name goes
334 # into gltests_LIBOBJS instead of into LIBOBJS.
335 AC_DEFUN([gltests_REPLACE_FUNCS], [
336   m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
337   AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
338 ])
339
340 # Like AC_LIBSOURCES, except the directory where the source file is
341 # expected is derived from the gnulib-tool parameterization,
342 # and alloca is special cased (for the alloca-opt module).
343 # We could also entirely rely on EXTRA_lib..._SOURCES.
344 AC_DEFUN([gltests_LIBSOURCES], [
345   m4_foreach([_gl_NAME], [$1], [
346     m4_if(_gl_NAME, [alloca.c], [], [
347       m4_define([gltests_LIBSOURCES_DIR], [tests])
348       m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
349     ])
350   ])
351 ])
352
353 # This macro records the list of files which have been installed by
354 # gnulib-tool and may be removed by future gnulib-tool invocations.
355 AC_DEFUN([gl_FILE_LIST], [
356   build-aux/config.rpath
357   build-aux/git-version-gen
358   build-aux/prefix-gnulib-mk
359   lib/alloca.in.h
360   lib/arg-nonnull.h
361   lib/asnprintf.c
362   lib/c++defs.h
363   lib/errno.in.h
364   lib/float+.h
365   lib/float.c
366   lib/float.in.h
367   lib/fprintf.c
368   lib/fpucw.h
369   lib/frexp.c
370   lib/frexpl.c
371   lib/fseterr.c
372   lib/fseterr.h
373   lib/isnan.c
374   lib/isnand-nolibm.h
375   lib/isnand.c
376   lib/isnanf-nolibm.h
377   lib/isnanf.c
378   lib/isnanl-nolibm.h
379   lib/isnanl.c
380   lib/itold.c
381   lib/limits.in.h
382   lib/localcharset.c
383   lib/localcharset.h
384   lib/math.c
385   lib/math.in.h
386   lib/memchr.c
387   lib/memchr.valgrind
388   lib/printf-args.c
389   lib/printf-args.h
390   lib/printf-frexp.c
391   lib/printf-frexp.h
392   lib/printf-frexpl.c
393   lib/printf-frexpl.h
394   lib/printf-parse.c
395   lib/printf-parse.h
396   lib/signbitd.c
397   lib/signbitf.c
398   lib/signbitl.c
399   lib/size_max.h
400   lib/snprintf.c
401   lib/stddef.in.h
402   lib/stdint.in.h
403   lib/stdio-impl.h
404   lib/stdio.in.h
405   lib/streq.h
406   lib/string.in.h
407   lib/sys_types.in.h
408   lib/unitypes.in.h
409   lib/uniwidth.in.h
410   lib/uniwidth/cjk.h
411   lib/uniwidth/width.c
412   lib/vasnprintf.c
413   lib/vasnprintf.h
414   lib/verify.h
415   lib/vsnprintf.c
416   lib/warn-on-use.h
417   lib/wchar.in.h
418   lib/wctype-h.c
419   lib/wctype.in.h
420   lib/wcwidth.c
421   lib/xsize.c
422   lib/xsize.h
423   m4/00gnulib.m4
424   m4/absolute-header.m4
425   m4/alloca.m4
426   m4/asm-underscore.m4
427   m4/codeset.m4
428   m4/errno_h.m4
429   m4/exponentd.m4
430   m4/exponentf.m4
431   m4/exponentl.m4
432   m4/extensions.m4
433   m4/extern-inline.m4
434   m4/float_h.m4
435   m4/fpieee.m4
436   m4/fprintf-posix.m4
437   m4/frexp.m4
438   m4/frexpl.m4
439   m4/fseterr.m4
440   m4/gnulib-common.m4
441   m4/host-cpu-c-abi.m4
442   m4/include_next.m4
443   m4/intmax_t.m4
444   m4/inttypes_h.m4
445   m4/isnand.m4
446   m4/isnanf.m4
447   m4/isnanl.m4
448   m4/ldexpl.m4
449   m4/lib-ld.m4
450   m4/lib-link.m4
451   m4/lib-prefix.m4
452   m4/libunistring-base.m4
453   m4/limits-h.m4
454   m4/localcharset.m4
455   m4/longlong.m4
456   m4/math_h.m4
457   m4/memchr.m4
458   m4/mmap-anon.m4
459   m4/multiarch.m4
460   m4/nocrash.m4
461   m4/non-recursive-gnulib-prefix-hack.m4
462   m4/off_t.m4
463   m4/printf-frexp.m4
464   m4/printf-frexpl.m4
465   m4/printf.m4
466   m4/signbit.m4
467   m4/size_max.m4
468   m4/snprintf.m4
469   m4/ssize_t.m4
470   m4/stddef_h.m4
471   m4/stdint.m4
472   m4/stdint_h.m4
473   m4/stdio_h.m4
474   m4/string_h.m4
475   m4/sys_types_h.m4
476   m4/vasnprintf.m4
477   m4/vsnprintf.m4
478   m4/warn-on-use.m4
479   m4/wchar_h.m4
480   m4/wchar_t.m4
481   m4/wctype_h.m4
482   m4/wcwidth.m4
483   m4/wint_t.m4
484   m4/xsize.m4
485 ])