logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

gettext-0.3.2-m4_cleanup.patch (62200B)


  1. From f2466c319fee707e6c753c1311dd15367f04793b Mon Sep 17 00:00:00 2001
  2. From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
  3. Date: Fri, 24 May 2024 08:38:44 +0200
  4. Subject: [PATCH] m4: Only expose what GNU gettext also exposes
  5. Upstream: https://github.com/sabotage-linux/gettext-tiny/pull/67
  6. Otherwise gettext-tiny m4 libs ends up overriding other versions
  7. of vendored gnulib, making autoreconf fail.
  8. Additionally I checked that each m4 file has it's required
  9. automake functions, which can be listed with the following command:
  10. $ grep AC_REQUIRE m4/*.m4 | grep AM
  11. ---
  12. m4/ansi-c++.m4 | 128 ---------------
  13. m4/codeset.m4 | 24 ---
  14. m4/configheader.m4 | 1 -
  15. m4/fcntl-o.m4 | 134 ----------------
  16. m4/glibc2.m4 | 31 ----
  17. m4/glibc21.m4 | 34 ----
  18. m4/intdiv0.m4 | 87 ----------
  19. m4/intldir.m4 | 19 ---
  20. m4/intmax.m4 | 36 -----
  21. m4/inttypes-pri.m4 | 42 -----
  22. m4/inttypes_h.m4 | 29 ----
  23. m4/lcmessage.m4 | 35 ----
  24. m4/lock.m4 | 47 ------
  25. m4/longlong.m4 | 113 -------------
  26. m4/printf-posix.m4 | 48 ------
  27. m4/size_max.m4 | 79 ---------
  28. m4/stdint_h.m4 | 27 ----
  29. m4/threadlib.m4 | 391 ---------------------------------------------
  30. m4/uintmax_t.m4 | 30 ----
  31. m4/visibility.m4 | 77 ---------
  32. m4/wchar_t.m4 | 24 ---
  33. m4/wint_t.m4 | 74 ---------
  34. m4/xsize.m4 | 12 --
  35. 23 files changed, 1522 deletions(-)
  36. delete mode 100644 m4/ansi-c++.m4
  37. delete mode 100644 m4/codeset.m4
  38. delete mode 100644 m4/configheader.m4
  39. delete mode 100644 m4/fcntl-o.m4
  40. delete mode 100644 m4/glibc2.m4
  41. delete mode 100644 m4/glibc21.m4
  42. delete mode 100644 m4/intdiv0.m4
  43. delete mode 100644 m4/intldir.m4
  44. delete mode 100644 m4/intmax.m4
  45. delete mode 100644 m4/inttypes-pri.m4
  46. delete mode 100644 m4/inttypes_h.m4
  47. delete mode 100644 m4/lcmessage.m4
  48. delete mode 100644 m4/lock.m4
  49. delete mode 100644 m4/longlong.m4
  50. delete mode 100644 m4/printf-posix.m4
  51. delete mode 100644 m4/size_max.m4
  52. delete mode 100644 m4/stdint_h.m4
  53. delete mode 100644 m4/threadlib.m4
  54. delete mode 100644 m4/uintmax_t.m4
  55. delete mode 100644 m4/visibility.m4
  56. delete mode 100644 m4/wchar_t.m4
  57. delete mode 100644 m4/wint_t.m4
  58. delete mode 100644 m4/xsize.m4
  59. diff --git a/m4/ansi-c++.m4 b/m4/ansi-c++.m4
  60. deleted file mode 100644
  61. index c299860..0000000
  62. --- a/m4/ansi-c++.m4
  63. +++ /dev/null
  64. @@ -1,128 +0,0 @@
  65. -# ansi-c++.m4 serial 9
  66. -dnl Copyright (C) 2002-2003, 2005, 2010-2017 Free Software Foundation, Inc.
  67. -dnl This file is free software; the Free Software Foundation
  68. -dnl gives unlimited permission to copy and/or distribute it,
  69. -dnl with or without modifications, as long as this notice is preserved.
  70. -
  71. -dnl From Bruno Haible.
  72. -
  73. -# Sets CXX_CHOICE to 'yes' or 'no', depending on the preferred use of C++.
  74. -# The default is 'yes'. If the configure.ac contains a definition of the
  75. -# macro gl_CXX_CHOICE_DEFAULT_NO, then the default is 'no'. In both cases,
  76. -# the user can change the value by passing the option --disable-cxx or
  77. -# --enable-cxx, respectively.
  78. -
  79. -AC_DEFUN([gl_CXX_CHOICE],
  80. -[
  81. - AC_MSG_CHECKING([whether to use C++])
  82. - dnl Plus signs are supported in AC_ARG_ENABLE starting with autoconf-2.66.
  83. - m4_version_prereq([2.66],
  84. - [m4_ifdef([gl_CXX_CHOICE_DEFAULT_NO],
  85. - [AC_ARG_ENABLE([c++],
  86. - [ --enable-c++ also build C++ sources],
  87. - [CXX_CHOICE="$enableval"],
  88. - [CXX_CHOICE=no])],
  89. - [AC_ARG_ENABLE([c++],
  90. - [ --disable-c++ do not build C++ sources],
  91. - [CXX_CHOICE="$enableval"],
  92. - [CXX_CHOICE=yes])])],
  93. - [m4_ifdef([gl_CXX_CHOICE_DEFAULT_NO],
  94. - [AC_ARG_ENABLE([cxx],
  95. - [ --enable-cxx also build C++ sources],
  96. - [CXX_CHOICE="$enableval"],
  97. - [CXX_CHOICE=no])],
  98. - [AC_ARG_ENABLE([cxx],
  99. - [ --disable-cxx do not build C++ sources],
  100. - [CXX_CHOICE="$enableval"],
  101. - [CXX_CHOICE=yes])])])
  102. - AC_MSG_RESULT([$CXX_CHOICE])
  103. - AC_SUBST([CXX_CHOICE])
  104. -])
  105. -
  106. -# gl_PROG_ANSI_CXX([ANSICXX_VARIABLE], [ANSICXX_CONDITIONAL])
  107. -# Sets ANSICXX_VARIABLE to the name of a sufficiently ANSI C++ compliant
  108. -# compiler, or to "no" if none is found.
  109. -# Defines the Automake condition ANSICXX_CONDITIONAL to true if such a compiler
  110. -# was found, or to false if not.
  111. -
  112. -AC_DEFUN([gl_PROG_ANSI_CXX],
  113. -[
  114. - AC_REQUIRE([gl_CXX_CHOICE])
  115. - m4_if([$1], [CXX], [],
  116. - [gl_save_CXX="$CXX"])
  117. - if test "$CXX_CHOICE" = no; then
  118. - CXX=no
  119. - fi
  120. - if test -z "$CXX"; then
  121. - if test -n "$CCC"; then
  122. - CXX="$CCC"
  123. - else
  124. - AC_CHECK_TOOLS([CXX],
  125. - [g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC],
  126. - [:])
  127. - fi
  128. - fi
  129. - if test "$CXX" != no; then
  130. - dnl Use a modified version of AC_PROG_CXX_WORKS that does not exit
  131. - dnl upon failure.
  132. - AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works])
  133. - AC_LANG_PUSH([C++])
  134. - AC_ARG_VAR([CXX], [C++ compiler command])
  135. - AC_ARG_VAR([CXXFLAGS], [C++ compiler flags])
  136. - echo 'int main () { return 0; }' > conftest.$ac_ext
  137. - if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
  138. - gl_cv_prog_ansicxx_works=yes
  139. - if (./conftest; exit) 2>/dev/null; then
  140. - gl_cv_prog_ansicxx_cross=no
  141. - else
  142. - gl_cv_prog_ansicxx_cross=yes
  143. - fi
  144. - else
  145. - gl_cv_prog_ansicxx_works=no
  146. - fi
  147. - rm -fr conftest*
  148. - AC_LANG_POP([C++])
  149. - AC_MSG_RESULT([$gl_cv_prog_ansicxx_works])
  150. - if test $gl_cv_prog_ansicxx_works = no; then
  151. - CXX=no
  152. - else
  153. - dnl Test for namespaces.
  154. - dnl We don't bother supporting pre-ANSI-C++ compilers.
  155. - AC_MSG_CHECKING([whether the C++ compiler supports namespaces])
  156. - AC_LANG_PUSH([C++])
  157. - cat <<EOF > conftest.$ac_ext
  158. -#include <iostream>
  159. -namespace test { using namespace std; }
  160. -std::ostream* ptr;
  161. -int main () { return 0; }
  162. -EOF
  163. - if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
  164. - gl_cv_prog_ansicxx_namespaces=yes
  165. - else
  166. - gl_cv_prog_ansicxx_namespaces=no
  167. - fi
  168. - rm -fr conftest*
  169. - AC_LANG_POP([C++])
  170. - AC_MSG_RESULT([$gl_cv_prog_ansicxx_namespaces])
  171. - if test $gl_cv_prog_ansicxx_namespaces = no; then
  172. - CXX=no
  173. - fi
  174. - fi
  175. - fi
  176. - m4_if([$1], [CXX], [],
  177. - [$1="$CXX"
  178. - CXX="$gl_save_CXX"])
  179. - AC_SUBST([$1])
  180. -
  181. - AM_CONDITIONAL([$2], [test "$$1" != no])
  182. -
  183. - if test "$$1" != no; then
  184. - dnl This macro invocation resolves an automake error:
  185. - dnl /usr/local/share/automake-1.11/am/depend2.am: am__fastdepCXX does not appear in AM_CONDITIONAL
  186. - dnl /usr/local/share/automake-1.11/am/depend2.am: The usual way to define 'am__fastdepCXX' is to add 'AC_PROG_CXX'
  187. - dnl /usr/local/share/automake-1.11/am/depend2.am: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
  188. - _AM_DEPENDENCIES([CXX])
  189. - else
  190. - AM_CONDITIONAL([am__fastdepCXX], [false])
  191. - fi
  192. -])
  193. diff --git a/m4/codeset.m4 b/m4/codeset.m4
  194. deleted file mode 100644
  195. index bc98201..0000000
  196. --- a/m4/codeset.m4
  197. +++ /dev/null
  198. @@ -1,24 +0,0 @@
  199. -# codeset.m4 serial 5 (gettext-0.18.2)
  200. -dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016 Free Software Foundation,
  201. -dnl Inc.
  202. -dnl This file is free software; the Free Software Foundation
  203. -dnl gives unlimited permission to copy and/or distribute it,
  204. -dnl with or without modifications, as long as this notice is preserved.
  205. -
  206. -dnl From Bruno Haible.
  207. -
  208. -AC_DEFUN([AM_LANGINFO_CODESET],
  209. -[
  210. - AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset],
  211. - [AC_LINK_IFELSE(
  212. - [AC_LANG_PROGRAM(
  213. - [[#include <langinfo.h>]],
  214. - [[char* cs = nl_langinfo(CODESET); return !cs;]])],
  215. - [am_cv_langinfo_codeset=yes],
  216. - [am_cv_langinfo_codeset=no])
  217. - ])
  218. - if test $am_cv_langinfo_codeset = yes; then
  219. - AC_DEFINE([HAVE_LANGINFO_CODESET], [1],
  220. - [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
  221. - fi
  222. -])
  223. diff --git a/m4/configheader.m4 b/m4/configheader.m4
  224. deleted file mode 100644
  225. index f06f1d8..0000000
  226. --- a/m4/configheader.m4
  227. +++ /dev/null
  228. @@ -1 +0,0 @@
  229. -AC_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
  230. diff --git a/m4/fcntl-o.m4 b/m4/fcntl-o.m4
  231. deleted file mode 100644
  232. index 3c3b63c..0000000
  233. --- a/m4/fcntl-o.m4
  234. +++ /dev/null
  235. @@ -1,134 +0,0 @@
  236. -# fcntl-o.m4 serial 4
  237. -dnl Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc.
  238. -dnl This file is free software; the Free Software Foundation
  239. -dnl gives unlimited permission to copy and/or distribute it,
  240. -dnl with or without modifications, as long as this notice is preserved.
  241. -
  242. -dnl Written by Paul Eggert.
  243. -
  244. -# Test whether the flags O_NOATIME and O_NOFOLLOW actually work.
  245. -# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise.
  246. -# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise.
  247. -AC_DEFUN([gl_FCNTL_O_FLAGS],
  248. -[
  249. - dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW.
  250. - dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes
  251. - dnl AC_GNU_SOURCE.
  252. - m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
  253. - [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
  254. - [AC_REQUIRE([AC_GNU_SOURCE])])
  255. -
  256. - AC_CHECK_HEADERS_ONCE([unistd.h])
  257. - AC_CHECK_FUNCS_ONCE([symlink])
  258. - AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
  259. - [AC_RUN_IFELSE(
  260. - [AC_LANG_PROGRAM(
  261. - [[#include <sys/types.h>
  262. - #include <sys/stat.h>
  263. - #if HAVE_UNISTD_H
  264. - # include <unistd.h>
  265. - #else /* on Windows with MSVC */
  266. - # include <io.h>
  267. - # include <stdlib.h>
  268. - # defined sleep(n) _sleep ((n) * 1000)
  269. - #endif
  270. - #include <fcntl.h>
  271. - #ifndef O_NOATIME
  272. - #define O_NOATIME 0
  273. - #endif
  274. - #ifndef O_NOFOLLOW
  275. - #define O_NOFOLLOW 0
  276. - #endif
  277. - static int const constants[] =
  278. - {
  279. - O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
  280. - O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
  281. - };
  282. - ]],
  283. - [[
  284. - int result = !constants;
  285. - #if HAVE_SYMLINK
  286. - {
  287. - static char const sym[] = "conftest.sym";
  288. - if (symlink ("/dev/null", sym) != 0)
  289. - result |= 2;
  290. - else
  291. - {
  292. - int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
  293. - if (fd >= 0)
  294. - {
  295. - close (fd);
  296. - result |= 4;
  297. - }
  298. - }
  299. - if (unlink (sym) != 0 || symlink (".", sym) != 0)
  300. - result |= 2;
  301. - else
  302. - {
  303. - int fd = open (sym, O_RDONLY | O_NOFOLLOW);
  304. - if (fd >= 0)
  305. - {
  306. - close (fd);
  307. - result |= 4;
  308. - }
  309. - }
  310. - unlink (sym);
  311. - }
  312. - #endif
  313. - {
  314. - static char const file[] = "confdefs.h";
  315. - int fd = open (file, O_RDONLY | O_NOATIME);
  316. - if (fd < 0)
  317. - result |= 8;
  318. - else
  319. - {
  320. - struct stat st0;
  321. - if (fstat (fd, &st0) != 0)
  322. - result |= 16;
  323. - else
  324. - {
  325. - char c;
  326. - sleep (1);
  327. - if (read (fd, &c, 1) != 1)
  328. - result |= 24;
  329. - else
  330. - {
  331. - if (close (fd) != 0)
  332. - result |= 32;
  333. - else
  334. - {
  335. - struct stat st1;
  336. - if (stat (file, &st1) != 0)
  337. - result |= 40;
  338. - else
  339. - if (st0.st_atime != st1.st_atime)
  340. - result |= 64;
  341. - }
  342. - }
  343. - }
  344. - }
  345. - }
  346. - return result;]])],
  347. - [gl_cv_header_working_fcntl_h=yes],
  348. - [case $? in #(
  349. - 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
  350. - 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
  351. - 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
  352. - *) gl_cv_header_working_fcntl_h='no';;
  353. - esac],
  354. - [gl_cv_header_working_fcntl_h=cross-compiling])])
  355. -
  356. - case $gl_cv_header_working_fcntl_h in #(
  357. - *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
  358. - *) ac_val=1;;
  359. - esac
  360. - AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val],
  361. - [Define to 1 if O_NOATIME works.])
  362. -
  363. - case $gl_cv_header_working_fcntl_h in #(
  364. - *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
  365. - *) ac_val=1;;
  366. - esac
  367. - AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val],
  368. - [Define to 1 if O_NOFOLLOW works.])
  369. -])
  370. diff --git a/m4/glibc2.m4 b/m4/glibc2.m4
  371. deleted file mode 100644
  372. index 926edba..0000000
  373. --- a/m4/glibc2.m4
  374. +++ /dev/null
  375. @@ -1,31 +0,0 @@
  376. -# glibc2.m4 serial 3
  377. -dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2017 Free Software Foundation,
  378. -dnl Inc.
  379. -dnl This file is free software; the Free Software Foundation
  380. -dnl gives unlimited permission to copy and/or distribute it,
  381. -dnl with or without modifications, as long as this notice is preserved.
  382. -
  383. -# Test for the GNU C Library, version 2.0 or newer.
  384. -# From Bruno Haible.
  385. -
  386. -AC_DEFUN([gt_GLIBC2],
  387. - [
  388. - AC_CACHE_CHECK([whether we are using the GNU C Library 2 or newer],
  389. - [ac_cv_gnu_library_2],
  390. - [AC_EGREP_CPP([Lucky GNU user],
  391. - [
  392. -#include <features.h>
  393. -#ifdef __GNU_LIBRARY__
  394. - #if (__GLIBC__ >= 2) && !defined __UCLIBC__
  395. - Lucky GNU user
  396. - #endif
  397. -#endif
  398. - ],
  399. - [ac_cv_gnu_library_2=yes],
  400. - [ac_cv_gnu_library_2=no])
  401. - ]
  402. - )
  403. - AC_SUBST([GLIBC2])
  404. - GLIBC2="$ac_cv_gnu_library_2"
  405. - ]
  406. -)
  407. diff --git a/m4/glibc21.m4 b/m4/glibc21.m4
  408. deleted file mode 100644
  409. index 2e30ed6..0000000
  410. --- a/m4/glibc21.m4
  411. +++ /dev/null
  412. @@ -1,34 +0,0 @@
  413. -# glibc21.m4 serial 5
  414. -dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2017 Free Software Foundation,
  415. -dnl Inc.
  416. -dnl This file is free software; the Free Software Foundation
  417. -dnl gives unlimited permission to copy and/or distribute it,
  418. -dnl with or without modifications, as long as this notice is preserved.
  419. -
  420. -# Test for the GNU C Library, version 2.1 or newer, or uClibc.
  421. -# From Bruno Haible.
  422. -
  423. -AC_DEFUN([gl_GLIBC21],
  424. - [
  425. - AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc],
  426. - [ac_cv_gnu_library_2_1],
  427. - [AC_EGREP_CPP([Lucky],
  428. - [
  429. -#include <features.h>
  430. -#ifdef __GNU_LIBRARY__
  431. - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
  432. - Lucky GNU user
  433. - #endif
  434. -#endif
  435. -#ifdef __UCLIBC__
  436. - Lucky user
  437. -#endif
  438. - ],
  439. - [ac_cv_gnu_library_2_1=yes],
  440. - [ac_cv_gnu_library_2_1=no])
  441. - ]
  442. - )
  443. - AC_SUBST([GLIBC21])
  444. - GLIBC21="$ac_cv_gnu_library_2_1"
  445. - ]
  446. -)
  447. diff --git a/m4/intdiv0.m4 b/m4/intdiv0.m4
  448. deleted file mode 100644
  449. index bbbc114..0000000
  450. --- a/m4/intdiv0.m4
  451. +++ /dev/null
  452. @@ -1,87 +0,0 @@
  453. -# intdiv0.m4 serial 6 (gettext-0.18.2)
  454. -dnl Copyright (C) 2002, 2007-2008, 2010-2017 Free Software Foundation, Inc.
  455. -dnl This file is free software; the Free Software Foundation
  456. -dnl gives unlimited permission to copy and/or distribute it,
  457. -dnl with or without modifications, as long as this notice is preserved.
  458. -
  459. -dnl From Bruno Haible.
  460. -
  461. -AC_DEFUN([gt_INTDIV0],
  462. -[
  463. - AC_REQUIRE([AC_PROG_CC])dnl
  464. - AC_REQUIRE([AC_CANONICAL_HOST])dnl
  465. -
  466. - AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
  467. - gt_cv_int_divbyzero_sigfpe,
  468. - [
  469. - gt_cv_int_divbyzero_sigfpe=
  470. -changequote(,)dnl
  471. - case "$host_os" in
  472. - macos* | darwin[6-9]* | darwin[1-9][0-9]*)
  473. - # On Mac OS X 10.2 or newer, just assume the same as when cross-
  474. - # compiling. If we were to perform the real test, 1 Crash Report
  475. - # dialog window would pop up.
  476. - case "$host_cpu" in
  477. - i[34567]86 | x86_64)
  478. - gt_cv_int_divbyzero_sigfpe="guessing yes" ;;
  479. - esac
  480. - ;;
  481. - esac
  482. -changequote([,])dnl
  483. - if test -z "$gt_cv_int_divbyzero_sigfpe"; then
  484. - AC_RUN_IFELSE(
  485. - [AC_LANG_SOURCE([[
  486. -#include <stdlib.h>
  487. -#include <signal.h>
  488. -
  489. -static void
  490. -sigfpe_handler (int sig)
  491. -{
  492. - /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
  493. - _exit (sig != SIGFPE);
  494. -}
  495. -
  496. -int x = 1;
  497. -int y = 0;
  498. -int z;
  499. -int nan;
  500. -
  501. -int main ()
  502. -{
  503. - signal (SIGFPE, sigfpe_handler);
  504. -/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
  505. -#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
  506. - signal (SIGTRAP, sigfpe_handler);
  507. -#endif
  508. -/* Linux/SPARC yields signal SIGILL. */
  509. -#if defined (__sparc__) && defined (__linux__)
  510. - signal (SIGILL, sigfpe_handler);
  511. -#endif
  512. -
  513. - z = x / y;
  514. - nan = y / y;
  515. - exit (2);
  516. -}
  517. -]])],
  518. - [gt_cv_int_divbyzero_sigfpe=yes],
  519. - [gt_cv_int_divbyzero_sigfpe=no],
  520. - [
  521. - # Guess based on the CPU.
  522. -changequote(,)dnl
  523. - case "$host_cpu" in
  524. - alpha* | i[34567]86 | x86_64 | m68k | s390*)
  525. - gt_cv_int_divbyzero_sigfpe="guessing yes";;
  526. - *)
  527. - gt_cv_int_divbyzero_sigfpe="guessing no";;
  528. - esac
  529. -changequote([,])dnl
  530. - ])
  531. - fi
  532. - ])
  533. - case "$gt_cv_int_divbyzero_sigfpe" in
  534. - *yes) value=1;;
  535. - *) value=0;;
  536. - esac
  537. - AC_DEFINE_UNQUOTED([INTDIV0_RAISES_SIGFPE], [$value],
  538. - [Define if integer division by zero raises signal SIGFPE.])
  539. -])
  540. diff --git a/m4/intldir.m4 b/m4/intldir.m4
  541. deleted file mode 100644
  542. index c688f46..0000000
  543. --- a/m4/intldir.m4
  544. +++ /dev/null
  545. @@ -1,19 +0,0 @@
  546. -# intldir.m4 serial 2 (gettext-0.18)
  547. -dnl Copyright (C) 2006, 2009-2014, 2016 Free Software Foundation, Inc.
  548. -dnl This file is free software; the Free Software Foundation
  549. -dnl gives unlimited permission to copy and/or distribute it,
  550. -dnl with or without modifications, as long as this notice is preserved.
  551. -dnl
  552. -dnl This file can be used in projects which are not available under
  553. -dnl the GNU General Public License or the GNU Library General Public
  554. -dnl License but which still want to provide support for the GNU gettext
  555. -dnl functionality.
  556. -dnl Please note that the actual code of the GNU gettext library is covered
  557. -dnl by the GNU Library General Public License, and the rest of the GNU
  558. -dnl gettext package is covered by the GNU General Public License.
  559. -dnl They are *not* in the public domain.
  560. -
  561. -AC_PREREQ([2.52])
  562. -
  563. -dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory.
  564. -AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], [])
  565. diff --git a/m4/intmax.m4 b/m4/intmax.m4
  566. deleted file mode 100644
  567. index b432fae..0000000
  568. --- a/m4/intmax.m4
  569. +++ /dev/null
  570. @@ -1,36 +0,0 @@
  571. -# intmax.m4 serial 6 (gettext-0.18.2)
  572. -dnl Copyright (C) 2002-2005, 2008-2017 Free Software Foundation, Inc.
  573. -dnl This file is free software; the Free Software Foundation
  574. -dnl gives unlimited permission to copy and/or distribute it,
  575. -dnl with or without modifications, as long as this notice is preserved.
  576. -
  577. -dnl From Bruno Haible.
  578. -dnl Test whether the system has the 'intmax_t' type, but don't attempt to
  579. -dnl find a replacement if it is lacking.
  580. -
  581. -AC_DEFUN([gt_TYPE_INTMAX_T],
  582. -[
  583. - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
  584. - AC_REQUIRE([gl_AC_HEADER_STDINT_H])
  585. - AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t],
  586. - [AC_COMPILE_IFELSE(
  587. - [AC_LANG_PROGRAM(
  588. - [[
  589. -#include <stddef.h>
  590. -#include <stdlib.h>
  591. -#if HAVE_STDINT_H_WITH_UINTMAX
  592. -#include <stdint.h>
  593. -#endif
  594. -#if HAVE_INTTYPES_H_WITH_UINTMAX
  595. -#include <inttypes.h>
  596. -#endif
  597. - ]],
  598. - [[intmax_t x = -1;
  599. - return !x;]])],
  600. - [gt_cv_c_intmax_t=yes],
  601. - [gt_cv_c_intmax_t=no])])
  602. - if test $gt_cv_c_intmax_t = yes; then
  603. - AC_DEFINE([HAVE_INTMAX_T], [1],
  604. - [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
  605. - fi
  606. -])
  607. diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4
  608. deleted file mode 100644
  609. index 2055787..0000000
  610. --- a/m4/inttypes-pri.m4
  611. +++ /dev/null
  612. @@ -1,42 +0,0 @@
  613. -# inttypes-pri.m4 serial 7 (gettext-0.18.2)
  614. -dnl Copyright (C) 1997-2002, 2006, 2008-2017 Free Software Foundation, Inc.
  615. -dnl This file is free software; the Free Software Foundation
  616. -dnl gives unlimited permission to copy and/or distribute it,
  617. -dnl with or without modifications, as long as this notice is preserved.
  618. -
  619. -dnl From Bruno Haible.
  620. -
  621. -AC_PREREQ([2.53])
  622. -
  623. -# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
  624. -# macros to non-string values. This is the case on AIX 4.3.3.
  625. -
  626. -AC_DEFUN([gt_INTTYPES_PRI],
  627. -[
  628. - AC_CHECK_HEADERS([inttypes.h])
  629. - if test $ac_cv_header_inttypes_h = yes; then
  630. - AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
  631. - [gt_cv_inttypes_pri_broken],
  632. - [
  633. - AC_COMPILE_IFELSE(
  634. - [AC_LANG_PROGRAM(
  635. - [[
  636. -#include <inttypes.h>
  637. -#ifdef PRId32
  638. -char *p = PRId32;
  639. -#endif
  640. - ]],
  641. - [[]])],
  642. - [gt_cv_inttypes_pri_broken=no],
  643. - [gt_cv_inttypes_pri_broken=yes])
  644. - ])
  645. - fi
  646. - if test "$gt_cv_inttypes_pri_broken" = yes; then
  647. - AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1],
  648. - [Define if <inttypes.h> exists and defines unusable PRI* macros.])
  649. - PRI_MACROS_BROKEN=1
  650. - else
  651. - PRI_MACROS_BROKEN=0
  652. - fi
  653. - AC_SUBST([PRI_MACROS_BROKEN])
  654. -])
  655. diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4
  656. deleted file mode 100644
  657. index 9240305..0000000
  658. --- a/m4/inttypes_h.m4
  659. +++ /dev/null
  660. @@ -1,29 +0,0 @@
  661. -# inttypes_h.m4 serial 10
  662. -dnl Copyright (C) 1997-2004, 2006, 2008-2017 Free Software Foundation, Inc.
  663. -dnl This file is free software; the Free Software Foundation
  664. -dnl gives unlimited permission to copy and/or distribute it,
  665. -dnl with or without modifications, as long as this notice is preserved.
  666. -
  667. -dnl From Paul Eggert.
  668. -
  669. -# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
  670. -# doesn't clash with <sys/types.h>, and declares uintmax_t.
  671. -
  672. -AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
  673. -[
  674. - AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h],
  675. - [AC_COMPILE_IFELSE(
  676. - [AC_LANG_PROGRAM(
  677. - [[
  678. -#include <sys/types.h>
  679. -#include <inttypes.h>
  680. - ]],
  681. - [[uintmax_t i = (uintmax_t) -1; return !i;]])],
  682. - [gl_cv_header_inttypes_h=yes],
  683. - [gl_cv_header_inttypes_h=no])])
  684. - if test $gl_cv_header_inttypes_h = yes; then
  685. - AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1],
  686. - [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
  687. - and declares uintmax_t. ])
  688. - fi
  689. -])
  690. diff --git a/m4/lcmessage.m4 b/m4/lcmessage.m4
  691. deleted file mode 100644
  692. index 1c24d6d..0000000
  693. --- a/m4/lcmessage.m4
  694. +++ /dev/null
  695. @@ -1,35 +0,0 @@
  696. -# lcmessage.m4 serial 7 (gettext-0.18.2)
  697. -dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014, 2016 Free Software
  698. -dnl Foundation, Inc.
  699. -dnl This file is free software; the Free Software Foundation
  700. -dnl gives unlimited permission to copy and/or distribute it,
  701. -dnl with or without modifications, as long as this notice is preserved.
  702. -dnl
  703. -dnl This file can be used in projects which are not available under
  704. -dnl the GNU General Public License or the GNU Library General Public
  705. -dnl License but which still want to provide support for the GNU gettext
  706. -dnl functionality.
  707. -dnl Please note that the actual code of the GNU gettext library is covered
  708. -dnl by the GNU Library General Public License, and the rest of the GNU
  709. -dnl gettext package is covered by the GNU General Public License.
  710. -dnl They are *not* in the public domain.
  711. -
  712. -dnl Authors:
  713. -dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
  714. -
  715. -# Check whether LC_MESSAGES is available in <locale.h>.
  716. -
  717. -AC_DEFUN([gt_LC_MESSAGES],
  718. -[
  719. - AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES],
  720. - [AC_LINK_IFELSE(
  721. - [AC_LANG_PROGRAM(
  722. - [[#include <locale.h>]],
  723. - [[return LC_MESSAGES]])],
  724. - [gt_cv_val_LC_MESSAGES=yes],
  725. - [gt_cv_val_LC_MESSAGES=no])])
  726. - if test $gt_cv_val_LC_MESSAGES = yes; then
  727. - AC_DEFINE([HAVE_LC_MESSAGES], [1],
  728. - [Define if your <locale.h> file defines LC_MESSAGES.])
  729. - fi
  730. -])
  731. diff --git a/m4/lock.m4 b/m4/lock.m4
  732. deleted file mode 100644
  733. index cb04a67..0000000
  734. --- a/m4/lock.m4
  735. +++ /dev/null
  736. @@ -1,47 +0,0 @@
  737. -# lock.m4 serial 14
  738. -dnl Copyright (C) 2005-2017 Free Software Foundation, Inc.
  739. -dnl This file is free software; the Free Software Foundation
  740. -dnl gives unlimited permission to copy and/or distribute it,
  741. -dnl with or without modifications, as long as this notice is preserved.
  742. -
  743. -dnl From Bruno Haible.
  744. -
  745. -AC_DEFUN([gl_LOCK],
  746. -[
  747. - AC_REQUIRE([gl_THREADLIB])
  748. - if test "$gl_threads_api" = posix; then
  749. - # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
  750. - # pthread_rwlock_* functions.
  751. - has_rwlock=false
  752. - AC_CHECK_TYPE([pthread_rwlock_t],
  753. - [has_rwlock=true
  754. - AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1],
  755. - [Define if the POSIX multithreading library has read/write locks.])],
  756. - [],
  757. - [#include <pthread.h>])
  758. - if $has_rwlock; then
  759. - gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER
  760. - fi
  761. - # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
  762. - AC_COMPILE_IFELSE([
  763. - AC_LANG_PROGRAM(
  764. - [[#include <pthread.h>]],
  765. - [[
  766. -#if __FreeBSD__ == 4
  767. -error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
  768. -#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
  769. - && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
  770. -error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
  771. -#else
  772. -int x = (int)PTHREAD_MUTEX_RECURSIVE;
  773. -return !x;
  774. -#endif
  775. - ]])],
  776. - [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1],
  777. - [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
  778. - fi
  779. - gl_PREREQ_LOCK
  780. -])
  781. -
  782. -# Prerequisites of lib/glthread/lock.c.
  783. -AC_DEFUN([gl_PREREQ_LOCK], [:])
  784. diff --git a/m4/longlong.m4 b/m4/longlong.m4
  785. deleted file mode 100644
  786. index 9a3294b..0000000
  787. --- a/m4/longlong.m4
  788. +++ /dev/null
  789. @@ -1,113 +0,0 @@
  790. -# longlong.m4 serial 17
  791. -dnl Copyright (C) 1999-2007, 2009-2017 Free Software Foundation, Inc.
  792. -dnl This file is free software; the Free Software Foundation
  793. -dnl gives unlimited permission to copy and/or distribute it,
  794. -dnl with or without modifications, as long as this notice is preserved.
  795. -
  796. -dnl From Paul Eggert.
  797. -
  798. -# Define HAVE_LONG_LONG_INT if 'long long int' works.
  799. -# This fixes a bug in Autoconf 2.61, and can be faster
  800. -# than what's in Autoconf 2.62 through 2.68.
  801. -
  802. -# Note: If the type 'long long int' exists but is only 32 bits large
  803. -# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
  804. -# defined. In this case you can treat 'long long int' like 'long int'.
  805. -
  806. -AC_DEFUN([AC_TYPE_LONG_LONG_INT],
  807. -[
  808. - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
  809. - AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
  810. - [ac_cv_type_long_long_int=yes
  811. - if test "x${ac_cv_prog_cc_c99-no}" = xno; then
  812. - ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
  813. - if test $ac_cv_type_long_long_int = yes; then
  814. - dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
  815. - dnl If cross compiling, assume the bug is not important, since
  816. - dnl nobody cross compiles for this platform as far as we know.
  817. - AC_RUN_IFELSE(
  818. - [AC_LANG_PROGRAM(
  819. - [[@%:@include <limits.h>
  820. - @%:@ifndef LLONG_MAX
  821. - @%:@ define HALF \
  822. - (1LL << (sizeof (long long int) * CHAR_BIT - 2))
  823. - @%:@ define LLONG_MAX (HALF - 1 + HALF)
  824. - @%:@endif]],
  825. - [[long long int n = 1;
  826. - int i;
  827. - for (i = 0; ; i++)
  828. - {
  829. - long long int m = n << i;
  830. - if (m >> i != n)
  831. - return 1;
  832. - if (LLONG_MAX / 2 < m)
  833. - break;
  834. - }
  835. - return 0;]])],
  836. - [],
  837. - [ac_cv_type_long_long_int=no],
  838. - [:])
  839. - fi
  840. - fi])
  841. - if test $ac_cv_type_long_long_int = yes; then
  842. - AC_DEFINE([HAVE_LONG_LONG_INT], [1],
  843. - [Define to 1 if the system has the type 'long long int'.])
  844. - fi
  845. -])
  846. -
  847. -# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
  848. -# This fixes a bug in Autoconf 2.61, and can be faster
  849. -# than what's in Autoconf 2.62 through 2.68.
  850. -
  851. -# Note: If the type 'unsigned long long int' exists but is only 32 bits
  852. -# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
  853. -# will not be defined. In this case you can treat 'unsigned long long int'
  854. -# like 'unsigned long int'.
  855. -
  856. -AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
  857. -[
  858. - AC_CACHE_CHECK([for unsigned long long int],
  859. - [ac_cv_type_unsigned_long_long_int],
  860. - [ac_cv_type_unsigned_long_long_int=yes
  861. - if test "x${ac_cv_prog_cc_c99-no}" = xno; then
  862. - AC_LINK_IFELSE(
  863. - [_AC_TYPE_LONG_LONG_SNIPPET],
  864. - [],
  865. - [ac_cv_type_unsigned_long_long_int=no])
  866. - fi])
  867. - if test $ac_cv_type_unsigned_long_long_int = yes; then
  868. - AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
  869. - [Define to 1 if the system has the type 'unsigned long long int'.])
  870. - fi
  871. -])
  872. -
  873. -# Expands to a C program that can be used to test for simultaneous support
  874. -# of 'long long' and 'unsigned long long'. We don't want to say that
  875. -# 'long long' is available if 'unsigned long long' is not, or vice versa,
  876. -# because too many programs rely on the symmetry between signed and unsigned
  877. -# integer types (excluding 'bool').
  878. -AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
  879. -[
  880. - AC_LANG_PROGRAM(
  881. - [[/* For now, do not test the preprocessor; as of 2007 there are too many
  882. - implementations with broken preprocessors. Perhaps this can
  883. - be revisited in 2012. In the meantime, code should not expect
  884. - #if to work with literals wider than 32 bits. */
  885. - /* Test literals. */
  886. - long long int ll = 9223372036854775807ll;
  887. - long long int nll = -9223372036854775807LL;
  888. - unsigned long long int ull = 18446744073709551615ULL;
  889. - /* Test constant expressions. */
  890. - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
  891. - ? 1 : -1)];
  892. - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
  893. - ? 1 : -1)];
  894. - int i = 63;]],
  895. - [[/* Test availability of runtime routines for shift and division. */
  896. - long long int llmax = 9223372036854775807ll;
  897. - unsigned long long int ullmax = 18446744073709551615ull;
  898. - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
  899. - | (llmax / ll) | (llmax % ll)
  900. - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
  901. - | (ullmax / ull) | (ullmax % ull));]])
  902. -])
  903. diff --git a/m4/printf-posix.m4 b/m4/printf-posix.m4
  904. deleted file mode 100644
  905. index 0577933..0000000
  906. --- a/m4/printf-posix.m4
  907. +++ /dev/null
  908. @@ -1,48 +0,0 @@
  909. -# printf-posix.m4 serial 6 (gettext-0.18.2)
  910. -dnl Copyright (C) 2003, 2007, 2009-2017 Free Software Foundation, Inc.
  911. -dnl This file is free software; the Free Software Foundation
  912. -dnl gives unlimited permission to copy and/or distribute it,
  913. -dnl with or without modifications, as long as this notice is preserved.
  914. -
  915. -dnl From Bruno Haible.
  916. -dnl Test whether the printf() function supports POSIX/XSI format strings with
  917. -dnl positions.
  918. -
  919. -AC_DEFUN([gt_PRINTF_POSIX],
  920. -[
  921. - AC_REQUIRE([AC_PROG_CC])
  922. - AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
  923. - gt_cv_func_printf_posix,
  924. - [
  925. - AC_RUN_IFELSE(
  926. - [AC_LANG_SOURCE([[
  927. -#include <stdio.h>
  928. -#include <string.h>
  929. -/* The string "%2$d %1$d", with dollar characters protected from the shell's
  930. - dollar expansion (possibly an autoconf bug). */
  931. -static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
  932. -static char buf[100];
  933. -int main ()
  934. -{
  935. - sprintf (buf, format, 33, 55);
  936. - return (strcmp (buf, "55 33") != 0);
  937. -}]])],
  938. - [gt_cv_func_printf_posix=yes],
  939. - [gt_cv_func_printf_posix=no],
  940. - [
  941. - AC_EGREP_CPP([notposix], [
  942. -#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
  943. - notposix
  944. -#endif
  945. - ],
  946. - [gt_cv_func_printf_posix="guessing no"],
  947. - [gt_cv_func_printf_posix="guessing yes"])
  948. - ])
  949. - ])
  950. - case $gt_cv_func_printf_posix in
  951. - *yes)
  952. - AC_DEFINE([HAVE_POSIX_PRINTF], [1],
  953. - [Define if your printf() function supports format strings with positions.])
  954. - ;;
  955. - esac
  956. -])
  957. diff --git a/m4/size_max.m4 b/m4/size_max.m4
  958. deleted file mode 100644
  959. index 05ad1b6..0000000
  960. --- a/m4/size_max.m4
  961. +++ /dev/null
  962. @@ -1,79 +0,0 @@
  963. -# size_max.m4 serial 10
  964. -dnl Copyright (C) 2003, 2005-2006, 2008-2017 Free Software Foundation, Inc.
  965. -dnl This file is free software; the Free Software Foundation
  966. -dnl gives unlimited permission to copy and/or distribute it,
  967. -dnl with or without modifications, as long as this notice is preserved.
  968. -
  969. -dnl From Bruno Haible.
  970. -
  971. -AC_DEFUN([gl_SIZE_MAX],
  972. -[
  973. - AC_CHECK_HEADERS([stdint.h])
  974. - dnl First test whether the system already has SIZE_MAX.
  975. - AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [
  976. - gl_cv_size_max=
  977. - AC_EGREP_CPP([Found it], [
  978. -#include <limits.h>
  979. -#if HAVE_STDINT_H
  980. -#include <stdint.h>
  981. -#endif
  982. -#ifdef SIZE_MAX
  983. -Found it
  984. -#endif
  985. -], [gl_cv_size_max=yes])
  986. - if test -z "$gl_cv_size_max"; then
  987. - dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
  988. - dnl than the type 'unsigned long'. Try hard to find a definition that can
  989. - dnl be used in a preprocessor #if, i.e. doesn't contain a cast.
  990. - AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1],
  991. - [#include <stddef.h>
  992. -#include <limits.h>], [size_t_bits_minus_1=])
  993. - AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)],
  994. - [#include <stddef.h>], [fits_in_uint=])
  995. - if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
  996. - if test $fits_in_uint = 1; then
  997. - dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
  998. - dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
  999. - AC_COMPILE_IFELSE(
  1000. - [AC_LANG_PROGRAM(
  1001. - [[#include <stddef.h>
  1002. - extern size_t foo;
  1003. - extern unsigned long foo;
  1004. - ]],
  1005. - [[]])],
  1006. - [fits_in_uint=0])
  1007. - fi
  1008. - dnl We cannot use 'expr' to simplify this expression, because 'expr'
  1009. - dnl works only with 'long' integers in the host environment, while we
  1010. - dnl might be cross-compiling from a 32-bit platform to a 64-bit platform.
  1011. - if test $fits_in_uint = 1; then
  1012. - gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
  1013. - else
  1014. - gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
  1015. - fi
  1016. - else
  1017. - dnl Shouldn't happen, but who knows...
  1018. - gl_cv_size_max='((size_t)~(size_t)0)'
  1019. - fi
  1020. - fi
  1021. - ])
  1022. - if test "$gl_cv_size_max" != yes; then
  1023. - AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max],
  1024. - [Define as the maximum value of type 'size_t', if the system doesn't define it.])
  1025. - fi
  1026. - dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after
  1027. - dnl <stdint.h>. Remember that the #undef in AH_VERBATIM gets replaced with
  1028. - dnl #define by AC_DEFINE_UNQUOTED.
  1029. - AH_VERBATIM([SIZE_MAX],
  1030. -[/* Define as the maximum value of type 'size_t', if the system doesn't define
  1031. - it. */
  1032. -#ifndef SIZE_MAX
  1033. -# undef SIZE_MAX
  1034. -#endif])
  1035. -])
  1036. -
  1037. -dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
  1038. -dnl Remove this when we can assume autoconf >= 2.61.
  1039. -m4_ifdef([AC_COMPUTE_INT], [], [
  1040. - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
  1041. -])
  1042. diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4
  1043. deleted file mode 100644
  1044. index 786eaa3..0000000
  1045. --- a/m4/stdint_h.m4
  1046. +++ /dev/null
  1047. @@ -1,27 +0,0 @@
  1048. -# stdint_h.m4 serial 9
  1049. -dnl Copyright (C) 1997-2004, 2006, 2008-2017 Free Software Foundation, Inc.
  1050. -dnl This file is free software; the Free Software Foundation
  1051. -dnl gives unlimited permission to copy and/or distribute it,
  1052. -dnl with or without modifications, as long as this notice is preserved.
  1053. -
  1054. -dnl From Paul Eggert.
  1055. -
  1056. -# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
  1057. -# doesn't clash with <sys/types.h>, and declares uintmax_t.
  1058. -
  1059. -AC_DEFUN([gl_AC_HEADER_STDINT_H],
  1060. -[
  1061. - AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h],
  1062. - [AC_COMPILE_IFELSE(
  1063. - [AC_LANG_PROGRAM(
  1064. - [[#include <sys/types.h>
  1065. - #include <stdint.h>]],
  1066. - [[uintmax_t i = (uintmax_t) -1; return !i;]])],
  1067. - [gl_cv_header_stdint_h=yes],
  1068. - [gl_cv_header_stdint_h=no])])
  1069. - if test $gl_cv_header_stdint_h = yes; then
  1070. - AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1],
  1071. - [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
  1072. - and declares uintmax_t. ])
  1073. - fi
  1074. -])
  1075. diff --git a/m4/threadlib.m4 b/m4/threadlib.m4
  1076. deleted file mode 100644
  1077. index f79fde2..0000000
  1078. --- a/m4/threadlib.m4
  1079. +++ /dev/null
  1080. @@ -1,391 +0,0 @@
  1081. -# threadlib.m4 serial 12
  1082. -dnl Copyright (C) 2005-2017 Free Software Foundation, Inc.
  1083. -dnl This file is free software; the Free Software Foundation
  1084. -dnl gives unlimited permission to copy and/or distribute it,
  1085. -dnl with or without modifications, as long as this notice is preserved.
  1086. -
  1087. -dnl From Bruno Haible.
  1088. -
  1089. -dnl gl_THREADLIB
  1090. -dnl ------------
  1091. -dnl Tests for a multithreading library to be used.
  1092. -dnl If the configure.ac contains a definition of the gl_THREADLIB_DEFAULT_NO
  1093. -dnl (it must be placed before the invocation of gl_THREADLIB_EARLY!), then the
  1094. -dnl default is 'no', otherwise it is system dependent. In both cases, the user
  1095. -dnl can change the choice through the options --enable-threads=choice or
  1096. -dnl --disable-threads.
  1097. -dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS,
  1098. -dnl USE_PTH_THREADS, USE_WINDOWS_THREADS
  1099. -dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
  1100. -dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
  1101. -dnl libtool).
  1102. -dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
  1103. -dnl programs that really need multithread functionality. The difference
  1104. -dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
  1105. -dnl symbols, typically LIBTHREAD is empty whereas LIBMULTITHREAD is not.
  1106. -dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
  1107. -dnl multithread-safe programs.
  1108. -
  1109. -AC_DEFUN([gl_THREADLIB_EARLY],
  1110. -[
  1111. - AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
  1112. -])
  1113. -
  1114. -dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once.
  1115. -
  1116. -AC_DEFUN([gl_THREADLIB_EARLY_BODY],
  1117. -[
  1118. - dnl Ordering constraints: This macro modifies CPPFLAGS in a way that
  1119. - dnl influences the result of the autoconf tests that test for *_unlocked
  1120. - dnl declarations, on AIX 5 at least. Therefore it must come early.
  1121. - AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl
  1122. - AC_BEFORE([$0], [gl_ARGP])dnl
  1123. -
  1124. - AC_REQUIRE([AC_CANONICAL_HOST])
  1125. - dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems.
  1126. - dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes
  1127. - dnl AC_GNU_SOURCE.
  1128. - m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
  1129. - [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
  1130. - [AC_REQUIRE([AC_GNU_SOURCE])])
  1131. - dnl Check for multithreading.
  1132. - m4_ifdef([gl_THREADLIB_DEFAULT_NO],
  1133. - [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])],
  1134. - [m4_divert_text([DEFAULTS], [gl_use_threads_default=])])
  1135. - AC_ARG_ENABLE([threads],
  1136. -AC_HELP_STRING([--enable-threads={posix|solaris|pth|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
  1137. -AC_HELP_STRING([--disable-threads], [build without multithread safety])]),
  1138. - [gl_use_threads=$enableval],
  1139. - [if test -n "$gl_use_threads_default"; then
  1140. - gl_use_threads="$gl_use_threads_default"
  1141. - else
  1142. -changequote(,)dnl
  1143. - case "$host_os" in
  1144. - dnl Disable multithreading by default on OSF/1, because it interferes
  1145. - dnl with fork()/exec(): When msgexec is linked with -lpthread, its
  1146. - dnl child process gets an endless segmentation fault inside execvp().
  1147. - dnl Disable multithreading by default on Cygwin 1.5.x, because it has
  1148. - dnl bugs that lead to endless loops or crashes. See
  1149. - dnl <http://cygwin.com/ml/cygwin/2009-08/msg00283.html>.
  1150. - osf*) gl_use_threads=no ;;
  1151. - cygwin*)
  1152. - case `uname -r` in
  1153. - 1.[0-5].*) gl_use_threads=no ;;
  1154. - *) gl_use_threads=yes ;;
  1155. - esac
  1156. - ;;
  1157. - *) gl_use_threads=yes ;;
  1158. - esac
  1159. -changequote([,])dnl
  1160. - fi
  1161. - ])
  1162. - if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
  1163. - # For using <pthread.h>:
  1164. - case "$host_os" in
  1165. - osf*)
  1166. - # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
  1167. - # groks <pthread.h>. cc also understands the flag -pthread, but
  1168. - # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
  1169. - # 2. putting a flag into CPPFLAGS that has an effect on the linker
  1170. - # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
  1171. - # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
  1172. - CPPFLAGS="$CPPFLAGS -D_REENTRANT"
  1173. - ;;
  1174. - esac
  1175. - # Some systems optimize for single-threaded programs by default, and
  1176. - # need special flags to disable these optimizations. For example, the
  1177. - # definition of 'errno' in <errno.h>.
  1178. - case "$host_os" in
  1179. - aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
  1180. - solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
  1181. - esac
  1182. - fi
  1183. -])
  1184. -
  1185. -dnl The guts of gl_THREADLIB. Needs to be expanded only once.
  1186. -
  1187. -AC_DEFUN([gl_THREADLIB_BODY],
  1188. -[
  1189. - AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
  1190. - gl_threads_api=none
  1191. - LIBTHREAD=
  1192. - LTLIBTHREAD=
  1193. - LIBMULTITHREAD=
  1194. - LTLIBMULTITHREAD=
  1195. - if test "$gl_use_threads" != no; then
  1196. - dnl Check whether the compiler and linker support weak declarations.
  1197. - AC_CACHE_CHECK([whether imported symbols can be declared weak],
  1198. - [gl_cv_have_weak],
  1199. - [gl_cv_have_weak=no
  1200. - dnl First, test whether the compiler accepts it syntactically.
  1201. - AC_LINK_IFELSE(
  1202. - [AC_LANG_PROGRAM(
  1203. - [[extern void xyzzy ();
  1204. -#pragma weak xyzzy]],
  1205. - [[xyzzy();]])],
  1206. - [gl_cv_have_weak=maybe])
  1207. - if test $gl_cv_have_weak = maybe; then
  1208. - dnl Second, test whether it actually works. On Cygwin 1.7.2, with
  1209. - dnl gcc 4.3, symbols declared weak always evaluate to the address 0.
  1210. - AC_RUN_IFELSE(
  1211. - [AC_LANG_SOURCE([[
  1212. -#include <stdio.h>
  1213. -#pragma weak fputs
  1214. -int main ()
  1215. -{
  1216. - return (fputs == NULL);
  1217. -}]])],
  1218. - [gl_cv_have_weak=yes],
  1219. - [gl_cv_have_weak=no],
  1220. - [dnl When cross-compiling, assume that only ELF platforms support
  1221. - dnl weak symbols.
  1222. - AC_EGREP_CPP([Extensible Linking Format],
  1223. - [#ifdef __ELF__
  1224. - Extensible Linking Format
  1225. - #endif
  1226. - ],
  1227. - [gl_cv_have_weak="guessing yes"],
  1228. - [gl_cv_have_weak="guessing no"])
  1229. - ])
  1230. - fi
  1231. - ])
  1232. - if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
  1233. - # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
  1234. - # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
  1235. - AC_CHECK_HEADER([pthread.h],
  1236. - [gl_have_pthread_h=yes], [gl_have_pthread_h=no])
  1237. - if test "$gl_have_pthread_h" = yes; then
  1238. - # Other possible tests:
  1239. - # -lpthreads (FSU threads, PCthreads)
  1240. - # -lgthreads
  1241. - gl_have_pthread=
  1242. - # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
  1243. - # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
  1244. - # the second one only in libpthread, and lock.c needs it.
  1245. - #
  1246. - # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
  1247. - # needs -pthread for some reason. See:
  1248. - # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html
  1249. - save_LIBS=$LIBS
  1250. - for gl_pthread in '' '-pthread'; do
  1251. - LIBS="$LIBS $gl_pthread"
  1252. - AC_LINK_IFELSE(
  1253. - [AC_LANG_PROGRAM(
  1254. - [[#include <pthread.h>
  1255. - pthread_mutex_t m;
  1256. - pthread_mutexattr_t ma;
  1257. - ]],
  1258. - [[pthread_mutex_lock (&m);
  1259. - pthread_mutexattr_init (&ma);]])],
  1260. - [gl_have_pthread=yes
  1261. - LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
  1262. - LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread])
  1263. - LIBS=$save_LIBS
  1264. - test -n "$gl_have_pthread" && break
  1265. - done
  1266. -
  1267. - # Test for libpthread by looking for pthread_kill. (Not pthread_self,
  1268. - # since it is defined as a macro on OSF/1.)
  1269. - if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
  1270. - # The program links fine without libpthread. But it may actually
  1271. - # need to link with libpthread in order to create multiple threads.
  1272. - AC_CHECK_LIB([pthread], [pthread_kill],
  1273. - [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
  1274. - # On Solaris and HP-UX, most pthread functions exist also in libc.
  1275. - # Therefore pthread_in_use() needs to actually try to create a
  1276. - # thread: pthread_create from libc will fail, whereas
  1277. - # pthread_create will actually create a thread.
  1278. - # On Solaris 10 or newer, this test is no longer needed, because
  1279. - # libc contains the fully functional pthread functions.
  1280. - case "$host_os" in
  1281. - solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
  1282. - AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
  1283. - [Define if the pthread_in_use() detection is hard.])
  1284. - esac
  1285. - ])
  1286. - elif test -z "$gl_have_pthread"; then
  1287. - # Some library is needed. Try libpthread and libc_r.
  1288. - AC_CHECK_LIB([pthread], [pthread_kill],
  1289. - [gl_have_pthread=yes
  1290. - LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
  1291. - LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread])
  1292. - if test -z "$gl_have_pthread"; then
  1293. - # For FreeBSD 4.
  1294. - AC_CHECK_LIB([c_r], [pthread_kill],
  1295. - [gl_have_pthread=yes
  1296. - LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
  1297. - LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r])
  1298. - fi
  1299. - fi
  1300. - if test -n "$gl_have_pthread"; then
  1301. - gl_threads_api=posix
  1302. - AC_DEFINE([USE_POSIX_THREADS], [1],
  1303. - [Define if the POSIX multithreading library can be used.])
  1304. - if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
  1305. - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
  1306. - AC_DEFINE([USE_POSIX_THREADS_WEAK], [1],
  1307. - [Define if references to the POSIX multithreading library should be made weak.])
  1308. - LIBTHREAD=
  1309. - LTLIBTHREAD=
  1310. - fi
  1311. - fi
  1312. - fi
  1313. - fi
  1314. - fi
  1315. - if test -z "$gl_have_pthread"; then
  1316. - if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
  1317. - gl_have_solaristhread=
  1318. - gl_save_LIBS="$LIBS"
  1319. - LIBS="$LIBS -lthread"
  1320. - AC_LINK_IFELSE(
  1321. - [AC_LANG_PROGRAM(
  1322. - [[
  1323. -#include <thread.h>
  1324. -#include <synch.h>
  1325. - ]],
  1326. - [[thr_self();]])],
  1327. - [gl_have_solaristhread=yes])
  1328. - LIBS="$gl_save_LIBS"
  1329. - if test -n "$gl_have_solaristhread"; then
  1330. - gl_threads_api=solaris
  1331. - LIBTHREAD=-lthread
  1332. - LTLIBTHREAD=-lthread
  1333. - LIBMULTITHREAD="$LIBTHREAD"
  1334. - LTLIBMULTITHREAD="$LTLIBTHREAD"
  1335. - AC_DEFINE([USE_SOLARIS_THREADS], [1],
  1336. - [Define if the old Solaris multithreading library can be used.])
  1337. - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
  1338. - AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1],
  1339. - [Define if references to the old Solaris multithreading library should be made weak.])
  1340. - LIBTHREAD=
  1341. - LTLIBTHREAD=
  1342. - fi
  1343. - fi
  1344. - fi
  1345. - fi
  1346. - if test "$gl_use_threads" = pth; then
  1347. - gl_save_CPPFLAGS="$CPPFLAGS"
  1348. - AC_LIB_LINKFLAGS([pth])
  1349. - gl_have_pth=
  1350. - gl_save_LIBS="$LIBS"
  1351. - LIBS="$LIBS $LIBPTH"
  1352. - AC_LINK_IFELSE(
  1353. - [AC_LANG_PROGRAM([[#include <pth.h>]], [[pth_self();]])],
  1354. - [gl_have_pth=yes])
  1355. - LIBS="$gl_save_LIBS"
  1356. - if test -n "$gl_have_pth"; then
  1357. - gl_threads_api=pth
  1358. - LIBTHREAD="$LIBPTH"
  1359. - LTLIBTHREAD="$LTLIBPTH"
  1360. - LIBMULTITHREAD="$LIBTHREAD"
  1361. - LTLIBMULTITHREAD="$LTLIBTHREAD"
  1362. - AC_DEFINE([USE_PTH_THREADS], [1],
  1363. - [Define if the GNU Pth multithreading library can be used.])
  1364. - if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
  1365. - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
  1366. - AC_DEFINE([USE_PTH_THREADS_WEAK], [1],
  1367. - [Define if references to the GNU Pth multithreading library should be made weak.])
  1368. - LIBTHREAD=
  1369. - LTLIBTHREAD=
  1370. - fi
  1371. - fi
  1372. - else
  1373. - CPPFLAGS="$gl_save_CPPFLAGS"
  1374. - fi
  1375. - fi
  1376. - if test -z "$gl_have_pthread"; then
  1377. - case "$gl_use_threads" in
  1378. - yes | windows | win32) # The 'win32' is for backward compatibility.
  1379. - if { case "$host_os" in
  1380. - mingw*) true;;
  1381. - *) false;;
  1382. - esac
  1383. - }; then
  1384. - gl_threads_api=windows
  1385. - AC_DEFINE([USE_WINDOWS_THREADS], [1],
  1386. - [Define if the native Windows multithreading API can be used.])
  1387. - fi
  1388. - ;;
  1389. - esac
  1390. - fi
  1391. - fi
  1392. - AC_MSG_CHECKING([for multithread API to use])
  1393. - AC_MSG_RESULT([$gl_threads_api])
  1394. - AC_SUBST([LIBTHREAD])
  1395. - AC_SUBST([LTLIBTHREAD])
  1396. - AC_SUBST([LIBMULTITHREAD])
  1397. - AC_SUBST([LTLIBMULTITHREAD])
  1398. -])
  1399. -
  1400. -AC_DEFUN([gl_THREADLIB],
  1401. -[
  1402. - AC_REQUIRE([gl_THREADLIB_EARLY])
  1403. - AC_REQUIRE([gl_THREADLIB_BODY])
  1404. -])
  1405. -
  1406. -
  1407. -dnl gl_DISABLE_THREADS
  1408. -dnl ------------------
  1409. -dnl Sets the gl_THREADLIB default so that threads are not used by default.
  1410. -dnl The user can still override it at installation time, by using the
  1411. -dnl configure option '--enable-threads'.
  1412. -
  1413. -AC_DEFUN([gl_DISABLE_THREADS], [
  1414. - m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no])
  1415. -])
  1416. -
  1417. -
  1418. -dnl Survey of platforms:
  1419. -dnl
  1420. -dnl Platform Available Compiler Supports test-lock
  1421. -dnl flavours option weak result
  1422. -dnl --------------- --------- --------- -------- ---------
  1423. -dnl Linux 2.4/glibc posix -lpthread Y OK
  1424. -dnl
  1425. -dnl GNU Hurd/glibc posix
  1426. -dnl
  1427. -dnl Ubuntu 14.04 posix -pthread Y OK
  1428. -dnl
  1429. -dnl FreeBSD 5.3 posix -lc_r Y
  1430. -dnl posix -lkse ? Y
  1431. -dnl posix -lpthread ? Y
  1432. -dnl posix -lthr Y
  1433. -dnl
  1434. -dnl FreeBSD 5.2 posix -lc_r Y
  1435. -dnl posix -lkse Y
  1436. -dnl posix -lthr Y
  1437. -dnl
  1438. -dnl FreeBSD 4.0,4.10 posix -lc_r Y OK
  1439. -dnl
  1440. -dnl NetBSD 1.6 --
  1441. -dnl
  1442. -dnl OpenBSD 3.4 posix -lpthread Y OK
  1443. -dnl
  1444. -dnl Mac OS X 10.[123] posix -lpthread Y OK
  1445. -dnl
  1446. -dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK
  1447. -dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK
  1448. -dnl
  1449. -dnl HP-UX 11 posix -lpthread N (cc) OK
  1450. -dnl Y (gcc)
  1451. -dnl
  1452. -dnl IRIX 6.5 posix -lpthread Y 0.5
  1453. -dnl
  1454. -dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK
  1455. -dnl
  1456. -dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK
  1457. -dnl -lpthread (gcc) Y
  1458. -dnl
  1459. -dnl Cygwin posix -lpthread Y OK
  1460. -dnl
  1461. -dnl Any of the above pth -lpth 0.0
  1462. -dnl
  1463. -dnl Mingw windows N OK
  1464. -dnl
  1465. -dnl BeOS 5 --
  1466. -dnl
  1467. -dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is
  1468. -dnl turned off:
  1469. -dnl OK if all three tests terminate OK,
  1470. -dnl 0.5 if the first test terminates OK but the second one loops endlessly,
  1471. -dnl 0.0 if the first test already loops endlessly.
  1472. diff --git a/m4/uintmax_t.m4 b/m4/uintmax_t.m4
  1473. deleted file mode 100644
  1474. index 7e3b3df..0000000
  1475. --- a/m4/uintmax_t.m4
  1476. +++ /dev/null
  1477. @@ -1,30 +0,0 @@
  1478. -# uintmax_t.m4 serial 12
  1479. -dnl Copyright (C) 1997-2004, 2007-2017 Free Software Foundation, Inc.
  1480. -dnl This file is free software; the Free Software Foundation
  1481. -dnl gives unlimited permission to copy and/or distribute it,
  1482. -dnl with or without modifications, as long as this notice is preserved.
  1483. -
  1484. -dnl From Paul Eggert.
  1485. -
  1486. -AC_PREREQ([2.13])
  1487. -
  1488. -# Define uintmax_t to 'unsigned long' or 'unsigned long long'
  1489. -# if it is not already defined in <stdint.h> or <inttypes.h>.
  1490. -
  1491. -AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
  1492. -[
  1493. - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
  1494. - AC_REQUIRE([gl_AC_HEADER_STDINT_H])
  1495. - if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
  1496. - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
  1497. - test $ac_cv_type_unsigned_long_long_int = yes \
  1498. - && ac_type='unsigned long long' \
  1499. - || ac_type='unsigned long'
  1500. - AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type],
  1501. - [Define to unsigned long or unsigned long long
  1502. - if <stdint.h> and <inttypes.h> don't define.])
  1503. - else
  1504. - AC_DEFINE([HAVE_UINTMAX_T], [1],
  1505. - [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
  1506. - fi
  1507. -])
  1508. diff --git a/m4/visibility.m4 b/m4/visibility.m4
  1509. deleted file mode 100644
  1510. index ce00e72..0000000
  1511. --- a/m4/visibility.m4
  1512. +++ /dev/null
  1513. @@ -1,77 +0,0 @@
  1514. -# visibility.m4 serial 5 (gettext-0.18.2)
  1515. -dnl Copyright (C) 2005, 2008, 2010-2017 Free Software Foundation, Inc.
  1516. -dnl This file is free software; the Free Software Foundation
  1517. -dnl gives unlimited permission to copy and/or distribute it,
  1518. -dnl with or without modifications, as long as this notice is preserved.
  1519. -
  1520. -dnl From Bruno Haible.
  1521. -
  1522. -dnl Tests whether the compiler supports the command-line option
  1523. -dnl -fvisibility=hidden and the function and variable attributes
  1524. -dnl __attribute__((__visibility__("hidden"))) and
  1525. -dnl __attribute__((__visibility__("default"))).
  1526. -dnl Does *not* test for __visibility__("protected") - which has tricky
  1527. -dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
  1528. -dnl Mac OS X.
  1529. -dnl Does *not* test for __visibility__("internal") - which has processor
  1530. -dnl dependent semantics.
  1531. -dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
  1532. -dnl "really only recommended for legacy code".
  1533. -dnl Set the variable CFLAG_VISIBILITY.
  1534. -dnl Defines and sets the variable HAVE_VISIBILITY.
  1535. -
  1536. -AC_DEFUN([gl_VISIBILITY],
  1537. -[
  1538. - AC_REQUIRE([AC_PROG_CC])
  1539. - CFLAG_VISIBILITY=
  1540. - HAVE_VISIBILITY=0
  1541. - if test -n "$GCC"; then
  1542. - dnl First, check whether -Werror can be added to the command line, or
  1543. - dnl whether it leads to an error because of some other option that the
  1544. - dnl user has put into $CC $CFLAGS $CPPFLAGS.
  1545. - AC_MSG_CHECKING([whether the -Werror option is usable])
  1546. - AC_CACHE_VAL([gl_cv_cc_vis_werror], [
  1547. - gl_save_CFLAGS="$CFLAGS"
  1548. - CFLAGS="$CFLAGS -Werror"
  1549. - AC_COMPILE_IFELSE(
  1550. - [AC_LANG_PROGRAM([[]], [[]])],
  1551. - [gl_cv_cc_vis_werror=yes],
  1552. - [gl_cv_cc_vis_werror=no])
  1553. - CFLAGS="$gl_save_CFLAGS"])
  1554. - AC_MSG_RESULT([$gl_cv_cc_vis_werror])
  1555. - dnl Now check whether visibility declarations are supported.
  1556. - AC_MSG_CHECKING([for simple visibility declarations])
  1557. - AC_CACHE_VAL([gl_cv_cc_visibility], [
  1558. - gl_save_CFLAGS="$CFLAGS"
  1559. - CFLAGS="$CFLAGS -fvisibility=hidden"
  1560. - dnl We use the option -Werror and a function dummyfunc, because on some
  1561. - dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
  1562. - dnl "visibility attribute not supported in this configuration; ignored"
  1563. - dnl at the first function definition in every compilation unit, and we
  1564. - dnl don't want to use the option in this case.
  1565. - if test $gl_cv_cc_vis_werror = yes; then
  1566. - CFLAGS="$CFLAGS -Werror"
  1567. - fi
  1568. - AC_COMPILE_IFELSE(
  1569. - [AC_LANG_PROGRAM(
  1570. - [[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
  1571. - extern __attribute__((__visibility__("default"))) int exportedvar;
  1572. - extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
  1573. - extern __attribute__((__visibility__("default"))) int exportedfunc (void);
  1574. - void dummyfunc (void) {}
  1575. - ]],
  1576. - [[]])],
  1577. - [gl_cv_cc_visibility=yes],
  1578. - [gl_cv_cc_visibility=no])
  1579. - CFLAGS="$gl_save_CFLAGS"])
  1580. - AC_MSG_RESULT([$gl_cv_cc_visibility])
  1581. - if test $gl_cv_cc_visibility = yes; then
  1582. - CFLAG_VISIBILITY="-fvisibility=hidden"
  1583. - HAVE_VISIBILITY=1
  1584. - fi
  1585. - fi
  1586. - AC_SUBST([CFLAG_VISIBILITY])
  1587. - AC_SUBST([HAVE_VISIBILITY])
  1588. - AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
  1589. - [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
  1590. -])
  1591. diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4
  1592. deleted file mode 100644
  1593. index 11783d2..0000000
  1594. --- a/m4/wchar_t.m4
  1595. +++ /dev/null
  1596. @@ -1,24 +0,0 @@
  1597. -# wchar_t.m4 serial 4 (gettext-0.18.2)
  1598. -dnl Copyright (C) 2002-2003, 2008-2017 Free Software Foundation, Inc.
  1599. -dnl This file is free software; the Free Software Foundation
  1600. -dnl gives unlimited permission to copy and/or distribute it,
  1601. -dnl with or without modifications, as long as this notice is preserved.
  1602. -
  1603. -dnl From Bruno Haible.
  1604. -dnl Test whether <stddef.h> has the 'wchar_t' type.
  1605. -dnl Prerequisite: AC_PROG_CC
  1606. -
  1607. -AC_DEFUN([gt_TYPE_WCHAR_T],
  1608. -[
  1609. - AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
  1610. - [AC_COMPILE_IFELSE(
  1611. - [AC_LANG_PROGRAM(
  1612. - [[#include <stddef.h>
  1613. - wchar_t foo = (wchar_t)'\0';]],
  1614. - [[]])],
  1615. - [gt_cv_c_wchar_t=yes],
  1616. - [gt_cv_c_wchar_t=no])])
  1617. - if test $gt_cv_c_wchar_t = yes; then
  1618. - AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.])
  1619. - fi
  1620. -])
  1621. diff --git a/m4/wint_t.m4 b/m4/wint_t.m4
  1622. deleted file mode 100644
  1623. index 6f0ac84..0000000
  1624. --- a/m4/wint_t.m4
  1625. +++ /dev/null
  1626. @@ -1,74 +0,0 @@
  1627. -# wint_t.m4 serial 6
  1628. -dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc.
  1629. -dnl This file is free software; the Free Software Foundation
  1630. -dnl gives unlimited permission to copy and/or distribute it,
  1631. -dnl with or without modifications, as long as this notice is preserved.
  1632. -
  1633. -dnl From Bruno Haible.
  1634. -dnl Test whether <wchar.h> has the 'wint_t' type and whether gnulib's
  1635. -dnl <wchar.h> or <wctype.h> would, if present, override 'wint_t'.
  1636. -dnl Prerequisite: AC_PROG_CC
  1637. -
  1638. -AC_DEFUN([gt_TYPE_WINT_T],
  1639. -[
  1640. - AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
  1641. - [AC_COMPILE_IFELSE(
  1642. - [AC_LANG_PROGRAM(
  1643. - [[
  1644. -/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
  1645. - <wchar.h>.
  1646. - BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
  1647. - before <wchar.h>. */
  1648. -#include <stddef.h>
  1649. -#include <stdio.h>
  1650. -#include <time.h>
  1651. -#include <wchar.h>
  1652. - wint_t foo = (wchar_t)'\0';]],
  1653. - [[]])],
  1654. - [gt_cv_c_wint_t=yes],
  1655. - [gt_cv_c_wint_t=no])])
  1656. - if test $gt_cv_c_wint_t = yes; then
  1657. - AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.])
  1658. -
  1659. - dnl Determine whether gnulib's <wchar.h> or <wctype.h> would, if present,
  1660. - dnl override 'wint_t'.
  1661. - AC_CACHE_CHECK([whether wint_t is too small],
  1662. - [gl_cv_type_wint_t_too_small],
  1663. - [AC_COMPILE_IFELSE(
  1664. - [AC_LANG_PROGRAM([[
  1665. -/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
  1666. - <wchar.h>.
  1667. - BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
  1668. - included before <wchar.h>. */
  1669. -#if !(defined __GLIBC__ && !defined __UCLIBC__)
  1670. -# include <stddef.h>
  1671. -# include <stdio.h>
  1672. -# include <time.h>
  1673. -#endif
  1674. -#include <wchar.h>
  1675. - int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
  1676. - ]])],
  1677. - [gl_cv_type_wint_t_too_small=no],
  1678. - [gl_cv_type_wint_t_too_small=yes])])
  1679. - if test $gl_cv_type_wint_t_too_small = yes; then
  1680. - GNULIB_OVERRIDES_WINT_T=1
  1681. - else
  1682. - GNULIB_OVERRIDES_WINT_T=0
  1683. - fi
  1684. - else
  1685. - GNULIB_OVERRIDES_WINT_T=0
  1686. - fi
  1687. - AC_SUBST([GNULIB_OVERRIDES_WINT_T])
  1688. -])
  1689. -
  1690. -dnl Prerequisites of the 'wint_t' override.
  1691. -AC_DEFUN([gl_TYPE_WINT_T_PREREQ],
  1692. -[
  1693. - AC_CHECK_HEADERS_ONCE([crtdefs.h])
  1694. - if test $ac_cv_header_crtdefs_h = yes; then
  1695. - HAVE_CRTDEFS_H=1
  1696. - else
  1697. - HAVE_CRTDEFS_H=0
  1698. - fi
  1699. - AC_SUBST([HAVE_CRTDEFS_H])
  1700. -])
  1701. diff --git a/m4/xsize.m4 b/m4/xsize.m4
  1702. deleted file mode 100644
  1703. index 5f85057..0000000
  1704. --- a/m4/xsize.m4
  1705. +++ /dev/null
  1706. @@ -1,12 +0,0 @@
  1707. -# xsize.m4 serial 5
  1708. -dnl Copyright (C) 2003-2004, 2008-2017 Free Software Foundation, Inc.
  1709. -dnl This file is free software; the Free Software Foundation
  1710. -dnl gives unlimited permission to copy and/or distribute it,
  1711. -dnl with or without modifications, as long as this notice is preserved.
  1712. -
  1713. -AC_DEFUN([gl_XSIZE],
  1714. -[
  1715. - dnl Prerequisites of lib/xsize.h.
  1716. - AC_REQUIRE([gl_SIZE_MAX])
  1717. - AC_CHECK_HEADERS([stdint.h])
  1718. -])