4c779a05ea23c3f1a83c6ccd355c6dbe2959a934
[platform/upstream/groff.git] / src / libs / gnulib / m4 / gnulib-comp.m4
1 # DO NOT EDIT! GENERATED AUTOMATICALLY!
2 # Copyright (C) 2002-2014  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 <http://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 src/libs/gnulib/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   AC_REQUIRE([gl_PROG_AR_RANLIB])
41   AC_REQUIRE([AM_PROG_CC_C_O])
42   # Code from module configmake:
43   # Code from module extensions:
44   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
45   # Code from module extern-inline:
46   # Code from module include_next:
47   # Code from module localcharset:
48   # Code from module multiarch:
49   # Code from module snippet/arg-nonnull:
50   # Code from module snippet/c++defs:
51   # Code from module snippet/warn-on-use:
52   # Code from module stddef:
53   # Code from module stdint:
54   # Code from module streq:
55   # Code from module unitypes:
56   # Code from module uniwidth/base:
57   # Code from module uniwidth/width:
58   # Code from module wchar:
59   # Code from module wctype-h:
60   # Code from module wcwidth:
61 ])
62
63 # This macro should be invoked from src/libs/gnulib/configure.ac, in the section
64 # "Check for header files, types and library functions".
65 AC_DEFUN([gl_INIT],
66 [
67   AM_CONDITIONAL([GL_COND_LIBTOOL], [false])
68   gl_cond_libtool=false
69   gl_libdeps=
70   gl_ltlibdeps=
71   gl_m4_base='m4'
72   m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
73   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
74   m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
75   m4_pushdef([gl_LIBSOURCES_LIST], [])
76   m4_pushdef([gl_LIBSOURCES_DIR], [])
77   gl_COMMON
78   gl_source_base='lib'
79   gl_CONFIGMAKE_PREP
80   AC_REQUIRE([gl_EXTERN_INLINE])
81   gl_LOCALCHARSET
82   LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
83   AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
84   gl_MULTIARCH
85   gl_STDDEF_H
86   gl_STDINT_H
87   gl_LIBUNISTRING_LIBHEADER([0.9], [unitypes.h])
88   gl_LIBUNISTRING_LIBHEADER([0.9], [uniwidth.h])
89   gl_LIBUNISTRING_MODULE([0.9.4], [uniwidth/width])
90   gl_WCHAR_H
91   gl_WCTYPE_H
92   gl_FUNC_WCWIDTH
93   if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
94     AC_LIBOBJ([wcwidth])
95   fi
96   gl_WCHAR_MODULE_INDICATOR([wcwidth])
97   # End of code from modules
98   m4_ifval(gl_LIBSOURCES_LIST, [
99     m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
100       for gl_file in ]gl_LIBSOURCES_LIST[ ; do
101         if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
102           echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
103           exit 1
104         fi
105       done])dnl
106       m4_if(m4_sysval, [0], [],
107         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
108   ])
109   m4_popdef([gl_LIBSOURCES_DIR])
110   m4_popdef([gl_LIBSOURCES_LIST])
111   m4_popdef([AC_LIBSOURCES])
112   m4_popdef([AC_REPLACE_FUNCS])
113   m4_popdef([AC_LIBOBJ])
114   AC_CONFIG_COMMANDS_PRE([
115     gl_libobjs=
116     gl_ltlibobjs=
117     if test -n "$gl_LIBOBJS"; then
118       # Remove the extension.
119       sed_drop_objext='s/\.o$//;s/\.obj$//'
120       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
121         gl_libobjs="$gl_libobjs $i.$ac_objext"
122         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
123       done
124     fi
125     AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
126     AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
127   ])
128   gltests_libdeps=
129   gltests_ltlibdeps=
130   m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
131   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
132   m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
133   m4_pushdef([gltests_LIBSOURCES_LIST], [])
134   m4_pushdef([gltests_LIBSOURCES_DIR], [])
135   gl_COMMON
136   gl_source_base='tests'
137 changequote(,)dnl
138   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
139 changequote([, ])dnl
140   AC_SUBST([gltests_WITNESS])
141   gl_module_indicator_condition=$gltests_WITNESS
142   m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
143   m4_popdef([gl_MODULE_INDICATOR_CONDITION])
144   m4_ifval(gltests_LIBSOURCES_LIST, [
145     m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
146       for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
147         if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
148           echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
149           exit 1
150         fi
151       done])dnl
152       m4_if(m4_sysval, [0], [],
153         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
154   ])
155   m4_popdef([gltests_LIBSOURCES_DIR])
156   m4_popdef([gltests_LIBSOURCES_LIST])
157   m4_popdef([AC_LIBSOURCES])
158   m4_popdef([AC_REPLACE_FUNCS])
159   m4_popdef([AC_LIBOBJ])
160   AC_CONFIG_COMMANDS_PRE([
161     gltests_libobjs=
162     gltests_ltlibobjs=
163     if test -n "$gltests_LIBOBJS"; then
164       # Remove the extension.
165       sed_drop_objext='s/\.o$//;s/\.obj$//'
166       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
167         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
168         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
169       done
170     fi
171     AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
172     AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
173   ])
174   LIBGNU_LIBDEPS="$gl_libdeps"
175   AC_SUBST([LIBGNU_LIBDEPS])
176   LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
177   AC_SUBST([LIBGNU_LTLIBDEPS])
178 ])
179
180 # Like AC_LIBOBJ, except that the module name goes
181 # into gl_LIBOBJS instead of into LIBOBJS.
182 AC_DEFUN([gl_LIBOBJ], [
183   AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
184   gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
185 ])
186
187 # Like AC_REPLACE_FUNCS, except that the module name goes
188 # into gl_LIBOBJS instead of into LIBOBJS.
189 AC_DEFUN([gl_REPLACE_FUNCS], [
190   m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
191   AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
192 ])
193
194 # Like AC_LIBSOURCES, except the directory where the source file is
195 # expected is derived from the gnulib-tool parameterization,
196 # and alloca is special cased (for the alloca-opt module).
197 # We could also entirely rely on EXTRA_lib..._SOURCES.
198 AC_DEFUN([gl_LIBSOURCES], [
199   m4_foreach([_gl_NAME], [$1], [
200     m4_if(_gl_NAME, [alloca.c], [], [
201       m4_define([gl_LIBSOURCES_DIR], [lib])
202       m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
203     ])
204   ])
205 ])
206
207 # Like AC_LIBOBJ, except that the module name goes
208 # into gltests_LIBOBJS instead of into LIBOBJS.
209 AC_DEFUN([gltests_LIBOBJ], [
210   AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
211   gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
212 ])
213
214 # Like AC_REPLACE_FUNCS, except that the module name goes
215 # into gltests_LIBOBJS instead of into LIBOBJS.
216 AC_DEFUN([gltests_REPLACE_FUNCS], [
217   m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
218   AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
219 ])
220
221 # Like AC_LIBSOURCES, except the directory where the source file is
222 # expected is derived from the gnulib-tool parameterization,
223 # and alloca is special cased (for the alloca-opt module).
224 # We could also entirely rely on EXTRA_lib..._SOURCES.
225 AC_DEFUN([gltests_LIBSOURCES], [
226   m4_foreach([_gl_NAME], [$1], [
227     m4_if(_gl_NAME, [alloca.c], [], [
228       m4_define([gltests_LIBSOURCES_DIR], [tests])
229       m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
230     ])
231   ])
232 ])
233
234 # This macro records the list of files which have been installed by
235 # gnulib-tool and may be removed by future gnulib-tool invocations.
236 AC_DEFUN([gl_FILE_LIST], [
237   build-aux/snippet/arg-nonnull.h
238   build-aux/snippet/c++defs.h
239   build-aux/snippet/warn-on-use.h
240   lib/config.charset
241   lib/localcharset.c
242   lib/localcharset.h
243   lib/ref-add.sin
244   lib/ref-del.sin
245   lib/stddef.in.h
246   lib/stdint.in.h
247   lib/streq.h
248   lib/unitypes.in.h
249   lib/uniwidth.in.h
250   lib/uniwidth/cjk.h
251   lib/uniwidth/width.c
252   lib/wchar.in.h
253   lib/wctype-h.c
254   lib/wctype.in.h
255   lib/wcwidth.c
256   m4/00gnulib.m4
257   m4/codeset.m4
258   m4/configmake.m4
259   m4/extensions.m4
260   m4/extern-inline.m4
261   m4/fcntl-o.m4
262   m4/glibc21.m4
263   m4/gnulib-common.m4
264   m4/include_next.m4
265   m4/libunistring-base.m4
266   m4/localcharset.m4
267   m4/longlong.m4
268   m4/multiarch.m4
269   m4/onceonly.m4
270   m4/stddef_h.m4
271   m4/stdint.m4
272   m4/warn-on-use.m4
273   m4/wchar_h.m4
274   m4/wchar_t.m4
275   m4/wctype_h.m4
276   m4/wcwidth.m4
277   m4/wint_t.m4
278 ])