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