gnulib-comp.m4 35.5 KB
Newer Older
Paul Eggert's avatar
Paul Eggert committed
1
# DO NOT EDIT! GENERATED AUTOMATICALLY!
Paul Eggert's avatar
Paul Eggert committed
2
# Copyright (C) 2002-2020 Free Software Foundation, Inc.
Paul Eggert's avatar
Paul Eggert committed
3
#
4 5 6 7 8 9 10 11 12 13 14
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
Paul Eggert's avatar
Paul Eggert committed
15
# along with this file.  If not, see <https://www.gnu.org/licenses/>.
16 17 18 19
#
# As a special exception to the GNU General Public License,
# this file may be distributed as part of a program that
# contains a configuration script generated by Autoconf, under
Paul Eggert's avatar
Paul Eggert committed
20 21 22 23 24 25 26 27 28 29 30
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
#
# This file represents the compiled summary of the specification in
# gnulib-cache.m4. It lists the computed macro invocations that need
# to be invoked from configure.ac.
# In projects that use version control, this file can be treated like
# other built files.


Paul Eggert's avatar
Paul Eggert committed
31
# This macro should be invoked from ./configure.ac, in the section
Paul Eggert's avatar
Paul Eggert committed
32 33 34 35 36 37 38 39
# "Checks for programs", right after AC_PROG_CC, and certainly before
# any checks for libraries, header files, types and library functions.
AC_DEFUN([gl_EARLY],
[
  m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace
  m4_pattern_allow([^gl_ES$])dnl a valid locale name
  m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
  m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
Paul Eggert's avatar
Paul Eggert committed
40 41 42

  # Pre-early section.
  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
Paul Eggert's avatar
Paul Eggert committed
43
  AC_REQUIRE([gl_PROG_AR_RANLIB])
Paul Eggert's avatar
Paul Eggert committed
44

45
  # Code from module absolute-header:
Paul Eggert's avatar
Paul Eggert committed
46
  # Code from module acl-permissions:
Paul Eggert's avatar
Paul Eggert committed
47
  # Code from module alloca-opt:
Paul Eggert's avatar
Paul Eggert committed
48
  # Code from module allocator:
49
  # Code from module at-internal:
Paul Eggert's avatar
Paul Eggert committed
50
  # Code from module attribute:
51
  # Code from module binary-io:
Paul Eggert's avatar
Paul Eggert committed
52
  # Code from module builtin-expect:
53
  # Code from module byteswap:
54 55
  # Code from module c-ctype:
  # Code from module c-strcase:
Paul Eggert's avatar
Paul Eggert committed
56
  # Code from module c99:
57
  # Code from module canonicalize-lgpl:
58
  # Code from module careadlinkat:
59
  # Code from module clock-time:
60
  # Code from module cloexec:
Paul Eggert's avatar
Paul Eggert committed
61
  # Code from module close-stream:
62
  # Code from module copy-file-range:
63
  # Code from module count-leading-zeros:
64 65
  # Code from module count-one-bits:
  # Code from module count-trailing-zeros:
Paul Eggert's avatar
Paul Eggert committed
66 67 68 69
  # Code from module crypto/md5-buffer:
  # Code from module crypto/sha1-buffer:
  # Code from module crypto/sha256-buffer:
  # Code from module crypto/sha512-buffer:
70
  # Code from module d-type:
71
  # Code from module diffseq:
72
  # Code from module dirent:
Paul Eggert's avatar
Paul Eggert committed
73
  # Code from module dirfd:
Paul Eggert's avatar
Paul Eggert committed
74
  # Code from module double-slash-root:
Paul Eggert's avatar
Paul Eggert committed
75
  # Code from module dtoastr:
76
  # Code from module dtotimespec:
77
  # Code from module dup2:
78
  # Code from module environ:
79
  # Code from module errno:
80
  # Code from module euidaccess:
81
  # Code from module execinfo:
82
  # Code from module explicit_bzero:
Paul Eggert's avatar
Paul Eggert committed
83
  # Code from module extensions:
84
  # Code from module extern-inline:
85
  # Code from module faccessat:
86
  # Code from module fchmodat:
87
  # Code from module fcntl:
88
  # Code from module fcntl-h:
89
  # Code from module fdopendir:
90
  # Code from module filemode:
Paul Eggert's avatar
Paul Eggert committed
91
  # Code from module filename:
92
  # Code from module filevercmp:
Paul Eggert's avatar
Paul Eggert committed
93
  # Code from module flexmember:
Paul Eggert's avatar
Paul Eggert committed
94
  # Code from module fpending:
95 96
  # Code from module fpieee:
  AC_REQUIRE([gl_FP_IEEE])
97
  # Code from module fstatat:
98
  # Code from module fsusage:
Paul Eggert's avatar
Paul Eggert committed
99
  # Code from module fsync:
100
  # Code from module futimens:
101
  # Code from module getdtablesize:
102
  # Code from module getgroups:
103
  # Code from module getloadavg:
Paul Eggert's avatar
Paul Eggert committed
104 105
  # Code from module getopt-gnu:
  # Code from module getopt-posix:
Paul Eggert's avatar
Paul Eggert committed
106
  # Code from module getrandom:
Paul Eggert's avatar
Paul Eggert committed
107
  # Code from module gettext-h:
108 109
  # Code from module gettime:
  # Code from module gettimeofday:
110
  # Code from module gitlog-to-changelog:
111
  # Code from module group-member:
112
  # Code from module ieee754-h:
Paul Eggert's avatar
Paul Eggert committed
113
  # Code from module ignore-value:
Paul Eggert's avatar
Paul Eggert committed
114
  # Code from module include_next:
Paul Eggert's avatar
Paul Eggert committed
115
  # Code from module intprops:
Paul Eggert's avatar
Paul Eggert committed
116
  # Code from module inttypes-incomplete:
Paul Eggert's avatar
Paul Eggert committed
117
  # Code from module largefile:
Paul Eggert's avatar
Paul Eggert committed
118
  AC_REQUIRE([AC_SYS_LARGEFILE])
119
  # Code from module lchmod:
120
  # Code from module libc-config:
Paul Eggert's avatar
Paul Eggert committed
121
  # Code from module libgmp:
Paul Eggert's avatar
Paul Eggert committed
122
  # Code from module limits-h:
Paul Eggert's avatar
Paul Eggert committed
123
  # Code from module lstat:
124
  # Code from module malloca:
125
  # Code from module manywarnings:
126
  # Code from module memmem-simple:
127
  # Code from module mempcpy:
128
  # Code from module memrchr:
129
  # Code from module minmax:
130
  # Code from module mkostemp:
Paul Eggert's avatar
Paul Eggert committed
131
  # Code from module mktime:
132
  # Code from module mktime-internal:
Paul Eggert's avatar
Paul Eggert committed
133
  # Code from module multiarch:
134
  # Code from module nocrash:
Paul Eggert's avatar
Paul Eggert committed
135
  # Code from module nstrftime:
136
  # Code from module open:
137
  # Code from module openat-h:
138
  # Code from module pathmax:
139
  # Code from module pipe2:
140
  # Code from module pselect:
141
  # Code from module pthread_sigmask:
Paul Eggert's avatar
Paul Eggert committed
142
  # Code from module qcopy-acl:
Paul Eggert's avatar
Paul Eggert committed
143
  # Code from module readlink:
144
  # Code from module readlinkat:
Paul Eggert's avatar
Paul Eggert committed
145
  # Code from module regex:
146
  # Code from module root-uid:
147
  # Code from module sig2str:
148
  # Code from module sigdescr_np:
149
  # Code from module signal-h:
150 151 152 153
  # Code from module snippet/_Noreturn:
  # Code from module snippet/arg-nonnull:
  # Code from module snippet/c++defs:
  # Code from module snippet/warn-on-use:
154
  # Code from module socklen:
155
  # Code from module ssize_t:
156
  # Code from module stat-time:
Paul Eggert's avatar
Paul Eggert committed
157
  # Code from module std-gnu11:
Paul Eggert's avatar
Paul Eggert committed
158
  # Code from module stdalign:
Paul Eggert's avatar
Paul Eggert committed
159
  # Code from module stddef:
160
  # Code from module stdint:
Paul Eggert's avatar
Paul Eggert committed
161
  # Code from module stdio:
162
  # Code from module stdlib:
Paul Eggert's avatar
Paul Eggert committed
163
  # Code from module stpcpy:
164
  # Code from module string:
165
  # Code from module strnlen:
166 167
  # Code from module strtoimax:
  # Code from module strtoll:
Paul Eggert's avatar
Paul Eggert committed
168
  # Code from module symlink:
Paul Eggert's avatar
Paul Eggert committed
169
  # Code from module sys_random:
170
  # Code from module sys_select:
171
  # Code from module sys_stat:
172
  # Code from module sys_time:
Paul Eggert's avatar
Paul Eggert committed
173
  # Code from module sys_types:
174
  # Code from module tempname:
Paul Eggert's avatar
Paul Eggert committed
175 176
  # Code from module time:
  # Code from module time_r:
177 178
  # Code from module time_rz:
  # Code from module timegm:
179
  # Code from module timer-time:
180 181 182
  # Code from module timespec:
  # Code from module timespec-add:
  # Code from module timespec-sub:
183
  # Code from module u64:
Paul Eggert's avatar
Paul Eggert committed
184
  # Code from module unistd:
185
  # Code from module unlocked-io:
186
  # Code from module update-copyright:
187
  # Code from module utimens:
188
  # Code from module utimensat:
Paul Eggert's avatar
Paul Eggert committed
189
  # Code from module vararrays:
190
  # Code from module verify:
Paul Eggert's avatar
Paul Eggert committed
191
  # Code from module vla:
192
  # Code from module warnings:
193
  # Code from module xalloc-oversized:
Paul Eggert's avatar
Paul Eggert committed
194 195
])

