]> code.delx.au - gnu-emacs/blob - m4/gnulib-comp.m4
Use faccessat, not access, when checking file permissions.
[gnu-emacs] / m4 / gnulib-comp.m4
1 # DO NOT EDIT! GENERATED AUTOMATICALLY!
2 # Copyright (C) 2002-2012 Free Software Foundation, Inc.
3 #
4 # This file is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This file is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this file. If not, see <http://www.gnu.org/licenses/>.
16 #
17 # As a special exception to the GNU General Public License,
18 # this file may be distributed as part of a program that
19 # contains a configuration script generated by Autoconf, under
20 # the same distribution terms as the rest of that program.
21 #
22 # Generated by gnulib-tool.
23 #
24 # This file represents the compiled summary of the specification in
25 # gnulib-cache.m4. It lists the computed macro invocations that need
26 # to be invoked from configure.ac.
27 # In projects that use version control, this file can be treated like
28 # other built files.
29
30
31 # This macro should be invoked from ./configure.ac, in the section
32 # "Checks for programs", right after AC_PROG_CC, and certainly before
33 # any checks for libraries, header files, types and library functions.
34 AC_DEFUN([gl_EARLY],
35 [
36 m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace
37 m4_pattern_allow([^gl_ES$])dnl a valid locale name
38 m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
39 m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
40 AC_REQUIRE([gl_PROG_AR_RANLIB])
41 # Code from module alloca-opt:
42 # Code from module allocator:
43 # Code from module c-ctype:
44 # Code from module c-strcase:
45 # Code from module careadlinkat:
46 # Code from module clock-time:
47 # Code from module crypto/md5:
48 # Code from module crypto/sha1:
49 # Code from module crypto/sha256:
50 # Code from module crypto/sha512:
51 # Code from module dosname:
52 # Code from module dtoastr:
53 # Code from module dtotimespec:
54 # Code from module dup2:
55 # Code from module environ:
56 # Code from module euidaccess:
57 # Code from module execinfo:
58 # Code from module extensions:
59 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
60 # Code from module extern-inline:
61 # Code from module faccessat:
62 # Code from module fcntl-h:
63 # Code from module filemode:
64 # Code from module getgroups:
65 # Code from module getloadavg:
66 # Code from module getopt-gnu:
67 # Code from module getopt-posix:
68 # Code from module gettext-h:
69 # Code from module gettime:
70 # Code from module gettimeofday:
71 # Code from module group-member:
72 # Code from module ignore-value:
73 # Code from module include_next:
74 # Code from module intprops:
75 # Code from module inttypes-incomplete:
76 # Code from module largefile:
77 AC_REQUIRE([AC_SYS_LARGEFILE])
78 # Code from module lstat:
79 # Code from module manywarnings:
80 # Code from module mktime:
81 # Code from module multiarch:
82 # Code from module nocrash:
83 # Code from module pathmax:
84 # Code from module pselect:
85 # Code from module pthread_sigmask:
86 # Code from module readlink:
87 # Code from module root-uid:
88 # Code from module signal-h:
89 # Code from module snippet/_Noreturn:
90 # Code from module snippet/arg-nonnull:
91 # Code from module snippet/c++defs:
92 # Code from module snippet/warn-on-use:
93 # Code from module socklen:
94 # Code from module ssize_t:
95 # Code from module stat:
96 # Code from module stat-time:
97 # Code from module stdalign:
98 # Code from module stdarg:
99 dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
100 dnl for the builtin va_copy to work. With Autoconf 2.60 or later,
101 dnl gl_PROG_CC_C99 arranges for this. With older Autoconf gl_PROG_CC_C99
102 dnl shouldn't hurt, though installers are on their own to set c99 mode.
103 gl_PROG_CC_C99
104 # Code from module stdbool:
105 # Code from module stddef:
106 # Code from module stdint:
107 # Code from module stdio:
108 # Code from module stdlib:
109 # Code from module strftime:
110 # Code from module strtoimax:
111 # Code from module strtoll:
112 # Code from module strtoull:
113 # Code from module strtoumax:
114 # Code from module symlink:
115 # Code from module sys_select:
116 # Code from module sys_stat:
117 # Code from module sys_time:
118 # Code from module time:
119 # Code from module time_r:
120 # Code from module timer-time:
121 # Code from module timespec:
122 # Code from module timespec-add:
123 # Code from module timespec-sub:
124 # Code from module u64:
125 # Code from module unistd:
126 # Code from module utimens:
127 # Code from module verify:
128 # Code from module warnings:
129 # Code from module xalloc-oversized:
130 ])
131
132 # This macro should be invoked from ./configure.ac, in the section
133 # "Check for header files, types and library functions".
134 AC_DEFUN([gl_INIT],
135 [
136 AM_CONDITIONAL([GL_COND_LIBTOOL], [false])
137 gl_cond_libtool=false
138 gl_libdeps=
139 gl_ltlibdeps=
140 gl_m4_base='m4'
141 m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
142 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
143 m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
144 m4_pushdef([gl_LIBSOURCES_LIST], [])
145 m4_pushdef([gl_LIBSOURCES_DIR], [])
146 gl_COMMON
147 gl_source_base='lib'
148 gl_FUNC_ALLOCA
149 AC_CHECK_FUNCS_ONCE([readlinkat])
150 gl_CLOCK_TIME
151 gl_MD5
152 gl_SHA1
153 gl_SHA256
154 gl_SHA512
155 AC_REQUIRE([gl_C99_STRTOLD])
156 gl_FUNC_DUP2
157 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
158 AC_LIBOBJ([dup2])
159 gl_PREREQ_DUP2
160 fi
161 gl_UNISTD_MODULE_INDICATOR([dup2])
162 gl_ENVIRON
163 gl_UNISTD_MODULE_INDICATOR([environ])
164 gl_EXECINFO_H
165 AC_REQUIRE([gl_EXTERN_INLINE])
166 gl_FUNC_FACCESSAT
167 if test $HAVE_FACCESSAT = 0; then
168 AC_LIBOBJ([faccessat])
169 gl_PREREQ_FACCESSAT
170 fi
171 gl_MODULE_INDICATOR([faccessat])
172 gl_UNISTD_MODULE_INDICATOR([faccessat])
173 gl_FCNTL_H
174 gl_FILEMODE
175 gl_GETLOADAVG
176 if test $HAVE_GETLOADAVG = 0; then
177 AC_LIBOBJ([getloadavg])
178 gl_PREREQ_GETLOADAVG
179 fi
180 gl_STDLIB_MODULE_INDICATOR([getloadavg])
181 gl_FUNC_GETOPT_GNU
182 if test $REPLACE_GETOPT = 1; then
183 AC_LIBOBJ([getopt])
184 AC_LIBOBJ([getopt1])
185 gl_PREREQ_GETOPT
186 dnl Arrange for unistd.h to include getopt.h.
187 GNULIB_GL_UNISTD_H_GETOPT=1
188 fi
189 AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
190 gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
191 gl_FUNC_GETOPT_POSIX
192 if test $REPLACE_GETOPT = 1; then
193 AC_LIBOBJ([getopt])
194 AC_LIBOBJ([getopt1])
195 gl_PREREQ_GETOPT
196 dnl Arrange for unistd.h to include getopt.h.
197 GNULIB_GL_UNISTD_H_GETOPT=1
198 fi
199 AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
200 gl_GETTIME
201 gl_FUNC_GETTIMEOFDAY
202 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
203 AC_LIBOBJ([gettimeofday])
204 gl_PREREQ_GETTIMEOFDAY
205 fi
206 gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
207 gl_INTTYPES_INCOMPLETE
208 AC_REQUIRE([gl_LARGEFILE])
209 gl_FUNC_LSTAT
210 if test $REPLACE_LSTAT = 1; then
211 AC_LIBOBJ([lstat])
212 gl_PREREQ_LSTAT
213 fi
214 gl_SYS_STAT_MODULE_INDICATOR([lstat])
215 gl_FUNC_MKTIME
216 if test $REPLACE_MKTIME = 1; then
217 AC_LIBOBJ([mktime])
218 gl_PREREQ_MKTIME
219 fi
220 gl_TIME_MODULE_INDICATOR([mktime])
221 gl_MULTIARCH
222 gl_FUNC_PSELECT
223 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
224 AC_LIBOBJ([pselect])
225 fi
226 gl_SYS_SELECT_MODULE_INDICATOR([pselect])
227 gl_FUNC_PTHREAD_SIGMASK
228 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
229 AC_LIBOBJ([pthread_sigmask])
230 gl_PREREQ_PTHREAD_SIGMASK
231 fi
232 gl_SIGNAL_MODULE_INDICATOR([pthread_sigmask])
233 gl_FUNC_READLINK
234 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
235 AC_LIBOBJ([readlink])
236 gl_PREREQ_READLINK
237 fi
238 gl_UNISTD_MODULE_INDICATOR([readlink])
239 gl_SIGNAL_H
240 gl_TYPE_SOCKLEN_T
241 gt_TYPE_SSIZE_T
242 gl_STAT_TIME
243 gl_STAT_BIRTHTIME
244 gl_STDALIGN_H
245 gl_STDARG_H
246 AM_STDBOOL_H
247 gl_STDDEF_H
248 gl_STDINT_H
249 gl_STDIO_H
250 gl_STDLIB_H
251 gl_FUNC_GNU_STRFTIME
252 gl_FUNC_STRTOIMAX
253 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
254 AC_LIBOBJ([strtoimax])
255 gl_PREREQ_STRTOIMAX
256 fi
257 gl_INTTYPES_MODULE_INDICATOR([strtoimax])
258 gl_FUNC_STRTOUMAX
259 if test $ac_cv_func_strtoumax = no; then
260 AC_LIBOBJ([strtoumax])
261 gl_PREREQ_STRTOUMAX
262 fi
263 gl_INTTYPES_MODULE_INDICATOR([strtoumax])
264 gl_FUNC_SYMLINK
265 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
266 AC_LIBOBJ([symlink])
267 fi
268 gl_UNISTD_MODULE_INDICATOR([symlink])
269 gl_HEADER_SYS_SELECT
270 AC_PROG_MKDIR_P
271 gl_HEADER_SYS_STAT_H
272 AC_PROG_MKDIR_P
273 gl_HEADER_SYS_TIME_H
274 AC_PROG_MKDIR_P
275 gl_HEADER_TIME_H
276 gl_TIME_R
277 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
278 AC_LIBOBJ([time_r])
279 gl_PREREQ_TIME_R
280 fi
281 gl_TIME_MODULE_INDICATOR([time_r])
282 gl_TIMER_TIME
283 gl_TIMESPEC
284 gl_UNISTD_H
285 gl_UTIMENS
286 gl_gnulib_enabled_dosname=false
287 gl_gnulib_enabled_euidaccess=false
288 gl_gnulib_enabled_getgroups=false
289 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
290 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
291 gl_gnulib_enabled_pathmax=false
292 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
293 gl_gnulib_enabled_stat=false
294 gl_gnulib_enabled_strtoll=false
295 gl_gnulib_enabled_strtoull=false
296 gl_gnulib_enabled_verify=false
297 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
298 func_gl_gnulib_m4code_dosname ()
299 {
300 if ! $gl_gnulib_enabled_dosname; then
301 gl_gnulib_enabled_dosname=true
302 fi
303 }
304 func_gl_gnulib_m4code_euidaccess ()
305 {
306 if ! $gl_gnulib_enabled_euidaccess; then
307 gl_FUNC_EUIDACCESS
308 if test $HAVE_EUIDACCESS = 0; then
309 AC_LIBOBJ([euidaccess])
310 gl_PREREQ_EUIDACCESS
311 fi
312 gl_UNISTD_MODULE_INDICATOR([euidaccess])
313 gl_gnulib_enabled_euidaccess=true
314 if test $HAVE_EUIDACCESS = 0; then
315 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1
316 fi
317 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c
318 if test $HAVE_EUIDACCESS = 0; then
319 func_gl_gnulib_m4code_stat
320 fi
321 fi
322 }
323 func_gl_gnulib_m4code_getgroups ()
324 {
325 if ! $gl_gnulib_enabled_getgroups; then
326 gl_FUNC_GETGROUPS
327 if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
328 AC_LIBOBJ([getgroups])
329 fi
330 gl_UNISTD_MODULE_INDICATOR([getgroups])
331 gl_gnulib_enabled_getgroups=true
332 fi
333 }
334 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
335 {
336 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
337 AC_SUBST([LIBINTL])
338 AC_SUBST([LTLIBINTL])
339 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
340 fi
341 }
342 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 ()
343 {
344 if ! $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
345 gl_FUNC_GROUP_MEMBER
346 if test $HAVE_GROUP_MEMBER = 0; then
347 AC_LIBOBJ([group-member])
348 gl_PREREQ_GROUP_MEMBER
349 fi
350 gl_UNISTD_MODULE_INDICATOR([group-member])
351 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true
352 if test $HAVE_GROUP_MEMBER = 0; then
353 func_gl_gnulib_m4code_getgroups
354 fi
355 if test $HAVE_GROUP_MEMBER = 0; then
356 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
357 fi
358 fi
359 }
360 func_gl_gnulib_m4code_pathmax ()
361 {
362 if ! $gl_gnulib_enabled_pathmax; then
363 gl_PATHMAX
364 gl_gnulib_enabled_pathmax=true
365 fi
366 }
367 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c ()
368 {
369 if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
370 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true
371 fi
372 }
373 func_gl_gnulib_m4code_stat ()
374 {
375 if ! $gl_gnulib_enabled_stat; then
376 gl_FUNC_STAT
377 if test $REPLACE_STAT = 1; then
378 AC_LIBOBJ([stat])
379 gl_PREREQ_STAT
380 fi
381 gl_SYS_STAT_MODULE_INDICATOR([stat])
382 gl_gnulib_enabled_stat=true
383 if test $REPLACE_STAT = 1; then
384 func_gl_gnulib_m4code_dosname
385 fi
386 if test $REPLACE_STAT = 1; then
387 func_gl_gnulib_m4code_pathmax
388 fi
389 if test $REPLACE_STAT = 1; then
390 func_gl_gnulib_m4code_verify
391 fi
392 fi
393 }
394 func_gl_gnulib_m4code_strtoll ()
395 {
396 if ! $gl_gnulib_enabled_strtoll; then
397 gl_FUNC_STRTOLL
398 if test $HAVE_STRTOLL = 0; then
399 AC_LIBOBJ([strtoll])
400 gl_PREREQ_STRTOLL
401 fi
402 gl_STDLIB_MODULE_INDICATOR([strtoll])
403 gl_gnulib_enabled_strtoll=true
404 fi
405 }
406 func_gl_gnulib_m4code_strtoull ()
407 {
408 if ! $gl_gnulib_enabled_strtoull; then
409 gl_FUNC_STRTOULL
410 if test $HAVE_STRTOULL = 0; then
411 AC_LIBOBJ([strtoull])
412 gl_PREREQ_STRTOULL
413 fi
414 gl_STDLIB_MODULE_INDICATOR([strtoull])
415 gl_gnulib_enabled_strtoull=true
416 fi
417 }
418 func_gl_gnulib_m4code_verify ()
419 {
420 if ! $gl_gnulib_enabled_verify; then
421 gl_gnulib_enabled_verify=true
422 fi
423 }
424 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
425 {
426 if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
427 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true
428 fi
429 }
430 if test $HAVE_FACCESSAT = 0; then
431 func_gl_gnulib_m4code_dosname
432 fi
433 if test $HAVE_FACCESSAT = 0; then
434 func_gl_gnulib_m4code_euidaccess
435 fi
436 if test $REPLACE_GETOPT = 1; then
437 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
438 fi
439 if test $REPLACE_LSTAT = 1; then
440 func_gl_gnulib_m4code_dosname
441 fi
442 if test $REPLACE_LSTAT = 1; then
443 func_gl_gnulib_m4code_stat
444 fi
445 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
446 func_gl_gnulib_m4code_stat
447 fi
448 if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
449 func_gl_gnulib_m4code_strtoll
450 fi
451 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
452 func_gl_gnulib_m4code_verify
453 fi
454 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
455 func_gl_gnulib_m4code_strtoull
456 fi
457 if test $ac_cv_func_strtoumax = no; then
458 func_gl_gnulib_m4code_verify
459 fi
460 m4_pattern_allow([^gl_GNULIB_ENABLED_])
461 AM_CONDITIONAL([gl_GNULIB_ENABLED_dosname], [$gl_gnulib_enabled_dosname])
462 AM_CONDITIONAL([gl_GNULIB_ENABLED_euidaccess], [$gl_gnulib_enabled_euidaccess])
463 AM_CONDITIONAL([gl_GNULIB_ENABLED_getgroups], [$gl_gnulib_enabled_getgroups])
464 AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [$gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36])
465 AM_CONDITIONAL([gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1], [$gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1])
466 AM_CONDITIONAL([gl_GNULIB_ENABLED_pathmax], [$gl_gnulib_enabled_pathmax])
467 AM_CONDITIONAL([gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c], [$gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c])
468 AM_CONDITIONAL([gl_GNULIB_ENABLED_stat], [$gl_gnulib_enabled_stat])
469 AM_CONDITIONAL([gl_GNULIB_ENABLED_strtoll], [$gl_gnulib_enabled_strtoll])
470 AM_CONDITIONAL([gl_GNULIB_ENABLED_strtoull], [$gl_gnulib_enabled_strtoull])
471 AM_CONDITIONAL([gl_GNULIB_ENABLED_verify], [$gl_gnulib_enabled_verify])
472 AM_CONDITIONAL([gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec], [$gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec])
473 # End of code from modules
474 m4_ifval(gl_LIBSOURCES_LIST, [
475 m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
476 for gl_file in ]gl_LIBSOURCES_LIST[ ; do
477 if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
478 echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
479 exit 1
480 fi
481 done])dnl
482 m4_if(m4_sysval, [0], [],
483 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
484 ])
485 m4_popdef([gl_LIBSOURCES_DIR])
486 m4_popdef([gl_LIBSOURCES_LIST])
487 m4_popdef([AC_LIBSOURCES])
488 m4_popdef([AC_REPLACE_FUNCS])
489 m4_popdef([AC_LIBOBJ])
490 AC_CONFIG_COMMANDS_PRE([
491 gl_libobjs=
492 gl_ltlibobjs=
493 if test -n "$gl_LIBOBJS"; then
494 # Remove the extension.
495 sed_drop_objext='s/\.o$//;s/\.obj$//'
496 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
497 gl_libobjs="$gl_libobjs $i.$ac_objext"
498 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
499 done
500 fi
501 AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
502 AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
503 ])
504 gltests_libdeps=
505 gltests_ltlibdeps=
506 m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
507 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
508 m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
509 m4_pushdef([gltests_LIBSOURCES_LIST], [])
510 m4_pushdef([gltests_LIBSOURCES_DIR], [])
511 gl_COMMON
512 gl_source_base='tests'
513 changequote(,)dnl
514 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
515 changequote([, ])dnl
516 AC_SUBST([gltests_WITNESS])
517 gl_module_indicator_condition=$gltests_WITNESS
518 m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
519 m4_pattern_allow([^gl_GNULIB_ENABLED_])
520 m4_popdef([gl_MODULE_INDICATOR_CONDITION])
521 m4_ifval(gltests_LIBSOURCES_LIST, [
522 m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
523 for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
524 if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
525 echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
526 exit 1
527 fi
528 done])dnl
529 m4_if(m4_sysval, [0], [],
530 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
531 ])
532 m4_popdef([gltests_LIBSOURCES_DIR])
533 m4_popdef([gltests_LIBSOURCES_LIST])
534 m4_popdef([AC_LIBSOURCES])
535 m4_popdef([AC_REPLACE_FUNCS])
536 m4_popdef([AC_LIBOBJ])
537 AC_CONFIG_COMMANDS_PRE([
538 gltests_libobjs=
539 gltests_ltlibobjs=
540 if test -n "$gltests_LIBOBJS"; then
541 # Remove the extension.
542 sed_drop_objext='s/\.o$//;s/\.obj$//'
543 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
544 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
545 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
546 done
547 fi
548 AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
549 AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
550 ])
551 LIBGNU_LIBDEPS="$gl_libdeps"
552 AC_SUBST([LIBGNU_LIBDEPS])
553 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
554 AC_SUBST([LIBGNU_LTLIBDEPS])
555 ])
556
557 # Like AC_LIBOBJ, except that the module name goes
558 # into gl_LIBOBJS instead of into LIBOBJS.
559 AC_DEFUN([gl_LIBOBJ], [
560 AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
561 gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
562 ])
563
564 # Like AC_REPLACE_FUNCS, except that the module name goes
565 # into gl_LIBOBJS instead of into LIBOBJS.
566 AC_DEFUN([gl_REPLACE_FUNCS], [
567 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
568 AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
569 ])
570
571 # Like AC_LIBSOURCES, except the directory where the source file is
572 # expected is derived from the gnulib-tool parameterization,
573 # and alloca is special cased (for the alloca-opt module).
574 # We could also entirely rely on EXTRA_lib..._SOURCES.
575 AC_DEFUN([gl_LIBSOURCES], [
576 m4_foreach([_gl_NAME], [$1], [
577 m4_if(_gl_NAME, [alloca.c], [], [
578 m4_define([gl_LIBSOURCES_DIR], [lib])
579 m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
580 ])
581 ])
582 ])
583
584 # Like AC_LIBOBJ, except that the module name goes
585 # into gltests_LIBOBJS instead of into LIBOBJS.
586 AC_DEFUN([gltests_LIBOBJ], [
587 AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
588 gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
589 ])
590
591 # Like AC_REPLACE_FUNCS, except that the module name goes
592 # into gltests_LIBOBJS instead of into LIBOBJS.
593 AC_DEFUN([gltests_REPLACE_FUNCS], [
594 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
595 AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
596 ])
597
598 # Like AC_LIBSOURCES, except the directory where the source file is
599 # expected is derived from the gnulib-tool parameterization,
600 # and alloca is special cased (for the alloca-opt module).
601 # We could also entirely rely on EXTRA_lib..._SOURCES.
602 AC_DEFUN([gltests_LIBSOURCES], [
603 m4_foreach([_gl_NAME], [$1], [
604 m4_if(_gl_NAME, [alloca.c], [], [
605 m4_define([gltests_LIBSOURCES_DIR], [tests])
606 m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
607 ])
608 ])
609 ])
610
611 # This macro records the list of files which have been installed by
612 # gnulib-tool and may be removed by future gnulib-tool invocations.
613 AC_DEFUN([gl_FILE_LIST], [
614 build-aux/snippet/_Noreturn.h
615 build-aux/snippet/arg-nonnull.h
616 build-aux/snippet/c++defs.h
617 build-aux/snippet/warn-on-use.h
618 lib/alloca.in.h
619 lib/allocator.c
620 lib/allocator.h
621 lib/at-func.c
622 lib/c-ctype.c
623 lib/c-ctype.h
624 lib/c-strcase.h
625 lib/c-strcasecmp.c
626 lib/c-strncasecmp.c
627 lib/careadlinkat.c
628 lib/careadlinkat.h
629 lib/dosname.h
630 lib/dtoastr.c
631 lib/dtotimespec.c
632 lib/dup2.c
633 lib/euidaccess.c
634 lib/execinfo.c
635 lib/execinfo.in.h
636 lib/faccessat.c
637 lib/fcntl.in.h
638 lib/filemode.c
639 lib/filemode.h
640 lib/ftoastr.c
641 lib/ftoastr.h
642 lib/getgroups.c
643 lib/getloadavg.c
644 lib/getopt.c
645 lib/getopt.in.h
646 lib/getopt1.c
647 lib/getopt_int.h
648 lib/gettext.h
649 lib/gettime.c
650 lib/gettimeofday.c
651 lib/group-member.c
652 lib/ignore-value.h
653 lib/intprops.h
654 lib/inttypes.in.h
655 lib/lstat.c
656 lib/md5.c
657 lib/md5.h
658 lib/mktime-internal.h
659 lib/mktime.c
660 lib/pathmax.h
661 lib/pselect.c
662 lib/pthread_sigmask.c
663 lib/readlink.c
664 lib/root-uid.h
665 lib/sha1.c
666 lib/sha1.h
667 lib/sha256.c
668 lib/sha256.h
669 lib/sha512.c
670 lib/sha512.h
671 lib/signal.in.h
672 lib/stat-time.c
673 lib/stat-time.h
674 lib/stat.c
675 lib/stdalign.in.h
676 lib/stdarg.in.h
677 lib/stdbool.in.h
678 lib/stddef.in.h
679 lib/stdint.in.h
680 lib/stdio.in.h
681 lib/stdlib.in.h
682 lib/strftime.c
683 lib/strftime.h
684 lib/strtoimax.c
685 lib/strtol.c
686 lib/strtoll.c
687 lib/strtoul.c
688 lib/strtoull.c
689 lib/strtoumax.c
690 lib/symlink.c
691 lib/sys_select.in.h
692 lib/sys_stat.in.h
693 lib/sys_time.in.h
694 lib/time.in.h
695 lib/time_r.c
696 lib/timespec-add.c
697 lib/timespec-sub.c
698 lib/timespec.c
699 lib/timespec.h
700 lib/u64.c
701 lib/u64.h
702 lib/unistd.in.h
703 lib/utimens.c
704 lib/utimens.h
705 lib/verify.h
706 lib/xalloc-oversized.h
707 m4/00gnulib.m4
708 m4/alloca.m4
709 m4/c-strtod.m4
710 m4/clock_time.m4
711 m4/dup2.m4
712 m4/environ.m4
713 m4/euidaccess.m4
714 m4/execinfo.m4
715 m4/extensions.m4
716 m4/extern-inline.m4
717 m4/faccessat.m4
718 m4/fcntl-o.m4
719 m4/fcntl_h.m4
720 m4/filemode.m4
721 m4/getgroups.m4
722 m4/getloadavg.m4
723 m4/getopt.m4
724 m4/gettime.m4
725 m4/gettimeofday.m4
726 m4/gnulib-common.m4
727 m4/group-member.m4
728 m4/include_next.m4
729 m4/inttypes.m4
730 m4/largefile.m4
731 m4/longlong.m4
732 m4/lstat.m4
733 m4/manywarnings.m4
734 m4/md5.m4
735 m4/mktime.m4
736 m4/multiarch.m4
737 m4/nocrash.m4
738 m4/off_t.m4
739 m4/pathmax.m4
740 m4/pselect.m4
741 m4/pthread_sigmask.m4
742 m4/readlink.m4
743 m4/sha1.m4
744 m4/sha256.m4
745 m4/sha512.m4
746 m4/signal_h.m4
747 m4/socklen.m4
748 m4/ssize_t.m4
749 m4/st_dm_mode.m4
750 m4/stat-time.m4
751 m4/stat.m4
752 m4/stdalign.m4
753 m4/stdarg.m4
754 m4/stdbool.m4
755 m4/stddef_h.m4
756 m4/stdint.m4
757 m4/stdio_h.m4
758 m4/stdlib_h.m4
759 m4/strftime.m4
760 m4/strtoimax.m4
761 m4/strtoll.m4
762 m4/strtoull.m4
763 m4/strtoumax.m4
764 m4/symlink.m4
765 m4/sys_select_h.m4
766 m4/sys_socket_h.m4
767 m4/sys_stat_h.m4
768 m4/sys_time_h.m4
769 m4/time_h.m4
770 m4/time_r.m4
771 m4/timer_time.m4
772 m4/timespec.m4
773 m4/tm_gmtoff.m4
774 m4/unistd_h.m4
775 m4/utimbuf.m4
776 m4/utimens.m4
777 m4/utimes.m4
778 m4/warn-on-use.m4
779 m4/warnings.m4
780 m4/wchar_t.m4
781 ])