* Makefile.in (GNULIB_TOOL_FLAG): Add --conditional-dependencies.
[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 AC_CHECK_FUNCS_ONCE([readlinkat])
88 gl_MD5
89 AC_REQUIRE([gl_C99_STRTOLD])
90 gl_FILEMODE
91 gl_GETLOADAVG([$gl_source_base])
92 gl_STDLIB_MODULE_INDICATOR([getloadavg])
93 gl_FUNC_GETOPT_GNU
94 gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
95 gl_FUNC_GETOPT_POSIX
96 AC_REQUIRE([AC_C_INLINE])
97 gl_INTTYPES_INCOMPLETE
98 gl_FUNC_LSTAT
99 gl_SYS_STAT_MODULE_INDICATOR([lstat])
100 gl_FUNC_MKTIME
101 gl_TIME_MODULE_INDICATOR([mktime])
102 gl_MULTIARCH
103 gl_FUNC_READLINK
104 gl_UNISTD_MODULE_INDICATOR([readlink])
105 gl_TYPE_SOCKLEN_T
106 gt_TYPE_SSIZE_T
107 AM_STDBOOL_H
108 gl_STDDEF_H
109 gl_STDINT_H
110 gl_STDIO_H
111 gl_STDLIB_H
112 gl_FUNC_GNU_STRFTIME
113 gl_FUNC_STRTOUMAX
114 gl_INTTYPES_MODULE_INDICATOR([strtoumax])
115 gl_FUNC_SYMLINK
116 gl_UNISTD_MODULE_INDICATOR([symlink])
117 gl_HEADER_SYS_STAT_H
118 AC_PROG_MKDIR_P
119 gl_HEADER_TIME_H
120 gl_TIME_R
121 gl_TIME_MODULE_INDICATOR([time_r])
122 gl_UNISTD_H
123 gl_gnulib_enabled_dosname=false
124 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
125 gl_gnulib_enabled_stat=false
126 gl_gnulib_enabled_strtoull=false
127 gl_gnulib_enabled_verify=false
128 func_gl_gnulib_m4code_dosname ()
129 {
130 if ! $gl_gnulib_enabled_dosname; then
131 gl_gnulib_enabled_dosname=true
132 fi
133 }
134 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
135 {
136 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
137 AC_SUBST([LIBINTL])
138 AC_SUBST([LTLIBINTL])
139 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
140 fi
141 }
142 func_gl_gnulib_m4code_stat ()
143 {
144 if ! $gl_gnulib_enabled_stat; then
145 gl_FUNC_STAT
146 gl_SYS_STAT_MODULE_INDICATOR([stat])
147 gl_gnulib_enabled_stat=true
148 if $condition; then
149 func_gl_gnulib_m4code_dosname
150 fi
151 fi
152 }
153 func_gl_gnulib_m4code_strtoull ()
154 {
155 if ! $gl_gnulib_enabled_strtoull; then
156 gl_FUNC_STRTOULL
157 gl_STDLIB_MODULE_INDICATOR([strtoull])
158 gl_gnulib_enabled_strtoull=true
159 fi
160 }
161 func_gl_gnulib_m4code_verify ()
162 {
163 if ! $gl_gnulib_enabled_verify; then
164 gl_gnulib_enabled_verify=true
165 fi
166 }
167 if test $GNULIB_UNISTD_H_GETOPT = 1; then
168 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
169 fi
170 if test $REPLACE_LSTAT = 1; then
171 func_gl_gnulib_m4code_dosname
172 fi
173 if test $REPLACE_LSTAT = 1; then
174 func_gl_gnulib_m4code_stat
175 fi
176 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
177 func_gl_gnulib_m4code_stat
178 fi
179 if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then
180 func_gl_gnulib_m4code_verify
181 fi
182 if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
183 func_gl_gnulib_m4code_strtoull
184 fi
185 m4_pattern_allow([^gl_GNULIB_ENABLED_])
186 AM_CONDITIONAL([gl_GNULIB_ENABLED_dosname], [$gl_gnulib_enabled_dosname])
187 AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [$gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36])
188 AM_CONDITIONAL([gl_GNULIB_ENABLED_stat], [$gl_gnulib_enabled_stat])
189 AM_CONDITIONAL([gl_GNULIB_ENABLED_strtoull], [$gl_gnulib_enabled_strtoull])
190 AM_CONDITIONAL([gl_GNULIB_ENABLED_verify], [$gl_gnulib_enabled_verify])
191 # End of code from modules
192 m4_ifval(gl_LIBSOURCES_LIST, [
193 m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
194 for gl_file in ]gl_LIBSOURCES_LIST[ ; do
195 if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
196 echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
197 exit 1
198 fi
199 done])dnl
200 m4_if(m4_sysval, [0], [],
201 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
202 ])
203 m4_popdef([gl_LIBSOURCES_DIR])
204 m4_popdef([gl_LIBSOURCES_LIST])
205 m4_popdef([AC_LIBSOURCES])
206 m4_popdef([AC_REPLACE_FUNCS])
207 m4_popdef([AC_LIBOBJ])
208 AC_CONFIG_COMMANDS_PRE([
209 gl_libobjs=
210 gl_ltlibobjs=
211 if test -n "$gl_LIBOBJS"; then
212 # Remove the extension.
213 sed_drop_objext='s/\.o$//;s/\.obj$//'
214 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
215 gl_libobjs="$gl_libobjs $i.$ac_objext"
216 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
217 done
218 fi
219 AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
220 AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
221 ])
222 gltests_libdeps=
223 gltests_ltlibdeps=
224 m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
225 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
226 m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
227 m4_pushdef([gltests_LIBSOURCES_LIST], [])
228 m4_pushdef([gltests_LIBSOURCES_DIR], [])
229 gl_COMMON
230 gl_source_base='tests'
231 changequote(,)dnl
232 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
233 changequote([, ])dnl
234 AC_SUBST([gltests_WITNESS])
235 gl_module_indicator_condition=$gltests_WITNESS
236 m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
237 m4_pattern_allow([^gl_GNULIB_ENABLED_])
238 m4_popdef([gl_MODULE_INDICATOR_CONDITION])
239 m4_ifval(gltests_LIBSOURCES_LIST, [
240 m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
241 for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
242 if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
243 echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
244 exit 1
245 fi
246 done])dnl
247 m4_if(m4_sysval, [0], [],
248 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
249 ])
250 m4_popdef([gltests_LIBSOURCES_DIR])
251 m4_popdef([gltests_LIBSOURCES_LIST])
252 m4_popdef([AC_LIBSOURCES])
253 m4_popdef([AC_REPLACE_FUNCS])
254 m4_popdef([AC_LIBOBJ])
255 AC_CONFIG_COMMANDS_PRE([
256 gltests_libobjs=
257 gltests_ltlibobjs=
258 if test -n "$gltests_LIBOBJS"; then
259 # Remove the extension.
260 sed_drop_objext='s/\.o$//;s/\.obj$//'
261 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
262 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
263 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
264 done
265 fi
266 AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
267 AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
268 ])
269 LIBGNU_LIBDEPS="$gl_libdeps"
270 AC_SUBST([LIBGNU_LIBDEPS])
271 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
272 AC_SUBST([LIBGNU_LTLIBDEPS])
273 ])
274
275 # Like AC_LIBOBJ, except that the module name goes
276 # into gl_LIBOBJS instead of into LIBOBJS.
277 AC_DEFUN([gl_LIBOBJ], [
278 AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
279 gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
280 ])
281
282 # Like AC_REPLACE_FUNCS, except that the module name goes
283 # into gl_LIBOBJS instead of into LIBOBJS.
284 AC_DEFUN([gl_REPLACE_FUNCS], [
285 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
286 AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
287 ])
288
289 # Like AC_LIBSOURCES, except the directory where the source file is
290 # expected is derived from the gnulib-tool parameterization,
291 # and alloca is special cased (for the alloca-opt module).
292 # We could also entirely rely on EXTRA_lib..._SOURCES.
293 AC_DEFUN([gl_LIBSOURCES], [
294 m4_foreach([_gl_NAME], [$1], [
295 m4_if(_gl_NAME, [alloca.c], [], [
296 m4_define([gl_LIBSOURCES_DIR], [lib])
297 m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
298 ])
299 ])
300 ])
301
302 # Like AC_LIBOBJ, except that the module name goes
303 # into gltests_LIBOBJS instead of into LIBOBJS.
304 AC_DEFUN([gltests_LIBOBJ], [
305 AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
306 gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
307 ])
308
309 # Like AC_REPLACE_FUNCS, except that the module name goes
310 # into gltests_LIBOBJS instead of into LIBOBJS.
311 AC_DEFUN([gltests_REPLACE_FUNCS], [
312 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
313 AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
314 ])
315
316 # Like AC_LIBSOURCES, except the directory where the source file is
317 # expected is derived from the gnulib-tool parameterization,
318 # and alloca is special cased (for the alloca-opt module).
319 # We could also entirely rely on EXTRA_lib..._SOURCES.
320 AC_DEFUN([gltests_LIBSOURCES], [
321 m4_foreach([_gl_NAME], [$1], [
322 m4_if(_gl_NAME, [alloca.c], [], [
323 m4_define([gltests_LIBSOURCES_DIR], [tests])
324 m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
325 ])
326 ])
327 ])
328
329 # This macro records the list of files which have been installed by
330 # gnulib-tool and may be removed by future gnulib-tool invocations.
331 AC_DEFUN([gl_FILE_LIST], [
332 build-aux/arg-nonnull.h
333 build-aux/c++defs.h
334 build-aux/warn-on-use.h
335 lib/allocator.c
336 lib/allocator.h
337 lib/careadlinkat.c
338 lib/careadlinkat.h
339 lib/dosname.h
340 lib/dtoastr.c
341 lib/filemode.c
342 lib/filemode.h
343 lib/ftoastr.c
344 lib/ftoastr.h
345 lib/getloadavg.c
346 lib/getopt.c
347 lib/getopt.in.h
348 lib/getopt1.c
349 lib/getopt_int.h
350 lib/gettext.h
351 lib/ignore-value.h
352 lib/intprops.h
353 lib/inttypes.in.h
354 lib/lstat.c
355 lib/md5.c
356 lib/md5.h
357 lib/mktime-internal.h
358 lib/mktime.c
359 lib/readlink.c
360 lib/stat.c
361 lib/stdbool.in.h
362 lib/stddef.in.h
363 lib/stdint.in.h
364 lib/stdio.in.h
365 lib/stdlib.in.h
366 lib/strftime.c
367 lib/strftime.h
368 lib/strtoimax.c
369 lib/strtol.c
370 lib/strtoul.c
371 lib/strtoull.c
372 lib/strtoumax.c
373 lib/symlink.c
374 lib/sys_stat.in.h
375 lib/time.in.h
376 lib/time_r.c
377 lib/unistd.in.h
378 lib/verify.h
379 m4/00gnulib.m4
380 m4/c-strtod.m4
381 m4/extensions.m4
382 m4/filemode.m4
383 m4/getloadavg.m4
384 m4/getopt.m4
385 m4/gnulib-common.m4
386 m4/include_next.m4
387 m4/inttypes.m4
388 m4/longlong.m4
389 m4/lstat.m4
390 m4/md5.m4
391 m4/mktime.m4
392 m4/multiarch.m4
393 m4/readlink.m4
394 m4/socklen.m4
395 m4/ssize_t.m4
396 m4/st_dm_mode.m4
397 m4/stat.m4
398 m4/stdbool.m4
399 m4/stddef_h.m4
400 m4/stdint.m4
401 m4/stdio_h.m4
402 m4/stdlib_h.m4
403 m4/strftime.m4
404 m4/strtoull.m4
405 m4/strtoumax.m4
406 m4/symlink.m4
407 m4/sys_stat_h.m4
408 m4/time_h.m4
409 m4/time_r.m4
410 m4/tm_gmtoff.m4
411 m4/unistd_h.m4
412 m4/warn-on-use.m4
413 m4/wchar_t.m4
414 ])