Paul Eggert's avatar
Paul Eggert committed
196
# This macro should be invoked from ./configure.ac, in the section
Paul Eggert's avatar
Paul Eggert committed
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211
# "Check for header files, types and library functions".
AC_DEFUN([gl_INIT],
[
  AM_CONDITIONAL([GL_COND_LIBTOOL], [false])
  gl_cond_libtool=false
  gl_libdeps=
  gl_ltlibdeps=
  gl_m4_base='m4'
  m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
  m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
  m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
  m4_pushdef([gl_LIBSOURCES_LIST], [])
  m4_pushdef([gl_LIBSOURCES_DIR], [])
  gl_COMMON
  gl_source_base='lib'
Paul Eggert's avatar
Paul Eggert committed
212
  gl_FUNC_ACL
Paul Eggert's avatar
Paul Eggert committed
213
  gl_FUNC_ALLOCA
214
  gl___BUILTIN_EXPECT
215
  gl_BYTESWAP
216 217 218 219 220 221 222
  gl_CANONICALIZE_LGPL
  if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
    AC_LIBOBJ([canonicalize-lgpl])
  fi
  gl_MODULE_INDICATOR([canonicalize-lgpl])
  gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name])
  gl_STDLIB_MODULE_INDICATOR([realpath])
Paul Eggert's avatar
Paul Eggert committed
223
  AC_REQUIRE([AC_C_RESTRICT])
Paul Eggert's avatar
Paul Eggert committed
224 225
  AC_CHECK_FUNCS_ONCE([readlinkat])
  gl_CLOCK_TIME
Paul Eggert's avatar
Paul Eggert committed
226
  gl_MODULE_INDICATOR([close-stream])
227 228 229 230 231
  gl_FUNC_COPY_FILE_RANGE
  if test $HAVE_COPY_FILE_RANGE = 0; then
    AC_LIBOBJ([copy-file-range])
  fi
  gl_UNISTD_MODULE_INDICATOR([copy-file-range])
Paul Eggert's avatar
Paul Eggert committed
232
  AC_REQUIRE([AC_C_RESTRICT])
Paul Eggert's avatar
Paul Eggert committed
233
  gl_MD5
Paul Eggert's avatar
Paul Eggert committed
234
  AC_REQUIRE([AC_C_RESTRICT])
Paul Eggert's avatar
Paul Eggert committed
235
  gl_SHA1
Paul Eggert's avatar
Paul Eggert committed
236
  AC_REQUIRE([AC_C_RESTRICT])
Paul Eggert's avatar
Paul Eggert committed
237
  gl_SHA256
Paul Eggert's avatar
Paul Eggert committed
238
  AC_REQUIRE([AC_C_RESTRICT])
Paul Eggert's avatar
Paul Eggert committed
239
  gl_SHA512
240
  gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE
241
  gl_DIRENT_H
Paul Eggert's avatar
Paul Eggert committed
242
  gl_DOUBLE_SLASH_ROOT
Paul Eggert's avatar
Paul Eggert committed
243
  gl_FUNC_DUP2
Paul Eggert's avatar
Paul Eggert committed
244
  if test $REPLACE_DUP2 = 1; then
