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