gnulib-comp.m4 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988
  1. # DO NOT EDIT! GENERATED AUTOMATICALLY!
  2. # Copyright (C) 2002-2015 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. # This macro should be invoked from ./configure.ac, in the section
  30. # "Checks for programs", right after AC_PROG_CC, and certainly before
  31. # any checks for libraries, header files, types and library functions.
  32. AC_DEFUN([gl_EARLY],
  33. [
  34. m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace
  35. m4_pattern_allow([^gl_ES$])dnl a valid locale name
  36. m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
  37. m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
  38. AC_REQUIRE([gl_PROG_AR_RANLIB])
  39. AC_REQUIRE([AM_PROG_CC_C_O])
  40. # Code from module absolute-header:
  41. # Code from module alloca-opt:
  42. # Code from module argmatch:
  43. # Code from module arpa_inet:
  44. # Code from module assure:
  45. # Code from module base64:
  46. # Code from module btowc:
  47. # Code from module c-ctype:
  48. # Code from module c-strcase:
  49. # Code from module c-strcaseeq:
  50. # Code from module configmake:
  51. # Code from module crypto/sha1:
  52. # Code from module dirname:
  53. # Code from module dirname-lgpl:
  54. # Code from module dosname:
  55. # Code from module double-slash-root:
  56. # Code from module environ:
  57. # Code from module errno:
  58. # Code from module error:
  59. # Code from module exitfail:
  60. # Code from module extensions:
  61. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
  62. # Code from module extern-inline:
  63. # Code from module fd-hook:
  64. # Code from module float:
  65. # Code from module floorf:
  66. # Code from module fsusage:
  67. # Code from module full-read:
  68. # Code from module getaddrinfo:
  69. # Code from module gethostname:
  70. # Code from module getloadavg:
  71. # Code from module getopt-gnu:
  72. # Code from module getopt-posix:
  73. # Code from module gettext:
  74. # Code from module gettext-h:
  75. # Code from module gettimeofday:
  76. # Code from module havelib:
  77. # Code from module hostent:
  78. # Code from module human:
  79. # Code from module idpriv-droptemp:
  80. # Code from module include_next:
  81. # Code from module inet_ntop:
  82. # Code from module intprops:
  83. # Code from module inttypes-incomplete:
  84. # Code from module langinfo:
  85. # Code from module largefile:
  86. AC_REQUIRE([AC_SYS_LARGEFILE])
  87. # Code from module localcharset:
  88. # Code from module locale:
  89. # Code from module localeconv:
  90. # Code from module lock:
  91. # Code from module malloc-posix:
  92. # Code from module malloca:
  93. # Code from module math:
  94. # Code from module mbrtowc:
  95. # Code from module mbsinit:
  96. # Code from module mbtowc:
  97. # Code from module memchr:
  98. # Code from module mktime:
  99. # Code from module mktime-internal:
  100. # Code from module mountlist:
  101. # Code from module msvc-inval:
  102. # Code from module msvc-nothrow:
  103. # Code from module multiarch:
  104. # Code from module netdb:
  105. # Code from module netinet_in:
  106. # Code from module nl_langinfo:
  107. # Code from module nocrash:
  108. # Code from module quote:
  109. # Code from module quotearg:
  110. # Code from module quotearg-simple:
  111. # Code from module read:
  112. # Code from module regex:
  113. # Code from module safe-read:
  114. # Code from module servent:
  115. # Code from module setenv:
  116. # Code from module size_max:
  117. # Code from module snippet/_Noreturn:
  118. # Code from module snippet/arg-nonnull:
  119. # Code from module snippet/c++defs:
  120. # Code from module snippet/warn-on-use:
  121. # Code from module snprintf:
  122. # Code from module socketlib:
  123. # Code from module sockets:
  124. # Code from module socklen:
  125. # Code from module ssize_t:
  126. # Code from module stdalign:
  127. # Code from module stdbool:
  128. # Code from module stddef:
  129. # Code from module stdint:
  130. # Code from module stdio:
  131. # Code from module stdlib:
  132. # Code from module strcase:
  133. # Code from module strcasestr:
  134. # Code from module strcasestr-simple:
  135. # Code from module streq:
  136. # Code from module strerror:
  137. # Code from module strerror-override:
  138. # Code from module string:
  139. # Code from module strings:
  140. # Code from module strndup:
  141. # Code from module strnlen:
  142. # Code from module strsep:
  143. # Code from module strstr-simple:
  144. # Code from module strtoull:
  145. # Code from module strtoumax:
  146. # Code from module sys_socket:
  147. # Code from module sys_time:
  148. # Code from module sys_types:
  149. # Code from module sys_uio:
  150. # Code from module threadlib:
  151. gl_THREADLIB_EARLY
  152. # Code from module time:
  153. # Code from module time_r:
  154. # Code from module timegm:
  155. # Code from module unistd:
  156. # Code from module unsetenv:
  157. # Code from module vasnprintf:
  158. # Code from module vasprintf:
  159. # Code from module verify:
  160. # Code from module vsnprintf:
  161. # Code from module wchar:
  162. # Code from module wcrtomb:
  163. # Code from module wctype-h:
  164. # Code from module xalloc:
  165. # Code from module xalloc-die:
  166. # Code from module xalloc-oversized:
  167. # Code from module xsize:
  168. # Code from module xstrndup:
  169. # Code from module xstrtol:
  170. # Code from module xstrtoumax:
  171. ])
  172. # This macro should be invoked from ./configure.ac, in the section
  173. # "Check for header files, types and library functions".
  174. AC_DEFUN([gl_INIT],
  175. [
  176. AM_CONDITIONAL([GL_COND_LIBTOOL], [false])
  177. gl_cond_libtool=false
  178. gl_libdeps=
  179. gl_ltlibdeps=
  180. gl_m4_base='gl/m4'
  181. m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
  182. m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
  183. m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
  184. m4_pushdef([gl_LIBSOURCES_LIST], [])
  185. m4_pushdef([gl_LIBSOURCES_DIR], [])
  186. gl_COMMON
  187. gl_source_base='gl'
  188. gl_FUNC_ALLOCA
  189. gl_HEADER_ARPA_INET
  190. AC_PROG_MKDIR_P
  191. gl_FUNC_BASE64
  192. gl_FUNC_BTOWC
  193. if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
  194. AC_LIBOBJ([btowc])
  195. gl_PREREQ_BTOWC
  196. fi
  197. gl_WCHAR_MODULE_INDICATOR([btowc])
  198. gl_CONFIGMAKE_PREP
  199. gl_SHA1
  200. gl_DIRNAME
  201. gl_MODULE_INDICATOR([dirname])
  202. gl_DIRNAME_LGPL
  203. gl_DOUBLE_SLASH_ROOT
  204. gl_ENVIRON
  205. gl_UNISTD_MODULE_INDICATOR([environ])
  206. gl_HEADER_ERRNO_H
  207. gl_ERROR
  208. if test $ac_cv_lib_error_at_line = no; then
  209. AC_LIBOBJ([error])
  210. gl_PREREQ_ERROR
  211. fi
  212. m4_ifdef([AM_XGETTEXT_OPTION],
  213. [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
  214. AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
  215. AC_REQUIRE([gl_EXTERN_INLINE])
  216. gl_FLOAT_H
  217. if test $REPLACE_FLOAT_LDBL = 1; then
  218. AC_LIBOBJ([float])
  219. fi
  220. if test $REPLACE_ITOLD = 1; then
  221. AC_LIBOBJ([itold])
  222. fi
  223. gl_FUNC_FLOORF
  224. if test $HAVE_DECL_FLOORF = 0 || test $REPLACE_FLOORF = 1; then
  225. AC_LIBOBJ([floorf])
  226. fi
  227. gl_MATH_MODULE_INDICATOR([floorf])
  228. gl_FSUSAGE
  229. if test $gl_cv_fs_space = yes; then
  230. AC_LIBOBJ([fsusage])
  231. gl_PREREQ_FSUSAGE_EXTRA
  232. fi
  233. gl_GETADDRINFO
  234. if test $HAVE_GETADDRINFO = 0; then
  235. AC_LIBOBJ([getaddrinfo])
  236. fi
  237. if test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1; then
  238. AC_LIBOBJ([gai_strerror])
  239. fi
  240. gl_NETDB_MODULE_INDICATOR([getaddrinfo])
  241. gl_FUNC_GETHOSTNAME
  242. if test $HAVE_GETHOSTNAME = 0; then
  243. AC_LIBOBJ([gethostname])
  244. gl_PREREQ_GETHOSTNAME
  245. fi
  246. gl_UNISTD_MODULE_INDICATOR([gethostname])
  247. gl_GETLOADAVG
  248. if test $HAVE_GETLOADAVG = 0; then
  249. AC_LIBOBJ([getloadavg])
  250. gl_PREREQ_GETLOADAVG
  251. fi
  252. gl_STDLIB_MODULE_INDICATOR([getloadavg])
  253. gl_FUNC_GETOPT_GNU
  254. if test $REPLACE_GETOPT = 1; then
  255. AC_LIBOBJ([getopt])
  256. AC_LIBOBJ([getopt1])
  257. gl_PREREQ_GETOPT
  258. dnl Arrange for unistd.h to include getopt.h.
  259. GNULIB_GL_UNISTD_H_GETOPT=1
  260. fi
  261. AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
  262. gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
  263. gl_FUNC_GETOPT_POSIX
  264. if test $REPLACE_GETOPT = 1; then
  265. AC_LIBOBJ([getopt])
  266. AC_LIBOBJ([getopt1])
  267. gl_PREREQ_GETOPT
  268. dnl Arrange for unistd.h to include getopt.h.
  269. GNULIB_GL_UNISTD_H_GETOPT=1
  270. fi
  271. AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
  272. dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
  273. AM_GNU_GETTEXT_VERSION([0.18.1])
  274. AC_SUBST([LIBINTL])
  275. AC_SUBST([LTLIBINTL])
  276. gl_FUNC_GETTIMEOFDAY
  277. if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
  278. AC_LIBOBJ([gettimeofday])
  279. gl_PREREQ_GETTIMEOFDAY
  280. fi
  281. gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
  282. gl_HOSTENT
  283. gl_HUMAN
  284. gl_IDPRIV
  285. gl_FUNC_INET_NTOP
  286. if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
  287. AC_LIBOBJ([inet_ntop])
  288. gl_PREREQ_INET_NTOP
  289. fi
  290. gl_ARPA_INET_MODULE_INDICATOR([inet_ntop])
  291. gl_INTTYPES_INCOMPLETE
  292. gl_LANGINFO_H
  293. AC_REQUIRE([gl_LARGEFILE])
  294. gl_LOCALCHARSET
  295. LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
  296. AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
  297. gl_LOCALE_H
  298. gl_FUNC_LOCALECONV
  299. if test $REPLACE_LOCALECONV = 1; then
  300. AC_LIBOBJ([localeconv])
  301. gl_PREREQ_LOCALECONV
  302. fi
  303. gl_LOCALE_MODULE_INDICATOR([localeconv])
  304. gl_LOCK
  305. gl_MODULE_INDICATOR([lock])
  306. gl_FUNC_MALLOC_POSIX
  307. if test $REPLACE_MALLOC = 1; then
  308. AC_LIBOBJ([malloc])
  309. fi
  310. gl_STDLIB_MODULE_INDICATOR([malloc-posix])
  311. gl_MALLOCA
  312. gl_MATH_H
  313. gl_FUNC_MBRTOWC
  314. if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
  315. AC_LIBOBJ([mbrtowc])
  316. gl_PREREQ_MBRTOWC
  317. fi
  318. gl_WCHAR_MODULE_INDICATOR([mbrtowc])
  319. gl_FUNC_MBSINIT
  320. if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
  321. AC_LIBOBJ([mbsinit])
  322. gl_PREREQ_MBSINIT
  323. fi
  324. gl_WCHAR_MODULE_INDICATOR([mbsinit])
  325. gl_FUNC_MBTOWC
  326. if test $REPLACE_MBTOWC = 1; then
  327. AC_LIBOBJ([mbtowc])
  328. gl_PREREQ_MBTOWC
  329. fi
  330. gl_STDLIB_MODULE_INDICATOR([mbtowc])
  331. gl_FUNC_MEMCHR
  332. if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
  333. AC_LIBOBJ([memchr])
  334. gl_PREREQ_MEMCHR
  335. fi
  336. gl_STRING_MODULE_INDICATOR([memchr])
  337. gl_FUNC_MKTIME
  338. if test $REPLACE_MKTIME = 1; then
  339. AC_LIBOBJ([mktime])
  340. gl_PREREQ_MKTIME
  341. fi
  342. gl_TIME_MODULE_INDICATOR([mktime])
  343. gl_FUNC_MKTIME_INTERNAL
  344. if test $REPLACE_MKTIME = 1; then
  345. AC_LIBOBJ([mktime])
  346. gl_PREREQ_MKTIME
  347. fi
  348. gl_MOUNTLIST
  349. if test $gl_cv_list_mounted_fs = yes; then
  350. AC_LIBOBJ([mountlist])
  351. gl_PREREQ_MOUNTLIST_EXTRA
  352. fi
  353. gl_MSVC_INVAL
  354. if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
  355. AC_LIBOBJ([msvc-inval])
  356. fi
  357. gl_MSVC_NOTHROW
  358. if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
  359. AC_LIBOBJ([msvc-nothrow])
  360. fi
  361. gl_MULTIARCH
  362. gl_HEADER_NETDB
  363. gl_HEADER_NETINET_IN
  364. AC_PROG_MKDIR_P
  365. gl_FUNC_NL_LANGINFO
  366. if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
  367. AC_LIBOBJ([nl_langinfo])
  368. fi
  369. gl_LANGINFO_MODULE_INDICATOR([nl_langinfo])
  370. gl_QUOTE
  371. gl_QUOTEARG
  372. gl_FUNC_READ
  373. if test $REPLACE_READ = 1; then
  374. AC_LIBOBJ([read])
  375. gl_PREREQ_READ
  376. fi
  377. gl_UNISTD_MODULE_INDICATOR([read])
  378. gl_REGEX
  379. if test $ac_use_included_regex = yes; then
  380. AC_LIBOBJ([regex])
  381. gl_PREREQ_REGEX
  382. fi
  383. gl_PREREQ_SAFE_READ
  384. gl_SERVENT
  385. gl_FUNC_SETENV
  386. if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
  387. AC_LIBOBJ([setenv])
  388. fi
  389. gl_STDLIB_MODULE_INDICATOR([setenv])
  390. gl_SIZE_MAX
  391. gl_FUNC_SNPRINTF
  392. gl_STDIO_MODULE_INDICATOR([snprintf])
  393. gl_MODULE_INDICATOR([snprintf])
  394. AC_REQUIRE([gl_SOCKETLIB])
  395. AC_REQUIRE([gl_SOCKETS])
  396. gl_TYPE_SOCKLEN_T
  397. gt_TYPE_SSIZE_T
  398. gl_STDALIGN_H
  399. AM_STDBOOL_H
  400. gl_STDDEF_H
  401. gl_STDINT_H
  402. gl_STDIO_H
  403. gl_STDLIB_H
  404. gl_STRCASE
  405. if test $HAVE_STRCASECMP = 0; then
  406. AC_LIBOBJ([strcasecmp])
  407. gl_PREREQ_STRCASECMP
  408. fi
  409. if test $HAVE_STRNCASECMP = 0; then
  410. AC_LIBOBJ([strncasecmp])
  411. gl_PREREQ_STRNCASECMP
  412. fi
  413. gl_FUNC_STRCASESTR
  414. if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then
  415. AC_LIBOBJ([strcasestr])
  416. gl_PREREQ_STRCASESTR
  417. fi
  418. gl_FUNC_STRCASESTR_SIMPLE
  419. if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then
  420. AC_LIBOBJ([strcasestr])
  421. gl_PREREQ_STRCASESTR
  422. fi
  423. gl_STRING_MODULE_INDICATOR([strcasestr])
  424. gl_FUNC_STRERROR
  425. if test $REPLACE_STRERROR = 1; then
  426. AC_LIBOBJ([strerror])
  427. fi
  428. gl_MODULE_INDICATOR([strerror])
  429. gl_STRING_MODULE_INDICATOR([strerror])
  430. AC_REQUIRE([gl_HEADER_ERRNO_H])
  431. AC_REQUIRE([gl_FUNC_STRERROR_0])
  432. if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
  433. AC_LIBOBJ([strerror-override])
  434. gl_PREREQ_SYS_H_WINSOCK2
  435. fi
  436. gl_HEADER_STRING_H
  437. gl_HEADER_STRINGS_H
  438. gl_FUNC_STRNDUP
  439. if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
  440. AC_LIBOBJ([strndup])
  441. fi
  442. gl_STRING_MODULE_INDICATOR([strndup])
  443. gl_FUNC_STRNLEN
  444. if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
  445. AC_LIBOBJ([strnlen])
  446. gl_PREREQ_STRNLEN
  447. fi
  448. gl_STRING_MODULE_INDICATOR([strnlen])
  449. gl_FUNC_STRSEP
  450. if test $HAVE_STRSEP = 0; then
  451. AC_LIBOBJ([strsep])
  452. gl_PREREQ_STRSEP
  453. fi
  454. gl_STRING_MODULE_INDICATOR([strsep])
  455. gl_FUNC_STRSTR_SIMPLE
  456. if test $REPLACE_STRSTR = 1; then
  457. AC_LIBOBJ([strstr])
  458. fi
  459. gl_STRING_MODULE_INDICATOR([strstr])
  460. gl_FUNC_STRTOULL
  461. if test $HAVE_STRTOULL = 0; then
  462. AC_LIBOBJ([strtoull])
  463. gl_PREREQ_STRTOULL
  464. fi
  465. gl_STDLIB_MODULE_INDICATOR([strtoull])
  466. gl_FUNC_STRTOUMAX
  467. if test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; then
  468. AC_LIBOBJ([strtoumax])
  469. gl_PREREQ_STRTOUMAX
  470. fi
  471. gl_INTTYPES_MODULE_INDICATOR([strtoumax])
  472. AC_REQUIRE([gl_HEADER_SYS_SOCKET])
  473. AC_PROG_MKDIR_P
  474. gl_HEADER_SYS_TIME_H
  475. AC_PROG_MKDIR_P
  476. gl_SYS_TYPES_H
  477. AC_PROG_MKDIR_P
  478. gl_HEADER_SYS_UIO
  479. AC_PROG_MKDIR_P
  480. gl_THREADLIB
  481. gl_HEADER_TIME_H
  482. gl_TIME_R
  483. if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
  484. AC_LIBOBJ([time_r])
  485. gl_PREREQ_TIME_R
  486. fi
  487. gl_TIME_MODULE_INDICATOR([time_r])
  488. gl_FUNC_TIMEGM
  489. if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then
  490. AC_LIBOBJ([timegm])
  491. gl_PREREQ_TIMEGM
  492. fi
  493. gl_TIME_MODULE_INDICATOR([timegm])
  494. gl_UNISTD_H
  495. gl_FUNC_UNSETENV
  496. if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
  497. AC_LIBOBJ([unsetenv])
  498. gl_PREREQ_UNSETENV
  499. fi
  500. gl_STDLIB_MODULE_INDICATOR([unsetenv])
  501. gl_FUNC_VASNPRINTF
  502. gl_FUNC_VASPRINTF
  503. gl_STDIO_MODULE_INDICATOR([vasprintf])
  504. m4_ifdef([AM_XGETTEXT_OPTION],
  505. [AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format])
  506. AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
  507. gl_FUNC_VSNPRINTF
  508. gl_STDIO_MODULE_INDICATOR([vsnprintf])
  509. gl_WCHAR_H
  510. gl_FUNC_WCRTOMB
  511. if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
  512. AC_LIBOBJ([wcrtomb])
  513. gl_PREREQ_WCRTOMB
  514. fi
  515. gl_WCHAR_MODULE_INDICATOR([wcrtomb])
  516. gl_WCTYPE_H
  517. gl_XALLOC
  518. gl_XSIZE
  519. gl_XSTRNDUP
  520. gl_XSTRTOL
  521. # End of code from modules
  522. m4_ifval(gl_LIBSOURCES_LIST, [
  523. m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
  524. for gl_file in ]gl_LIBSOURCES_LIST[ ; do
  525. if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
  526. echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
  527. exit 1
  528. fi
  529. done])dnl
  530. m4_if(m4_sysval, [0], [],
  531. [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
  532. ])
  533. m4_popdef([gl_LIBSOURCES_DIR])
  534. m4_popdef([gl_LIBSOURCES_LIST])
  535. m4_popdef([AC_LIBSOURCES])
  536. m4_popdef([AC_REPLACE_FUNCS])
  537. m4_popdef([AC_LIBOBJ])
  538. AC_CONFIG_COMMANDS_PRE([
  539. gl_libobjs=
  540. gl_ltlibobjs=
  541. if test -n "$gl_LIBOBJS"; then
  542. # Remove the extension.
  543. sed_drop_objext='s/\.o$//;s/\.obj$//'
  544. for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
  545. gl_libobjs="$gl_libobjs $i.$ac_objext"
  546. gl_ltlibobjs="$gl_ltlibobjs $i.lo"
  547. done
  548. fi
  549. AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
  550. AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
  551. ])
  552. gltests_libdeps=
  553. gltests_ltlibdeps=
  554. m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
  555. m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
  556. m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
  557. m4_pushdef([gltests_LIBSOURCES_LIST], [])
  558. m4_pushdef([gltests_LIBSOURCES_DIR], [])
  559. gl_COMMON
  560. gl_source_base='tests'
  561. changequote(,)dnl
  562. 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
  563. changequote([, ])dnl
  564. AC_SUBST([gltests_WITNESS])
  565. gl_module_indicator_condition=$gltests_WITNESS
  566. m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
  567. m4_popdef([gl_MODULE_INDICATOR_CONDITION])
  568. m4_ifval(gltests_LIBSOURCES_LIST, [
  569. m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
  570. for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
  571. if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
  572. echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
  573. exit 1
  574. fi
  575. done])dnl
  576. m4_if(m4_sysval, [0], [],
  577. [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
  578. ])
  579. m4_popdef([gltests_LIBSOURCES_DIR])
  580. m4_popdef([gltests_LIBSOURCES_LIST])
  581. m4_popdef([AC_LIBSOURCES])
  582. m4_popdef([AC_REPLACE_FUNCS])
  583. m4_popdef([AC_LIBOBJ])
  584. AC_CONFIG_COMMANDS_PRE([
  585. gltests_libobjs=
  586. gltests_ltlibobjs=
  587. if test -n "$gltests_LIBOBJS"; then
  588. # Remove the extension.
  589. sed_drop_objext='s/\.o$//;s/\.obj$//'
  590. for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
  591. gltests_libobjs="$gltests_libobjs $i.$ac_objext"
  592. gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
  593. done
  594. fi
  595. AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
  596. AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
  597. ])
  598. LIBGNU_LIBDEPS="$gl_libdeps"
  599. AC_SUBST([LIBGNU_LIBDEPS])
  600. LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
  601. AC_SUBST([LIBGNU_LTLIBDEPS])
  602. ])
  603. # Like AC_LIBOBJ, except that the module name goes
  604. # into gl_LIBOBJS instead of into LIBOBJS.
  605. AC_DEFUN([gl_LIBOBJ], [
  606. AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
  607. gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
  608. ])
  609. # Like AC_REPLACE_FUNCS, except that the module name goes
  610. # into gl_LIBOBJS instead of into LIBOBJS.
  611. AC_DEFUN([gl_REPLACE_FUNCS], [
  612. m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
  613. AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
  614. ])
  615. # Like AC_LIBSOURCES, except the directory where the source file is
  616. # expected is derived from the gnulib-tool parameterization,
  617. # and alloca is special cased (for the alloca-opt module).
  618. # We could also entirely rely on EXTRA_lib..._SOURCES.
  619. AC_DEFUN([gl_LIBSOURCES], [
  620. m4_foreach([_gl_NAME], [$1], [
  621. m4_if(_gl_NAME, [alloca.c], [], [
  622. m4_define([gl_LIBSOURCES_DIR], [gl])
  623. m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
  624. ])
  625. ])
  626. ])
  627. # Like AC_LIBOBJ, except that the module name goes
  628. # into gltests_LIBOBJS instead of into LIBOBJS.
  629. AC_DEFUN([gltests_LIBOBJ], [
  630. AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
  631. gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
  632. ])
  633. # Like AC_REPLACE_FUNCS, except that the module name goes
  634. # into gltests_LIBOBJS instead of into LIBOBJS.
  635. AC_DEFUN([gltests_REPLACE_FUNCS], [
  636. m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
  637. AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
  638. ])
  639. # Like AC_LIBSOURCES, except the directory where the source file is
  640. # expected is derived from the gnulib-tool parameterization,
  641. # and alloca is special cased (for the alloca-opt module).
  642. # We could also entirely rely on EXTRA_lib..._SOURCES.
  643. AC_DEFUN([gltests_LIBSOURCES], [
  644. m4_foreach([_gl_NAME], [$1], [
  645. m4_if(_gl_NAME, [alloca.c], [], [
  646. m4_define([gltests_LIBSOURCES_DIR], [tests])
  647. m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
  648. ])
  649. ])
  650. ])
  651. # This macro records the list of files which have been installed by
  652. # gnulib-tool and may be removed by future gnulib-tool invocations.
  653. AC_DEFUN([gl_FILE_LIST], [
  654. build-aux/config.rpath
  655. build-aux/snippet/_Noreturn.h
  656. build-aux/snippet/arg-nonnull.h
  657. build-aux/snippet/c++defs.h
  658. build-aux/snippet/warn-on-use.h
  659. lib/alloca.in.h
  660. lib/argmatch.c
  661. lib/argmatch.h
  662. lib/arpa_inet.in.h
  663. lib/asnprintf.c
  664. lib/asprintf.c
  665. lib/assure.h
  666. lib/base64.c
  667. lib/base64.h
  668. lib/basename-lgpl.c
  669. lib/basename.c
  670. lib/btowc.c
  671. lib/c-ctype.c
  672. lib/c-ctype.h
  673. lib/c-strcase.h
  674. lib/c-strcasecmp.c
  675. lib/c-strcaseeq.h
  676. lib/c-strncasecmp.c
  677. lib/config.charset
  678. lib/dirname-lgpl.c
  679. lib/dirname.c
  680. lib/dirname.h
  681. lib/dosname.h
  682. lib/errno.in.h
  683. lib/error.c
  684. lib/error.h
  685. lib/exitfail.c
  686. lib/exitfail.h
  687. lib/fd-hook.c
  688. lib/fd-hook.h
  689. lib/float+.h
  690. lib/float.c
  691. lib/float.in.h
  692. lib/floor.c
  693. lib/floorf.c
  694. lib/fsusage.c
  695. lib/fsusage.h
  696. lib/full-read.c
  697. lib/full-read.h
  698. lib/full-write.c
  699. lib/gai_strerror.c
  700. lib/getaddrinfo.c
  701. lib/gethostname.c
  702. lib/getloadavg.c
  703. lib/getopt.c
  704. lib/getopt.in.h
  705. lib/getopt1.c
  706. lib/getopt_int.h
  707. lib/gettext.h
  708. lib/gettimeofday.c
  709. lib/gl_openssl.h
  710. lib/glthread/lock.c
  711. lib/glthread/lock.h
  712. lib/glthread/threadlib.c
  713. lib/human.c
  714. lib/human.h
  715. lib/idpriv-droptemp.c
  716. lib/idpriv.h
  717. lib/inet_ntop.c
  718. lib/intprops.h
  719. lib/inttypes.in.h
  720. lib/itold.c
  721. lib/langinfo.in.h
  722. lib/localcharset.c
  723. lib/localcharset.h
  724. lib/locale.in.h
  725. lib/localeconv.c
  726. lib/malloc.c
  727. lib/malloca.c
  728. lib/malloca.h
  729. lib/malloca.valgrind
  730. lib/math.c
  731. lib/math.in.h
  732. lib/mbrtowc.c
  733. lib/mbsinit.c
  734. lib/mbtowc-impl.h
  735. lib/mbtowc.c
  736. lib/memchr.c
  737. lib/memchr.valgrind
  738. lib/mktime-internal.h
  739. lib/mktime.c
  740. lib/mountlist.c
  741. lib/mountlist.h
  742. lib/msvc-inval.c
  743. lib/msvc-inval.h
  744. lib/msvc-nothrow.c
  745. lib/msvc-nothrow.h
  746. lib/netdb.in.h
  747. lib/netinet_in.in.h
  748. lib/nl_langinfo.c
  749. lib/printf-args.c
  750. lib/printf-args.h
  751. lib/printf-parse.c
  752. lib/printf-parse.h
  753. lib/quote.h
  754. lib/quotearg.c
  755. lib/quotearg.h
  756. lib/read.c
  757. lib/ref-add.sin
  758. lib/ref-del.sin
  759. lib/regcomp.c
  760. lib/regex.c
  761. lib/regex.h
  762. lib/regex_internal.c
  763. lib/regex_internal.h
  764. lib/regexec.c
  765. lib/safe-read.c
  766. lib/safe-read.h
  767. lib/setenv.c
  768. lib/sha1.c
  769. lib/sha1.h
  770. lib/size_max.h
  771. lib/snprintf.c
  772. lib/sockets.c
  773. lib/sockets.h
  774. lib/stdalign.in.h
  775. lib/stdbool.in.h
  776. lib/stddef.in.h
  777. lib/stdint.in.h
  778. lib/stdio.in.h
  779. lib/stdlib.in.h
  780. lib/str-two-way.h
  781. lib/strcasecmp.c
  782. lib/strcasestr.c
  783. lib/streq.h
  784. lib/strerror-override.c
  785. lib/strerror-override.h
  786. lib/strerror.c
  787. lib/string.in.h
  788. lib/strings.in.h
  789. lib/stripslash.c
  790. lib/strncasecmp.c
  791. lib/strndup.c
  792. lib/strnlen.c
  793. lib/strsep.c
  794. lib/strstr.c
  795. lib/strtoimax.c
  796. lib/strtol.c
  797. lib/strtoul.c
  798. lib/strtoull.c
  799. lib/strtoumax.c
  800. lib/sys_socket.c
  801. lib/sys_socket.in.h
  802. lib/sys_time.in.h
  803. lib/sys_types.in.h
  804. lib/sys_uio.in.h
  805. lib/time.in.h
  806. lib/time_r.c
  807. lib/timegm.c
  808. lib/unistd.c
  809. lib/unistd.in.h
  810. lib/unsetenv.c
  811. lib/vasnprintf.c
  812. lib/vasnprintf.h
  813. lib/vasprintf.c
  814. lib/verify.h
  815. lib/vsnprintf.c
  816. lib/w32sock.h
  817. lib/wchar.in.h
  818. lib/wcrtomb.c
  819. lib/wctype-h.c
  820. lib/wctype.in.h
  821. lib/xalloc-die.c
  822. lib/xalloc-oversized.h
  823. lib/xalloc.h
  824. lib/xmalloc.c
  825. lib/xsize.c
  826. lib/xsize.h
  827. lib/xstrndup.c
  828. lib/xstrndup.h
  829. lib/xstrtol-error.c
  830. lib/xstrtol.c
  831. lib/xstrtol.h
  832. lib/xstrtoul.c
  833. lib/xstrtoumax.c
  834. m4/00gnulib.m4
  835. m4/absolute-header.m4
  836. m4/alloca.m4
  837. m4/arpa_inet_h.m4
  838. m4/base64.m4
  839. m4/btowc.m4
  840. m4/codeset.m4
  841. m4/configmake.m4
  842. m4/dirname.m4
  843. m4/double-slash-root.m4
  844. m4/eealloc.m4
  845. m4/environ.m4
  846. m4/errno_h.m4
  847. m4/error.m4
  848. m4/exponentd.m4
  849. m4/extensions.m4
  850. m4/extern-inline.m4
  851. m4/fcntl-o.m4
  852. m4/float_h.m4
  853. m4/floorf.m4
  854. m4/fstypename.m4
  855. m4/fsusage.m4
  856. m4/getaddrinfo.m4
  857. m4/gethostname.m4
  858. m4/getloadavg.m4
  859. m4/getopt.m4
  860. m4/gettext.m4
  861. m4/gettimeofday.m4
  862. m4/gl-openssl.m4
  863. m4/glibc2.m4
  864. m4/glibc21.m4
  865. m4/gnulib-common.m4
  866. m4/hostent.m4
  867. m4/human.m4
  868. m4/iconv.m4
  869. m4/idpriv.m4
  870. m4/include_next.m4
  871. m4/inet_ntop.m4
  872. m4/intdiv0.m4
  873. m4/intl.m4
  874. m4/intldir.m4
  875. m4/intlmacosx.m4
  876. m4/intmax.m4
  877. m4/intmax_t.m4
  878. m4/inttypes-pri.m4
  879. m4/inttypes.m4
  880. m4/inttypes_h.m4
  881. m4/langinfo_h.m4
  882. m4/largefile.m4
  883. m4/lcmessage.m4
  884. m4/lib-ld.m4
  885. m4/lib-link.m4
  886. m4/lib-prefix.m4
  887. m4/localcharset.m4
  888. m4/locale-fr.m4
  889. m4/locale-ja.m4
  890. m4/locale-zh.m4
  891. m4/locale_h.m4
  892. m4/localeconv.m4
  893. m4/lock.m4
  894. m4/longlong.m4
  895. m4/ls-mntd-fs.m4
  896. m4/malloc.m4
  897. m4/malloca.m4
  898. m4/math_h.m4
  899. m4/mbrtowc.m4
  900. m4/mbsinit.m4
  901. m4/mbstate_t.m4
  902. m4/mbtowc.m4
  903. m4/memchr.m4
  904. m4/mktime.m4
  905. m4/mmap-anon.m4
  906. m4/mountlist.m4
  907. m4/msvc-inval.m4
  908. m4/msvc-nothrow.m4
  909. m4/multiarch.m4
  910. m4/netdb_h.m4
  911. m4/netinet_in_h.m4
  912. m4/nl_langinfo.m4
  913. m4/nls.m4
  914. m4/nocrash.m4
  915. m4/off_t.m4
  916. m4/onceonly.m4
  917. m4/po.m4
  918. m4/printf-posix.m4
  919. m4/printf.m4
  920. m4/progtest.m4
  921. m4/quote.m4
  922. m4/quotearg.m4
  923. m4/read.m4
  924. m4/regex.m4
  925. m4/safe-read.m4
  926. m4/servent.m4
  927. m4/setenv.m4
  928. m4/sha1.m4
  929. m4/size_max.m4
  930. m4/snprintf.m4
  931. m4/socketlib.m4
  932. m4/sockets.m4
  933. m4/socklen.m4
  934. m4/sockpfaf.m4
  935. m4/ssize_t.m4
  936. m4/stdalign.m4
  937. m4/stdbool.m4
  938. m4/stddef_h.m4
  939. m4/stdint.m4
  940. m4/stdint_h.m4
  941. m4/stdio_h.m4
  942. m4/stdlib_h.m4
  943. m4/strcase.m4
  944. m4/strcasestr.m4
  945. m4/strerror.m4
  946. m4/string_h.m4
  947. m4/strings_h.m4
  948. m4/strndup.m4
  949. m4/strnlen.m4
  950. m4/strsep.m4
  951. m4/strstr.m4
  952. m4/strtoull.m4
  953. m4/strtoumax.m4
  954. m4/sys_socket_h.m4
  955. m4/sys_time_h.m4
  956. m4/sys_types_h.m4
  957. m4/sys_uio_h.m4
  958. m4/threadlib.m4
  959. m4/time_h.m4
  960. m4/time_r.m4
  961. m4/timegm.m4
  962. m4/uintmax_t.m4
  963. m4/unistd_h.m4
  964. m4/vasnprintf.m4
  965. m4/vasprintf.m4
  966. m4/visibility.m4
  967. m4/vsnprintf.m4
  968. m4/warn-on-use.m4
  969. m4/wchar_h.m4
  970. m4/wchar_t.m4
  971. m4/wcrtomb.m4
  972. m4/wctype_h.m4
  973. m4/wint_t.m4
  974. m4/xalloc.m4
  975. m4/xsize.m4
  976. m4/xstrndup.m4
  977. m4/xstrtol.m4
  978. ])