Paul Eggert's avatar
Paul Eggert committed
245 246 247 248 249 250
    AC_LIBOBJ([dup2])
    gl_PREREQ_DUP2
  fi
  gl_UNISTD_MODULE_INDICATOR([dup2])
  gl_ENVIRON
  gl_UNISTD_MODULE_INDICATOR([environ])
251
  gl_HEADER_ERRNO_H
252
  gl_EXECINFO_H
253 254 255 256 257 258
  gl_FUNC_EXPLICIT_BZERO
  if test $HAVE_EXPLICIT_BZERO = 0; then
    AC_LIBOBJ([explicit_bzero])
    gl_PREREQ_EXPLICIT_BZERO
  fi
  gl_STRING_MODULE_INDICATOR([explicit_bzero])
Paul Eggert's avatar
Paul Eggert committed
259
  AC_REQUIRE([gl_EXTERN_INLINE])
260
  gl_FUNC_FACCESSAT
Paul Eggert's avatar
Paul Eggert committed
261
  if test $HAVE_FACCESSAT = 0 || test $REPLACE_FACCESSAT = 1; then
262 263 264 265 266
    AC_LIBOBJ([faccessat])
    gl_PREREQ_FACCESSAT
  fi
  gl_MODULE_INDICATOR([faccessat])
  gl_UNISTD_MODULE_INDICATOR([faccessat])
267 268 269 270 271 272
  gl_FUNC_FCHMODAT
  if test $HAVE_FCHMODAT = 0 || test $REPLACE_FCHMODAT = 1; then
    AC_LIBOBJ([fchmodat])
    gl_PREREQ_FCHMODAT
  fi
  gl_SYS_STAT_MODULE_INDICATOR([fchmodat])
273 274 275 276 277
  gl_FUNC_FCNTL
  if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
    AC_LIBOBJ([fcntl])
  fi
  gl_FCNTL_MODULE_INDICATOR([fcntl])
278
  gl_FCNTL_H
279 280 281 282 283 284
  gl_FUNC_FDOPENDIR
  if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
    AC_LIBOBJ([fdopendir])
  fi
  gl_DIRENT_MODULE_INDICATOR([fdopendir])
  gl_MODULE_INDICATOR([fdopendir])
Paul Eggert's avatar
Paul Eggert committed
285
  gl_FILEMODE
286
  AC_C_FLEXIBLE_ARRAY_MEMBER
Paul Eggert's avatar
Paul Eggert committed
287
  gl_FUNC_FPENDING
Paul Eggert's avatar
Paul Eggert committed
288
  if test $gl_cv_func___fpending = no; then
Paul Eggert's avatar
Paul Eggert committed
289 290
    AC_LIBOBJ([fpending])
  fi
291 292 293 294 295
  gl_FUNC_FSTATAT
  if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
    AC_LIBOBJ([fstatat])
  fi
  gl_SYS_STAT_MODULE_INDICATOR([fstatat])
296 297 298 299 300
  gl_FSUSAGE
  if test $gl_cv_fs_space = yes; then
    AC_LIBOBJ([fsusage])
    gl_PREREQ_FSUSAGE_EXTRA
  fi
Paul Eggert's avatar
Paul Eggert committed
301 302 303 304 305 306
  gl_FUNC_FSYNC
  if test $HAVE_FSYNC = 0; then
    AC_LIBOBJ([fsync])
    gl_PREREQ_FSYNC
  fi
  gl_UNISTD_MODULE_INDICATOR([fsync])
307 308 309 310 311
  gl_FUNC_FUTIMENS
  if test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1; then
    AC_LIBOBJ([futimens])
  fi
  gl_SYS_STAT_MODULE_INDICATOR([futimens])
Paul Eggert's avatar
Paul Eggert committed
312
  AC_REQUIRE([AC_CANONICAL_HOST])
Paul Eggert's avatar
Paul Eggert committed
313 314 315 316 317 318 319
  gl_GETLOADAVG
  if test $HAVE_GETLOADAVG = 0; then
    AC_LIBOBJ([getloadavg])
    gl_PREREQ_GETLOADAVG
  fi
  gl_STDLIB_MODULE_INDICATOR([getloadavg])
  gl_FUNC_GETOPT_GNU
Paul Eggert's avatar
Paul Eggert committed
320 321 322
  dnl Because of the way gl_FUNC_GETOPT_GNU is implemented (the gl_getopt_required
  dnl mechanism), there is no need to do any AC_LIBOBJ or AC_SUBST here; they are
  dnl done in the getopt-posix module.
Paul Eggert's avatar
Paul Eggert committed
323 324 325 326 327 328 329 330
  gl_FUNC_GETOPT_POSIX
  if test $REPLACE_GETOPT = 1; then
    AC_LIBOBJ([getopt])
    AC_LIBOBJ([getopt1])
    dnl Arrange for unistd.h to include getopt.h.
    GNULIB_GL_UNISTD_H_GETOPT=1
  fi
  AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
Paul Eggert's avatar
Paul Eggert committed
331
  gl_UNISTD_MODULE_INDICATOR([getopt-posix])
Paul Eggert's avatar
Paul Eggert committed
332
  AC_REQUIRE([AC_CANONICAL_HOST])
Paul Eggert's avatar
Paul Eggert committed
333 334 335 336 337
  gl_FUNC_GETRANDOM
  if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
    AC_LIBOBJ([getrandom])
  fi
  gl_SYS_RANDOM_MODULE_INDICATOR([getrandom])
Paul Eggert's avatar
Paul Eggert committed
338 339 340 341 342 343 344
  gl_GETTIME
  gl_FUNC_GETTIMEOFDAY
  if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
    AC_LIBOBJ([gettimeofday])
    gl_PREREQ_GETTIMEOFDAY
  fi
  gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
345
  gl_IEEE754_H
Paul Eggert's avatar
Paul Eggert committed
346 347
  gl_INTTYPES_INCOMPLETE
  AC_REQUIRE([gl_LARGEFILE])
Paul Eggert's avatar
Paul Eggert committed
348
  gl___INLINE
Paul Eggert's avatar
Paul Eggert committed
349
  gl_LIBGMP
Paul Eggert's avatar
Paul Eggert committed
350
  if test $HAVE_LIBGMP != yes; then
Paul Eggert's avatar
Paul Eggert committed
351 352
    AC_LIBOBJ([mini-gmp-gnulib])
  fi
Paul Eggert's avatar
Paul Eggert committed
353
  gl_LIMITS_H
Paul Eggert's avatar
Paul Eggert committed
354 355 356 357 358 359
  gl_FUNC_LSTAT
  if test $REPLACE_LSTAT = 1; then
    AC_LIBOBJ([lstat])
    gl_PREREQ_LSTAT
  fi
  gl_SYS_STAT_MODULE_INDICATOR([lstat])
