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