Update from gnulib.
[bpt/emacs.git] / m4 / gl-comp.m4
1 # DO NOT EDIT! GENERATED AUTOMATICALLY!
2 # Copyright (C) 2002-2011 Free Software Foundation, Inc.
3 #
4 # This file is free software, distributed under the terms of the GNU
5 # General Public License. As a special exception to the GNU General
6 # Public License, this file may be distributed as part of a program
7 # that contains a configuration script generated by Autoconf, under
8 # the same distribution terms as the rest of that program.
9 #
10 # Generated by gnulib-tool.
11 #
12 # This file represents the compiled summary of the specification in
13 # gnulib-cache.m4. It lists the computed macro invocations that need
14 # to be invoked from configure.ac.
15 # In projects that use version control, this file can be treated like
16 # other built files.
17
18
19 # This macro should be invoked from ./configure.in, in the section
20 # "Checks for programs", right after AC_PROG_CC, and certainly before
21 # any checks for libraries, header files, types and library functions.
22 AC_DEFUN([gl_EARLY],
23 [
24 m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace
25 m4_pattern_allow([^gl_ES$])dnl a valid locale name
26 m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
27 m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
28 AC_REQUIRE([AC_PROG_RANLIB])
29 # Code from module allocator:
30 # Code from module arg-nonnull:
31 # Code from module c++defs:
32 # Code from module careadlinkat:
33 # Code from module crypto/md5:
34 # Code from module dosname:
35 # Code from module dtoastr:
36 # Code from module extensions:
37 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
38 # Code from module filemode:
39 # Code from module getloadavg:
40 # Code from module getopt-gnu:
41 # Code from module getopt-posix:
42 # Code from module gettext-h:
43 # Code from module ignore-value:
44 # Code from module include_next:
45 # Code from module intprops:
46 # Code from module inttypes-incomplete:
47 # Code from module lstat:
48 # Code from module mktime:
49 # Code from module multiarch:
50 # Code from module readlink:
51 # Code from module socklen:
52 # Code from module ssize_t:
53 # Code from module stat:
54 # Code from module stdbool:
55 # Code from module stddef:
56 # Code from module stdint:
57 # Code from module stdio:
58 # Code from module stdlib:
59 # Code from module strftime:
60 # Code from module strtoull:
61 # Code from module strtoumax:
62 # Code from module symlink:
63 # Code from module sys_stat:
64 # Code from module time:
65 # Code from module time_r:
66 # Code from module unistd:
67 # Code from module verify:
68 # Code from module warn-on-use:
69 ])
70
71 # This macro should be invoked from ./configure.in, in the section
72 # "Check for header files, types and library functions".
73 AC_DEFUN([gl_INIT],
74 [
75 AM_CONDITIONAL([GL_COND_LIBTOOL], [false])
76 gl_cond_libtool=false
77 gl_libdeps=
78 gl_ltlibdeps=
79 gl_m4_base='m4'
80 m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
81 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
82 m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
83 m4_pushdef([gl_LIBSOURCES_LIST], [])
84 m4_pushdef([gl_LIBSOURCES_DIR], [])
85 gl_COMMON
86 gl_source_base='lib'
87 # Code from module allocator:
88 # Code from module arg-nonnull:
89 # Code from module c++defs:
90 # Code from module careadlinkat:
91 AC_CHECK_FUNCS_ONCE([readlinkat])
92 # Code from module crypto/md5:
93 gl_MD5
94 # Code from module dosname:
95 # Code from module dtoastr:
96 AC_REQUIRE([gl_C99_STRTOLD])
97 # Code from module extensions:
98 # Code from module filemode:
99 gl_FILEMODE
100 # Code from module getloadavg:
101 gl_GETLOADAVG([$gl_source_base])
102 gl_STDLIB_MODULE_INDICATOR([getloadavg])
103 # Code from module getopt-gnu:
104 gl_FUNC_GETOPT_GNU
105 gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
106 # Code from module getopt-posix:
107 gl_FUNC_GETOPT_POSIX
108 # Code from module gettext-h:
109 AC_SUBST([LIBINTL])
110 AC_SUBST([LTLIBINTL])
111 # Code from module ignore-value:
112 AC_REQUIRE([AC_C_INLINE])
113 # Code from module include_next:
114 # Code from module intprops:
115 # Code from module inttypes-incomplete:
116 gl_INTTYPES_INCOMPLETE
117 # Code from module lstat:
118 gl_FUNC_LSTAT
119 gl_SYS_STAT_MODULE_INDICATOR([lstat])
120 # Code from module mktime:
121 gl_FUNC_MKTIME
122 gl_TIME_MODULE_INDICATOR([mktime])
123 # Code from module multiarch:
124 gl_MULTIARCH
125 # Code from module readlink:
126 gl_FUNC_READLINK
127 gl_UNISTD_MODULE_INDICATOR([readlink])
128 # Code from module socklen:
129 gl_TYPE_SOCKLEN_T
130 # Code from module ssize_t:
131 gt_TYPE_SSIZE_T
132 # Code from module stat:
133 gl_FUNC_STAT
134 gl_SYS_STAT_MODULE_INDICATOR([stat])
135 # Code from module stdbool:
136 AM_STDBOOL_H
137 # Code from module stddef:
138 gl_STDDEF_H
139 # Code from module stdint:
140 gl_STDINT_H
141 # Code from module stdio:
142 gl_STDIO_H
143 # Code from module stdlib:
144 gl_STDLIB_H
145 # Code from module strftime:
146 gl_FUNC_GNU_STRFTIME
147 # Code from module strtoull:
148 gl_FUNC_STRTOULL
149 gl_STDLIB_MODULE_INDICATOR([strtoull])
150 # Code from module strtoumax:
151 gl_FUNC_STRTOUMAX
152 gl_INTTYPES_MODULE_INDICATOR([strtoumax])
153 # Code from module symlink:
154 gl_FUNC_SYMLINK
155 gl_UNISTD_MODULE_INDICATOR([symlink])
156 # Code from module sys_stat:
157 gl_HEADER_SYS_STAT_H
158 AC_PROG_MKDIR_P
159 # Code from module time:
160 gl_HEADER_TIME_H
161 # Code from module time_r:
162 gl_TIME_R
163 gl_TIME_MODULE_INDICATOR([time_r])
164 # Code from module unistd:
165 gl_UNISTD_H
166 # Code from module verify:
167 # Code from module warn-on-use:
168 # End of code from modules
169 m4_ifval(gl_LIBSOURCES_LIST, [
170 m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
171 for gl_file in ]gl_LIBSOURCES_LIST[ ; do
172 if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
173 echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
174 exit 1
175 fi
176 done])dnl
177 m4_if(m4_sysval, [0], [],
178 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
179 ])
180 m4_popdef([gl_LIBSOURCES_DIR])
181 m4_popdef([gl_LIBSOURCES_LIST])
182 m4_popdef([AC_LIBSOURCES])
183 m4_popdef([AC_REPLACE_FUNCS])
184 m4_popdef([AC_LIBOBJ])
185 AC_CONFIG_COMMANDS_PRE([
186 gl_libobjs=
187 gl_ltlibobjs=
188 if test -n "$gl_LIBOBJS"; then
189 # Remove the extension.
190 sed_drop_objext='s/\.o$//;s/\.obj$//'
191 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
192 gl_libobjs="$gl_libobjs $i.$ac_objext"
193 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
194 done
195 fi
196 AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
197 AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
198 ])
199 gltests_libdeps=
200 gltests_ltlibdeps=
201 m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
202 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
203 m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
204 m4_pushdef([gltests_LIBSOURCES_LIST], [])
205 m4_pushdef([gltests_LIBSOURCES_DIR], [])
206 gl_COMMON
207 gl_source_base='tests'
208 changequote(,)dnl
209 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
210 changequote([, ])dnl
211 AC_SUBST([gltests_WITNESS])
212 gl_module_indicator_condition=$gltests_WITNESS
213 m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
214 m4_popdef([gl_MODULE_INDICATOR_CONDITION])
215 m4_ifval(gltests_LIBSOURCES_LIST, [
216 m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
217 for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
218 if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
219 echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
220 exit 1
221 fi
222 done])dnl
223 m4_if(m4_sysval, [0], [],
224 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
225 ])
226 m4_popdef([gltests_LIBSOURCES_DIR])
227 m4_popdef([gltests_LIBSOURCES_LIST])
228 m4_popdef([AC_LIBSOURCES])
229 m4_popdef([AC_REPLACE_FUNCS])
230 m4_popdef([AC_LIBOBJ])
231 AC_CONFIG_COMMANDS_PRE([
232 gltests_libobjs=
233 gltests_ltlibobjs=
234 if test -n "$gltests_LIBOBJS"; then
235 # Remove the extension.
236 sed_drop_objext='s/\.o$//;s/\.obj$//'
237 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
238 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
239 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
240 done
241 fi
242 AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
243 AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
244 ])
245 LIBGNU_LIBDEPS="$gl_libdeps"
246 AC_SUBST([LIBGNU_LIBDEPS])
247 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
248 AC_SUBST([LIBGNU_LTLIBDEPS])
249 ])
250
251 # Like AC_LIBOBJ, except that the module name goes
252 # into gl_LIBOBJS instead of into LIBOBJS.
253 AC_DEFUN([gl_LIBOBJ], [
254 AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
255 gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
256 ])
257
258 # Like AC_REPLACE_FUNCS, except that the module name goes
259 # into gl_LIBOBJS instead of into LIBOBJS.
260 AC_DEFUN([gl_REPLACE_FUNCS], [
261 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
262 AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
263 ])
264
265 # Like AC_LIBSOURCES, except the directory where the source file is
266 # expected is derived from the gnulib-tool parameterization,
267 # and alloca is special cased (for the alloca-opt module).
268 # We could also entirely rely on EXTRA_lib..._SOURCES.
269 AC_DEFUN([gl_LIBSOURCES], [
270 m4_foreach([_gl_NAME], [$1], [
271 m4_if(_gl_NAME, [alloca.c], [], [
272 m4_define([gl_LIBSOURCES_DIR], [lib])
273 m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
274 ])
275 ])
276 ])
277
278 # Like AC_LIBOBJ, except that the module name goes
279 # into gltests_LIBOBJS instead of into LIBOBJS.
280 AC_DEFUN([gltests_LIBOBJ], [
281 AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
282 gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
283 ])
284
285 # Like AC_REPLACE_FUNCS, except that the module name goes
286 # into gltests_LIBOBJS instead of into LIBOBJS.
287 AC_DEFUN([gltests_REPLACE_FUNCS], [
288 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
289 AC_CHECK_FUNCS([$1], , [gltests_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([gltests_LIBSOURCES], [
297 m4_foreach([_gl_NAME], [$1], [
298 m4_if(_gl_NAME, [alloca.c], [], [
299 m4_define([gltests_LIBSOURCES_DIR], [tests])
300 m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
301 ])
302 ])
303 ])
304
305 # This macro records the list of files which have been installed by
306 # gnulib-tool and may be removed by future gnulib-tool invocations.
307 AC_DEFUN([gl_FILE_LIST], [
308 build-aux/arg-nonnull.h
309 build-aux/c++defs.h
310 build-aux/warn-on-use.h
311 lib/allocator.c
312 lib/allocator.h
313 lib/careadlinkat.c
314 lib/careadlinkat.h
315 lib/dosname.h
316 lib/dtoastr.c
317 lib/filemode.c
318 lib/filemode.h
319 lib/ftoastr.c
320 lib/ftoastr.h
321 lib/getloadavg.c
322 lib/getopt.c
323 lib/getopt.in.h
324 lib/getopt1.c
325 lib/getopt_int.h
326 lib/gettext.h
327 lib/ignore-value.h
328 lib/intprops.h
329 lib/inttypes.in.h
330 lib/lstat.c
331 lib/md5.c
332 lib/md5.h
333 lib/mktime-internal.h
334 lib/mktime.c
335 lib/readlink.c
336 lib/stat.c
337 lib/stdbool.in.h
338 lib/stddef.in.h
339 lib/stdint.in.h
340 lib/stdio.in.h
341 lib/stdlib.in.h
342 lib/strftime.c
343 lib/strftime.h
344 lib/strtoimax.c
345 lib/strtol.c
346 lib/strtoul.c
347 lib/strtoull.c
348 lib/strtoumax.c
349 lib/symlink.c
350 lib/sys_stat.in.h
351 lib/time.in.h
352 lib/time_r.c
353 lib/unistd.in.h
354 lib/verify.h
355 m4/00gnulib.m4
356 m4/c-strtod.m4
357 m4/extensions.m4
358 m4/filemode.m4
359 m4/getloadavg.m4
360 m4/getopt.m4
361 m4/gnulib-common.m4
362 m4/include_next.m4
363 m4/inttypes.m4
364 m4/longlong.m4
365 m4/lstat.m4
366 m4/md5.m4
367 m4/mktime.m4
368 m4/multiarch.m4
369 m4/readlink.m4
370 m4/socklen.m4
371 m4/ssize_t.m4
372 m4/st_dm_mode.m4
373 m4/stat.m4
374 m4/stdbool.m4
375 m4/stddef_h.m4
376 m4/stdint.m4
377 m4/stdio_h.m4
378 m4/stdlib_h.m4
379 m4/strftime.m4
380 m4/strtoull.m4
381 m4/strtoumax.m4
382 m4/symlink.m4
383 m4/sys_stat_h.m4
384 m4/time_h.m4
385 m4/time_r.m4
386 m4/tm_gmtoff.m4
387 m4/unistd_h.m4
388 m4/warn-on-use.m4
389 m4/wchar_t.m4
390 ])