360 361 362 363 364
  gl_FUNC_MEMMEM_SIMPLE
  if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
    AC_LIBOBJ([memmem])
  fi
  gl_STRING_MODULE_INDICATOR([memmem])
365 366 367 368 369 370
  gl_FUNC_MEMPCPY
  if test $HAVE_MEMPCPY = 0; then
    AC_LIBOBJ([mempcpy])
    gl_PREREQ_MEMPCPY
  fi
  gl_STRING_MODULE_INDICATOR([mempcpy])
371 372 373 374 375 376
  gl_FUNC_MEMRCHR
  if test $ac_cv_func_memrchr = no; then
    AC_LIBOBJ([memrchr])
    gl_PREREQ_MEMRCHR
  fi
  gl_STRING_MODULE_INDICATOR([memrchr])
377
  gl_MINMAX
378 379 380 381 382 383 384
  gl_FUNC_MKOSTEMP
  if test $HAVE_MKOSTEMP = 0; then
    AC_LIBOBJ([mkostemp])
    gl_PREREQ_MKOSTEMP
  fi
  gl_MODULE_INDICATOR([mkostemp])
  gl_STDLIB_MODULE_INDICATOR([mkostemp])
Paul Eggert's avatar
Paul Eggert committed
385 386 387 388 389 390 391
  gl_FUNC_MKTIME
  if test $REPLACE_MKTIME = 1; then
    AC_LIBOBJ([mktime])
    gl_PREREQ_MKTIME
  fi
  gl_TIME_MODULE_INDICATOR([mktime])
  gl_MULTIARCH
Paul Eggert's avatar
Paul Eggert committed
392
  gl_FUNC_GNU_STRFTIME
Paul Eggert's avatar
Paul Eggert committed
393
  gl_PATHMAX
394 395
  gl_FUNC_PIPE2
  gl_UNISTD_MODULE_INDICATOR([pipe2])
Paul Eggert's avatar
Paul Eggert committed
396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412
  gl_FUNC_PSELECT
  if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
    AC_LIBOBJ([pselect])
  fi
  gl_SYS_SELECT_MODULE_INDICATOR([pselect])
  gl_FUNC_PTHREAD_SIGMASK
  if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
    AC_LIBOBJ([pthread_sigmask])
    gl_PREREQ_PTHREAD_SIGMASK
  fi
  gl_SIGNAL_MODULE_INDICATOR([pthread_sigmask])
  gl_FUNC_READLINK
  if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
    AC_LIBOBJ([readlink])
    gl_PREREQ_READLINK
  fi
  gl_UNISTD_MODULE_INDICATOR([readlink])
413
  gl_FUNC_READLINKAT
Paul Eggert's avatar
Paul Eggert committed
414
  if test $HAVE_READLINKAT = 0 || test $REPLACE_READLINKAT = 1; then
415 416 417
    AC_LIBOBJ([readlinkat])
  fi
  gl_UNISTD_MODULE_INDICATOR([readlinkat])
Paul Eggert's avatar
Paul Eggert committed
418 419 420 421 422
  gl_REGEX
  if test $ac_use_included_regex = yes; then
    AC_LIBOBJ([regex])
    gl_PREREQ_REGEX
  fi
423 424 425 426 427
  gl_FUNC_SIG2STR
  if test $ac_cv_func_sig2str = no; then
    AC_LIBOBJ([sig2str])
    gl_PREREQ_SIG2STR
  fi
428 429 430 431 432
  gl_FUNC_SIGDESCR_NP
  if test $HAVE_SIGDESCR_NP = 0; then
    AC_LIBOBJ([sigdescr_np])
  fi
  gl_STRING_MODULE_INDICATOR([sigdescr_np])
Paul Eggert's avatar
Paul Eggert committed
433 434 435 436 437 438 439 440 441 442
  gl_SIGNAL_H
  gl_TYPE_SOCKLEN_T
  gt_TYPE_SSIZE_T
  gl_STAT_TIME
  gl_STAT_BIRTHTIME
  gl_STDALIGN_H
  gl_STDDEF_H
  gl_STDINT_H
  gl_STDIO_H
  gl_STDLIB_H
Paul Eggert's avatar
Paul Eggert committed
443 444 445 446 447 448
  gl_FUNC_STPCPY
  if test $HAVE_STPCPY = 0; then
    AC_LIBOBJ([stpcpy])
    gl_PREREQ_STPCPY
  fi
  gl_STRING_MODULE_INDICATOR([stpcpy])
449
  gl_HEADER_STRING_H
450 451 452 453 454 455
  gl_FUNC_STRNLEN
  if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
    AC_LIBOBJ([strnlen])
    gl_PREREQ_STRNLEN
  fi
  gl_STRING_MODULE_INDICATOR([strnlen])
Paul Eggert's avatar
Paul Eggert committed
456
  gl_FUNC_STRTOIMAX
Paul Eggert's avatar
Paul Eggert committed
457
  if test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
Paul Eggert's avatar
Paul Eggert committed
458 459 460 461 462 463 464 465 466
    AC_LIBOBJ([strtoimax])
    gl_PREREQ_STRTOIMAX
  fi
  gl_INTTYPES_MODULE_INDICATOR([strtoimax])
  gl_FUNC_SYMLINK
  if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
    AC_LIBOBJ([symlink])
  fi
  gl_UNISTD_MODULE_INDICATOR([symlink])
Paul Eggert's avatar
Paul Eggert committed
467 468
  gl_HEADER_SYS_RANDOM
  AC_PROG_MKDIR_P
469
  AC_REQUIRE([gl_HEADER_SYS_SELECT])
Paul Eggert's avatar
Paul Eggert committed
470 471 472 473 474
  AC_PROG_MKDIR_P
  gl_HEADER_SYS_STAT_H
  AC_PROG_MKDIR_P
  gl_HEADER_SYS_TIME_H
  AC_PROG_MKDIR_P
Paul Eggert's avatar
Paul Eggert committed
475 476
  gl_SYS_TYPES_H
  AC_PROG_MKDIR_P
477
  gl_FUNC_GEN_TEMPNAME
Paul Eggert's avatar
Paul Eggert committed
478
  gl_MODULE_INDICATOR([tempname])
Paul Eggert's avatar
Paul Eggert committed
479 480 481 482 483 484 485
  gl_HEADER_TIME_H
  gl_TIME_R
  if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
    AC_LIBOBJ([time_r])
    gl_PREREQ_TIME_R
  fi
  gl_TIME_MODULE_INDICATOR([time_r])
