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