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