486
  gl_TIME_RZ
Paul Eggert's avatar
Paul Eggert committed
487
  if test $HAVE_TIMEZONE_T = 0; then
488 489 490 491 492 493 494 495 496
    AC_LIBOBJ([time_rz])
  fi
  gl_TIME_MODULE_INDICATOR([time_rz])
  gl_FUNC_TIMEGM
  if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then
    AC_LIBOBJ([timegm])
    gl_PREREQ_TIMEGM
  fi
  gl_TIME_MODULE_INDICATOR([timegm])
497
  gl_TIMER_TIME
Paul Eggert's avatar
Paul Eggert committed
498 499
  gl_TIMESPEC
  gl_UNISTD_H
500
  gl_FUNC_GLIBC_UNLOCKED_IO
501 502 503 504 505
  gl_FUNC_UTIMENSAT
  if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then
    AC_LIBOBJ([utimensat])
  fi
  gl_SYS_STAT_MODULE_INDICATOR([utimensat])
Paul Eggert's avatar
Paul Eggert committed
506
  AC_C_VARARRAYS
507
  gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
508
  gl_gnulib_enabled_cloexec=false
Paul Eggert's avatar
Paul Eggert committed
509
  gl_gnulib_enabled_dirfd=false
510
  gl_gnulib_enabled_euidaccess=false
511
  gl_gnulib_enabled_getdtablesize=false
512
  gl_gnulib_enabled_getgroups=false
513
  gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
514
  gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
515
  gl_gnulib_enabled_lchmod=false
516
  gl_gnulib_enabled_malloca=false
517
  gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31=false
Paul Eggert's avatar
Paul Eggert committed
518
  gl_gnulib_enabled_open=false
519
  gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false
520
  gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
521
  gl_gnulib_enabled_strtoll=false
522
  gl_gnulib_enabled_utimens=false
523
  gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
524 525 526
  func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b ()
  {
    if ! $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
Paul Eggert's avatar
Paul Eggert committed
527
      AC_REQUIRE([AC_CANONICAL_HOST])
528
      gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=true
Paul Eggert's avatar
Paul Eggert committed
529 530 531
      if case $host_os in mingw*) false;; *) :;; esac; then
        func_gl_gnulib_m4code_open
      fi
532 533 534 535 536 537 538
    fi
  }
  func_gl_gnulib_m4code_cloexec ()
  {
    if ! $gl_gnulib_enabled_cloexec; then
      gl_MODULE_INDICATOR_FOR_TESTS([cloexec])
      gl_gnulib_enabled_cloexec=true
539 540
    fi
  }
Paul Eggert's avatar
Paul Eggert committed
541 542 543 544
  func_gl_gnulib_m4code_dirfd ()
  {
    if ! $gl_gnulib_enabled_dirfd; then
      gl_FUNC_DIRFD
Paul Eggert's avatar
Paul Eggert committed
545 546
      if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
         || test $REPLACE_DIRFD = 1; then
Paul Eggert's avatar
Paul Eggert committed
547 548 549 550 551 552 553
        AC_LIBOBJ([dirfd])
        gl_PREREQ_DIRFD
      fi
      gl_DIRENT_MODULE_INDICATOR([dirfd])
      gl_gnulib_enabled_dirfd=true
    fi
  }
554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569
  func_gl_gnulib_m4code_euidaccess ()
  {
    if ! $gl_gnulib_enabled_euidaccess; then
      gl_FUNC_EUIDACCESS
      if test $HAVE_EUIDACCESS = 0; then
        AC_LIBOBJ([euidaccess])
        gl_PREREQ_EUIDACCESS
      fi
      gl_UNISTD_MODULE_INDICATOR([euidaccess])
      gl_gnulib_enabled_euidaccess=true
      if test $HAVE_EUIDACCESS = 0; then
        func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1
      fi
      func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c
    fi
  }
570 571 572 573
  func_gl_gnulib_m4code_getdtablesize ()
  {
    if ! $gl_gnulib_enabled_getdtablesize; then
      gl_FUNC_GETDTABLESIZE
Paul Eggert's avatar
Paul Eggert committed
574
      if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
575 576 577 578 579 580 581
        AC_LIBOBJ([getdtablesize])
        gl_PREREQ_GETDTABLESIZE
      fi
      gl_UNISTD_MODULE_INDICATOR([getdtablesize])
      gl_gnulib_enabled_getdtablesize=true
    fi
  }
582 583 584 585 586 587 588 589 590 591 592
  func_gl_gnulib_m4code_getgroups ()
  {
    if ! $gl_gnulib_enabled_getgroups; then
      gl_FUNC_GETGROUPS
      if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
        AC_LIBOBJ([getgroups])
      fi
      gl_UNISTD_MODULE_INDICATOR([getgroups])
      gl_gnulib_enabled_getgroups=true
    fi
  }
593 594 595
  func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
  {
    if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
Paul Eggert's avatar
Paul Eggert committed
596 597
      AC_SUBST([LIBINTL])
      AC_SUBST([LTLIBINTL])
598 599 600
      gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
    fi
  }
601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618
  func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 ()
  {
    if ! $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
      gl_FUNC_GROUP_MEMBER
      if test $HAVE_GROUP_MEMBER = 0; then
        AC_LIBOBJ([group-member])
        gl_PREREQ_GROUP_MEMBER
      fi
      gl_UNISTD_MODULE_INDICATOR([group-member])
      gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true
      if test $HAVE_GROUP_MEMBER = 0; then
        func_gl_gnulib_m4code_getgroups
      fi
      if test $HAVE_GROUP_MEMBER = 0; then
        func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
      fi
    fi
  }
619 620 621 622 623 624 625 626 627 628 629 630
  func_gl_gnulib_m4code_lchmod ()
  {
    if ! $gl_gnulib_enabled_lchmod; then
      gl_FUNC_LCHMOD
      if test $HAVE_LCHMOD = 0; then
        AC_LIBOBJ([lchmod])
        gl_PREREQ_LCHMOD
      fi
      gl_SYS_STAT_MODULE_INDICATOR([lchmod])
      gl_gnulib_enabled_lchmod=true
    fi
  }
631 632 633 634 635 636 637 638
  func_gl_gnulib_m4code_malloca ()
  {
    if ! $gl_gnulib_enabled_malloca; then
      gl_MALLOCA
      gl_gnulib_enabled_malloca=true
      func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
    fi
  }
