Handle old buffer display options more faithfully.
[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])
7ec98caf 29 # Code from module allocator:
1fd182f0
PE
30 # Code from module arg-nonnull:
31 # Code from module c++defs:
d1fdcab7 32 # Code from module careadlinkat:
942f733f 33 # Code from module crypto/md5:
13c3daa4 34 # Code from module crypto/sha1:
36f13e16 35 # Code from module dosname:
f737437b 36 # Code from module dtoastr:
1fd182f0
PE
37 # Code from module extensions:
38 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
5fa4ac76 39 # Code from module filemode:
79ab4b7f 40 # Code from module getloadavg:
e275c824
PE
41 # Code from module getopt-gnu:
42 # Code from module getopt-posix:
43 # Code from module gettext-h:
67342916 44 # Code from module ignore-value:
1fd182f0 45 # Code from module include_next:
a451f14b 46 # Code from module intprops:
b6f5355a 47 # Code from module inttypes-incomplete:
ae0d7250 48 # Code from module lstat:
1fd182f0
PE
49 # Code from module mktime:
50 # Code from module multiarch:
ae0d7250 51 # Code from module readlink:
401bf9b4 52 # Code from module socklen:
d1fdcab7 53 # Code from module ssize_t:
ae0d7250 54 # Code from module stat:
c378da0b
PE
55 # Code from module stdarg:
56 dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
57 dnl for the builtin va_copy to work. With Autoconf 2.60 or later,
58 dnl AC_PROG_CC_STDC arranges for this. With older Autoconf AC_PROG_CC_STDC
59 dnl shouldn't hurt, though installers are on their own to set c99 mode.
60 AC_REQUIRE([AC_PROG_CC_STDC])
16c3e636 61 # Code from module stdbool:
1fd182f0 62 # Code from module stddef:
5f90be1b 63 # Code from module stdint:
77185bdf 64 # Code from module stdio:
79ab4b7f 65 # Code from module stdlib:
16c3e636 66 # Code from module strftime:
b6f5355a 67 # Code from module strtoull:
a8a2bb29 68 # Code from module strtoumax:
ae0d7250 69 # Code from module symlink:
5fa4ac76 70 # Code from module sys_stat:
1fd182f0
PE
71 # Code from module time:
72 # Code from module time_r:
e275c824 73 # Code from module unistd:
a8a2bb29 74 # Code from module verify:
1fd182f0 75 # Code from module warn-on-use:
743c80a7
PE
76])
77
78# This macro should be invoked from ./configure.in, in the section
79# "Check for header files, types and library functions".
80AC_DEFUN([gl_INIT],
81[
82 AM_CONDITIONAL([GL_COND_LIBTOOL], [false])
83 gl_cond_libtool=false
84 gl_libdeps=
85 gl_ltlibdeps=
86 gl_m4_base='m4'
87 m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
88 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
89 m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
90 m4_pushdef([gl_LIBSOURCES_LIST], [])
91 m4_pushdef([gl_LIBSOURCES_DIR], [])
92 gl_COMMON
93 gl_source_base='lib'
19548d08
PE
94AC_CHECK_FUNCS_ONCE([readlinkat])
95gl_MD5
13c3daa4 96gl_SHA1
19548d08
PE
97AC_REQUIRE([gl_C99_STRTOLD])
98gl_FILEMODE
6a3e57bb 99gl_GETLOADAVG
8aeb5be9
PE
100if test $HAVE_GETLOADAVG = 0; then
101 AC_LIBOBJ([getloadavg])
102 gl_PREREQ_GETLOADAVG
103fi
19548d08
PE
104gl_STDLIB_MODULE_INDICATOR([getloadavg])
105gl_FUNC_GETOPT_GNU
8aeb5be9
PE
106if test $REPLACE_GETOPT = 1; then
107 AC_LIBOBJ([getopt])
108 AC_LIBOBJ([getopt1])
109 gl_PREREQ_GETOPT
110fi
19548d08
PE
111gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
112gl_FUNC_GETOPT_POSIX
8aeb5be9
PE
113if test $REPLACE_GETOPT = 1; then
114 AC_LIBOBJ([getopt])
115 AC_LIBOBJ([getopt1])
116 gl_PREREQ_GETOPT
117fi
19548d08
PE
118AC_REQUIRE([AC_C_INLINE])
119gl_INTTYPES_INCOMPLETE
120gl_FUNC_LSTAT
8aeb5be9
PE
121if test $REPLACE_LSTAT = 1; then
122 AC_LIBOBJ([lstat])
123 gl_PREREQ_LSTAT
124fi
19548d08
PE
125gl_SYS_STAT_MODULE_INDICATOR([lstat])
126gl_FUNC_MKTIME
8aeb5be9
PE
127if test $REPLACE_MKTIME = 1; then
128 AC_LIBOBJ([mktime])
129 gl_PREREQ_MKTIME
130fi
19548d08
PE
131gl_TIME_MODULE_INDICATOR([mktime])
132gl_MULTIARCH
133gl_FUNC_READLINK
8aeb5be9
PE
134if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
135 AC_LIBOBJ([readlink])
136 gl_PREREQ_READLINK
137fi
19548d08
PE
138gl_UNISTD_MODULE_INDICATOR([readlink])
139gl_TYPE_SOCKLEN_T
140gt_TYPE_SSIZE_T
c378da0b 141gl_STDARG_H
19548d08
PE
142AM_STDBOOL_H
143gl_STDDEF_H
144gl_STDINT_H
145gl_STDIO_H
146gl_STDLIB_H
147gl_FUNC_GNU_STRFTIME
148gl_FUNC_STRTOUMAX
8aeb5be9
PE
149if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then
150 AC_LIBOBJ([strtoumax])
151 gl_PREREQ_STRTOUMAX
152fi
19548d08
PE
153gl_INTTYPES_MODULE_INDICATOR([strtoumax])
154gl_FUNC_SYMLINK
8aeb5be9
PE
155if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
156 AC_LIBOBJ([symlink])
157fi
19548d08
PE
158gl_UNISTD_MODULE_INDICATOR([symlink])
159gl_HEADER_SYS_STAT_H
160AC_PROG_MKDIR_P
161gl_HEADER_TIME_H
162gl_TIME_R
8aeb5be9
PE
163if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
164 AC_LIBOBJ([time_r])
165 gl_PREREQ_TIME_R
166fi
19548d08
PE
167gl_TIME_MODULE_INDICATOR([time_r])
168gl_UNISTD_H
169 gl_gnulib_enabled_dosname=false
170 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
171 gl_gnulib_enabled_stat=false
172 gl_gnulib_enabled_strtoull=false
173 gl_gnulib_enabled_verify=false
174 func_gl_gnulib_m4code_dosname ()
175 {
176 if ! $gl_gnulib_enabled_dosname; then
177 gl_gnulib_enabled_dosname=true
178 fi
179 }
180 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
181 {
182 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
183AC_SUBST([LIBINTL])
184AC_SUBST([LTLIBINTL])
185 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
186 fi
187 }
188 func_gl_gnulib_m4code_stat ()
189 {
190 if ! $gl_gnulib_enabled_stat; then
191gl_FUNC_STAT
8aeb5be9
PE
192if test $REPLACE_STAT = 1; then
193 AC_LIBOBJ([stat])
194 gl_PREREQ_STAT
195fi
19548d08
PE
196gl_SYS_STAT_MODULE_INDICATOR([stat])
197 gl_gnulib_enabled_stat=true
198 if $condition; then
199 func_gl_gnulib_m4code_dosname
200 fi
201 fi
202 }
203 func_gl_gnulib_m4code_strtoull ()
204 {
205 if ! $gl_gnulib_enabled_strtoull; then
206gl_FUNC_STRTOULL
8aeb5be9
PE
207if test $HAVE_STRTOULL = 0; then
208 AC_LIBOBJ([strtoull])
209 gl_PREREQ_STRTOULL
210fi
19548d08
PE
211gl_STDLIB_MODULE_INDICATOR([strtoull])
212 gl_gnulib_enabled_strtoull=true
213 fi
214 }
215 func_gl_gnulib_m4code_verify ()
216 {
217 if ! $gl_gnulib_enabled_verify; then
218 gl_gnulib_enabled_verify=true
219 fi
220 }
8aeb5be9 221 if test $REPLACE_GETOPT = 1; then
19548d08
PE
222 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
223 fi
224 if test $REPLACE_LSTAT = 1; then
225 func_gl_gnulib_m4code_dosname
226 fi
227 if test $REPLACE_LSTAT = 1; then
228 func_gl_gnulib_m4code_stat
229 fi
230 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
231 func_gl_gnulib_m4code_stat
232 fi
233 if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then
234 func_gl_gnulib_m4code_verify
235 fi
236 if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
237 func_gl_gnulib_m4code_strtoull
238 fi
239 m4_pattern_allow([^gl_GNULIB_ENABLED_])
240 AM_CONDITIONAL([gl_GNULIB_ENABLED_dosname], [$gl_gnulib_enabled_dosname])
241 AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [$gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36])
242 AM_CONDITIONAL([gl_GNULIB_ENABLED_stat], [$gl_gnulib_enabled_stat])
243 AM_CONDITIONAL([gl_GNULIB_ENABLED_strtoull], [$gl_gnulib_enabled_strtoull])
244 AM_CONDITIONAL([gl_GNULIB_ENABLED_verify], [$gl_gnulib_enabled_verify])
743c80a7
PE
245 # End of code from modules
246 m4_ifval(gl_LIBSOURCES_LIST, [
247 m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
248 for gl_file in ]gl_LIBSOURCES_LIST[ ; do
249 if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
250 echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
251 exit 1
252 fi
253 done])dnl
254 m4_if(m4_sysval, [0], [],
255 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
256 ])
257 m4_popdef([gl_LIBSOURCES_DIR])
258 m4_popdef([gl_LIBSOURCES_LIST])
259 m4_popdef([AC_LIBSOURCES])
260 m4_popdef([AC_REPLACE_FUNCS])
261 m4_popdef([AC_LIBOBJ])
262 AC_CONFIG_COMMANDS_PRE([
263 gl_libobjs=
264 gl_ltlibobjs=
265 if test -n "$gl_LIBOBJS"; then
266 # Remove the extension.
267 sed_drop_objext='s/\.o$//;s/\.obj$//'
268 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
269 gl_libobjs="$gl_libobjs $i.$ac_objext"
270 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
271 done
272 fi
273 AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
274 AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
275 ])
276 gltests_libdeps=
277 gltests_ltlibdeps=
278 m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
279 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
280 m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
281 m4_pushdef([gltests_LIBSOURCES_LIST], [])
282 m4_pushdef([gltests_LIBSOURCES_DIR], [])
283 gl_COMMON
284 gl_source_base='tests'
285changequote(,)dnl
286 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
287changequote([, ])dnl
288 AC_SUBST([gltests_WITNESS])
289 gl_module_indicator_condition=$gltests_WITNESS
290 m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
19548d08 291 m4_pattern_allow([^gl_GNULIB_ENABLED_])
743c80a7
PE
292 m4_popdef([gl_MODULE_INDICATOR_CONDITION])
293 m4_ifval(gltests_LIBSOURCES_LIST, [
294 m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
295 for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
296 if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
297 echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
298 exit 1
299 fi
300 done])dnl
301 m4_if(m4_sysval, [0], [],
302 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
303 ])
304 m4_popdef([gltests_LIBSOURCES_DIR])
305 m4_popdef([gltests_LIBSOURCES_LIST])
306 m4_popdef([AC_LIBSOURCES])
307 m4_popdef([AC_REPLACE_FUNCS])
308 m4_popdef([AC_LIBOBJ])
309 AC_CONFIG_COMMANDS_PRE([
310 gltests_libobjs=
311 gltests_ltlibobjs=
312 if test -n "$gltests_LIBOBJS"; then
313 # Remove the extension.
314 sed_drop_objext='s/\.o$//;s/\.obj$//'
315 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
316 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
317 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
318 done
319 fi
320 AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
321 AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
322 ])
323 LIBGNU_LIBDEPS="$gl_libdeps"
324 AC_SUBST([LIBGNU_LIBDEPS])
325 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
326 AC_SUBST([LIBGNU_LTLIBDEPS])
327])
328
329# Like AC_LIBOBJ, except that the module name goes
330# into gl_LIBOBJS instead of into LIBOBJS.
331AC_DEFUN([gl_LIBOBJ], [
332 AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
333 gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
334])
335
336# Like AC_REPLACE_FUNCS, except that the module name goes
337# into gl_LIBOBJS instead of into LIBOBJS.
338AC_DEFUN([gl_REPLACE_FUNCS], [
339 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
340 AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
341])
342
343# Like AC_LIBSOURCES, except the directory where the source file is
344# expected is derived from the gnulib-tool parameterization,
345# and alloca is special cased (for the alloca-opt module).
346# We could also entirely rely on EXTRA_lib..._SOURCES.
347AC_DEFUN([gl_LIBSOURCES], [
348 m4_foreach([_gl_NAME], [$1], [
349 m4_if(_gl_NAME, [alloca.c], [], [
350 m4_define([gl_LIBSOURCES_DIR], [lib])
351 m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
352 ])
353 ])
354])
355
356# Like AC_LIBOBJ, except that the module name goes
357# into gltests_LIBOBJS instead of into LIBOBJS.
358AC_DEFUN([gltests_LIBOBJ], [
359 AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
360 gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
361])
362
363# Like AC_REPLACE_FUNCS, except that the module name goes
364# into gltests_LIBOBJS instead of into LIBOBJS.
365AC_DEFUN([gltests_REPLACE_FUNCS], [
366 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
367 AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
368])
369
370# Like AC_LIBSOURCES, except the directory where the source file is
371# expected is derived from the gnulib-tool parameterization,
372# and alloca is special cased (for the alloca-opt module).
373# We could also entirely rely on EXTRA_lib..._SOURCES.
374AC_DEFUN([gltests_LIBSOURCES], [
375 m4_foreach([_gl_NAME], [$1], [
376 m4_if(_gl_NAME, [alloca.c], [], [
377 m4_define([gltests_LIBSOURCES_DIR], [tests])
378 m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
379 ])
380 ])
381])
382
383# This macro records the list of files which have been installed by
384# gnulib-tool and may be removed by future gnulib-tool invocations.
385AC_DEFUN([gl_FILE_LIST], [
1fd182f0
PE
386 build-aux/arg-nonnull.h
387 build-aux/c++defs.h
388 build-aux/warn-on-use.h
7ec98caf 389 lib/allocator.c
d1fdcab7
PE
390 lib/allocator.h
391 lib/careadlinkat.c
392 lib/careadlinkat.h
36f13e16 393 lib/dosname.h
a451f14b 394 lib/dtoastr.c
5fa4ac76
PE
395 lib/filemode.c
396 lib/filemode.h
a451f14b
PE
397 lib/ftoastr.c
398 lib/ftoastr.h
79ab4b7f 399 lib/getloadavg.c
e275c824
PE
400 lib/getopt.c
401 lib/getopt.in.h
402 lib/getopt1.c
403 lib/getopt_int.h
404 lib/gettext.h
67342916 405 lib/ignore-value.h
a451f14b 406 lib/intprops.h
a8a2bb29 407 lib/inttypes.in.h
ae0d7250 408 lib/lstat.c
942f733f
PE
409 lib/md5.c
410 lib/md5.h
1fd182f0
PE
411 lib/mktime-internal.h
412 lib/mktime.c
ae0d7250 413 lib/readlink.c
13c3daa4
LL
414 lib/sha1.c
415 lib/sha1.h
ae0d7250 416 lib/stat.c
c378da0b 417 lib/stdarg.in.h
16c3e636 418 lib/stdbool.in.h
1fd182f0 419 lib/stddef.in.h
5f90be1b 420 lib/stdint.in.h
77185bdf 421 lib/stdio.in.h
79ab4b7f 422 lib/stdlib.in.h
16c3e636
PE
423 lib/strftime.c
424 lib/strftime.h
a8a2bb29
PE
425 lib/strtoimax.c
426 lib/strtol.c
a8a2bb29
PE
427 lib/strtoul.c
428 lib/strtoull.c
429 lib/strtoumax.c
ae0d7250 430 lib/symlink.c
5fa4ac76 431 lib/sys_stat.in.h
1fd182f0
PE
432 lib/time.in.h
433 lib/time_r.c
e275c824 434 lib/unistd.in.h
a8a2bb29 435 lib/verify.h
743c80a7 436 m4/00gnulib.m4
a451f14b 437 m4/c-strtod.m4
1fd182f0 438 m4/extensions.m4
5fa4ac76 439 m4/filemode.m4
79ab4b7f 440 m4/getloadavg.m4
e275c824 441 m4/getopt.m4
743c80a7 442 m4/gnulib-common.m4
1fd182f0 443 m4/include_next.m4
a8a2bb29 444 m4/inttypes.m4
5f90be1b 445 m4/longlong.m4
ae0d7250 446 m4/lstat.m4
942f733f 447 m4/md5.m4
1fd182f0
PE
448 m4/mktime.m4
449 m4/multiarch.m4
ae0d7250 450 m4/readlink.m4
13c3daa4 451 m4/sha1.m4
401bf9b4 452 m4/socklen.m4
d1fdcab7 453 m4/ssize_t.m4
5fa4ac76 454 m4/st_dm_mode.m4
ae0d7250 455 m4/stat.m4
c378da0b 456 m4/stdarg.m4
16c3e636 457 m4/stdbool.m4
1fd182f0 458 m4/stddef_h.m4
5f90be1b 459 m4/stdint.m4
77185bdf 460 m4/stdio_h.m4
79ab4b7f 461 m4/stdlib_h.m4
16c3e636 462 m4/strftime.m4
a8a2bb29
PE
463 m4/strtoull.m4
464 m4/strtoumax.m4
ae0d7250 465 m4/symlink.m4
5fa4ac76 466 m4/sys_stat_h.m4
1fd182f0
PE
467 m4/time_h.m4
468 m4/time_r.m4
16c3e636 469 m4/tm_gmtoff.m4
e275c824 470 m4/unistd_h.m4
1fd182f0
PE
471 m4/warn-on-use.m4
472 m4/wchar_t.m4
743c80a7 473])