Merge from mainline.
[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 arg-nonnull:
30 # Code from module c++defs:
31 # Code from module crypto/md5:
32 # Code from module dosname:
33 # Code from module dtoastr:
34 # Code from module extensions:
35 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
36 # Code from module filemode:
37 # Code from module getloadavg:
38 # Code from module getopt-gnu:
39 # Code from module getopt-posix:
40 # Code from module gettext-h:
41 # Code from module ignore-value:
42 # Code from module include_next:
43 # Code from module intprops:
44 # Code from module lstat:
45 # Code from module mktime:
46 # Code from module multiarch:
47 # Code from module readlink:
48 # Code from module stat:
49 # Code from module stdbool:
50 # Code from module stddef:
51 # Code from module stdint:
52 # Code from module stdlib:
53 # Code from module strftime:
54 # Code from module symlink:
55 # Code from module sys_stat:
56 # Code from module time:
57 # Code from module time_r:
58 # Code from module unistd:
59 # Code from module warn-on-use:
60 ])
61
62 # This macro should be invoked from ./configure.in, in the section
63 # "Check for header files, types and library functions".
64 AC_DEFUN([gl_INIT],
65 [
66 AM_CONDITIONAL([GL_COND_LIBTOOL], [false])
67 gl_cond_libtool=false
68 gl_libdeps=
69 gl_ltlibdeps=
70 gl_m4_base='m4'
71 m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
72 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
73 m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
74 m4_pushdef([gl_LIBSOURCES_LIST], [])
75 m4_pushdef([gl_LIBSOURCES_DIR], [])
76 gl_COMMON
77 gl_source_base='lib'
78 # Code from module arg-nonnull:
79 # Code from module c++defs:
80 # Code from module crypto/md5:
81 gl_MD5
82 # Code from module dosname:
83 # Code from module dtoastr:
84 AC_REQUIRE([gl_C99_STRTOLD])
85 # Code from module extensions:
86 # Code from module filemode:
87 gl_FILEMODE
88 # Code from module getloadavg:
89 gl_GETLOADAVG([$gl_source_base])
90 gl_STDLIB_MODULE_INDICATOR([getloadavg])
91 # Code from module getopt-gnu:
92 gl_FUNC_GETOPT_GNU
93 gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
94 # Code from module getopt-posix:
95 gl_FUNC_GETOPT_POSIX
96 # Code from module gettext-h:
97 AC_SUBST([LIBINTL])
98 AC_SUBST([LTLIBINTL])
99 # Code from module ignore-value:
100 AC_REQUIRE([AC_C_INLINE])
101 # Code from module include_next:
102 # Code from module intprops:
103 # Code from module lstat:
104 gl_FUNC_LSTAT
105 gl_SYS_STAT_MODULE_INDICATOR([lstat])
106 # Code from module mktime:
107 gl_FUNC_MKTIME
108 gl_TIME_MODULE_INDICATOR([mktime])
109 # Code from module multiarch:
110 gl_MULTIARCH
111 # Code from module readlink:
112 gl_FUNC_READLINK
113 gl_UNISTD_MODULE_INDICATOR([readlink])
114 # Code from module stat:
115 gl_FUNC_STAT
116 gl_SYS_STAT_MODULE_INDICATOR([stat])
117 # Code from module stdbool:
118 AM_STDBOOL_H
119 # Code from module stddef:
120 gl_STDDEF_H
121 # Code from module stdint:
122 gl_STDINT_H
123 # Code from module stdlib:
124 gl_STDLIB_H
125 # Code from module strftime:
126 gl_FUNC_GNU_STRFTIME
127 # Code from module symlink:
128 gl_FUNC_SYMLINK
129 gl_UNISTD_MODULE_INDICATOR([symlink])
130 # Code from module sys_stat:
131 gl_HEADER_SYS_STAT_H
132 AC_PROG_MKDIR_P
133 # Code from module time:
134 gl_HEADER_TIME_H
135 # Code from module time_r:
136 gl_TIME_R
137 gl_TIME_MODULE_INDICATOR([time_r])
138 # Code from module unistd:
139 gl_UNISTD_H
140 # Code from module warn-on-use:
141 # End of code from modules
142 m4_ifval(gl_LIBSOURCES_LIST, [
143 m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
144 for gl_file in ]gl_LIBSOURCES_LIST[ ; do
145 if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
146 echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
147 exit 1
148 fi
149 done])dnl
150 m4_if(m4_sysval, [0], [],
151 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
152 ])
153 m4_popdef([gl_LIBSOURCES_DIR])
154 m4_popdef([gl_LIBSOURCES_LIST])
155 m4_popdef([AC_LIBSOURCES])
156 m4_popdef([AC_REPLACE_FUNCS])
157 m4_popdef([AC_LIBOBJ])
158 AC_CONFIG_COMMANDS_PRE([
159 gl_libobjs=
160 gl_ltlibobjs=
161 if test -n "$gl_LIBOBJS"; then
162 # Remove the extension.
163 sed_drop_objext='s/\.o$//;s/\.obj$//'
164 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
165 gl_libobjs="$gl_libobjs $i.$ac_objext"
166 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
167 done
168 fi
169 AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
170 AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
171 ])
172 gltests_libdeps=
173 gltests_ltlibdeps=
174 m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
175 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
176 m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
177 m4_pushdef([gltests_LIBSOURCES_LIST], [])
178 m4_pushdef([gltests_LIBSOURCES_DIR], [])
179 gl_COMMON
180 gl_source_base='tests'
181 changequote(,)dnl
182 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
183 changequote([, ])dnl
184 AC_SUBST([gltests_WITNESS])
185 gl_module_indicator_condition=$gltests_WITNESS
186 m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
187 m4_popdef([gl_MODULE_INDICATOR_CONDITION])
188 m4_ifval(gltests_LIBSOURCES_LIST, [
189 m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
190 for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
191 if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
192 echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
193 exit 1
194 fi
195 done])dnl
196 m4_if(m4_sysval, [0], [],
197 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
198 ])
199 m4_popdef([gltests_LIBSOURCES_DIR])
200 m4_popdef([gltests_LIBSOURCES_LIST])
201 m4_popdef([AC_LIBSOURCES])
202 m4_popdef([AC_REPLACE_FUNCS])
203 m4_popdef([AC_LIBOBJ])
204 AC_CONFIG_COMMANDS_PRE([
205 gltests_libobjs=
206 gltests_ltlibobjs=
207 if test -n "$gltests_LIBOBJS"; then
208 # Remove the extension.
209 sed_drop_objext='s/\.o$//;s/\.obj$//'
210 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
211 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
212 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
213 done
214 fi
215 AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
216 AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
217 ])
218 LIBGNU_LIBDEPS="$gl_libdeps"
219 AC_SUBST([LIBGNU_LIBDEPS])
220 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
221 AC_SUBST([LIBGNU_LTLIBDEPS])
222 ])
223
224 # Like AC_LIBOBJ, except that the module name goes
225 # into gl_LIBOBJS instead of into LIBOBJS.
226 AC_DEFUN([gl_LIBOBJ], [
227 AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
228 gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
229 ])
230
231 # Like AC_REPLACE_FUNCS, except that the module name goes
232 # into gl_LIBOBJS instead of into LIBOBJS.
233 AC_DEFUN([gl_REPLACE_FUNCS], [
234 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
235 AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
236 ])
237
238 # Like AC_LIBSOURCES, except the directory where the source file is
239 # expected is derived from the gnulib-tool parameterization,
240 # and alloca is special cased (for the alloca-opt module).
241 # We could also entirely rely on EXTRA_lib..._SOURCES.
242 AC_DEFUN([gl_LIBSOURCES], [
243 m4_foreach([_gl_NAME], [$1], [
244 m4_if(_gl_NAME, [alloca.c], [], [
245 m4_define([gl_LIBSOURCES_DIR], [lib])
246 m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
247 ])
248 ])
249 ])
250
251 # Like AC_LIBOBJ, except that the module name goes
252 # into gltests_LIBOBJS instead of into LIBOBJS.
253 AC_DEFUN([gltests_LIBOBJ], [
254 AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
255 gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
256 ])
257
258 # Like AC_REPLACE_FUNCS, except that the module name goes
259 # into gltests_LIBOBJS instead of into LIBOBJS.
260 AC_DEFUN([gltests_REPLACE_FUNCS], [
261 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
262 AC_CHECK_FUNCS([$1], , [gltests_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([gltests_LIBSOURCES], [
270 m4_foreach([_gl_NAME], [$1], [
271 m4_if(_gl_NAME, [alloca.c], [], [
272 m4_define([gltests_LIBSOURCES_DIR], [tests])
273 m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
274 ])
275 ])
276 ])
277
278 # This macro records the list of files which have been installed by
279 # gnulib-tool and may be removed by future gnulib-tool invocations.
280 AC_DEFUN([gl_FILE_LIST], [
281 build-aux/arg-nonnull.h
282 build-aux/c++defs.h
283 build-aux/warn-on-use.h
284 lib/dosname.h
285 lib/dtoastr.c
286 lib/filemode.c
287 lib/filemode.h
288 lib/ftoastr.c
289 lib/ftoastr.h
290 lib/getloadavg.c
291 lib/getopt.c
292 lib/getopt.in.h
293 lib/getopt1.c
294 lib/getopt_int.h
295 lib/gettext.h
296 lib/ignore-value.h
297 lib/intprops.h
298 lib/lstat.c
299 lib/md5.c
300 lib/md5.h
301 lib/mktime-internal.h
302 lib/mktime.c
303 lib/readlink.c
304 lib/stat.c
305 lib/stdbool.in.h
306 lib/stddef.in.h
307 lib/stdint.in.h
308 lib/stdlib.in.h
309 lib/strftime.c
310 lib/strftime.h
311 lib/symlink.c
312 lib/sys_stat.in.h
313 lib/time.in.h
314 lib/time_r.c
315 lib/unistd.in.h
316 m4/00gnulib.m4
317 m4/c-strtod.m4
318 m4/extensions.m4
319 m4/filemode.m4
320 m4/getloadavg.m4
321 m4/getopt.m4
322 m4/gnulib-common.m4
323 m4/include_next.m4
324 m4/longlong.m4
325 m4/lstat.m4
326 m4/md5.m4
327 m4/mktime.m4
328 m4/multiarch.m4
329 m4/readlink.m4
330 m4/st_dm_mode.m4
331 m4/stat.m4
332 m4/stdbool.m4
333 m4/stddef_h.m4
334 m4/stdint.m4
335 m4/stdlib_h.m4
336 m4/strftime.m4
337 m4/symlink.m4
338 m4/sys_stat_h.m4
339 m4/time_h.m4
340 m4/time_r.m4
341 m4/tm_gmtoff.m4
342 m4/unistd_h.m4
343 m4/warn-on-use.m4
344 m4/wchar_t.m4
345 ])