639 640 641 642
  func_gl_gnulib_m4code_5264294aa0a5557541b53c8c741f7f31 ()
  {
    if ! $gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31; then
      gl_FUNC_MKTIME_INTERNAL
Paul Eggert's avatar
Paul Eggert committed
643
      if test $WANT_MKTIME_INTERNAL = 1; then
644 645 646 647 648 649
        AC_LIBOBJ([mktime])
        gl_PREREQ_MKTIME
      fi
      gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31=true
    fi
  }
Paul Eggert's avatar
Paul Eggert committed
650 651 652 653 654 655 656 657 658 659 660 661 662 663 664
  func_gl_gnulib_m4code_open ()
  {
    if ! $gl_gnulib_enabled_open; then
      gl_FUNC_OPEN
      if test $REPLACE_OPEN = 1; then
        AC_LIBOBJ([open])
        gl_PREREQ_OPEN
      fi
      gl_FCNTL_MODULE_INDICATOR([open])
      gl_gnulib_enabled_open=true
      if test $REPLACE_OPEN = 1; then
        func_gl_gnulib_m4code_cloexec
      fi
    fi
  }
665 666 667 668 669 670
  func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 ()
  {
    if ! $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
      gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=true
    fi
  }
671 672 673 674 675 676
  func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c ()
  {
    if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
      gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true
    fi
  }
677 678 679
  func_gl_gnulib_m4code_strtoll ()
  {
    if ! $gl_gnulib_enabled_strtoll; then
Paul Eggert's avatar
Paul Eggert committed
680 681 682 683 684 685
      gl_FUNC_STRTOLL
      if test $HAVE_STRTOLL = 0; then
        AC_LIBOBJ([strtoll])
        gl_PREREQ_STRTOLL
      fi
      gl_STDLIB_MODULE_INDICATOR([strtoll])
686 687 688
      gl_gnulib_enabled_strtoll=true
    fi
  }
689 690 691 692 693 694 695
  func_gl_gnulib_m4code_utimens ()
  {
    if ! $gl_gnulib_enabled_utimens; then
      gl_UTIMENS
      gl_gnulib_enabled_utimens=true
    fi
  }
696 697 698 699 700 701
  func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
  {
    if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
      gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true
    fi
  }
702 703 704
  if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
    func_gl_gnulib_m4code_malloca
  fi
Paul Eggert's avatar
Paul Eggert committed
705
  if test $HAVE_FACCESSAT = 0 || test $REPLACE_FACCESSAT = 1; then
706
    func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
707
  fi
708 709 710
  if test $HAVE_FACCESSAT = 0 || test $REPLACE_FACCESSAT = 1; then
    func_gl_gnulib_m4code_euidaccess
  fi
Paul Eggert's avatar
Paul Eggert committed
711
  if test $HAVE_FACCESSAT = 0 || test $REPLACE_FACCESSAT = 1; then
712 713
    func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
  fi
714 715 716 717 718 719 720 721 722
  if test $HAVE_FCHMODAT = 0; then
    func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
  fi
  if test $HAVE_FCHMODAT = 0; then
    func_gl_gnulib_m4code_lchmod
  fi
  if test $HAVE_FCHMODAT = 0; then
    func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
  fi
723 724 725
  if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
    func_gl_gnulib_m4code_getdtablesize
  fi
726 727 728
  if test $HAVE_FDOPENDIR = 0; then
    func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
  fi
Paul Eggert's avatar
Paul Eggert committed
729 730 731
  if test $HAVE_FDOPENDIR = 0; then
    func_gl_gnulib_m4code_dirfd
  fi
732 733 734 735 736 737
  if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
    func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
  fi
  if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
    func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
  fi
738 739 740
  if test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1; then
    func_gl_gnulib_m4code_utimens
  fi
Paul Eggert's avatar
Paul Eggert committed
741 742 743
  if case $host_os in mingw*) false;; *) test $HAVE_GETLOADAVG = 0;; esac; then
    func_gl_gnulib_m4code_open
  fi
744
  if test $REPLACE_GETOPT = 1; then
745 746
    func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
  fi
Paul Eggert's avatar
Paul Eggert committed
747 748 749
  if case $host_os in mingw*) false;; *) test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1;; esac; then
    func_gl_gnulib_m4code_open
  fi
750 751 752 753 754 755
  if test $HAVE_READLINKAT = 0; then
    func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
  fi
  if test $HAVE_READLINKAT = 0; then
    func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
  fi
Paul Eggert's avatar
Paul Eggert committed
756
  if { test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
757 758
    func_gl_gnulib_m4code_strtoll
  fi
759 760 761
  if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then
    func_gl_gnulib_m4code_5264294aa0a5557541b53c8c741f7f31
  fi
762 763 764 765 766 767 768 769 770
  if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then
    func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
  fi
  if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then
    func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
  fi
  if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then
    func_gl_gnulib_m4code_utimens
  fi
771
  m4_pattern_allow([^gl_GNULIB_ENABLED_])
772
  AM_CONDITIONAL([gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b], [$gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b])
773
  AM_CONDITIONAL([gl_GNULIB_ENABLED_cloexec], [$gl_gnulib_enabled_cloexec])
Paul Eggert's avatar
Paul Eggert committed
774
  AM_CONDITIONAL([gl_GNULIB_ENABLED_dirfd], [$gl_gnulib_enabled_dirfd])
775
  AM_CONDITIONAL([gl_GNULIB_ENABLED_euidaccess], [$gl_gnulib_enabled_euidaccess])
776
  AM_CONDITIONAL([gl_GNULIB_ENABLED_getdtablesize], [$gl_gnulib_enabled_getdtablesize])
777
  AM_CONDITIONAL([gl_GNULIB_ENABLED_getgroups], [$gl_gnulib_enabled_getgroups])
778
  AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [$gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36])
779
  AM_CONDITIONAL([gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1], [$gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1])
780
  AM_CONDITIONAL([gl_GNULIB_ENABLED_lchmod], [$gl_gnulib_enabled_lchmod])
781
  AM_CONDITIONAL([gl_GNULIB_ENABLED_malloca], [$gl_gnulib_enabled_malloca])
782
  AM_CONDITIONAL([gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31], [$gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31])
Paul Eggert's avatar
Paul Eggert committed
783
  AM_CONDITIONAL([gl_GNULIB_ENABLED_open], [$gl_gnulib_enabled_open])
784
  AM_CONDITIONAL([gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7], [$gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7])
785
  AM_CONDITIONAL([gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c], [$gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c])
786
  AM_CONDITIONAL([gl_GNULIB_ENABLED_strtoll], [$gl_gnulib_enabled_strtoll])
