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