787
  AM_CONDITIONAL([gl_GNULIB_ENABLED_utimens], [$gl_gnulib_enabled_utimens])
788
  AM_CONDITIONAL([gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec], [$gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec])
Paul Eggert's avatar
Paul Eggert committed
789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834
  # End of code from modules
  m4_ifval(gl_LIBSOURCES_LIST, [
    m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
      for gl_file in ]gl_LIBSOURCES_LIST[ ; do
        if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
          echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
          exit 1
        fi
      done])dnl
      m4_if(m4_sysval, [0], [],
        [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
  ])
  m4_popdef([gl_LIBSOURCES_DIR])
  m4_popdef([gl_LIBSOURCES_LIST])
  m4_popdef([AC_LIBSOURCES])
  m4_popdef([AC_REPLACE_FUNCS])
  m4_popdef([AC_LIBOBJ])
  AC_CONFIG_COMMANDS_PRE([
    gl_libobjs=
    gl_ltlibobjs=
    if test -n "$gl_LIBOBJS"; then
      # Remove the extension.
      sed_drop_objext='s/\.o$//;s/\.obj$//'
      for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
        gl_libobjs="$gl_libobjs $i.$ac_objext"
        gl_ltlibobjs="$gl_ltlibobjs $i.lo"
      done
    fi
    AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
    AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
  ])
  gltests_libdeps=
  gltests_ltlibdeps=
  m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
  m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
  m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
  m4_pushdef([gltests_LIBSOURCES_LIST], [])
  m4_pushdef([gltests_LIBSOURCES_DIR], [])
  gl_COMMON
  gl_source_base='tests'
changequote(,)dnl
  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
changequote([, ])dnl
  AC_SUBST([gltests_WITNESS])
  gl_module_indicator_condition=$gltests_WITNESS
  m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
835
  m4_pattern_allow([^gl_GNULIB_ENABLED_])
Paul Eggert's avatar
Paul Eggert committed
836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929
  m4_popdef([gl_MODULE_INDICATOR_CONDITION])
  m4_ifval(gltests_LIBSOURCES_LIST, [
    m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
      for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
        if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
          echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
          exit 1
        fi
      done])dnl
      m4_if(m4_sysval, [0], [],
        [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
  ])
  m4_popdef([gltests_LIBSOURCES_DIR])
  m4_popdef([gltests_LIBSOURCES_LIST])
  m4_popdef([AC_LIBSOURCES])
  m4_popdef([AC_REPLACE_FUNCS])
  m4_popdef([AC_LIBOBJ])
  AC_CONFIG_COMMANDS_PRE([
    gltests_libobjs=
    gltests_ltlibobjs=
    if test -n "$gltests_LIBOBJS"; then
      # Remove the extension.
      sed_drop_objext='s/\.o$//;s/\.obj$//'
      for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
        gltests_libobjs="$gltests_libobjs $i.$ac_objext"
        gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
      done
    fi
    AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
    AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
  ])
  LIBGNU_LIBDEPS="$gl_libdeps"
  AC_SUBST([LIBGNU_LIBDEPS])
  LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
  AC_SUBST([LIBGNU_LTLIBDEPS])
])

# Like AC_LIBOBJ, except that the module name goes
# into gl_LIBOBJS instead of into LIBOBJS.
AC_DEFUN([gl_LIBOBJ], [
  AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
  gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
])

# Like AC_REPLACE_FUNCS, except that the module name goes
# into gl_LIBOBJS instead of into LIBOBJS.
AC_DEFUN([gl_REPLACE_FUNCS], [
  m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
  AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
])

# Like AC_LIBSOURCES, except the directory where the source file is
# expected is derived from the gnulib-tool parameterization,
# and alloca is special cased (for the alloca-opt module).
# We could also entirely rely on EXTRA_lib..._SOURCES.
AC_DEFUN([gl_LIBSOURCES], [
  m4_foreach([_gl_NAME], [$1], [
    m4_if(_gl_NAME, [alloca.c], [], [
      m4_define([gl_LIBSOURCES_DIR], [lib])
      m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
    ])
  ])
])

# Like AC_LIBOBJ, except that the module name goes
# into gltests_LIBOBJS instead of into LIBOBJS.
AC_DEFUN([gltests_LIBOBJ], [
  AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
  gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
])

# Like AC_REPLACE_FUNCS, except that the module name goes
# into gltests_LIBOBJS instead of into LIBOBJS.
AC_DEFUN([gltests_REPLACE_FUNCS], [
  m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
  AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
])

# Like AC_LIBSOURCES, except the directory where the source file is
# expected is derived from the gnulib-tool parameterization,
# and alloca is special cased (for the alloca-opt module).
# We could also entirely rely on EXTRA_lib..._SOURCES.
AC_DEFUN([gltests_LIBSOURCES], [
  m4_foreach([_gl_NAME], [$1], [
    m4_if(_gl_NAME, [alloca.c], [], [
      m4_define([gltests_LIBSOURCES_DIR], [tests])
      m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
    ])
  ])
])

# This macro records the list of files which have been installed by
# gnulib-tool and may be removed by future gnulib-tool invocations.
AC_DEFUN([gl_FILE_LIST], [
930
  build-aux/gitlog-to-changelog
931
  build-aux/update-copyright
Paul Eggert's avatar
Paul Eggert committed
932
  lib/_Noreturn.h
933
  lib/acl-errno-valid.c
Paul Eggert's avatar
Paul Eggert committed
934
  lib/acl-internal.c
935 936 937
  lib/acl-internal.h
  lib/acl.h
  lib/acl_entries.c
Paul Eggert's avatar
Paul Eggert committed
938
  lib/alloca.in.h
Paul Eggert's avatar
Paul Eggert committed
939
  lib/allocator.c
940
  lib/allocator.h
Paul Eggert's avatar
Paul Eggert committed
941
  lib/arg-nonnull.h
942
  lib/at-func.c
Paul Eggert's avatar
Paul Eggert committed
943
  lib/attribute.h
944 945
  lib/binary-io.c
  lib/binary-io.h
946
  lib/byteswap.in.h
Paul Eggert's avatar
Paul Eggert committed
947
  lib/c++defs.h
948 949 950 951 952
  lib/c-ctype.c
  lib/c-ctype.h
  lib/c-strcase.h
  lib/c-strcasecmp.c
  lib/c-strncasecmp.c
953
  lib/canonicalize-lgpl.c
954 955
  lib/careadlinkat.c
  lib/careadlinkat.h
956
  lib/cdefs.h
957 958
  lib/cloexec.c
  lib/cloexec.h
Paul Eggert's avatar
Paul Eggert committed
959 960
  lib/close-stream.c
  lib/close-stream.h
961
  lib/copy-file-range.c
962 963
  lib/count-leading-zeros.c
  lib/count-leading-zeros.h
964 965 966 967
  lib/count-one-bits.c
  lib/count-one-bits.h
  lib/count-trailing-zeros.c
  lib/count-trailing-zeros.h
968
  lib/diffseq.h
969
  lib/dirent.in.h
Paul Eggert's avatar
Paul Eggert committed
970
  lib/dirfd.c
Paul Eggert's avatar
Paul Eggert committed
971
  lib/dtoastr.c
972
  lib/dtotimespec.c
973
  lib/dup2.c
974
  lib/errno.in.h
975
  lib/euidaccess.c
976 977
  lib/execinfo.c
  lib/execinfo.in.h
978
  lib/explicit_bzero.c
979
  lib/faccessat.c
980
  lib/fchmodat.c
981
  lib/fcntl.c
982
  lib/fcntl.in.h
983
  lib/fdopendir.c
984 985
  lib/filemode.c
  lib/filemode.h
Paul Eggert's avatar
Paul Eggert committed
986
  lib/filename.h
987 988
  lib/filevercmp.c
  lib/filevercmp.h
Paul Eggert's avatar
Paul Eggert committed
989
  lib/flexmember.h
Paul Eggert's avatar
Paul Eggert committed
990 991
  lib/fpending.c
  lib/fpending.h
992
  lib/fstatat.c
993 994
  lib/fsusage.c
  lib/fsusage.h
Paul Eggert's avatar
Paul Eggert committed
995
  lib/fsync.c
Paul Eggert's avatar
Paul Eggert committed
996 997
  lib/ftoastr.c
  lib/ftoastr.h
998
  lib/futimens.c
Paul Eggert's avatar
Paul Eggert committed
999
  lib/get-permissions.c
1000
  lib/getdtablesize.c
1001
  lib/getgroups.c
1002
  lib/getloadavg.c
Paul Eggert's avatar
Paul Eggert committed
1003 1004 1005 1006 1007
  lib/getopt-cdefs.in.h
  lib/getopt-core.h
  lib/getopt-ext.h
  lib/getopt-pfx-core.h
  lib/getopt-pfx-ext.h
Paul Eggert's avatar
Paul Eggert committed
1008 1009 1010 1011
  lib/getopt.c
  lib/getopt.in.h
  lib/getopt1.c
  lib/getopt_int.h
Paul Eggert's avatar
Paul Eggert committed
1012
  lib/getrandom.c
Paul Eggert's avatar
Paul Eggert committed
1013
  lib/gettext.h
1014 1015
  lib/gettime.c
  lib/gettimeofday.c
1016
  lib/gl_openssl.h
1017
  lib/group-member.c
1018
  lib/ieee754.in.h
Paul Eggert's avatar
Paul Eggert committed
1019
  lib/ignore-value.h
Paul Eggert's avatar
Paul Eggert committed
1020
  lib/intprops.h
1021
  lib/inttypes.in.h
1022
  lib/lchmod.c
1023
  lib/libc-config.h
Paul Eggert's avatar
Paul Eggert committed
1024
  lib/limits.in.h
Paul Eggert's avatar
Paul Eggert committed
1025
  lib/lstat.c
1026 1027
  lib/malloca.c
  lib/malloca.h
1028 1029
  lib/md5.c
  lib/md5.h
1030
  lib/memmem.c
1031
  lib/mempcpy.c
1032
  lib/memrchr.c
Paul Eggert's avatar
Paul Eggert committed
1033 1034 1035
  lib/mini-gmp-gnulib.c
  lib/mini-gmp.c
  lib/mini-gmp.h
1036
  lib/minmax.h
1037
  lib/mkostemp.c
Paul Eggert's avatar
Paul Eggert committed
1038 1039
  lib/mktime-internal.h
  lib/mktime.c
Paul Eggert's avatar
Paul Eggert committed
1040
  lib/nstrftime.c
1041
  lib/open.c
1042 1043 1044
  lib/openat-priv.h
  lib/openat-proc.c
  lib/openat.h
1045
  lib/pathmax.h
1046
  lib/pipe2.c
1047
  lib/pselect.c
1048
  lib/pthread_sigmask.c
1049
  lib/qcopy-acl.c
Paul Eggert's avatar
Paul Eggert committed
1050
  lib/readlink.c
1051
  lib/readlinkat.c
Paul Eggert's avatar
Paul Eggert committed
1052 1053 1054 1055 1056 1057
  lib/regcomp.c
  lib/regex.c
  lib/regex.h
  lib/regex_internal.c
  lib/regex_internal.h
  lib/regexec.c
1058
  lib/root-uid.h
Paul Eggert's avatar
Paul Eggert committed
1059
  lib/set-permissions.c
Leo Liu's avatar
Leo Liu committed
1060 1061
  lib/sha1.c
  lib/sha1.h
1062 1063 1064 1065
  lib/sha256.c
  lib/sha256.h
  lib/sha512.c
  lib/sha512.h
1066 1067
  lib/sig2str.c
  lib/sig2str.h
1068
  lib/sigdescr_np.c
1069
  lib/signal.in.h
1070
  lib/stat-time.c
1071
  lib/stat-time.h
Paul Eggert's avatar
Paul Eggert committed
1072
  lib/stdalign.in.h
Paul Eggert's avatar
Paul Eggert committed
1073
  lib/stddef.in.h
1074
  lib/stdint.in.h
Paul Eggert's avatar
Paul Eggert committed
1075
  lib/stdio-impl.h
Paul Eggert's avatar
Paul Eggert committed
1076
  lib/stdio.in.h
1077
  lib/stdlib.in.h
Paul Eggert's avatar
Paul Eggert committed
1078
  lib/stpcpy.c
1079
  lib/str-two-way.h
Paul Eggert's avatar
Paul Eggert committed
1080
  lib/strftime.h
1081
  lib/string.in.h
1082
  lib/strnlen.c
1083 1084
  lib/strtoimax.c
  lib/strtol.c
1085
  lib/strtoll.c
Paul Eggert's avatar
Paul Eggert committed
1086
  lib/symlink.c
Paul Eggert's avatar
Paul Eggert committed
1087
  lib/sys_random.in.h
1088
  lib/sys_select.in.h
1089
  lib/sys_stat.in.h
1090
  lib/sys_time.in.h
Paul Eggert's avatar
Paul Eggert committed
1091
  lib/sys_types.in.h
1092 1093
  lib/tempname.c