update gnulib to 47bf2cf3184027c1eb9c1dfeea5c5b8b2d69710d
* lib/dosname.h, lib/glthread/lock.c, lib/glthread/lock.h, lib/glthread/threadlib.c, lib/windows-mutex.c, lib/windows-mutex.h, lib/windows-once.c, lib/windows-once.h, lib/windows-recmutex.c, lib/windows-recmutex.h, lib/windows-rwlock.c, lib/windows-rwlock.h, m4/host-cpu-c-abi.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4, m4/lock.m4, m4/longlong.m4, m4/pthread_rwlock_rdlock.m4, tools/config.rpath: Delete. * lib/alloca.in.h, lib/argmatch.c, lib/argmatch.h, lib/arg-nonnull.h, lib/argp-ba.c, lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h, lib/argp-fs-xinl.c, lib/argp.h, lib/argp-help.c, lib/argp-namefrob.h, lib/argp-parse.c, lib/argp-pin.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c, lib/asnprintf.c, lib/basename-lgpl.c, lib/c-ctype.h, lib/c++defs.h, lib/cdefs.h, lib/closeout.c, lib/closeout.h, lib/close-stream.c, lib/c-strcasecmp.c, lib/c-strcaseeq.h, lib/c-strcase.h, lib/c-strncasecmp.c, lib/dirname.h, lib/dirname-lgpl.c, lib/errno.in.h, lib/error.c, lib/error.h, lib/exitfail.c, lib/exitfail.h, lib/fcntl.in.h, lib/filename.h, lib/float.c, lib/float+.h, lib/float.in.h, lib/fpending.c, lib/fpending.h, lib/getopt1.c, lib/getopt.c, lib/getopt-cdefs.in.h, lib/getopt-core.h, lib/getopt-ext.h, lib/getopt.in.h, lib/getopt_int.h, lib/getopt-pfx-core.h, lib/getopt-pfx-ext.h, lib/getprogname.c, lib/getprogname.h, lib/gettext.h, lib/gettimeofday.c, lib/hard-locale.c, lib/hard-locale.h, lib/intprops.h, lib/isatty.c, lib/itold.c, lib/libc-config.h, lib/limits.in.h, lib/localcharset.c, lib/localcharset.h, lib/localtime-buffer.c, lib/localtime-buffer.h, lib/lstat.c, lib/Makefile.am, lib/malloca.c, lib/malloca.h, lib/malloc.c, lib/mbrtowc.c, lib/mbsinit.c, lib/memchr.c, lib/memchr.valgrind, lib/mempcpy.c, lib/minmax.h, lib/mkdir.c, lib/mkstemp.c, lib/mkstemps.c, lib/msvc-inval.c, lib/msvc-inval.h, lib/msvc-nothrow.c, lib/msvc-nothrow.h, lib/_Noreturn.h, lib/pathmax.h, lib/printf-args.c, lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h, lib/progname.c, lib/progname.h, lib/quotearg.c, lib/quotearg.h, lib/quote.h, lib/rawmemchr.c, lib/rawmemchr.valgrind, lib/secure_getenv.c, lib/size_max.h, lib/sleep.c, lib/stat.c, lib/stat-time.h, lib/stat-w32.c, lib/stat-w32.h, lib/stdalign.in.h, lib/stdbool.in.h, lib/stddef.in.h, lib/stdint.in.h, lib/stdio-impl.h, lib/stdio.in.h, lib/stdlib.in.h, lib/stpcpy.c, lib/strcasecmp.c, lib/strchrnul.c, lib/strchrnul.valgrind, lib/streq.h, lib/strerror.c, lib/strerror-override.c, lib/strerror-override.h, lib/string.in.h, lib/strings.in.h, lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c, lib/strverscmp.c, lib/sysexits.in.h, lib/sys_stat.in.h, lib/sys_time.in.h, lib/sys_types.in.h, lib/sys_wait.in.h, lib/tempname.c, lib/tempname.h, lib/time.in.h, lib/unistd.in.h, lib/vasnprintf.c, lib/vasnprintf.h, lib/verify.h, lib/vsnprintf.c, lib/warn-on-use.h, lib/wchar.in.h, lib/wctype.in.h, lib/windows-initguard.h, lib/xalloc-die.c, lib/xalloc.h, lib/xalloc-oversized.h, lib/xmalloc.c, lib/xsize.h, m4/00gnulib.m4, m4/absolute-header.m4, m4/alloca.m4, m4/argp.m4, m4/codeset.m4, m4/dirname.m4, m4/double-slash-root.m4, m4/eealloc.m4, m4/errno_h.m4, m4/error.m4, m4/exponentd.m4, m4/extensions.m4, m4/extern-inline.m4, m4/fcntl_h.m4, m4/fcntl-o.m4, m4/float_h.m4, m4/fpending.m4, m4/getopt.m4, m4/getprogname.m4, m4/gettimeofday.m4, m4/gnulib-cache.m4, m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, m4/include_next.m4, m4/__inline.m4, m4/intmax_t.m4, m4/inttypes_h.m4, m4/isatty.m4, m4/largefile.m4, m4/limits-h.m4, m4/localcharset.m4, m4/locale-fr.m4, m4/locale-ja.m4, m4/locale-zh.m4, m4/localtime-buffer.m4, m4/lstat.m4, m4/malloca.m4, m4/malloc.m4, m4/math_h.m4, m4/mbrtowc.m4, m4/mbsinit.m4, m4/mbstate_t.m4, m4/memchr.m4, m4/mempcpy.m4, m4/minmax.m4, m4/mkdir.m4, m4/mkstemp.m4, m4/mkstemps.m4, m4/mmap-anon.m4, m4/msvc-inval.m4, m4/msvc-nothrow.m4, m4/multiarch.m4, m4/nocrash.m4, m4/off_t.m4, m4/pathmax.m4, m4/printf.m4, m4/quotearg.m4, m4/quote.m4, m4/rawmemchr.m4, m4/secure_getenv.m4, m4/size_max.m4, m4/sleep.m4, m4/ssize_t.m4, m4/stat.m4, m4/stat-time.m4, m4/stdalign.m4, m4/stdbool.m4, m4/stddef_h.m4, m4/std-gnu11.m4, m4/stdint_h.m4, m4/stdint.m4, m4/stdio_h.m4, m4/stdlib_h.m4, m4/stpcpy.m4, m4/strcase.m4, m4/strchrnul.m4, m4/strerror.m4, m4/string_h.m4, m4/strings_h.m4, m4/strndup.m4, m4/strnlen.m4, m4/strverscmp.m4, m4/sysexits.m4, m4/sys_socket_h.m4, m4/sys_stat_h.m4, m4/sys_time_h.m4, m4/sys_types_h.m4, m4/sys_wait_h.m4, m4/tempname.m4, m4/threadlib.m4, m4/time_h.m4, m4/unistd_h.m4, m4/vasnprintf.m4, m4/vsnprintf.m4, m4/warn-on-use.m4, m4/wchar_h.m4, m4/wchar_t.m4, m4/wctype_h.m4, m4/wint_t.m4, m4/xalloc.m4, m4/xsize.m4: Update. * lib/inttypes.in.h, lib/lc-charset-dispatch.c, lib/lc-charset-dispatch.h, lib/locale.in.h, lib/mbrtowc-impl.h, lib/mbrtowc-impl-utf8.h, lib/mbtowc-lock.c, lib/mbtowc-lock.h, lib/setlocale-lock.c, lib/setlocale_null.c, lib/setlocale_null.h, m4/inttypes.m4, m4/locale_h.m4, m4/setlocale_null.m4, m4/visibility.m4, m4/zzgnulib.m4: New files.
This commit is contained in:
parent
fe642bc9ad
commit
1e86463205
287 changed files with 6133 additions and 6812 deletions
|
|
@ -1,13 +1,14 @@
|
|||
# 00gnulib.m4 serial 3
|
||||
dnl Copyright (C) 2009-2019 Free Software Foundation, Inc.
|
||||
# 00gnulib.m4 serial 7
|
||||
dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl This file must be named something that sorts before all other
|
||||
dnl gnulib-provided .m4 files. It is needed until such time as we can
|
||||
dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and
|
||||
dnl m4_divert semantics.
|
||||
dnl gnulib-provided .m4 files. The first part is needed until such time
|
||||
dnl as we can assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and
|
||||
dnl m4_divert semantics. The second part is needed until the clang fix
|
||||
dnl has been included in Autoconf.
|
||||
|
||||
# Until autoconf 2.63, handling of the diversion stack required m4_init
|
||||
# to be called first; but this does not happen with aclocal. Wrapping
|
||||
|
|
@ -39,6 +40,76 @@ m4_version_prereq([2.63.263], [],
|
|||
[m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl
|
||||
[AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])])
|
||||
|
||||
# The following definitions arrange to use a compiler option
|
||||
# -Werror=implicit-function-declaration in AC_CHECK_DECL, when the
|
||||
# compiler is clang. Without it, clang implicitly declares "known"
|
||||
# library functions in C mode, but not in C++ mode, which would cause
|
||||
# Gnulib to omit a declaration and thus later produce an error in C++
|
||||
# mode. As of clang 9.0, these "known" functions are identified through
|
||||
# LIBBUILTIN invocations in the LLVM source file
|
||||
# llvm/tools/clang/include/clang/Basic/Builtins.def.
|
||||
# It's not possible to AC_REQUIRE the extra tests from AC_CHECK_DECL,
|
||||
# because AC_CHECK_DECL, like other Autoconf built-ins, is not supposed
|
||||
# to AC_REQUIRE anything: some configure.ac files have their first
|
||||
# AC_CHECK_DECL executed conditionally. Therefore append the extra tests
|
||||
# to AC_PROG_CC.
|
||||
AC_DEFUN([gl_COMPILER_CLANG],
|
||||
[
|
||||
dnl AC_REQUIRE([AC_PROG_CC])
|
||||
AC_CACHE_CHECK([whether the compiler is clang],
|
||||
[gl_cv_compiler_clang],
|
||||
[dnl Use _AC_COMPILE_IFELSE instead of AC_EGREP_CPP, to avoid error
|
||||
dnl "circular dependency of AC_LANG_COMPILER(C)" if AC_PROG_CC has
|
||||
dnl not yet been invoked.
|
||||
_AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[
|
||||
#ifdef __clang__
|
||||
barfbarf
|
||||
#endif
|
||||
]],[[]])
|
||||
],
|
||||
[gl_cv_compiler_clang=no],
|
||||
[gl_cv_compiler_clang=yes])
|
||||
])
|
||||
])
|
||||
AC_DEFUN([gl_COMPILER_PREPARE_CHECK_DECL],
|
||||
[
|
||||
dnl AC_REQUIRE([AC_PROG_CC])
|
||||
dnl AC_REQUIRE([gl_COMPILER_CLANG])
|
||||
AC_CACHE_CHECK([for compiler option needed when checking for declarations],
|
||||
[gl_cv_compiler_check_decl_option],
|
||||
[if test $gl_cv_compiler_clang = yes; then
|
||||
dnl Test whether the compiler supports the option
|
||||
dnl '-Werror=implicit-function-declaration'.
|
||||
save_ac_compile="$ac_compile"
|
||||
ac_compile="$ac_compile -Werror=implicit-function-declaration"
|
||||
dnl Use _AC_COMPILE_IFELSE instead of AC_COMPILE_IFELSE, to avoid a
|
||||
dnl warning "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
|
||||
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
|
||||
[gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'],
|
||||
[gl_cv_compiler_check_decl_option=none])
|
||||
ac_compile="$save_ac_compile"
|
||||
else
|
||||
gl_cv_compiler_check_decl_option=none
|
||||
fi
|
||||
])
|
||||
if test "x$gl_cv_compiler_check_decl_option" != xnone; then
|
||||
ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
|
||||
else
|
||||
ac_compile_for_check_decl="$ac_compile"
|
||||
fi
|
||||
])
|
||||
dnl Redefine _AC_CHECK_DECL_BODY so that it references ac_compile_for_check_decl
|
||||
dnl instead of ac_compile. If, for whatever reason, the override of AC_PROG_CC
|
||||
dnl in zzgnulib.m4 is inactive, use the original ac_compile.
|
||||
m4_define([_AC_CHECK_DECL_BODY],
|
||||
[ ac_save_ac_compile="$ac_compile"
|
||||
if test -n "$ac_compile_for_check_decl"; then
|
||||
ac_compile="$ac_compile_for_check_decl"
|
||||
fi]
|
||||
m4_defn([_AC_CHECK_DECL_BODY])[ ac_compile="$ac_save_ac_compile"
|
||||
])
|
||||
|
||||
# gl_00GNULIB
|
||||
# -----------
|
||||
# Witness macro that this file has been included. Needed to force
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Test for __inline keyword
|
||||
dnl Copyright 2017-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright 2017-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# absolute-header.m4 serial 16
|
||||
dnl Copyright (C) 2006-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# alloca.m4 serial 15
|
||||
dnl Copyright (C) 2002-2004, 2006-2007, 2009-2019 Free Software Foundation,
|
||||
dnl Copyright (C) 2002-2004, 2006-2007, 2009-2020 Free Software Foundation,
|
||||
dnl Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# argp.m4 serial 15
|
||||
dnl Copyright (C) 2003-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2003-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# codeset.m4 serial 5 (gettext-0.18.2)
|
||||
dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019 Free Software
|
||||
dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2020 Free Software
|
||||
dnl Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#serial 10 -*- autoconf -*-
|
||||
dnl Copyright (C) 2002-2006, 2009-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2002-2006, 2009-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# double-slash-root.m4 serial 4 -*- Autoconf -*-
|
||||
dnl Copyright (C) 2006, 2008-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2006, 2008-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# eealloc.m4 serial 3
|
||||
dnl Copyright (C) 2003, 2009-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2003, 2009-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# errno_h.m4 serial 13
|
||||
dnl Copyright (C) 2004, 2006, 2008-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2004, 2006, 2008-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#serial 14
|
||||
|
||||
# Copyright (C) 1996-1998, 2001-2004, 2009-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-1998, 2001-2004, 2009-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# exponentd.m4 serial 3
|
||||
dnl Copyright (C) 2007-2008, 2010-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2007-2008, 2010-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# serial 18 -*- Autoconf -*-
|
||||
# Enable extensions on systems that normally disable them.
|
||||
|
||||
# Copyright (C) 2003, 2006-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003, 2006-2020 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
dnl 'extern inline' a la ISO C99.
|
||||
|
||||
dnl Copyright 2012-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright 2012-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -32,7 +32,7 @@ AC_DEFUN([gl_EXTERN_INLINE],
|
|||
https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html
|
||||
|
||||
DragonFly; see
|
||||
http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
|
||||
http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log
|
||||
|
||||
FreeBSD; see:
|
||||
https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# fcntl-o.m4 serial 6
|
||||
dnl Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# serial 15
|
||||
# serial 16
|
||||
# Configure fcntl.h.
|
||||
dnl Copyright (C) 2006-2007, 2009-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2006-2007, 2009-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -37,6 +37,7 @@ AC_DEFUN([gl_FCNTL_MODULE_INDICATOR],
|
|||
|
||||
AC_DEFUN([gl_FCNTL_H_DEFAULTS],
|
||||
[
|
||||
GNULIB_CREAT=0; AC_SUBST([GNULIB_CREAT])
|
||||
GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL])
|
||||
GNULIB_NONBLOCKING=0; AC_SUBST([GNULIB_NONBLOCKING])
|
||||
GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN])
|
||||
|
|
@ -44,6 +45,7 @@ AC_DEFUN([gl_FCNTL_H_DEFAULTS],
|
|||
dnl Assume proper GNU behavior unless another module says otherwise.
|
||||
HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL])
|
||||
HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT])
|
||||
REPLACE_CREAT=0; AC_SUBST([REPLACE_CREAT])
|
||||
REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL])
|
||||
REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN])
|
||||
REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT])
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# float_h.m4 serial 12
|
||||
dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# serial 22
|
||||
|
||||
# Copyright (C) 2000-2001, 2004-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2000-2001, 2004-2020 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
10
m4/getopt.m4
10
m4/getopt.m4
|
|
@ -1,5 +1,5 @@
|
|||
# getopt.m4 serial 46
|
||||
dnl Copyright (C) 2002-2006, 2008-2019 Free Software Foundation, Inc.
|
||||
# getopt.m4 serial 47
|
||||
dnl Copyright (C) 2002-2006, 2008-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -302,8 +302,10 @@ dnl is ambiguous with environment values that contain newlines.
|
|||
]])],
|
||||
[gl_cv_func_getopt_gnu=yes],
|
||||
[gl_cv_func_getopt_gnu=no],
|
||||
[dnl Cross compiling. Assume the worst, even on glibc platforms.
|
||||
gl_cv_func_getopt_gnu="guessing no"
|
||||
[dnl Cross compiling.
|
||||
dnl Assume the worst, even on glibc platforms.
|
||||
dnl But obey --enable-cross-guesses.
|
||||
gl_cv_func_getopt_gnu="$gl_cross_guess_normal"
|
||||
])
|
||||
case $gl_had_POSIXLY_CORRECT in
|
||||
exported) ;;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# getprogname.m4 - check for getprogname or replacements for it
|
||||
|
||||
# Copyright (C) 2016-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2016-2020 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# serial 26
|
||||
# serial 27
|
||||
|
||||
# Copyright (C) 2001-2003, 2005, 2007, 2009-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2003, 2005, 2007, 2009-2020 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -109,8 +109,8 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
|
|||
*-musl*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
|
||||
# Guess no on native Windows.
|
||||
mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_gettimeofday_clobber="$gl_cross_guess_inverted" ;;
|
||||
esac
|
||||
])])
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2002-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# gnulib-common.m4 serial 44
|
||||
dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
|
||||
# gnulib-common.m4 serial 48
|
||||
dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -12,6 +12,7 @@ AC_DEFUN([gl_COMMON], [
|
|||
dnl Use AC_REQUIRE here, so that the code is expanded once only.
|
||||
AC_REQUIRE([gl_00GNULIB])
|
||||
AC_REQUIRE([gl_COMMON_BODY])
|
||||
AC_REQUIRE([gl_ZZGNULIB])
|
||||
])
|
||||
AC_DEFUN([gl_COMMON_BODY], [
|
||||
AH_VERBATIM([_Noreturn],
|
||||
|
|
@ -19,11 +20,21 @@ AC_DEFUN([gl_COMMON_BODY], [
|
|||
#ifndef _Noreturn
|
||||
# if (defined __cplusplus \
|
||||
&& ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
|
||||
|| (defined _MSC_VER && 1900 <= _MSC_VER)))
|
||||
|| (defined _MSC_VER && 1900 <= _MSC_VER)) \
|
||||
&& 0)
|
||||
/* [[noreturn]] is not practically usable, because with it the syntax
|
||||
extern _Noreturn void func (...);
|
||||
would not be valid; such a declaration would only be valid with 'extern'
|
||||
and '_Noreturn' swapped, or without the 'extern' keyword. However, some
|
||||
AIX system header files and several gnulib header files use precisely
|
||||
this syntax with 'extern'. */
|
||||
# define _Noreturn [[noreturn]]
|
||||
# elif ((!defined __cplusplus || defined __clang__) \
|
||||
&& (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
|
||||
|| 4 < __GNUC__ + (7 <= __GNUC_MINOR__)))
|
||||
|| 4 < __GNUC__ + (7 <= __GNUC_MINOR__) \
|
||||
|| (defined __apple_build_version__ \
|
||||
? 6000000 <= __apple_build_version__ \
|
||||
: 3 < __clang_major__ + (5 <= __clang_minor__))))
|
||||
/* _Noreturn works as-is. */
|
||||
# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
|
||||
# define _Noreturn __attribute__ ((__noreturn__))
|
||||
|
|
@ -94,7 +105,7 @@ AC_DEFUN([gl_COMMON_BODY], [
|
|||
invoked from such signal handlers. Such functions have some restrictions:
|
||||
* All functions that it calls should be marked _GL_ASYNC_SAFE as well,
|
||||
or should be listed as async-signal-safe in POSIX
|
||||
<http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04>
|
||||
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04>
|
||||
section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in
|
||||
particular, are NOT async-signal-safe.
|
||||
* All memory locations (variables and struct fields) that these functions
|
||||
|
|
@ -115,6 +126,33 @@ AC_DEFUN([gl_COMMON_BODY], [
|
|||
errno. */
|
||||
#define _GL_ASYNC_SAFE
|
||||
])
|
||||
dnl Hint which direction to take regarding cross-compilation guesses:
|
||||
dnl When a user installs a program on a platform they are not intimately
|
||||
dnl familiar with, --enable-cross-guesses=conservative is the appropriate
|
||||
dnl choice. It implements the "If we don't know, assume the worst" principle.
|
||||
dnl However, when an operating system developer (on a platform which is not
|
||||
dnl yet known to gnulib) builds packages for their platform, they want to
|
||||
dnl expose, not hide, possible platform bugs; in this case,
|
||||
dnl --enable-cross-guesses=risky is the appropriate choice.
|
||||
dnl Sets the variables
|
||||
dnl gl_cross_guess_normal (to be used when 'yes' is good and 'no' is bad),
|
||||
dnl gl_cross_guess_inverted (to be used when 'no' is good and 'yes' is bad).
|
||||
AC_ARG_ENABLE([cross-guesses],
|
||||
[AS_HELP_STRING([--enable-cross-guesses={conservative|risky}],
|
||||
[specify policy for cross-compilation guesses])],
|
||||
[if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
|
||||
AC_MSG_WARN([invalid argument supplied to --enable-cross-guesses])
|
||||
enableval=conservative
|
||||
fi
|
||||
gl_cross_guesses="$enableval"],
|
||||
[gl_cross_guesses=conservative])
|
||||
if test $gl_cross_guesses = risky; then
|
||||
gl_cross_guess_normal="guessing yes"
|
||||
gl_cross_guess_inverted="guessing no"
|
||||
else
|
||||
gl_cross_guess_normal="guessing no"
|
||||
gl_cross_guess_inverted="guessing yes"
|
||||
fi
|
||||
dnl Preparation for running test programs:
|
||||
dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
|
||||
dnl to /dev/tty, so they can be redirected to log files. Such diagnostics
|
||||
|
|
@ -381,12 +419,13 @@ AC_DEFUN([AC_C_RESTRICT],
|
|||
nothing if this is not supported. Do not define if restrict is
|
||||
supported directly. */
|
||||
#undef restrict
|
||||
/* Work around a bug in Sun C++: it does not support _Restrict or
|
||||
__restrict__, even though the corresponding Sun C compiler ends up with
|
||||
"#define restrict _Restrict" or "#define restrict __restrict__" in the
|
||||
previous line. Perhaps some future version of Sun C++ will work with
|
||||
restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
|
||||
#if defined __SUNPRO_CC && !defined __RESTRICT
|
||||
/* Work around a bug in older versions of Sun C++, which did not
|
||||
#define __restrict__ or support _Restrict or __restrict__
|
||||
even though the corresponding Sun C compiler ended up with
|
||||
"#define restrict _Restrict" or "#define restrict __restrict__"
|
||||
in the previous line. This workaround can be removed once
|
||||
we assume Oracle Developer Studio 12.5 (2016) or later. */
|
||||
#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__
|
||||
# define _Restrict
|
||||
# define __restrict__
|
||||
#endif])
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# DO NOT EDIT! GENERATED AUTOMATICALLY!
|
||||
# Copyright (C) 2002-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -42,7 +42,6 @@ AC_DEFUN([gl_EARLY],
|
|||
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
|
||||
AC_REQUIRE([gl_PROG_AR_RANLIB])
|
||||
|
||||
AC_REQUIRE([AM_PROG_CC_C_O])
|
||||
# Code from module absolute-header:
|
||||
# Code from module alloca:
|
||||
# Code from module alloca-opt:
|
||||
|
|
@ -55,7 +54,6 @@ AC_DEFUN([gl_EARLY],
|
|||
# Code from module close-stream:
|
||||
# Code from module closeout:
|
||||
# Code from module dirname-lgpl:
|
||||
# Code from module dosname:
|
||||
# Code from module double-slash-root:
|
||||
# Code from module errno:
|
||||
# Code from module error:
|
||||
|
|
@ -72,17 +70,17 @@ AC_DEFUN([gl_EARLY],
|
|||
# Code from module gettext-h:
|
||||
# Code from module gettimeofday:
|
||||
# Code from module hard-locale:
|
||||
# Code from module havelib:
|
||||
# Code from module include_next:
|
||||
# Code from module intprops:
|
||||
# Code from module inttypes-incomplete:
|
||||
# Code from module isatty:
|
||||
# Code from module largefile:
|
||||
AC_REQUIRE([AC_SYS_LARGEFILE])
|
||||
# Code from module libc-config:
|
||||
# Code from module limits-h:
|
||||
# Code from module localcharset:
|
||||
# Code from module locale:
|
||||
# Code from module localtime-buffer:
|
||||
# Code from module lock:
|
||||
# Code from module lstat:
|
||||
# Code from module malloc-gnu:
|
||||
# Code from module malloc-posix:
|
||||
|
|
@ -106,6 +104,7 @@ AC_DEFUN([gl_EARLY],
|
|||
# Code from module quotearg-simple:
|
||||
# Code from module rawmemchr:
|
||||
# Code from module secure_getenv:
|
||||
# Code from module setlocale-null:
|
||||
# Code from module size_max:
|
||||
# Code from module sleep:
|
||||
# Code from module snippet/_Noreturn:
|
||||
|
|
@ -139,8 +138,6 @@ AC_DEFUN([gl_EARLY],
|
|||
# Code from module sys_wait:
|
||||
# Code from module sysexits:
|
||||
# Code from module tempname:
|
||||
# Code from module threadlib:
|
||||
gl_THREADLIB_EARLY
|
||||
# Code from module time:
|
||||
# Code from module unistd:
|
||||
# Code from module vasnprintf:
|
||||
|
|
@ -148,10 +145,6 @@ AC_DEFUN([gl_EARLY],
|
|||
# Code from module vsnprintf:
|
||||
# Code from module wchar:
|
||||
# Code from module wctype-h:
|
||||
# Code from module windows-mutex:
|
||||
# Code from module windows-once:
|
||||
# Code from module windows-recmutex:
|
||||
# Code from module windows-rwlock:
|
||||
# Code from module xalloc:
|
||||
# Code from module xalloc-die:
|
||||
# Code from module xalloc-oversized:
|
||||
|
|
@ -218,6 +211,7 @@ AC_SUBST([LTALLOCA])
|
|||
GNULIB_GL_UNISTD_H_GETOPT=1
|
||||
fi
|
||||
AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
|
||||
gl_UNISTD_MODULE_INDICATOR([getopt-posix])
|
||||
gl_FUNC_GETPROGNAME
|
||||
AC_SUBST([LIBINTL])
|
||||
AC_SUBST([LTLIBINTL])
|
||||
|
|
@ -227,6 +221,10 @@ AC_SUBST([LTALLOCA])
|
|||
gl_PREREQ_GETTIMEOFDAY
|
||||
fi
|
||||
gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
|
||||
AC_REQUIRE([gl_FUNC_SETLOCALE_NULL])
|
||||
LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
|
||||
AC_SUBST([LIB_HARD_LOCALE])
|
||||
gl_INTTYPES_INCOMPLETE
|
||||
gl_FUNC_ISATTY
|
||||
if test $REPLACE_ISATTY = 1; then
|
||||
AC_LIBOBJ([isatty])
|
||||
|
|
@ -240,10 +238,9 @@ AC_SUBST([LTALLOCA])
|
|||
dnl For backward compatibility. Some packages still use this.
|
||||
LOCALCHARSET_TESTS_ENVIRONMENT=
|
||||
AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
|
||||
gl_LOCALE_H
|
||||
AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS])
|
||||
AC_LIBOBJ([localtime-buffer])
|
||||
gl_LOCK
|
||||
gl_MODULE_INDICATOR([lock])
|
||||
gl_FUNC_LSTAT
|
||||
if test $REPLACE_LSTAT = 1; then
|
||||
AC_LIBOBJ([lstat])
|
||||
|
|
@ -264,6 +261,11 @@ AC_SUBST([LTALLOCA])
|
|||
gl_FUNC_MBRTOWC
|
||||
if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
|
||||
AC_LIBOBJ([mbrtowc])
|
||||
if test $REPLACE_MBSTATE_T = 1; then
|
||||
AC_LIBOBJ([lc-charset-dispatch])
|
||||
AC_LIBOBJ([mbtowc-lock])
|
||||
gl_PREREQ_MBTOWC_LOCK
|
||||
fi
|
||||
gl_PREREQ_MBRTOWC
|
||||
fi
|
||||
gl_WCHAR_MODULE_INDICATOR([mbrtowc])
|
||||
|
|
@ -329,6 +331,12 @@ AC_SUBST([LTALLOCA])
|
|||
gl_PREREQ_SECURE_GETENV
|
||||
fi
|
||||
gl_STDLIB_MODULE_INDICATOR([secure_getenv])
|
||||
gl_FUNC_SETLOCALE_NULL
|
||||
if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
|
||||
AC_LIBOBJ([setlocale-lock])
|
||||
gl_PREREQ_SETLOCALE_LOCK
|
||||
fi
|
||||
gl_LOCALE_MODULE_INDICATOR([setlocale_null])
|
||||
gl_SIZE_MAX
|
||||
gl_FUNC_SLEEP
|
||||
if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
|
||||
|
|
@ -417,38 +425,14 @@ AC_SUBST([LTALLOCA])
|
|||
AC_PROG_MKDIR_P
|
||||
gl_SYSEXITS
|
||||
gl_FUNC_GEN_TEMPNAME
|
||||
AC_REQUIRE([gl_THREADLIB])
|
||||
gl_HEADER_TIME_H
|
||||
gl_UNISTD_H
|
||||
AC_REQUIRE([AC_C_RESTRICT])
|
||||
gl_FUNC_VASNPRINTF
|
||||
gl_FUNC_VSNPRINTF
|
||||
gl_STDIO_MODULE_INDICATOR([vsnprintf])
|
||||
gl_WCHAR_H
|
||||
gl_WCTYPE_H
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
case "$host_os" in
|
||||
mingw*)
|
||||
AC_LIBOBJ([windows-mutex])
|
||||
;;
|
||||
esac
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
case "$host_os" in
|
||||
mingw*)
|
||||
AC_LIBOBJ([windows-once])
|
||||
;;
|
||||
esac
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
case "$host_os" in
|
||||
mingw*)
|
||||
AC_LIBOBJ([windows-recmutex])
|
||||
;;
|
||||
esac
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
case "$host_os" in
|
||||
mingw*)
|
||||
AC_LIBOBJ([windows-rwlock])
|
||||
;;
|
||||
esac
|
||||
gl_XALLOC
|
||||
gl_XSIZE
|
||||
# End of code from modules
|
||||
|
|
@ -587,7 +571,6 @@ AC_DEFUN([gltests_LIBSOURCES], [
|
|||
# This macro records the list of files which have been installed by
|
||||
# gnulib-tool and may be removed by future gnulib-tool invocations.
|
||||
AC_DEFUN([gl_FILE_LIST], [
|
||||
build-aux/config.rpath
|
||||
lib/_Noreturn.h
|
||||
lib/alloca.c
|
||||
lib/alloca.in.h
|
||||
|
|
@ -623,7 +606,6 @@ AC_DEFUN([gl_FILE_LIST], [
|
|||
lib/closeout.h
|
||||
lib/dirname-lgpl.c
|
||||
lib/dirname.h
|
||||
lib/dosname.h
|
||||
lib/errno.in.h
|
||||
lib/error.c
|
||||
lib/error.h
|
||||
|
|
@ -649,26 +631,31 @@ AC_DEFUN([gl_FILE_LIST], [
|
|||
lib/getprogname.h
|
||||
lib/gettext.h
|
||||
lib/gettimeofday.c
|
||||
lib/glthread/lock.c
|
||||
lib/glthread/lock.h
|
||||
lib/glthread/threadlib.c
|
||||
lib/hard-locale.c
|
||||
lib/hard-locale.h
|
||||
lib/intprops.h
|
||||
lib/inttypes.in.h
|
||||
lib/isatty.c
|
||||
lib/itold.c
|
||||
lib/lc-charset-dispatch.c
|
||||
lib/lc-charset-dispatch.h
|
||||
lib/libc-config.h
|
||||
lib/limits.in.h
|
||||
lib/localcharset.c
|
||||
lib/localcharset.h
|
||||
lib/locale.in.h
|
||||
lib/localtime-buffer.c
|
||||
lib/localtime-buffer.h
|
||||
lib/lstat.c
|
||||
lib/malloc.c
|
||||
lib/malloca.c
|
||||
lib/malloca.h
|
||||
lib/mbrtowc-impl-utf8.h
|
||||
lib/mbrtowc-impl.h
|
||||
lib/mbrtowc.c
|
||||
lib/mbsinit.c
|
||||
lib/mbtowc-lock.c
|
||||
lib/mbtowc-lock.h
|
||||
lib/memchr.c
|
||||
lib/memchr.valgrind
|
||||
lib/mempcpy.c
|
||||
|
|
@ -693,6 +680,9 @@ AC_DEFUN([gl_FILE_LIST], [
|
|||
lib/rawmemchr.c
|
||||
lib/rawmemchr.valgrind
|
||||
lib/secure_getenv.c
|
||||
lib/setlocale-lock.c
|
||||
lib/setlocale_null.c
|
||||
lib/setlocale_null.h
|
||||
lib/size_max.h
|
||||
lib/sleep.c
|
||||
lib/stat-time.c
|
||||
|
|
@ -741,14 +731,6 @@ AC_DEFUN([gl_FILE_LIST], [
|
|||
lib/wctype-h.c
|
||||
lib/wctype.in.h
|
||||
lib/windows-initguard.h
|
||||
lib/windows-mutex.c
|
||||
lib/windows-mutex.h
|
||||
lib/windows-once.c
|
||||
lib/windows-once.h
|
||||
lib/windows-recmutex.c
|
||||
lib/windows-recmutex.h
|
||||
lib/windows-rwlock.c
|
||||
lib/windows-rwlock.h
|
||||
lib/xalloc-die.c
|
||||
lib/xalloc-oversized.h
|
||||
lib/xalloc.h
|
||||
|
|
@ -777,23 +759,19 @@ AC_DEFUN([gl_FILE_LIST], [
|
|||
m4/getprogname.m4
|
||||
m4/gettimeofday.m4
|
||||
m4/gnulib-common.m4
|
||||
m4/host-cpu-c-abi.m4
|
||||
m4/include_next.m4
|
||||
m4/intmax_t.m4
|
||||
m4/inttypes.m4
|
||||
m4/inttypes_h.m4
|
||||
m4/isatty.m4
|
||||
m4/largefile.m4
|
||||
m4/lib-ld.m4
|
||||
m4/lib-link.m4
|
||||
m4/lib-prefix.m4
|
||||
m4/limits-h.m4
|
||||
m4/localcharset.m4
|
||||
m4/locale-fr.m4
|
||||
m4/locale-ja.m4
|
||||
m4/locale-zh.m4
|
||||
m4/locale_h.m4
|
||||
m4/localtime-buffer.m4
|
||||
m4/lock.m4
|
||||
m4/longlong.m4
|
||||
m4/lstat.m4
|
||||
m4/malloc.m4
|
||||
m4/malloca.m4
|
||||
|
|
@ -815,11 +793,11 @@ AC_DEFUN([gl_FILE_LIST], [
|
|||
m4/off_t.m4
|
||||
m4/pathmax.m4
|
||||
m4/printf.m4
|
||||
m4/pthread_rwlock_rdlock.m4
|
||||
m4/quote.m4
|
||||
m4/quotearg.m4
|
||||
m4/rawmemchr.m4
|
||||
m4/secure_getenv.m4
|
||||
m4/setlocale_null.m4
|
||||
m4/size_max.m4
|
||||
m4/sleep.m4
|
||||
m4/ssize_t.m4
|
||||
|
|
@ -853,6 +831,7 @@ AC_DEFUN([gl_FILE_LIST], [
|
|||
m4/time_h.m4
|
||||
m4/unistd_h.m4
|
||||
m4/vasnprintf.m4
|
||||
m4/visibility.m4
|
||||
m4/vsnprintf.m4
|
||||
m4/warn-on-use.m4
|
||||
m4/wchar_h.m4
|
||||
|
|
@ -861,4 +840,5 @@ AC_DEFUN([gl_FILE_LIST], [
|
|||
m4/wint_t.m4
|
||||
m4/xalloc.m4
|
||||
m4/xsize.m4
|
||||
m4/zzgnulib.m4
|
||||
])
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# gnulib-tool.m4 serial 2
|
||||
dnl Copyright (C) 2004-2005, 2009-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2004-2005, 2009-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,644 +0,0 @@
|
|||
# host-cpu-c-abi.m4 serial 11
|
||||
dnl Copyright (C) 2002-2019 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible and Sam Steingold.
|
||||
|
||||
dnl Sets the HOST_CPU variable to the canonical name of the CPU.
|
||||
dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its
|
||||
dnl C language ABI (application binary interface).
|
||||
dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in
|
||||
dnl config.h.
|
||||
dnl
|
||||
dnl This canonical name can be used to select a particular assembly language
|
||||
dnl source file that will interoperate with C code on the given host.
|
||||
dnl
|
||||
dnl For example:
|
||||
dnl * 'i386' and 'sparc' are different canonical names, because code for i386
|
||||
dnl will not run on SPARC CPUs and vice versa. They have different
|
||||
dnl instruction sets.
|
||||
dnl * 'sparc' and 'sparc64' are different canonical names, because code for
|
||||
dnl 'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code
|
||||
dnl contains 32-bit instructions, whereas 'sparc64' code contains 64-bit
|
||||
dnl instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit
|
||||
dnl mode, but not both.
|
||||
dnl * 'mips' and 'mipsn32' are different canonical names, because they use
|
||||
dnl different argument passing and return conventions for C functions, and
|
||||
dnl although the instruction set of 'mips' is a large subset of the
|
||||
dnl instruction set of 'mipsn32'.
|
||||
dnl * 'mipsn32' and 'mips64' are different canonical names, because they use
|
||||
dnl different sizes for the C types like 'int' and 'void *', and although
|
||||
dnl the instruction sets of 'mipsn32' and 'mips64' are the same.
|
||||
dnl * The same canonical name is used for different endiannesses. You can
|
||||
dnl determine the endianness through preprocessor symbols:
|
||||
dnl - 'arm': test __ARMEL__.
|
||||
dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL.
|
||||
dnl - 'powerpc64': test _BIG_ENDIAN vs. _LITTLE_ENDIAN.
|
||||
dnl * The same name 'i386' is used for CPUs of type i386, i486, i586
|
||||
dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because
|
||||
dnl - Instructions that do not exist on all of these CPUs (cmpxchg,
|
||||
dnl MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your
|
||||
dnl assembly language source files use such instructions, you will
|
||||
dnl need to make the distinction.
|
||||
dnl - Speed of execution of the common instruction set is reasonable across
|
||||
dnl the entire family of CPUs. If you have assembly language source files
|
||||
dnl that are optimized for particular CPU types (like GNU gmp has), you
|
||||
dnl will need to make the distinction.
|
||||
dnl See <https://en.wikipedia.org/wiki/X86_instruction_listings>.
|
||||
AC_DEFUN([gl_HOST_CPU_C_ABI],
|
||||
[
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([gl_C_ASM])
|
||||
AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi],
|
||||
[case "$host_cpu" in
|
||||
|
||||
changequote(,)dnl
|
||||
i[4567]86 )
|
||||
changequote([,])dnl
|
||||
gl_cv_host_cpu_c_abi=i386
|
||||
;;
|
||||
|
||||
x86_64 )
|
||||
# On x86_64 systems, the C compiler may be generating code in one of
|
||||
# these ABIs:
|
||||
# - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
|
||||
# - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
|
||||
# with native Windows (mingw, MSVC).
|
||||
# - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
|
||||
# - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if (defined __x86_64__ || defined __amd64__ \
|
||||
|| defined _M_X64 || defined _M_AMD64)
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined __ILP32__ || defined _ILP32
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_host_cpu_c_abi=x86_64-x32],
|
||||
[gl_cv_host_cpu_c_abi=x86_64])],
|
||||
[gl_cv_host_cpu_c_abi=i386])
|
||||
;;
|
||||
|
||||
changequote(,)dnl
|
||||
alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
|
||||
changequote([,])dnl
|
||||
gl_cv_host_cpu_c_abi=alpha
|
||||
;;
|
||||
|
||||
arm* | aarch64 )
|
||||
# Assume arm with EABI.
|
||||
# On arm64 systems, the C compiler may be generating code in one of
|
||||
# these ABIs:
|
||||
# - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
|
||||
# - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
|
||||
# - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#ifdef __aarch64__
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined __ILP32__ || defined _ILP32
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_host_cpu_c_abi=arm64-ilp32],
|
||||
[gl_cv_host_cpu_c_abi=arm64])],
|
||||
[# Don't distinguish little-endian and big-endian arm, since they
|
||||
# don't require different machine code for simple operations and
|
||||
# since the user can distinguish them through the preprocessor
|
||||
# defines __ARMEL__ vs. __ARMEB__.
|
||||
# But distinguish arm which passes floating-point arguments and
|
||||
# return values in integer registers (r0, r1, ...) - this is
|
||||
# gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which
|
||||
# passes them in float registers (s0, s1, ...) and double registers
|
||||
# (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer
|
||||
# sets the preprocessor defines __ARM_PCS (for the first case) and
|
||||
# __ARM_PCS_VFP (for the second case), but older GCC does not.
|
||||
echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
|
||||
# Look for a reference to the register d0 in the .s file.
|
||||
AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1
|
||||
if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then
|
||||
gl_cv_host_cpu_c_abi=armhf
|
||||
else
|
||||
gl_cv_host_cpu_c_abi=arm
|
||||
fi
|
||||
rm -f conftest*
|
||||
])
|
||||
;;
|
||||
|
||||
hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
|
||||
# On hppa, the C compiler may be generating 32-bit code or 64-bit
|
||||
# code. In the latter case, it defines _LP64 and __LP64__.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#ifdef __LP64__
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_host_cpu_c_abi=hppa64],
|
||||
[gl_cv_host_cpu_c_abi=hppa])
|
||||
;;
|
||||
|
||||
ia64* )
|
||||
# On ia64 on HP-UX, the C compiler may be generating 64-bit code or
|
||||
# 32-bit code. In the latter case, it defines _ILP32.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#ifdef _ILP32
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_host_cpu_c_abi=ia64-ilp32],
|
||||
[gl_cv_host_cpu_c_abi=ia64])
|
||||
;;
|
||||
|
||||
mips* )
|
||||
# We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
|
||||
# at 32.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_host_cpu_c_abi=mips64],
|
||||
[# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but
|
||||
# may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32.
|
||||
# In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
|
||||
# may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if (_MIPS_SIM == _ABIN32)
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_host_cpu_c_abi=mipsn32],
|
||||
[gl_cv_host_cpu_c_abi=mips])])
|
||||
;;
|
||||
|
||||
powerpc* )
|
||||
# Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
|
||||
# No need to distinguish them here; the caller may distinguish
|
||||
# them based on the OS.
|
||||
# On powerpc64 systems, the C compiler may still be generating
|
||||
# 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
|
||||
# be generating 64-bit code.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined __powerpc64__ || defined _ARCH_PPC64
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[# On powerpc64, there are two ABIs on Linux: The AIX compatible
|
||||
# one and the ELFv2 one. The latter defines _CALL_ELF=2.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined _CALL_ELF && _CALL_ELF == 2
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_host_cpu_c_abi=powerpc64-elfv2],
|
||||
[gl_cv_host_cpu_c_abi=powerpc64])
|
||||
],
|
||||
[gl_cv_host_cpu_c_abi=powerpc])
|
||||
;;
|
||||
|
||||
rs6000 )
|
||||
gl_cv_host_cpu_c_abi=powerpc
|
||||
;;
|
||||
|
||||
riscv32 | riscv64 )
|
||||
# There are 2 architectures (with variants): rv32* and rv64*.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if __riscv_xlen == 64
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[cpu=riscv64],
|
||||
[cpu=riscv32])
|
||||
# There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
|
||||
# Size of 'long' and 'void *':
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined __LP64__
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[main_abi=lp64],
|
||||
[main_abi=ilp32])
|
||||
# Float ABIs:
|
||||
# __riscv_float_abi_double:
|
||||
# 'float' and 'double' are passed in floating-point registers.
|
||||
# __riscv_float_abi_single:
|
||||
# 'float' are passed in floating-point registers.
|
||||
# __riscv_float_abi_soft:
|
||||
# No values are passed in floating-point registers.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined __riscv_float_abi_double
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[float_abi=d],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined __riscv_float_abi_single
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[float_abi=f],
|
||||
[float_abi=''])
|
||||
])
|
||||
gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}"
|
||||
;;
|
||||
|
||||
s390* )
|
||||
# On s390x, the C compiler may be generating 64-bit (= s390x) code
|
||||
# or 31-bit (= s390) code.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined __LP64__ || defined __s390x__
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_host_cpu_c_abi=s390x],
|
||||
[gl_cv_host_cpu_c_abi=s390])
|
||||
;;
|
||||
|
||||
sparc | sparc64 )
|
||||
# UltraSPARCs running Linux have `uname -m` = "sparc64", but the
|
||||
# C compiler still generates 32-bit code.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined __sparcv9 || defined __arch64__
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_host_cpu_c_abi=sparc64],
|
||||
[gl_cv_host_cpu_c_abi=sparc])
|
||||
;;
|
||||
|
||||
*)
|
||||
gl_cv_host_cpu_c_abi="$host_cpu"
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same.
|
||||
HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'`
|
||||
HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi"
|
||||
AC_SUBST([HOST_CPU])
|
||||
AC_SUBST([HOST_CPU_C_ABI])
|
||||
|
||||
# This was
|
||||
# AC_DEFINE_UNQUOTED([__${HOST_CPU}__])
|
||||
# AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__])
|
||||
# earlier, but KAI C++ 3.2d doesn't like this.
|
||||
sed -e 's/-/_/g' >> confdefs.h <<EOF
|
||||
#ifndef __${HOST_CPU}__
|
||||
#define __${HOST_CPU}__ 1
|
||||
#endif
|
||||
#ifndef __${HOST_CPU_C_ABI}__
|
||||
#define __${HOST_CPU_C_ABI}__ 1
|
||||
#endif
|
||||
EOF
|
||||
AH_TOP([/* CPU and C ABI indicator */
|
||||
#ifndef __i386__
|
||||
#undef __i386__
|
||||
#endif
|
||||
#ifndef __x86_64_x32__
|
||||
#undef __x86_64_x32__
|
||||
#endif
|
||||
#ifndef __x86_64__
|
||||
#undef __x86_64__
|
||||
#endif
|
||||
#ifndef __alpha__
|
||||
#undef __alpha__
|
||||
#endif
|
||||
#ifndef __arm__
|
||||
#undef __arm__
|
||||
#endif
|
||||
#ifndef __armhf__
|
||||
#undef __armhf__
|
||||
#endif
|
||||
#ifndef __arm64_ilp32__
|
||||
#undef __arm64_ilp32__
|
||||
#endif
|
||||
#ifndef __arm64__
|
||||
#undef __arm64__
|
||||
#endif
|
||||
#ifndef __hppa__
|
||||
#undef __hppa__
|
||||
#endif
|
||||
#ifndef __hppa64__
|
||||
#undef __hppa64__
|
||||
#endif
|
||||
#ifndef __ia64_ilp32__
|
||||
#undef __ia64_ilp32__
|
||||
#endif
|
||||
#ifndef __ia64__
|
||||
#undef __ia64__
|
||||
#endif
|
||||
#ifndef __m68k__
|
||||
#undef __m68k__
|
||||
#endif
|
||||
#ifndef __mips__
|
||||
#undef __mips__
|
||||
#endif
|
||||
#ifndef __mipsn32__
|
||||
#undef __mipsn32__
|
||||
#endif
|
||||
#ifndef __mips64__
|
||||
#undef __mips64__
|
||||
#endif
|
||||
#ifndef __powerpc__
|
||||
#undef __powerpc__
|
||||
#endif
|
||||
#ifndef __powerpc64__
|
||||
#undef __powerpc64__
|
||||
#endif
|
||||
#ifndef __powerpc64_elfv2__
|
||||
#undef __powerpc64_elfv2__
|
||||
#endif
|
||||
#ifndef __riscv32__
|
||||
#undef __riscv32__
|
||||
#endif
|
||||
#ifndef __riscv64__
|
||||
#undef __riscv64__
|
||||
#endif
|
||||
#ifndef __riscv32_ilp32__
|
||||
#undef __riscv32_ilp32__
|
||||
#endif
|
||||
#ifndef __riscv32_ilp32f__
|
||||
#undef __riscv32_ilp32f__
|
||||
#endif
|
||||
#ifndef __riscv32_ilp32d__
|
||||
#undef __riscv32_ilp32d__
|
||||
#endif
|
||||
#ifndef __riscv64_ilp32__
|
||||
#undef __riscv64_ilp32__
|
||||
#endif
|
||||
#ifndef __riscv64_ilp32f__
|
||||
#undef __riscv64_ilp32f__
|
||||
#endif
|
||||
#ifndef __riscv64_ilp32d__
|
||||
#undef __riscv64_ilp32d__
|
||||
#endif
|
||||
#ifndef __riscv64_lp64__
|
||||
#undef __riscv64_lp64__
|
||||
#endif
|
||||
#ifndef __riscv64_lp64f__
|
||||
#undef __riscv64_lp64f__
|
||||
#endif
|
||||
#ifndef __riscv64_lp64d__
|
||||
#undef __riscv64_lp64d__
|
||||
#endif
|
||||
#ifndef __s390__
|
||||
#undef __s390__
|
||||
#endif
|
||||
#ifndef __s390x__
|
||||
#undef __s390x__
|
||||
#endif
|
||||
#ifndef __sh__
|
||||
#undef __sh__
|
||||
#endif
|
||||
#ifndef __sparc__
|
||||
#undef __sparc__
|
||||
#endif
|
||||
#ifndef __sparc64__
|
||||
#undef __sparc64__
|
||||
#endif
|
||||
])
|
||||
|
||||
])
|
||||
|
||||
|
||||
dnl Sets the HOST_CPU_C_ABI_32BIT variable to 'yes' if the C language ABI
|
||||
dnl (application binary interface) is a 32-bit one, or to 'no' otherwise.
|
||||
dnl This is a simplified variant of gl_HOST_CPU_C_ABI.
|
||||
AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
|
||||
[
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_CACHE_CHECK([32-bit host C ABI], [gl_cv_host_cpu_c_abi_32bit],
|
||||
[if test -n "$gl_cv_host_cpu_c_abi"; then
|
||||
case "$gl_cv_host_cpu_c_abi" in
|
||||
i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
|
||||
gl_cv_host_cpu_c_abi_32bit=yes ;;
|
||||
*)
|
||||
gl_cv_host_cpu_c_abi_32bit=no ;;
|
||||
esac
|
||||
else
|
||||
case "$host_cpu" in
|
||||
|
||||
changequote(,)dnl
|
||||
i[4567]86 )
|
||||
changequote([,])dnl
|
||||
gl_cv_host_cpu_c_abi_32bit=yes
|
||||
;;
|
||||
|
||||
x86_64 )
|
||||
# On x86_64 systems, the C compiler may be generating code in one of
|
||||
# these ABIs:
|
||||
# - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
|
||||
# - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
|
||||
# with native Windows (mingw, MSVC).
|
||||
# - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
|
||||
# - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if (defined __x86_64__ || defined __amd64__ \
|
||||
|| defined _M_X64 || defined _M_AMD64) \
|
||||
&& !(defined __ILP32__ || defined _ILP32)
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_host_cpu_c_abi_32bit=no],
|
||||
[gl_cv_host_cpu_c_abi_32bit=yes])
|
||||
;;
|
||||
|
||||
arm* | aarch64 )
|
||||
# Assume arm with EABI.
|
||||
# On arm64 systems, the C compiler may be generating code in one of
|
||||
# these ABIs:
|
||||
# - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
|
||||
# - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
|
||||
# - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_host_cpu_c_abi_32bit=no],
|
||||
[gl_cv_host_cpu_c_abi_32bit=yes])
|
||||
;;
|
||||
|
||||
hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
|
||||
# On hppa, the C compiler may be generating 32-bit code or 64-bit
|
||||
# code. In the latter case, it defines _LP64 and __LP64__.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#ifdef __LP64__
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_host_cpu_c_abi_32bit=no],
|
||||
[gl_cv_host_cpu_c_abi_32bit=yes])
|
||||
;;
|
||||
|
||||
ia64* )
|
||||
# On ia64 on HP-UX, the C compiler may be generating 64-bit code or
|
||||
# 32-bit code. In the latter case, it defines _ILP32.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#ifdef _ILP32
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_host_cpu_c_abi_32bit=yes],
|
||||
[gl_cv_host_cpu_c_abi_32bit=no])
|
||||
;;
|
||||
|
||||
mips* )
|
||||
# We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
|
||||
# at 32.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_host_cpu_c_abi_32bit=no],
|
||||
[gl_cv_host_cpu_c_abi_32bit=yes])
|
||||
;;
|
||||
|
||||
powerpc* )
|
||||
# Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
|
||||
# No need to distinguish them here; the caller may distinguish
|
||||
# them based on the OS.
|
||||
# On powerpc64 systems, the C compiler may still be generating
|
||||
# 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
|
||||
# be generating 64-bit code.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined __powerpc64__ || defined _ARCH_PPC64
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_host_cpu_c_abi_32bit=no],
|
||||
[gl_cv_host_cpu_c_abi_32bit=yes])
|
||||
;;
|
||||
|
||||
rs6000 )
|
||||
gl_cv_host_cpu_c_abi_32bit=yes
|
||||
;;
|
||||
|
||||
riscv32 | riscv64 )
|
||||
# There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
|
||||
# Size of 'long' and 'void *':
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined __LP64__
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_host_cpu_c_abi_32bit=no],
|
||||
[gl_cv_host_cpu_c_abi_32bit=yes])
|
||||
;;
|
||||
|
||||
s390* )
|
||||
# On s390x, the C compiler may be generating 64-bit (= s390x) code
|
||||
# or 31-bit (= s390) code.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined __LP64__ || defined __s390x__
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_host_cpu_c_abi_32bit=no],
|
||||
[gl_cv_host_cpu_c_abi_32bit=yes])
|
||||
;;
|
||||
|
||||
sparc | sparc64 )
|
||||
# UltraSPARCs running Linux have `uname -m` = "sparc64", but the
|
||||
# C compiler still generates 32-bit code.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined __sparcv9 || defined __arch64__
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_host_cpu_c_abi_32bit=no],
|
||||
[gl_cv_host_cpu_c_abi_32bit=yes])
|
||||
;;
|
||||
|
||||
*)
|
||||
gl_cv_host_cpu_c_abi_32bit=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
])
|
||||
|
||||
HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
|
||||
])
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
# include_next.m4 serial 24
|
||||
dnl Copyright (C) 2006-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# intmax_t.m4 serial 8
|
||||
dnl Copyright (C) 1997-2004, 2006-2007, 2009-2019 Free Software Foundation,
|
||||
# intmax_t.m4 serial 9
|
||||
dnl Copyright (C) 1997-2004, 2006-2007, 2009-2020 Free Software Foundation,
|
||||
dnl Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
|
@ -19,11 +19,7 @@ AC_DEFUN([gl_AC_TYPE_INTMAX_T],
|
|||
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
|
||||
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
|
||||
if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
|
||||
AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
|
||||
test $ac_cv_type_long_long_int = yes \
|
||||
&& ac_type='long long' \
|
||||
|| ac_type='long'
|
||||
AC_DEFINE_UNQUOTED([intmax_t], [$ac_type],
|
||||
AC_DEFINE_UNQUOTED([intmax_t], [long long],
|
||||
[Define to long or long long if <inttypes.h> and <stdint.h> don't define.])
|
||||
else
|
||||
AC_DEFINE([HAVE_INTMAX_T], [1],
|
||||
|
|
@ -57,11 +53,7 @@ AC_DEFUN([gt_AC_TYPE_INTMAX_T],
|
|||
AC_DEFINE([HAVE_INTMAX_T], [1],
|
||||
[Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
|
||||
else
|
||||
AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
|
||||
test $ac_cv_type_long_long_int = yes \
|
||||
&& ac_type='long long' \
|
||||
|| ac_type='long'
|
||||
AC_DEFINE_UNQUOTED([intmax_t], [$ac_type],
|
||||
AC_DEFINE_UNQUOTED([intmax_t], [long long],
|
||||
[Define to long or long long if <stdint.h> and <inttypes.h> don't define.])
|
||||
fi
|
||||
])
|
||||
|
|
|
|||
159
m4/inttypes.m4
Normal file
159
m4/inttypes.m4
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
# inttypes.m4 serial 29
|
||||
dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Derek Price, Bruno Haible.
|
||||
dnl Test whether <inttypes.h> is supported or must be substituted.
|
||||
|
||||
AC_DEFUN([gl_INTTYPES_H],
|
||||
[
|
||||
AC_REQUIRE([gl_INTTYPES_INCOMPLETE])
|
||||
gl_INTTYPES_PRI_SCN
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE],
|
||||
[
|
||||
AC_REQUIRE([gl_STDINT_H])
|
||||
AC_CHECK_HEADERS_ONCE([inttypes.h])
|
||||
|
||||
dnl Override <inttypes.h> always, so that the portability warnings work.
|
||||
AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
|
||||
gl_CHECK_NEXT_HEADERS([inttypes.h])
|
||||
|
||||
AC_REQUIRE([gl_MULTIARCH])
|
||||
|
||||
dnl Check for declarations of anything we want to poison if the
|
||||
dnl corresponding gnulib module is not in use.
|
||||
gl_WARN_ON_USE_PREPARE([[#include <inttypes.h>
|
||||
]], [imaxabs imaxdiv strtoimax strtoumax])
|
||||
|
||||
AC_REQUIRE([AC_C_RESTRICT])
|
||||
])
|
||||
|
||||
# Ensure that the PRI* and SCN* macros are defined appropriately.
|
||||
AC_DEFUN([gl_INTTYPES_PRI_SCN],
|
||||
[
|
||||
AC_REQUIRE([gt_INTTYPES_PRI])
|
||||
|
||||
PRIPTR_PREFIX=
|
||||
if test -n "$STDINT_H"; then
|
||||
dnl Using the gnulib <stdint.h>. It always defines intptr_t to 'long'.
|
||||
PRIPTR_PREFIX='"l"'
|
||||
else
|
||||
dnl Using the system's <stdint.h>.
|
||||
for glpfx in '' l ll I64; do
|
||||
case $glpfx in
|
||||
'') gltype1='int';;
|
||||
l) gltype1='long int';;
|
||||
ll) gltype1='long long int';;
|
||||
I64) gltype1='__int64';;
|
||||
esac
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <stdint.h>
|
||||
extern intptr_t foo;
|
||||
extern $gltype1 foo;]])],
|
||||
[PRIPTR_PREFIX='"'$glpfx'"'])
|
||||
test -n "$PRIPTR_PREFIX" && break
|
||||
done
|
||||
fi
|
||||
AC_SUBST([PRIPTR_PREFIX])
|
||||
|
||||
gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
|
||||
[INT32_MAX_LT_INTMAX_MAX],
|
||||
[defined INT32_MAX && defined INTMAX_MAX],
|
||||
[INT32_MAX < INTMAX_MAX],
|
||||
[sizeof (int) < sizeof (long long int)])
|
||||
if test $APPLE_UNIVERSAL_BUILD = 0; then
|
||||
gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
|
||||
[INT64_MAX_EQ_LONG_MAX],
|
||||
[defined INT64_MAX],
|
||||
[INT64_MAX == LONG_MAX],
|
||||
[sizeof (long long int) == sizeof (long int)])
|
||||
else
|
||||
INT64_MAX_EQ_LONG_MAX=-1
|
||||
fi
|
||||
gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
|
||||
[UINT32_MAX_LT_UINTMAX_MAX],
|
||||
[defined UINT32_MAX && defined UINTMAX_MAX],
|
||||
[UINT32_MAX < UINTMAX_MAX],
|
||||
[sizeof (unsigned int) < sizeof (unsigned long long int)])
|
||||
if test $APPLE_UNIVERSAL_BUILD = 0; then
|
||||
gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
|
||||
[UINT64_MAX_EQ_ULONG_MAX],
|
||||
[defined UINT64_MAX],
|
||||
[UINT64_MAX == ULONG_MAX],
|
||||
[sizeof (unsigned long long int) == sizeof (unsigned long int)])
|
||||
else
|
||||
UINT64_MAX_EQ_ULONG_MAX=-1
|
||||
fi
|
||||
])
|
||||
|
||||
# Define the symbol $1 to be 1 if the condition is true, 0 otherwise.
|
||||
# If $2 is true, the condition is $3; otherwise if long long int is supported
|
||||
# approximate the condition with $4; otherwise, assume the condition is false.
|
||||
# The condition should work on all C99 platforms; the approximations should be
|
||||
# good enough to work on all practical pre-C99 platforms.
|
||||
# $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants.
|
||||
AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION],
|
||||
[
|
||||
AC_CACHE_CHECK([whether $3],
|
||||
[gl_cv_test_$1],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[/* Work also in C++ mode. */
|
||||
#define __STDC_LIMIT_MACROS 1
|
||||
|
||||
/* Work if build is not clean. */
|
||||
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
|
||||
|
||||
#include <limits.h>
|
||||
#if HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#if $2
|
||||
#define CONDITION ($3)
|
||||
#else
|
||||
#define CONDITION ($4)
|
||||
#endif
|
||||
int test[CONDITION ? 1 : -1];]])],
|
||||
[gl_cv_test_$1=yes],
|
||||
[gl_cv_test_$1=no])])
|
||||
if test $gl_cv_test_$1 = yes; then
|
||||
$1=1;
|
||||
else
|
||||
$1=0;
|
||||
fi
|
||||
AC_SUBST([$1])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR],
|
||||
[
|
||||
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
|
||||
AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
|
||||
gl_MODULE_INDICATOR_SET_VARIABLE([$1])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
|
||||
[
|
||||
GNULIB_IMAXABS=0; AC_SUBST([GNULIB_IMAXABS])
|
||||
GNULIB_IMAXDIV=0; AC_SUBST([GNULIB_IMAXDIV])
|
||||
GNULIB_STRTOIMAX=0; AC_SUBST([GNULIB_STRTOIMAX])
|
||||
GNULIB_STRTOUMAX=0; AC_SUBST([GNULIB_STRTOUMAX])
|
||||
dnl Assume proper GNU behavior unless another module says otherwise.
|
||||
HAVE_DECL_IMAXABS=1; AC_SUBST([HAVE_DECL_IMAXABS])
|
||||
HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV])
|
||||
HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
|
||||
HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
|
||||
HAVE_IMAXDIV_T=1; AC_SUBST([HAVE_IMAXDIV_T])
|
||||
REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX])
|
||||
REPLACE_STRTOUMAX=0; AC_SUBST([REPLACE_STRTOUMAX])
|
||||
INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
|
||||
INT64_MAX_EQ_LONG_MAX='defined _LP64'; AC_SUBST([INT64_MAX_EQ_LONG_MAX])
|
||||
PRI_MACROS_BROKEN=0; AC_SUBST([PRI_MACROS_BROKEN])
|
||||
PRIPTR_PREFIX=__PRIPTR_PREFIX; AC_SUBST([PRIPTR_PREFIX])
|
||||
UINT32_MAX_LT_UINTMAX_MAX=1; AC_SUBST([UINT32_MAX_LT_UINTMAX_MAX])
|
||||
UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; AC_SUBST([UINT64_MAX_EQ_ULONG_MAX])
|
||||
])
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
# inttypes_h.m4 serial 10
|
||||
dnl Copyright (C) 1997-2004, 2006, 2008-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 1997-2004, 2006, 2008-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# isatty.m4 serial 3
|
||||
dnl Copyright (C) 2012-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,10 +1,27 @@
|
|||
# Enable large files on systems where this is not the default.
|
||||
# Enable support for files on Linux file systems with 64-bit inode numbers.
|
||||
|
||||
# Copyright 1992-1996, 1998-2019 Free Software Foundation, Inc.
|
||||
# Copyright 1992-1996, 1998-2020 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# The following macro works around a problem in Autoconf's AC_FUNC_FSEEKO:
|
||||
# It does not set _LARGEFILE_SOURCE=1 on HP-UX/ia64 32-bit, although this
|
||||
# setting of _LARGEFILE_SOURCE is needed so that <stdio.h> declares fseeko
|
||||
# and ftello in C++ mode as well.
|
||||
AC_DEFUN([gl_SET_LARGEFILE_SOURCE],
|
||||
[
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_FUNC_FSEEKO
|
||||
case "$host_os" in
|
||||
hpux*)
|
||||
AC_DEFINE([_LARGEFILE_SOURCE], [1],
|
||||
[Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).])
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
# The following implementation works around a problem in autoconf <= 2.69;
|
||||
# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5,
|
||||
# or configures them incorrectly in some cases.
|
||||
|
|
@ -56,7 +73,10 @@ rm -rf conftest*[]dnl
|
|||
# By default, many hosts won't let programs access large files;
|
||||
# one must use special compiler options to get large-file access to work.
|
||||
# For more details about this brain damage please see:
|
||||
# http://www.unix-systems.org/version2/whatsnew/lfs20mar.html
|
||||
# http://www.unix.org/version2/whatsnew/lfs20mar.html
|
||||
# Additionally, on Linux file systems with 64-bit inodes a file that happens
|
||||
# to have a 64-bit inode number cannot be accessed by 32-bit applications on
|
||||
# Linux x86/x86_64. This can occur with file systems such as XFS and NFS.
|
||||
AC_DEFUN([AC_SYS_LARGEFILE],
|
||||
[AC_ARG_ENABLE(largefile,
|
||||
[ --disable-largefile omit support for large files])
|
||||
|
|
@ -93,9 +113,6 @@ if test "$enable_largefile" != no; then
|
|||
[Define for large files, on AIX-style hosts.],
|
||||
[_AC_SYS_LARGEFILE_TEST_INCLUDES])
|
||||
fi
|
||||
|
||||
AC_DEFINE([_DARWIN_USE_64_BIT_INODE], [1],
|
||||
[Enable large inode numbers on Mac OS X 10.5.])
|
||||
fi
|
||||
])# AC_SYS_LARGEFILE
|
||||
])# m4_version_prereq 2.70
|
||||
|
|
|
|||
168
m4/lib-ld.m4
168
m4/lib-ld.m4
|
|
@ -1,168 +0,0 @@
|
|||
# lib-ld.m4 serial 9
|
||||
dnl Copyright (C) 1996-2003, 2009-2019 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl Subroutines of libtool.m4,
|
||||
dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
|
||||
dnl collision with libtool.m4.
|
||||
|
||||
dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
|
||||
AC_DEFUN([AC_LIB_PROG_LD_GNU],
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
|
||||
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
|
||||
case `$LD -v 2>&1 </dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
acl_cv_prog_gnu_ld=yes
|
||||
;;
|
||||
*)
|
||||
acl_cv_prog_gnu_ld=no
|
||||
;;
|
||||
esac])
|
||||
with_gnu_ld=$acl_cv_prog_gnu_ld
|
||||
])
|
||||
|
||||
dnl From libtool-2.4. Sets the variable LD.
|
||||
AC_DEFUN([AC_LIB_PROG_LD],
|
||||
[AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
|
||||
AC_ARG_WITH([gnu-ld],
|
||||
[AS_HELP_STRING([--with-gnu-ld],
|
||||
[assume the C compiler uses GNU ld [default=no]])],
|
||||
[test "$withval" = no || with_gnu_ld=yes],
|
||||
[with_gnu_ld=no])dnl
|
||||
|
||||
# Prepare PATH_SEPARATOR.
|
||||
# The user is always right.
|
||||
if test "${PATH_SEPARATOR+set}" != set; then
|
||||
# Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
|
||||
# contains only /bin. Note that ksh looks also at the FPATH variable,
|
||||
# so we have to set that as well for the test.
|
||||
PATH_SEPARATOR=:
|
||||
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
|
||||
&& { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
|
||||
|| PATH_SEPARATOR=';'
|
||||
}
|
||||
fi
|
||||
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_CHECKING([for ld])
|
||||
elif test "$GCC" = yes; then
|
||||
AC_MSG_CHECKING([for ld used by $CC])
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
if test -n "$LD"; then
|
||||
# Let the user override the test with a path.
|
||||
:
|
||||
else
|
||||
AC_CACHE_VAL([acl_cv_path_LD],
|
||||
[
|
||||
acl_cv_path_LD= # Final result of this test
|
||||
ac_prog=ld # Program to search in $PATH
|
||||
if test "$GCC" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
case $host in
|
||||
*-*-mingw*)
|
||||
# gcc leaves a trailing carriage return which upsets mingw
|
||||
acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||
*)
|
||||
acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
|
||||
esac
|
||||
case $acl_output in
|
||||
# Accept absolute paths.
|
||||
[[\\/]]* | ?:[[\\/]]*)
|
||||
re_direlt='/[[^/]][[^/]]*/\.\./'
|
||||
# Canonicalize the pathname of ld
|
||||
acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
|
||||
while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
|
||||
done
|
||||
# Got the pathname. No search in PATH is needed.
|
||||
acl_cv_path_LD="$acl_output"
|
||||
ac_prog=
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test -n "$ac_prog"; then
|
||||
# Search for $ac_prog in $PATH.
|
||||
acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
|
||||
for ac_dir in $PATH; do
|
||||
IFS="$acl_save_ifs"
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
acl_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some variants of GNU ld only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
test "$with_gnu_ld" != no && break
|
||||
;;
|
||||
*)
|
||||
test "$with_gnu_ld" != yes && break
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
IFS="$acl_save_ifs"
|
||||
fi
|
||||
case $host in
|
||||
*-*-aix*)
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined __powerpc64__ || defined _ARCH_PPC64
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[# The compiler produces 64-bit code. Add option '-b64' so that the
|
||||
# linker groks 64-bit object files.
|
||||
case "$acl_cv_path_LD " in
|
||||
*" -b64 "*) ;;
|
||||
*) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
|
||||
esac
|
||||
], [])
|
||||
;;
|
||||
sparc64-*-netbsd*)
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined __sparcv9 || defined __arch64__
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[],
|
||||
[# The compiler produces 32-bit code. Add option '-m elf32_sparc'
|
||||
# so that the linker groks 32-bit object files.
|
||||
case "$acl_cv_path_LD " in
|
||||
*" -m elf32_sparc "*) ;;
|
||||
*) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
|
||||
esac
|
||||
])
|
||||
;;
|
||||
esac
|
||||
])
|
||||
LD="$acl_cv_path_LD"
|
||||
fi
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT([$LD])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
fi
|
||||
AC_LIB_PROG_LD_GNU
|
||||
])
|
||||
774
m4/lib-link.m4
774
m4/lib-link.m4
|
|
@ -1,774 +0,0 @@
|
|||
# lib-link.m4 serial 28
|
||||
dnl Copyright (C) 2001-2019 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_PREREQ([2.61])
|
||||
|
||||
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
|
||||
dnl augments the CPPFLAGS variable.
|
||||
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
|
||||
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
pushdef([Name],[m4_translit([$1],[./+-], [____])])
|
||||
pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
||||
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
|
||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
|
||||
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
|
||||
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
|
||||
ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
|
||||
])
|
||||
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
|
||||
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
|
||||
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
|
||||
LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||
AC_SUBST([LIB]NAME)
|
||||
AC_SUBST([LTLIB]NAME)
|
||||
AC_SUBST([LIB]NAME[_PREFIX])
|
||||
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
|
||||
dnl results of this search when this library appears as a dependency.
|
||||
HAVE_LIB[]NAME=yes
|
||||
popdef([NAME])
|
||||
popdef([Name])
|
||||
])
|
||||
|
||||
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
|
||||
dnl searches for libname and the libraries corresponding to explicit and
|
||||
dnl implicit dependencies, together with the specified include files and
|
||||
dnl the ability to compile and link the specified testcode. The missing-message
|
||||
dnl defaults to 'no' and may contain additional hints for the user.
|
||||
dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
|
||||
dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
|
||||
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
|
||||
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
|
||||
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
|
||||
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
||||
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
pushdef([Name],[m4_translit([$1],[./+-], [____])])
|
||||
pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
||||
|
||||
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
|
||||
dnl accordingly.
|
||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||
|
||||
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
|
||||
dnl because if the user has installed lib[]Name and not disabled its use
|
||||
dnl via --without-lib[]Name-prefix, he wants to use it.
|
||||
ac_save_CPPFLAGS="$CPPFLAGS"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||
|
||||
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
|
||||
ac_save_LIBS="$LIBS"
|
||||
dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
|
||||
dnl because these -l options might require -L options that are present in
|
||||
dnl LIBS. -l options benefit only from the -L options listed before it.
|
||||
dnl Otherwise, add it to the front of LIBS, because it may be a static
|
||||
dnl library that depends on another static library that is present in LIBS.
|
||||
dnl Static libraries benefit only from the static libraries listed after
|
||||
dnl it.
|
||||
case " $LIB[]NAME" in
|
||||
*" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
|
||||
*) LIBS="$LIB[]NAME $LIBS" ;;
|
||||
esac
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([[$3]], [[$4]])],
|
||||
[ac_cv_lib[]Name=yes],
|
||||
[ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
|
||||
LIBS="$ac_save_LIBS"
|
||||
])
|
||||
if test "$ac_cv_lib[]Name" = yes; then
|
||||
HAVE_LIB[]NAME=yes
|
||||
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
|
||||
AC_MSG_CHECKING([how to link with lib[]$1])
|
||||
AC_MSG_RESULT([$LIB[]NAME])
|
||||
else
|
||||
HAVE_LIB[]NAME=no
|
||||
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
|
||||
dnl $INC[]NAME either.
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||
LIB[]NAME=
|
||||
LTLIB[]NAME=
|
||||
LIB[]NAME[]_PREFIX=
|
||||
fi
|
||||
AC_SUBST([HAVE_LIB]NAME)
|
||||
AC_SUBST([LIB]NAME)
|
||||
AC_SUBST([LTLIB]NAME)
|
||||
AC_SUBST([LIB]NAME[_PREFIX])
|
||||
popdef([NAME])
|
||||
popdef([Name])
|
||||
])
|
||||
|
||||
dnl Determine the platform dependent parameters needed to use rpath:
|
||||
dnl acl_libext,
|
||||
dnl acl_shlibext,
|
||||
dnl acl_libname_spec,
|
||||
dnl acl_library_names_spec,
|
||||
dnl acl_hardcode_libdir_flag_spec,
|
||||
dnl acl_hardcode_libdir_separator,
|
||||
dnl acl_hardcode_direct,
|
||||
dnl acl_hardcode_minus_L.
|
||||
AC_DEFUN([AC_LIB_RPATH],
|
||||
[
|
||||
dnl Complain if config.rpath is missing.
|
||||
AC_REQUIRE_AUX_FILE([config.rpath])
|
||||
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
|
||||
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
|
||||
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
|
||||
AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
|
||||
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
|
||||
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
|
||||
. ./conftest.sh
|
||||
rm -f ./conftest.sh
|
||||
acl_cv_rpath=done
|
||||
])
|
||||
wl="$acl_cv_wl"
|
||||
acl_libext="$acl_cv_libext"
|
||||
acl_shlibext="$acl_cv_shlibext"
|
||||
acl_libname_spec="$acl_cv_libname_spec"
|
||||
acl_library_names_spec="$acl_cv_library_names_spec"
|
||||
acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
|
||||
acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
|
||||
acl_hardcode_direct="$acl_cv_hardcode_direct"
|
||||
acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
|
||||
dnl Determine whether the user wants rpath handling at all.
|
||||
AC_ARG_ENABLE([rpath],
|
||||
[ --disable-rpath do not hardcode runtime library paths],
|
||||
:, enable_rpath=yes)
|
||||
])
|
||||
|
||||
dnl AC_LIB_FROMPACKAGE(name, package)
|
||||
dnl declares that libname comes from the given package. The configure file
|
||||
dnl will then not have a --with-libname-prefix option but a
|
||||
dnl --with-package-prefix option. Several libraries can come from the same
|
||||
dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
|
||||
dnl macro call that searches for libname.
|
||||
AC_DEFUN([AC_LIB_FROMPACKAGE],
|
||||
[
|
||||
pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
||||
define([acl_frompackage_]NAME, [$2])
|
||||
popdef([NAME])
|
||||
pushdef([PACK],[$2])
|
||||
pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
||||
define([acl_libsinpackage_]PACKUP,
|
||||
m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
|
||||
popdef([PACKUP])
|
||||
popdef([PACK])
|
||||
])
|
||||
|
||||
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
|
||||
dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
|
||||
dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
|
||||
pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
||||
pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
|
||||
pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
||||
pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
|
||||
dnl By default, look in $includedir and $libdir.
|
||||
use_additional=yes
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
AC_ARG_WITH(PACK[-prefix],
|
||||
[[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
|
||||
--without-]]PACK[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
|
||||
[
|
||||
if test "X$withval" = "Xno"; then
|
||||
use_additional=no
|
||||
else
|
||||
if test "X$withval" = "X"; then
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
else
|
||||
additional_includedir="$withval/include"
|
||||
additional_libdir="$withval/$acl_libdirstem"
|
||||
if test "$acl_libdirstem2" != "$acl_libdirstem" \
|
||||
&& test ! -d "$withval/$acl_libdirstem"; then
|
||||
additional_libdir="$withval/$acl_libdirstem2"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
dnl Search the library and its dependencies in $additional_libdir and
|
||||
dnl $LDFLAGS. Using breadth-first-seach.
|
||||
LIB[]NAME=
|
||||
LTLIB[]NAME=
|
||||
INC[]NAME=
|
||||
LIB[]NAME[]_PREFIX=
|
||||
dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
|
||||
dnl computed. So it has to be reset here.
|
||||
HAVE_LIB[]NAME=
|
||||
rpathdirs=
|
||||
ltrpathdirs=
|
||||
names_already_handled=
|
||||
names_next_round='$1 $2'
|
||||
while test -n "$names_next_round"; do
|
||||
names_this_round="$names_next_round"
|
||||
names_next_round=
|
||||
for name in $names_this_round; do
|
||||
already_handled=
|
||||
for n in $names_already_handled; do
|
||||
if test "$n" = "$name"; then
|
||||
already_handled=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$already_handled"; then
|
||||
names_already_handled="$names_already_handled $name"
|
||||
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
|
||||
dnl or AC_LIB_HAVE_LINKFLAGS call.
|
||||
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
|
||||
eval value=\"\$HAVE_LIB$uppername\"
|
||||
if test -n "$value"; then
|
||||
if test "$value" = yes; then
|
||||
eval value=\"\$LIB$uppername\"
|
||||
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
|
||||
eval value=\"\$LTLIB$uppername\"
|
||||
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
|
||||
else
|
||||
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
|
||||
dnl that this library doesn't exist. So just drop it.
|
||||
:
|
||||
fi
|
||||
else
|
||||
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
|
||||
dnl and the already constructed $LIBNAME/$LTLIBNAME.
|
||||
found_dir=
|
||||
found_la=
|
||||
found_so=
|
||||
found_a=
|
||||
eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
|
||||
if test -n "$acl_shlibext"; then
|
||||
shrext=".$acl_shlibext" # typically: shrext=.so
|
||||
else
|
||||
shrext=
|
||||
fi
|
||||
if test $use_additional = yes; then
|
||||
dir="$additional_libdir"
|
||||
dnl The same code as in the loop below:
|
||||
dnl First look for a shared library.
|
||||
if test -n "$acl_shlibext"; then
|
||||
if test -f "$dir/$libname$shrext"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$libname$shrext"
|
||||
else
|
||||
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
|
||||
ver=`(cd "$dir" && \
|
||||
for f in "$libname$shrext".*; do echo "$f"; done \
|
||||
| sed -e "s,^$libname$shrext\\\\.,," \
|
||||
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
|
||||
| sed 1q ) 2>/dev/null`
|
||||
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$libname$shrext.$ver"
|
||||
fi
|
||||
else
|
||||
eval library_names=\"$acl_library_names_spec\"
|
||||
for f in $library_names; do
|
||||
if test -f "$dir/$f"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$f"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Then look for a static library.
|
||||
if test "X$found_dir" = "X"; then
|
||||
if test -f "$dir/$libname.$acl_libext"; then
|
||||
found_dir="$dir"
|
||||
found_a="$dir/$libname.$acl_libext"
|
||||
fi
|
||||
fi
|
||||
if test "X$found_dir" != "X"; then
|
||||
if test -f "$dir/$libname.la"; then
|
||||
found_la="$dir/$libname.la"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "X$found_dir" = "X"; then
|
||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
case "$x" in
|
||||
-L*)
|
||||
dir=`echo "X$x" | sed -e 's/^X-L//'`
|
||||
dnl First look for a shared library.
|
||||
if test -n "$acl_shlibext"; then
|
||||
if test -f "$dir/$libname$shrext"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$libname$shrext"
|
||||
else
|
||||
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
|
||||
ver=`(cd "$dir" && \
|
||||
for f in "$libname$shrext".*; do echo "$f"; done \
|
||||
| sed -e "s,^$libname$shrext\\\\.,," \
|
||||
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
|
||||
| sed 1q ) 2>/dev/null`
|
||||
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$libname$shrext.$ver"
|
||||
fi
|
||||
else
|
||||
eval library_names=\"$acl_library_names_spec\"
|
||||
for f in $library_names; do
|
||||
if test -f "$dir/$f"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$f"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Then look for a static library.
|
||||
if test "X$found_dir" = "X"; then
|
||||
if test -f "$dir/$libname.$acl_libext"; then
|
||||
found_dir="$dir"
|
||||
found_a="$dir/$libname.$acl_libext"
|
||||
fi
|
||||
fi
|
||||
if test "X$found_dir" != "X"; then
|
||||
if test -f "$dir/$libname.la"; then
|
||||
found_la="$dir/$libname.la"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "X$found_dir" != "X"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test "X$found_dir" != "X"; then
|
||||
dnl Found the library.
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
|
||||
if test "X$found_so" != "X"; then
|
||||
dnl Linking with a shared library. We attempt to hardcode its
|
||||
dnl directory into the executable's runpath, unless it's the
|
||||
dnl standard /usr/lib.
|
||||
if test "$enable_rpath" = no \
|
||||
|| test "X$found_dir" = "X/usr/$acl_libdirstem" \
|
||||
|| test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
|
||||
dnl No hardcoding is needed.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
dnl Use an explicit option to hardcode DIR into the resulting
|
||||
dnl binary.
|
||||
dnl Potentially add DIR to ltrpathdirs.
|
||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||
haveit=
|
||||
for x in $ltrpathdirs; do
|
||||
if test "X$x" = "X$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
ltrpathdirs="$ltrpathdirs $found_dir"
|
||||
fi
|
||||
dnl The hardcoding into $LIBNAME is system dependent.
|
||||
if test "$acl_hardcode_direct" = yes; then
|
||||
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
dnl resulting binary.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
|
||||
dnl Use an explicit option to hardcode DIR into the resulting
|
||||
dnl binary.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
dnl Potentially add DIR to rpathdirs.
|
||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||
haveit=
|
||||
for x in $rpathdirs; do
|
||||
if test "X$x" = "X$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
rpathdirs="$rpathdirs $found_dir"
|
||||
fi
|
||||
else
|
||||
dnl Rely on "-L$found_dir".
|
||||
dnl But don't add it if it's already contained in the LDFLAGS
|
||||
dnl or the already constructed $LIBNAME
|
||||
haveit=
|
||||
for x in $LDFLAGS $LIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
|
||||
fi
|
||||
if test "$acl_hardcode_minus_L" != no; then
|
||||
dnl FIXME: Not sure whether we should use
|
||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||
dnl here.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
|
||||
dnl here, because this doesn't fit in flags passed to the
|
||||
dnl compiler. So give up. No hardcoding. This affects only
|
||||
dnl very old systems.
|
||||
dnl FIXME: Not sure whether we should use
|
||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||
dnl here.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "X$found_a" != "X"; then
|
||||
dnl Linking with a static library.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
|
||||
else
|
||||
dnl We shouldn't come here, but anyway it's good to have a
|
||||
dnl fallback.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
|
||||
fi
|
||||
fi
|
||||
dnl Assume the include files are nearby.
|
||||
additional_includedir=
|
||||
case "$found_dir" in
|
||||
*/$acl_libdirstem | */$acl_libdirstem/)
|
||||
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
|
||||
if test "$name" = '$1'; then
|
||||
LIB[]NAME[]_PREFIX="$basedir"
|
||||
fi
|
||||
additional_includedir="$basedir/include"
|
||||
;;
|
||||
*/$acl_libdirstem2 | */$acl_libdirstem2/)
|
||||
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
|
||||
if test "$name" = '$1'; then
|
||||
LIB[]NAME[]_PREFIX="$basedir"
|
||||
fi
|
||||
additional_includedir="$basedir/include"
|
||||
;;
|
||||
esac
|
||||
if test "X$additional_includedir" != "X"; then
|
||||
dnl Potentially add $additional_includedir to $INCNAME.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/include,
|
||||
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
|
||||
dnl 3. if it's already present in $CPPFLAGS or the already
|
||||
dnl constructed $INCNAME,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_includedir" != "X/usr/include"; then
|
||||
haveit=
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
for x in $CPPFLAGS $INC[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-I$additional_includedir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_includedir"; then
|
||||
dnl Really add $additional_includedir to $INCNAME.
|
||||
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Look for dependencies.
|
||||
if test -n "$found_la"; then
|
||||
dnl Read the .la file. It defines the variables
|
||||
dnl dlname, library_names, old_library, dependency_libs, current,
|
||||
dnl age, revision, installed, dlopen, dlpreopen, libdir.
|
||||
save_libdir="$libdir"
|
||||
case "$found_la" in
|
||||
*/* | *\\*) . "$found_la" ;;
|
||||
*) . "./$found_la" ;;
|
||||
esac
|
||||
libdir="$save_libdir"
|
||||
dnl We use only dependency_libs.
|
||||
for dep in $dependency_libs; do
|
||||
case "$dep" in
|
||||
-L*)
|
||||
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
|
||||
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/lib,
|
||||
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
|
||||
dnl 3. if it's already present in $LDFLAGS or the already
|
||||
dnl constructed $LIBNAME,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
|
||||
&& test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
|
||||
haveit=
|
||||
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
|
||||
|| test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
haveit=
|
||||
for x in $LDFLAGS $LIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LIBNAME.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
haveit=
|
||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LTLIBNAME.
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-R*)
|
||||
dir=`echo "X$dep" | sed -e 's/^X-R//'`
|
||||
if test "$enable_rpath" != no; then
|
||||
dnl Potentially add DIR to rpathdirs.
|
||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||
haveit=
|
||||
for x in $rpathdirs; do
|
||||
if test "X$x" = "X$dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
rpathdirs="$rpathdirs $dir"
|
||||
fi
|
||||
dnl Potentially add DIR to ltrpathdirs.
|
||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||
haveit=
|
||||
for x in $ltrpathdirs; do
|
||||
if test "X$x" = "X$dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
ltrpathdirs="$ltrpathdirs $dir"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-l*)
|
||||
dnl Handle this in the next round.
|
||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
|
||||
;;
|
||||
*.la)
|
||||
dnl Handle this in the next round. Throw away the .la's
|
||||
dnl directory; it is already contained in a preceding -L
|
||||
dnl option.
|
||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
|
||||
;;
|
||||
*)
|
||||
dnl Most likely an immediate library name.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
else
|
||||
dnl Didn't find the library; assume it is in the system directories
|
||||
dnl known to the linker and runtime loader. (All the system
|
||||
dnl directories known to the linker should also be known to the
|
||||
dnl runtime loader, otherwise the system is severely misconfigured.)
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
if test "X$rpathdirs" != "X"; then
|
||||
if test -n "$acl_hardcode_libdir_separator"; then
|
||||
dnl Weird platform: only the last -rpath option counts, the user must
|
||||
dnl pass all path elements in one option. We can arrange that for a
|
||||
dnl single library, but not when more than one $LIBNAMEs are used.
|
||||
alldirs=
|
||||
for found_dir in $rpathdirs; do
|
||||
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
|
||||
done
|
||||
dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$alldirs"
|
||||
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||
else
|
||||
dnl The -rpath options are cumulative.
|
||||
for found_dir in $rpathdirs; do
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$found_dir"
|
||||
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
if test "X$ltrpathdirs" != "X"; then
|
||||
dnl When using libtool, the option that works for both libraries and
|
||||
dnl executables is -R. The -R options are cumulative.
|
||||
for found_dir in $ltrpathdirs; do
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
|
||||
done
|
||||
fi
|
||||
popdef([PACKLIBS])
|
||||
popdef([PACKUP])
|
||||
popdef([PACK])
|
||||
popdef([NAME])
|
||||
])
|
||||
|
||||
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
|
||||
dnl unless already present in VAR.
|
||||
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
|
||||
dnl contains two or three consecutive elements that belong together.
|
||||
AC_DEFUN([AC_LIB_APPENDTOVAR],
|
||||
[
|
||||
for element in [$2]; do
|
||||
haveit=
|
||||
for x in $[$1]; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X$element"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
[$1]="${[$1]}${[$1]:+ }$element"
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
dnl For those cases where a variable contains several -L and -l options
|
||||
dnl referring to unknown libraries and directories, this macro determines the
|
||||
dnl necessary additional linker options for the runtime path.
|
||||
dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
|
||||
dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
|
||||
dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
|
||||
dnl otherwise linking without libtool is assumed.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
|
||||
$1=
|
||||
if test "$enable_rpath" != no; then
|
||||
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
|
||||
dnl Use an explicit option to hardcode directories into the resulting
|
||||
dnl binary.
|
||||
rpathdirs=
|
||||
next=
|
||||
for opt in $2; do
|
||||
if test -n "$next"; then
|
||||
dir="$next"
|
||||
dnl No need to hardcode the standard /usr/lib.
|
||||
if test "X$dir" != "X/usr/$acl_libdirstem" \
|
||||
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
|
||||
rpathdirs="$rpathdirs $dir"
|
||||
fi
|
||||
next=
|
||||
else
|
||||
case $opt in
|
||||
-L) next=yes ;;
|
||||
-L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
|
||||
dnl No need to hardcode the standard /usr/lib.
|
||||
if test "X$dir" != "X/usr/$acl_libdirstem" \
|
||||
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
|
||||
rpathdirs="$rpathdirs $dir"
|
||||
fi
|
||||
next= ;;
|
||||
*) next= ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
if test "X$rpathdirs" != "X"; then
|
||||
if test -n ""$3""; then
|
||||
dnl libtool is used for linking. Use -R options.
|
||||
for dir in $rpathdirs; do
|
||||
$1="${$1}${$1:+ }-R$dir"
|
||||
done
|
||||
else
|
||||
dnl The linker is used for linking directly.
|
||||
if test -n "$acl_hardcode_libdir_separator"; then
|
||||
dnl Weird platform: only the last -rpath option counts, the user
|
||||
dnl must pass all path elements in one option.
|
||||
alldirs=
|
||||
for dir in $rpathdirs; do
|
||||
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
|
||||
done
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$alldirs"
|
||||
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
$1="$flag"
|
||||
else
|
||||
dnl The -rpath options are cumulative.
|
||||
for dir in $rpathdirs; do
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$dir"
|
||||
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
$1="${$1}${$1:+ }$flag"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([$1])
|
||||
])
|
||||
249
m4/lib-prefix.m4
249
m4/lib-prefix.m4
|
|
@ -1,249 +0,0 @@
|
|||
# lib-prefix.m4 serial 14
|
||||
dnl Copyright (C) 2001-2005, 2008-2019 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
|
||||
dnl to access previously installed libraries. The basic assumption is that
|
||||
dnl a user will want packages to use other packages he previously installed
|
||||
dnl with the same --prefix option.
|
||||
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
|
||||
dnl libraries, but is otherwise very convenient.
|
||||
AC_DEFUN([AC_LIB_PREFIX],
|
||||
[
|
||||
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
dnl By default, look in $includedir and $libdir.
|
||||
use_additional=yes
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
AC_ARG_WITH([lib-prefix],
|
||||
[[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
|
||||
--without-lib-prefix don't search for libraries in includedir and libdir]],
|
||||
[
|
||||
if test "X$withval" = "Xno"; then
|
||||
use_additional=no
|
||||
else
|
||||
if test "X$withval" = "X"; then
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
else
|
||||
additional_includedir="$withval/include"
|
||||
additional_libdir="$withval/$acl_libdirstem"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
if test $use_additional = yes; then
|
||||
dnl Potentially add $additional_includedir to $CPPFLAGS.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/include,
|
||||
dnl 2. if it's already present in $CPPFLAGS,
|
||||
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_includedir" != "X/usr/include"; then
|
||||
haveit=
|
||||
for x in $CPPFLAGS; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-I$additional_includedir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_includedir"; then
|
||||
dnl Really add $additional_includedir to $CPPFLAGS.
|
||||
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Potentially add $additional_libdir to $LDFLAGS.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/lib,
|
||||
dnl 2. if it's already present in $LDFLAGS,
|
||||
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
|
||||
haveit=
|
||||
for x in $LDFLAGS; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux*) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LDFLAGS.
|
||||
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
|
||||
dnl acl_final_exec_prefix, containing the values to which $prefix and
|
||||
dnl $exec_prefix will expand at the end of the configure script.
|
||||
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
|
||||
[
|
||||
dnl Unfortunately, prefix and exec_prefix get only finally determined
|
||||
dnl at the end of configure.
|
||||
if test "X$prefix" = "XNONE"; then
|
||||
acl_final_prefix="$ac_default_prefix"
|
||||
else
|
||||
acl_final_prefix="$prefix"
|
||||
fi
|
||||
if test "X$exec_prefix" = "XNONE"; then
|
||||
acl_final_exec_prefix='${prefix}'
|
||||
else
|
||||
acl_final_exec_prefix="$exec_prefix"
|
||||
fi
|
||||
acl_save_prefix="$prefix"
|
||||
prefix="$acl_final_prefix"
|
||||
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
|
||||
prefix="$acl_save_prefix"
|
||||
])
|
||||
|
||||
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
|
||||
dnl variables prefix and exec_prefix bound to the values they will have
|
||||
dnl at the end of the configure script.
|
||||
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
|
||||
[
|
||||
acl_save_prefix="$prefix"
|
||||
prefix="$acl_final_prefix"
|
||||
acl_save_exec_prefix="$exec_prefix"
|
||||
exec_prefix="$acl_final_exec_prefix"
|
||||
$1
|
||||
exec_prefix="$acl_save_exec_prefix"
|
||||
prefix="$acl_save_prefix"
|
||||
])
|
||||
|
||||
dnl AC_LIB_PREPARE_MULTILIB creates
|
||||
dnl - a variable acl_libdirstem, containing the basename of the libdir, either
|
||||
dnl "lib" or "lib64" or "lib/64",
|
||||
dnl - a variable acl_libdirstem2, as a secondary possible value for
|
||||
dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
|
||||
dnl "lib/amd64".
|
||||
AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
|
||||
[
|
||||
dnl There is no formal standard regarding lib and lib64.
|
||||
dnl On glibc systems, the current practice is that on a system supporting
|
||||
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
|
||||
dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
|
||||
dnl the compiler's default mode by looking at the compiler's library search
|
||||
dnl path. If at least one of its elements ends in /lib64 or points to a
|
||||
dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
|
||||
dnl Otherwise we use the default, namely "lib".
|
||||
dnl On Solaris systems, the current practice is that on a system supporting
|
||||
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
|
||||
dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
|
||||
dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT])
|
||||
|
||||
case "$host_os" in
|
||||
solaris*)
|
||||
AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#ifdef _LP64
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_solaris_64bit=yes],
|
||||
[gl_cv_solaris_64bit=no])
|
||||
]);;
|
||||
esac
|
||||
|
||||
dnl Allow the user to override the result by setting acl_cv_libdirstems.
|
||||
AC_CACHE_CHECK([for the common suffixes of directories in the library search path],
|
||||
[acl_cv_libdirstems],
|
||||
[acl_libdirstem=lib
|
||||
acl_libdirstem2=
|
||||
case "$host_os" in
|
||||
solaris*)
|
||||
dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
|
||||
dnl <https://docs.oracle.com/cd/E19253-01/816-5138/dev-env/index.html>.
|
||||
dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
|
||||
dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
|
||||
dnl symlink is missing, so we set acl_libdirstem2 too.
|
||||
if test $gl_cv_solaris_64bit = yes; then
|
||||
acl_libdirstem=lib/64
|
||||
case "$host_cpu" in
|
||||
sparc*) acl_libdirstem2=lib/sparcv9 ;;
|
||||
i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
dnl If $CC generates code for a 32-bit ABI, the libraries are
|
||||
dnl surely under $prefix/lib, not $prefix/lib64.
|
||||
if test "$HOST_CPU_C_ABI_32BIT" != yes; then
|
||||
dnl The result is a property of the system. However, non-system
|
||||
dnl compilers sometimes have odd library search paths. Therefore
|
||||
dnl prefer asking /usr/bin/gcc, if available, rather than $CC.
|
||||
searchpath=`(if test -f /usr/bin/gcc \
|
||||
&& LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
|
||||
LC_ALL=C /usr/bin/gcc -print-search-dirs; \
|
||||
else \
|
||||
LC_ALL=C $CC -print-search-dirs; \
|
||||
fi) 2>/dev/null \
|
||||
| sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
|
||||
if test -n "$searchpath"; then
|
||||
acl_save_IFS="${IFS= }"; IFS=":"
|
||||
for searchdir in $searchpath; do
|
||||
if test -d "$searchdir"; then
|
||||
case "$searchdir" in
|
||||
*/lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
|
||||
*/../ | */.. )
|
||||
# Better ignore directories of this form. They are misleading.
|
||||
;;
|
||||
*) searchdir=`cd "$searchdir" && pwd`
|
||||
case "$searchdir" in
|
||||
*/lib64 ) acl_libdirstem=lib64 ;;
|
||||
esac ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
IFS="$acl_save_IFS"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
|
||||
acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2"
|
||||
])
|
||||
# Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2.
|
||||
acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
|
||||
acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'`
|
||||
])
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
dnl Check whether limits.h has needed features.
|
||||
|
||||
dnl Copyright 2016-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright 2016-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# localcharset.m4 serial 8
|
||||
dnl Copyright (C) 2002, 2004, 2006, 2009-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2002, 2004, 2006, 2009-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# locale-fr.m4 serial 19
|
||||
dnl Copyright (C) 2003, 2005-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2003, 2005-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# locale-ja.m4 serial 14
|
||||
dnl Copyright (C) 2003, 2005-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2003, 2005-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# locale-zh.m4 serial 14
|
||||
dnl Copyright (C) 2003, 2005-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2003, 2005-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
158
m4/locale_h.m4
Normal file
158
m4/locale_h.m4
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
# locale_h.m4 serial 24
|
||||
dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
AC_DEFUN([gl_LOCALE_H],
|
||||
[
|
||||
dnl Use AC_REQUIRE here, so that the default behavior below is expanded
|
||||
dnl once only, before all statements that occur in other macros.
|
||||
AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
|
||||
|
||||
dnl Persuade glibc <locale.h> to define locale_t and the int_p_*, int_n_*
|
||||
dnl members of 'struct lconv'.
|
||||
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
|
||||
|
||||
dnl If <stddef.h> is replaced, then <locale.h> must also be replaced.
|
||||
AC_REQUIRE([gl_STDDEF_H])
|
||||
|
||||
AC_REQUIRE([gl_LOCALE_T])
|
||||
|
||||
dnl Solaris 11.0 defines the int_p_*, int_n_* members of 'struct lconv'
|
||||
dnl only if _LCONV_C99 is defined.
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
case "$host_os" in
|
||||
solaris*)
|
||||
AC_DEFINE([_LCONV_C99], [1], [Define to 1 on Solaris.])
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_CACHE_CHECK([whether locale.h conforms to POSIX:2001],
|
||||
[gl_cv_header_locale_h_posix2001],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <locale.h>
|
||||
int x = LC_MESSAGES;
|
||||
int y = sizeof (((struct lconv *) 0)->decimal_point);]],
|
||||
[[]])],
|
||||
[gl_cv_header_locale_h_posix2001=yes],
|
||||
[gl_cv_header_locale_h_posix2001=no])])
|
||||
|
||||
dnl Check whether 'struct lconv' is complete.
|
||||
dnl Bionic libc's 'struct lconv' is just a dummy.
|
||||
dnl On OpenBSD 4.9, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.x,
|
||||
dnl mingw, MSVC 9, it lacks the int_p_* and int_n_* members.
|
||||
AC_CACHE_CHECK([whether struct lconv is properly defined],
|
||||
[gl_cv_sys_struct_lconv_ok],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <locale.h>
|
||||
struct lconv l;
|
||||
int x = sizeof (l.decimal_point);
|
||||
int y = sizeof (l.int_p_cs_precedes);]],
|
||||
[[]])],
|
||||
[gl_cv_sys_struct_lconv_ok=yes],
|
||||
[gl_cv_sys_struct_lconv_ok=no])
|
||||
])
|
||||
if test $gl_cv_sys_struct_lconv_ok = no; then
|
||||
dnl On native Windows with MSVC, merely define these member names as macros.
|
||||
dnl This avoids trouble in C++ mode.
|
||||
case "$host_os" in
|
||||
mingw*)
|
||||
AC_EGREP_CPP([Special], [
|
||||
#ifdef _MSC_VER
|
||||
Special
|
||||
#endif
|
||||
],
|
||||
[],
|
||||
[REPLACE_STRUCT_LCONV=1])
|
||||
;;
|
||||
*) REPLACE_STRUCT_LCONV=1 ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
dnl <locale.h> is always overridden, because of GNULIB_POSIXCHECK.
|
||||
gl_NEXT_HEADERS([locale.h])
|
||||
|
||||
dnl Check for declarations of anything we want to poison if the
|
||||
dnl corresponding gnulib module is not in use.
|
||||
gl_WARN_ON_USE_PREPARE([[#include <locale.h>
|
||||
/* Some systems provide declarations in a non-standard header. */
|
||||
#if HAVE_XLOCALE_H
|
||||
# include <xlocale.h>
|
||||
#endif
|
||||
]],
|
||||
[setlocale newlocale duplocale freelocale])
|
||||
])
|
||||
|
||||
dnl Checks to determine whether the system has the locale_t type,
|
||||
dnl and how to obtain it.
|
||||
AC_DEFUN([gl_LOCALE_T],
|
||||
[
|
||||
dnl Persuade glibc and Solaris <locale.h> to define locale_t.
|
||||
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
|
||||
|
||||
dnl Check whether use of locale_t requires inclusion of <xlocale.h>,
|
||||
dnl e.g. on Mac OS X 10.5. If <locale.h> does not define locale_t by
|
||||
dnl itself, we assume that <xlocale.h> will do so.
|
||||
AC_CACHE_CHECK([whether locale.h defines locale_t],
|
||||
[gl_cv_header_locale_has_locale_t],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <locale.h>
|
||||
locale_t x;]],
|
||||
[[]])],
|
||||
[gl_cv_header_locale_has_locale_t=yes],
|
||||
[gl_cv_header_locale_has_locale_t=no])
|
||||
])
|
||||
|
||||
dnl Check for <xlocale.h>.
|
||||
AC_CHECK_HEADERS_ONCE([xlocale.h])
|
||||
if test $ac_cv_header_xlocale_h = yes; then
|
||||
HAVE_XLOCALE_H=1
|
||||
if test $gl_cv_header_locale_has_locale_t = yes; then
|
||||
gl_cv_header_locale_h_needs_xlocale_h=no
|
||||
else
|
||||
gl_cv_header_locale_h_needs_xlocale_h=yes
|
||||
fi
|
||||
HAVE_LOCALE_T=1
|
||||
else
|
||||
HAVE_XLOCALE_H=0
|
||||
gl_cv_header_locale_h_needs_xlocale_h=no
|
||||
if test $gl_cv_header_locale_has_locale_t = yes; then
|
||||
HAVE_LOCALE_T=1
|
||||
else
|
||||
HAVE_LOCALE_T=0
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([HAVE_XLOCALE_H])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_LOCALE_MODULE_INDICATOR],
|
||||
[
|
||||
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
|
||||
AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
|
||||
gl_MODULE_INDICATOR_SET_VARIABLE([$1])
|
||||
dnl Define it also as a C macro, for the benefit of the unit tests.
|
||||
gl_MODULE_INDICATOR_FOR_TESTS([$1])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_LOCALE_H_DEFAULTS],
|
||||
[
|
||||
GNULIB_LOCALECONV=0; AC_SUBST([GNULIB_LOCALECONV])
|
||||
GNULIB_SETLOCALE=0; AC_SUBST([GNULIB_SETLOCALE])
|
||||
GNULIB_SETLOCALE_NULL=0; AC_SUBST([GNULIB_SETLOCALE_NULL])
|
||||
GNULIB_DUPLOCALE=0; AC_SUBST([GNULIB_DUPLOCALE])
|
||||
GNULIB_LOCALENAME=0; AC_SUBST([GNULIB_LOCALENAME])
|
||||
dnl Assume proper GNU behavior unless another module says otherwise.
|
||||
HAVE_NEWLOCALE=1; AC_SUBST([HAVE_NEWLOCALE])
|
||||
HAVE_DUPLOCALE=1; AC_SUBST([HAVE_DUPLOCALE])
|
||||
HAVE_FREELOCALE=1; AC_SUBST([HAVE_FREELOCALE])
|
||||
REPLACE_LOCALECONV=0; AC_SUBST([REPLACE_LOCALECONV])
|
||||
REPLACE_SETLOCALE=0; AC_SUBST([REPLACE_SETLOCALE])
|
||||
REPLACE_NEWLOCALE=0; AC_SUBST([REPLACE_NEWLOCALE])
|
||||
REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE])
|
||||
REPLACE_FREELOCALE=0; AC_SUBST([REPLACE_FREELOCALE])
|
||||
REPLACE_STRUCT_LCONV=0; AC_SUBST([REPLACE_STRUCT_LCONV])
|
||||
])
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
# localtime-buffer.m4 serial 1
|
||||
dnl Copyright (C) 2017-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2017-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
47
m4/lock.m4
47
m4/lock.m4
|
|
@ -1,47 +0,0 @@
|
|||
# lock.m4 serial 14
|
||||
dnl Copyright (C) 2005-2019 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_DEFUN([gl_LOCK],
|
||||
[
|
||||
AC_REQUIRE([gl_THREADLIB])
|
||||
if test "$gl_threads_api" = posix; then
|
||||
# OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
|
||||
# pthread_rwlock_* functions.
|
||||
has_rwlock=false
|
||||
AC_CHECK_TYPE([pthread_rwlock_t],
|
||||
[has_rwlock=true
|
||||
AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1],
|
||||
[Define if the POSIX multithreading library has read/write locks.])],
|
||||
[],
|
||||
[#include <pthread.h>])
|
||||
if $has_rwlock; then
|
||||
gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER
|
||||
fi
|
||||
# glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM(
|
||||
[[#include <pthread.h>]],
|
||||
[[
|
||||
#if __FreeBSD__ == 4
|
||||
error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
|
||||
#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
|
||||
&& __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
|
||||
error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
|
||||
#else
|
||||
int x = (int)PTHREAD_MUTEX_RECURSIVE;
|
||||
return !x;
|
||||
#endif
|
||||
]])],
|
||||
[AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1],
|
||||
[Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
|
||||
fi
|
||||
gl_PREREQ_LOCK
|
||||
])
|
||||
|
||||
# Prerequisites of lib/glthread/lock.c.
|
||||
AC_DEFUN([gl_PREREQ_LOCK], [:])
|
||||
113
m4/longlong.m4
113
m4/longlong.m4
|
|
@ -1,113 +0,0 @@
|
|||
# longlong.m4 serial 18
|
||||
dnl Copyright (C) 1999-2007, 2009-2019 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Paul Eggert.
|
||||
|
||||
AC_PREREQ([2.62])
|
||||
|
||||
# Define HAVE_LONG_LONG_INT if 'long long int' works.
|
||||
# This can be faster than what's in Autoconf 2.62 through 2.68.
|
||||
|
||||
# Note: If the type 'long long int' exists but is only 32 bits large
|
||||
# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
|
||||
# defined. In this case you can treat 'long long int' like 'long int'.
|
||||
|
||||
AC_DEFUN([AC_TYPE_LONG_LONG_INT],
|
||||
[
|
||||
AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
|
||||
AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
|
||||
[ac_cv_type_long_long_int=yes
|
||||
if test "x${ac_cv_prog_cc_c99-no}" = xno; then
|
||||
ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
|
||||
if test $ac_cv_type_long_long_int = yes; then
|
||||
dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
|
||||
dnl If cross compiling, assume the bug is not important, since
|
||||
dnl nobody cross compiles for this platform as far as we know.
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[@%:@include <limits.h>
|
||||
@%:@ifndef LLONG_MAX
|
||||
@%:@ define HALF \
|
||||
(1LL << (sizeof (long long int) * CHAR_BIT - 2))
|
||||
@%:@ define LLONG_MAX (HALF - 1 + HALF)
|
||||
@%:@endif]],
|
||||
[[long long int n = 1;
|
||||
int i;
|
||||
for (i = 0; ; i++)
|
||||
{
|
||||
long long int m = n << i;
|
||||
if (m >> i != n)
|
||||
return 1;
|
||||
if (LLONG_MAX / 2 < m)
|
||||
break;
|
||||
}
|
||||
return 0;]])],
|
||||
[],
|
||||
[ac_cv_type_long_long_int=no],
|
||||
[:])
|
||||
fi
|
||||
fi])
|
||||
if test $ac_cv_type_long_long_int = yes; then
|
||||
AC_DEFINE([HAVE_LONG_LONG_INT], [1],
|
||||
[Define to 1 if the system has the type 'long long int'.])
|
||||
fi
|
||||
])
|
||||
|
||||
# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
|
||||
# This can be faster than what's in Autoconf 2.62 through 2.68.
|
||||
|
||||
# Note: If the type 'unsigned long long int' exists but is only 32 bits
|
||||
# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
|
||||
# will not be defined. In this case you can treat 'unsigned long long int'
|
||||
# like 'unsigned long int'.
|
||||
|
||||
AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
|
||||
[
|
||||
AC_CACHE_CHECK([for unsigned long long int],
|
||||
[ac_cv_type_unsigned_long_long_int],
|
||||
[ac_cv_type_unsigned_long_long_int=yes
|
||||
if test "x${ac_cv_prog_cc_c99-no}" = xno; then
|
||||
AC_LINK_IFELSE(
|
||||
[_AC_TYPE_LONG_LONG_SNIPPET],
|
||||
[],
|
||||
[ac_cv_type_unsigned_long_long_int=no])
|
||||
fi])
|
||||
if test $ac_cv_type_unsigned_long_long_int = yes; then
|
||||
AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
|
||||
[Define to 1 if the system has the type 'unsigned long long int'.])
|
||||
fi
|
||||
])
|
||||
|
||||
# Expands to a C program that can be used to test for simultaneous support
|
||||
# of 'long long' and 'unsigned long long'. We don't want to say that
|
||||
# 'long long' is available if 'unsigned long long' is not, or vice versa,
|
||||
# because too many programs rely on the symmetry between signed and unsigned
|
||||
# integer types (excluding 'bool').
|
||||
AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
|
||||
[
|
||||
AC_LANG_PROGRAM(
|
||||
[[/* For now, do not test the preprocessor; as of 2007 there are too many
|
||||
implementations with broken preprocessors. Perhaps this can
|
||||
be revisited in 2012. In the meantime, code should not expect
|
||||
#if to work with literals wider than 32 bits. */
|
||||
/* Test literals. */
|
||||
long long int ll = 9223372036854775807ll;
|
||||
long long int nll = -9223372036854775807LL;
|
||||
unsigned long long int ull = 18446744073709551615ULL;
|
||||
/* Test constant expressions. */
|
||||
typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
|
||||
? 1 : -1)];
|
||||
typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
|
||||
? 1 : -1)];
|
||||
int i = 63;]],
|
||||
[[/* Test availability of runtime routines for shift and division. */
|
||||
long long int llmax = 9223372036854775807ll;
|
||||
unsigned long long int ullmax = 18446744073709551615ull;
|
||||
return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
|
||||
| (llmax / ll) | (llmax % ll)
|
||||
| (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
|
||||
| (ullmax / ull) | (ullmax % ull));]])
|
||||
])
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# serial 32
|
||||
# serial 33
|
||||
|
||||
# Copyright (C) 1997-2001, 2003-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1997-2001, 2003-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
|
@ -63,8 +63,8 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
|
|||
# Guess no on native Windows.
|
||||
gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
|
||||
*)
|
||||
# If we don't know, assume the worst.
|
||||
gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
|
||||
esac
|
||||
])
|
||||
rm -f conftest.sym conftest.file
|
||||
|
|
|
|||
12
m4/malloc.m4
12
m4/malloc.m4
|
|
@ -1,11 +1,9 @@
|
|||
# malloc.m4 serial 19
|
||||
dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
|
||||
# malloc.m4 serial 20
|
||||
dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
m4_version_prereq([2.70], [] ,[
|
||||
|
||||
# This is adapted with modifications from upstream Autoconf here:
|
||||
# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
|
||||
AC_DEFUN([_AC_FUNC_MALLOC_IF],
|
||||
|
|
@ -35,8 +33,8 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
|
|||
*-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \
|
||||
| hpux* | solaris* | cygwin* | mingw*)
|
||||
ac_cv_func_malloc_0_nonnull="guessing yes" ;;
|
||||
# If we don't know, assume the worst.
|
||||
*) ac_cv_func_malloc_0_nonnull="guessing no" ;;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
|
||||
esac
|
||||
])
|
||||
])
|
||||
|
|
@ -50,8 +48,6 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
|
|||
esac
|
||||
])# _AC_FUNC_MALLOC_IF
|
||||
|
||||
])
|
||||
|
||||
# gl_FUNC_MALLOC_GNU
|
||||
# ------------------
|
||||
# Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# malloca.m4 serial 1
|
||||
dnl Copyright (C) 2003-2004, 2006-2007, 2009-2019 Free Software Foundation,
|
||||
# malloca.m4 serial 2
|
||||
dnl Copyright (C) 2003-2004, 2006-2007, 2009-2020 Free Software Foundation,
|
||||
dnl Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
|
@ -11,5 +11,4 @@ AC_DEFUN([gl_MALLOCA],
|
|||
dnl @ALLOCA@ and @LTALLOCA@.
|
||||
dnl gl_FUNC_ALLOCA dnl Already brought in by the module dependencies.
|
||||
AC_REQUIRE([gl_EEMALLOC])
|
||||
AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
|
||||
])
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# math_h.m4 serial 119
|
||||
dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
219
m4/mbrtowc.m4
219
m4/mbrtowc.m4
|
|
@ -1,5 +1,5 @@
|
|||
# mbrtowc.m4 serial 31 -*- coding: utf-8 -*-
|
||||
dnl Copyright (C) 2001-2002, 2004-2005, 2008-2019 Free Software Foundation,
|
||||
# mbrtowc.m4 serial 37 -*- coding: utf-8 -*-
|
||||
dnl Copyright (C) 2001-2002, 2004-2005, 2008-2020 Free Software Foundation,
|
||||
dnl Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
|
@ -8,6 +8,8 @@ dnl with or without modifications, as long as this notice is preserved.
|
|||
AC_DEFUN([gl_FUNC_MBRTOWC],
|
||||
[
|
||||
AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
|
||||
AC_REQUIRE([gl_PTHREADLIB])
|
||||
AC_CHECK_HEADERS_ONCE([threads.h])
|
||||
|
||||
AC_REQUIRE([AC_TYPE_MBSTATE_T])
|
||||
gl_MBSTATE_T_BROKEN
|
||||
|
|
@ -39,6 +41,7 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
|
|||
gl_MBRTOWC_NULL_ARG2
|
||||
gl_MBRTOWC_RETVAL
|
||||
gl_MBRTOWC_NUL_RETVAL
|
||||
gl_MBRTOWC_STORES_INCOMPLETE
|
||||
gl_MBRTOWC_EMPTY_INPUT
|
||||
gl_MBRTOWC_C_LOCALE
|
||||
case "$gl_cv_func_mbrtowc_null_arg1" in
|
||||
|
|
@ -69,6 +72,13 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
|
|||
REPLACE_MBRTOWC=1
|
||||
;;
|
||||
esac
|
||||
case "$gl_cv_func_mbrtowc_stores_incomplete" in
|
||||
*no) ;;
|
||||
*) AC_DEFINE([MBRTOWC_STORES_INCOMPLETE_BUG], [1],
|
||||
[Define if the mbrtowc function stores a wide character when reporting incomplete input.])
|
||||
REPLACE_MBRTOWC=1
|
||||
;;
|
||||
esac
|
||||
case "$gl_cv_func_mbrtowc_empty_input" in
|
||||
*yes) ;;
|
||||
*) AC_DEFINE([MBRTOWC_EMPTY_INPUT_BUG], [1],
|
||||
|
|
@ -77,15 +87,32 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
|
|||
REPLACE_MBRTOWC=1
|
||||
;;
|
||||
esac
|
||||
case $gl_cv_C_locale_sans_EILSEQ in
|
||||
case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
|
||||
*yes) ;;
|
||||
*) AC_DEFINE([C_LOCALE_MAYBE_EILSEQ], [1],
|
||||
[Define to 1 if the C locale may have encoding errors.])
|
||||
*) AC_DEFINE([MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ], [1],
|
||||
[Define if the mbrtowc function may signal encoding errors in the C locale.])
|
||||
REPLACE_MBRTOWC=1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test $REPLACE_MBSTATE_T = 1; then
|
||||
case "$host_os" in
|
||||
mingw*) LIB_MBRTOWC= ;;
|
||||
*)
|
||||
gl_WEAK_SYMBOLS
|
||||
case "$gl_cv_have_weak" in
|
||||
*yes) LIB_MBRTOWC= ;;
|
||||
*) LIB_MBRTOWC="$LIBPTHREAD" ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
else
|
||||
LIB_MBRTOWC=
|
||||
fi
|
||||
dnl LIB_MBRTOWC is expected to be '-pthread' or '-lpthread' on AIX
|
||||
dnl with gcc or xlc, and empty otherwise.
|
||||
AC_SUBST([LIB_MBRTOWC])
|
||||
])
|
||||
|
||||
dnl Test whether mbsinit() and mbrtowc() need to be overridden in a way that
|
||||
|
|
@ -97,11 +124,19 @@ dnl avoid inconsistencies.
|
|||
AC_DEFUN([gl_MBSTATE_T_BROKEN],
|
||||
[
|
||||
AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
|
||||
AC_REQUIRE([AC_TYPE_MBSTATE_T])
|
||||
AC_CHECK_FUNCS_ONCE([mbsinit])
|
||||
AC_CHECK_FUNCS_ONCE([mbrtowc])
|
||||
if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
|
||||
dnl On native Windows, we know exactly how mbsinit() behaves and don't need
|
||||
dnl to override it, even if - like on MSVC - mbsinit() is only defined as
|
||||
dnl an inline function, not as a global function.
|
||||
if case "$host_os" in
|
||||
mingw*) true ;;
|
||||
*) test $ac_cv_func_mbsinit = yes ;;
|
||||
esac \
|
||||
&& test $ac_cv_func_mbrtowc = yes; then
|
||||
gl_MBRTOWC_INCOMPLETE_STATE
|
||||
gl_MBRTOWC_SANITYCHECK
|
||||
REPLACE_MBSTATE_T=0
|
||||
|
|
@ -126,6 +161,7 @@ AC_DEFUN([gl_MBRTOWC_INCOMPLETE_STATE],
|
|||
[
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([gt_LOCALE_JA])
|
||||
AC_REQUIRE([gt_LOCALE_FR_UTF8])
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
|
||||
AC_CACHE_CHECK([whether mbrtowc handles incomplete characters],
|
||||
[gl_cv_func_mbrtowc_incomplete_state],
|
||||
|
|
@ -171,6 +207,39 @@ int main ()
|
|||
[gl_cv_func_mbrtowc_incomplete_state=yes],
|
||||
[gl_cv_func_mbrtowc_incomplete_state=no],
|
||||
[:])
|
||||
else
|
||||
if test $LOCALE_FR_UTF8 != none; then
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_SOURCE([[
|
||||
#include <locale.h>
|
||||
#include <string.h>
|
||||
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
|
||||
<wchar.h>.
|
||||
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
|
||||
included before <wchar.h>. */
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <wchar.h>
|
||||
int main ()
|
||||
{
|
||||
if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
|
||||
{
|
||||
const char input[] = "B\303\274\303\237er"; /* "Büßer" */
|
||||
mbstate_t state;
|
||||
wchar_t wc;
|
||||
|
||||
memset (&state, '\0', sizeof (mbstate_t));
|
||||
if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
|
||||
if (mbsinit (&state))
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
}]])],
|
||||
[gl_cv_func_mbrtowc_incomplete_state=yes],
|
||||
[gl_cv_func_mbrtowc_incomplete_state=no],
|
||||
[:])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
|
@ -550,6 +619,126 @@ int main ()
|
|||
])
|
||||
])
|
||||
|
||||
dnl Test whether mbrtowc stores a wide character when reporting incomplete
|
||||
dnl input.
|
||||
|
||||
AC_DEFUN([gl_MBRTOWC_STORES_INCOMPLETE],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
|
||||
AC_CACHE_CHECK([whether mbrtowc stores incomplete characters],
|
||||
[gl_cv_func_mbrtowc_stores_incomplete],
|
||||
[
|
||||
dnl Initial guess, used when cross-compiling or when no suitable locale
|
||||
dnl is present.
|
||||
changequote(,)dnl
|
||||
case "$host_os" in
|
||||
# Guess yes on native Windows.
|
||||
mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
|
||||
*) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
|
||||
esac
|
||||
changequote([,])dnl
|
||||
case "$host_os" in
|
||||
mingw*)
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_SOURCE([[
|
||||
#include <locale.h>
|
||||
#include <string.h>
|
||||
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
|
||||
<wchar.h>.
|
||||
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
|
||||
included before <wchar.h>. */
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <wchar.h>
|
||||
int main ()
|
||||
{
|
||||
int result = 0;
|
||||
if (setlocale (LC_ALL, "French_France.65001") != NULL)
|
||||
{
|
||||
wchar_t wc = (wchar_t) 0xBADFACE;
|
||||
mbstate_t state;
|
||||
|
||||
memset (&state, '\0', sizeof (mbstate_t));
|
||||
if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
|
||||
&& wc != (wchar_t) 0xBADFACE)
|
||||
result |= 1;
|
||||
}
|
||||
if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
|
||||
{
|
||||
wchar_t wc = (wchar_t) 0xBADFACE;
|
||||
mbstate_t state;
|
||||
|
||||
memset (&state, '\0', sizeof (mbstate_t));
|
||||
if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
|
||||
&& wc != (wchar_t) 0xBADFACE)
|
||||
result |= 2;
|
||||
}
|
||||
if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
|
||||
{
|
||||
wchar_t wc = (wchar_t) 0xBADFACE;
|
||||
mbstate_t state;
|
||||
|
||||
memset (&state, '\0', sizeof (mbstate_t));
|
||||
if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
|
||||
&& wc != (wchar_t) 0xBADFACE)
|
||||
result |= 4;
|
||||
}
|
||||
if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
|
||||
{
|
||||
wchar_t wc = (wchar_t) 0xBADFACE;
|
||||
mbstate_t state;
|
||||
|
||||
memset (&state, '\0', sizeof (mbstate_t));
|
||||
if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
|
||||
&& wc != (wchar_t) 0xBADFACE)
|
||||
result |= 8;
|
||||
}
|
||||
return result;
|
||||
}]])],
|
||||
[gl_cv_func_mbrtowc_stores_incomplete=no],
|
||||
[gl_cv_func_mbrtowc_stores_incomplete=yes],
|
||||
[:])
|
||||
;;
|
||||
*)
|
||||
AC_REQUIRE([gt_LOCALE_FR_UTF8])
|
||||
if test $LOCALE_FR_UTF8 != none; then
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_SOURCE([[
|
||||
#include <locale.h>
|
||||
#include <string.h>
|
||||
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
|
||||
<wchar.h>.
|
||||
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
|
||||
included before <wchar.h>. */
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <wchar.h>
|
||||
int main ()
|
||||
{
|
||||
if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
|
||||
{
|
||||
wchar_t wc = (wchar_t) 0xBADFACE;
|
||||
mbstate_t state;
|
||||
|
||||
memset (&state, '\0', sizeof (mbstate_t));
|
||||
if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
|
||||
&& wc != (wchar_t) 0xBADFACE)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}]])],
|
||||
[gl_cv_func_mbrtowc_stores_incomplete=no],
|
||||
[gl_cv_func_mbrtowc_stores_incomplete=yes],
|
||||
[:])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
])
|
||||
])
|
||||
|
||||
dnl Test whether mbrtowc returns the correct value on empty input.
|
||||
|
||||
AC_DEFUN([gl_MBRTOWC_EMPTY_INPUT],
|
||||
|
|
@ -595,11 +784,11 @@ AC_DEFUN([gl_MBRTOWC_C_LOCALE],
|
|||
[
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
|
||||
AC_CACHE_CHECK([whether the C locale is free of encoding errors],
|
||||
[gl_cv_C_locale_sans_EILSEQ],
|
||||
[gl_cv_func_mbrtowc_C_locale_sans_EILSEQ],
|
||||
[
|
||||
dnl Initial guess, used when cross-compiling or when no suitable locale
|
||||
dnl is present.
|
||||
gl_cv_C_locale_sans_EILSEQ="guessing no"
|
||||
gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
|
||||
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
|
|
@ -622,22 +811,28 @@ AC_DEFUN([gl_MBRTOWC_C_LOCALE],
|
|||
}
|
||||
return 0;
|
||||
]])],
|
||||
[gl_cv_C_locale_sans_EILSEQ=yes],
|
||||
[gl_cv_C_locale_sans_EILSEQ=no],
|
||||
[gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes],
|
||||
[gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no],
|
||||
[case "$host_os" in
|
||||
# Guess yes on native Windows.
|
||||
mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;;
|
||||
mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
|
||||
esac
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
# Prerequisites of lib/mbrtowc.c.
|
||||
# Prerequisites of lib/mbrtowc.c and lib/lc-charset-dispatch.c.
|
||||
AC_DEFUN([gl_PREREQ_MBRTOWC], [
|
||||
AC_REQUIRE([AC_C_INLINE])
|
||||
:
|
||||
])
|
||||
|
||||
# Prerequisites of lib/mbtowc-lock.c.
|
||||
AC_DEFUN([gl_PREREQ_MBTOWC_LOCK],
|
||||
[
|
||||
gl_VISIBILITY
|
||||
])
|
||||
|
||||
|
||||
dnl From Paul Eggert
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# mbsinit.m4 serial 8
|
||||
dnl Copyright (C) 2008, 2010-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2008, 2010-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# mbstate_t.m4 serial 13
|
||||
dnl Copyright (C) 2000-2002, 2008-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2000-2002, 2008-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# memchr.m4 serial 14
|
||||
dnl Copyright (C) 2002-2004, 2009-2019 Free Software Foundation, Inc.
|
||||
# memchr.m4 serial 15
|
||||
dnl Copyright (C) 2002-2004, 2009-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -94,8 +94,8 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
|
|||
linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
|
||||
# Guess yes on native Windows.
|
||||
mingw*) gl_cv_func_memchr_works="guessing yes" ;;
|
||||
# Be pessimistic for now.
|
||||
*) gl_cv_func_memchr_works="guessing no" ;;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
|
||||
esac
|
||||
])
|
||||
])
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# mempcpy.m4 serial 11
|
||||
dnl Copyright (C) 2003-2004, 2006-2007, 2009-2019 Free Software Foundation,
|
||||
dnl Copyright (C) 2003-2004, 2006-2007, 2009-2020 Free Software Foundation,
|
||||
dnl Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# minmax.m4 serial 4
|
||||
dnl Copyright (C) 2005, 2009-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2005, 2009-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
12
m4/mkdir.m4
12
m4/mkdir.m4
|
|
@ -1,6 +1,6 @@
|
|||
# serial 15
|
||||
# serial 16
|
||||
|
||||
# Copyright (C) 2001, 2003-2004, 2006, 2008-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001, 2003-2004, 2006, 2008-2020 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -36,8 +36,8 @@ AC_DEFUN([gl_FUNC_MKDIR],
|
|||
[gl_cv_func_mkdir_trailing_slash_works="guessing yes"],
|
||||
[gl_cv_func_mkdir_trailing_slash_works="guessing no"])
|
||||
;;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
|
||||
esac
|
||||
])
|
||||
rm -rf conftest.dir
|
||||
|
|
@ -66,8 +66,8 @@ AC_DEFUN([gl_FUNC_MKDIR],
|
|||
*-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
|
||||
# Guess no on native Windows.
|
||||
mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
|
||||
esac
|
||||
])
|
||||
rm -rf conftest.dir
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#serial 26
|
||||
#serial 27
|
||||
|
||||
# Copyright (C) 2001, 2003-2007, 2009-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001, 2003-2007, 2009-2020 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -63,8 +63,8 @@ AC_DEFUN([gl_FUNC_MKSTEMP],
|
|||
*-musl*) gl_cv_func_working_mkstemp="guessing yes" ;;
|
||||
# Guess no on native Windows.
|
||||
mingw*) gl_cv_func_working_mkstemp="guessing no" ;;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_working_mkstemp="guessing no" ;;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_working_mkstemp="$gl_cross_guess_normal" ;;
|
||||
esac
|
||||
])
|
||||
rm -rf conftest.mkstemp
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# mkstemps.m4 serial 2
|
||||
dnl Copyright (C) 2009-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# mmap-anon.m4 serial 10
|
||||
dnl Copyright (C) 2005, 2007, 2009-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2005, 2007, 2009-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# msvc-inval.m4 serial 1
|
||||
dnl Copyright (C) 2011-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# msvc-nothrow.m4 serial 1
|
||||
dnl Copyright (C) 2011-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# multiarch.m4 serial 7
|
||||
dnl Copyright (C) 2008-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# nocrash.m4 serial 5
|
||||
dnl Copyright (C) 2005, 2009-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2005, 2009-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -53,7 +53,7 @@ nocrash_init (void)
|
|||
/* Allocate a port on which the thread shall listen for exceptions. */
|
||||
if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
|
||||
== KERN_SUCCESS) {
|
||||
/* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
|
||||
/* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
|
||||
if (mach_port_insert_right (self, our_exception_port, our_exception_port,
|
||||
MACH_MSG_TYPE_MAKE_SEND)
|
||||
== KERN_SUCCESS) {
|
||||
|
|
@ -72,7 +72,7 @@ nocrash_init (void)
|
|||
for a particular thread. This has the effect that when our exception
|
||||
port gets the message, the thread specific exception port has already
|
||||
been asked, and we don't need to bother about it.
|
||||
See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
|
||||
See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
|
||||
task_set_exception_ports (self, mask, our_exception_port,
|
||||
EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# off_t.m4 serial 1
|
||||
dnl Copyright (C) 2012-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# pathmax.m4 serial 11
|
||||
dnl Copyright (C) 2002-2003, 2005-2006, 2009-2019 Free Software Foundation,
|
||||
dnl Copyright (C) 2002-2003, 2005-2006, 2009-2020 Free Software Foundation,
|
||||
dnl Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
|
|
|||
74
m4/printf.m4
74
m4/printf.m4
|
|
@ -1,5 +1,5 @@
|
|||
# printf.m4 serial 61
|
||||
dnl Copyright (C) 2003, 2007-2019 Free Software Foundation, Inc.
|
||||
# printf.m4 serial 64
|
||||
dnl Copyright (C) 2003, 2007-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -93,8 +93,8 @@ changequote([,])dnl
|
|||
[gl_cv_func_printf_sizes_c99="guessing yes"],
|
||||
[gl_cv_func_printf_sizes_c99="guessing no"])
|
||||
;;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_printf_sizes_c99="guessing no";;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_printf_sizes_c99="$gl_cross_guess_normal";;
|
||||
esac
|
||||
])
|
||||
])
|
||||
|
|
@ -271,8 +271,8 @@ changequote([,])dnl
|
|||
[gl_cv_func_printf_infinite="guessing yes"],
|
||||
[gl_cv_func_printf_infinite="guessing no"])
|
||||
;;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_printf_infinite="guessing no";;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_printf_infinite="$gl_cross_guess_normal";;
|
||||
esac
|
||||
])
|
||||
])
|
||||
|
|
@ -481,8 +481,8 @@ changequote([,])dnl
|
|||
[gl_cv_func_printf_infinite_long_double="guessing yes"],
|
||||
[gl_cv_func_printf_infinite_long_double="guessing no"])
|
||||
;;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_printf_infinite_long_double="guessing no";;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_printf_infinite_long_double="$gl_cross_guess_normal";;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
|
@ -587,8 +587,8 @@ int main ()
|
|||
linux*-android*) gl_cv_func_printf_directive_a="guessing no";;
|
||||
# Guess no on native Windows.
|
||||
mingw*) gl_cv_func_printf_directive_a="guessing no";;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_printf_directive_a="guessing no";;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_printf_directive_a="$gl_cross_guess_normal";;
|
||||
esac
|
||||
])
|
||||
])
|
||||
|
|
@ -656,8 +656,8 @@ changequote([,])dnl
|
|||
[gl_cv_func_printf_directive_f="guessing yes"],
|
||||
[gl_cv_func_printf_directive_f="guessing no"])
|
||||
;;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_printf_directive_f="guessing no";;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_printf_directive_f="$gl_cross_guess_normal";;
|
||||
esac
|
||||
])
|
||||
])
|
||||
|
|
@ -711,6 +711,16 @@ int main ()
|
|||
[gl_cv_func_printf_directive_n=yes],
|
||||
[gl_cv_func_printf_directive_n=no],
|
||||
[case "$host_os" in
|
||||
# Guess no on glibc when _FORTIFY_SOURCE >= 2.
|
||||
*-gnu* | gnu*) AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if _FORTIFY_SOURCE >= 2
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_func_printf_directive_n="guessing yes"],
|
||||
[gl_cv_func_printf_directive_n="guessing no"])
|
||||
;;
|
||||
# Guess no on Android.
|
||||
linux*-android*) gl_cv_func_printf_directive_n="guessing no";;
|
||||
# Guess no on native Windows.
|
||||
|
|
@ -978,8 +988,8 @@ changequote(,)dnl
|
|||
linux*-android*) gl_cv_func_printf_flag_zero="guessing no";;
|
||||
# Guess no on native Windows.
|
||||
mingw*) gl_cv_func_printf_flag_zero="guessing no";;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_printf_flag_zero="guessing no";;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_printf_flag_zero="$gl_cross_guess_normal";;
|
||||
esac
|
||||
changequote([,])dnl
|
||||
])
|
||||
|
|
@ -1156,8 +1166,8 @@ changequote(,)dnl
|
|||
haiku*) gl_cv_func_printf_enomem="guessing yes";;
|
||||
# Guess no on Android.
|
||||
linux*-android*) gl_cv_func_printf_enomem="guessing no";;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_printf_enomem="guessing no";;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_printf_enomem="$gl_cross_guess_normal";;
|
||||
esac
|
||||
changequote([,])dnl
|
||||
fi
|
||||
|
|
@ -1255,8 +1265,8 @@ changequote(,)dnl
|
|||
linux*-android*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
|
||||
# Guess no on native Windows.
|
||||
mingw*) gl_cv_func_snprintf_truncation_c99="guessing no";;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_snprintf_truncation_c99="guessing no";;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_snprintf_truncation_c99="$gl_cross_guess_normal";;
|
||||
esac
|
||||
changequote([,])dnl
|
||||
])
|
||||
|
|
@ -1358,8 +1368,8 @@ changequote([,])dnl
|
|||
[gl_cv_func_snprintf_retval_c99="guessing yes"],
|
||||
[gl_cv_func_snprintf_retval_c99="guessing no"])
|
||||
;;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_snprintf_retval_c99="guessing no";;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_snprintf_retval_c99="$gl_cross_guess_normal";;
|
||||
esac
|
||||
])
|
||||
])
|
||||
|
|
@ -1412,10 +1422,18 @@ int main ()
|
|||
[gl_cv_func_snprintf_directive_n=yes],
|
||||
[gl_cv_func_snprintf_directive_n=no],
|
||||
[
|
||||
changequote(,)dnl
|
||||
case "$host_os" in
|
||||
# Guess yes on glibc systems.
|
||||
*-gnu* | gnu*) gl_cv_func_snprintf_directive_n="guessing yes";;
|
||||
# Guess no on glibc when _FORTIFY_SOURCE >= 2.
|
||||
*-gnu* | gnu*) AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if _FORTIFY_SOURCE >= 2
|
||||
error fail
|
||||
#endif
|
||||
]])],
|
||||
[gl_cv_func_snprintf_directive_n="guessing yes"],
|
||||
[gl_cv_func_snprintf_directive_n="guessing no"])
|
||||
;;
|
||||
changequote(,)dnl
|
||||
# Guess yes on musl systems.
|
||||
*-musl*) gl_cv_func_snprintf_directive_n="guessing yes";;
|
||||
# Guess yes on FreeBSD >= 5.
|
||||
|
|
@ -1446,10 +1464,10 @@ changequote(,)dnl
|
|||
linux*-android*) gl_cv_func_snprintf_directive_n="guessing no";;
|
||||
# Guess no on native Windows.
|
||||
mingw*) gl_cv_func_snprintf_directive_n="guessing no";;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_snprintf_directive_n="guessing no";;
|
||||
esac
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_snprintf_directive_n="$gl_cross_guess_normal";;
|
||||
changequote([,])dnl
|
||||
esac
|
||||
])
|
||||
])
|
||||
])
|
||||
|
|
@ -1601,8 +1619,8 @@ changequote(,)dnl
|
|||
linux*-android*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
|
||||
# Guess yes on native Windows.
|
||||
mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_vsnprintf_zerosize_c99="$gl_cross_guess_normal";;
|
||||
esac
|
||||
changequote([,])dnl
|
||||
])
|
||||
|
|
|
|||
|
|
@ -1,165 +0,0 @@
|
|||
# pthread_rwlock_rdlock.m4 serial 2
|
||||
dnl Copyright (C) 2017-2019 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
dnl Inspired by
|
||||
dnl https://github.com/linux-test-project/ltp/blob/master/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-2.c
|
||||
dnl by Intel Corporation.
|
||||
|
||||
dnl Test whether in a situation where
|
||||
dnl - an rwlock is taken by a reader and has a writer waiting,
|
||||
dnl - an additional reader requests the lock,
|
||||
dnl - the waiting writer and the requesting reader threads have the same
|
||||
dnl priority,
|
||||
dnl the requesting reader thread gets blocked, so that at some point the
|
||||
dnl waiting writer can acquire the lock.
|
||||
dnl Without such a guarantee, when there a N readers and each of the readers
|
||||
dnl spends more than 1/Nth of the time with the lock held, there is a high
|
||||
dnl probability that the waiting writer will not get the lock in a given finite
|
||||
dnl time, a phenomenon called "writer starvation".
|
||||
dnl Without such a guarantee, applications have a hard time avoiding writer
|
||||
dnl starvation.
|
||||
dnl
|
||||
dnl POSIX:2017 makes this requirement only for implementations that support TPS
|
||||
dnl (Thread Priority Scheduling) and only for the scheduling policies SCHED_FIFO
|
||||
dnl and SCHED_RR, see
|
||||
dnl http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_rwlock_rdlock.html
|
||||
dnl but this test verifies the guarantee regardless of TPS and regardless of
|
||||
dnl scheduling policy.
|
||||
dnl Glibc currently does not provide this guarantee, see
|
||||
dnl https://sourceware.org/bugzilla/show_bug.cgi?id=13701
|
||||
AC_DEFUN([gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER],
|
||||
[
|
||||
AC_REQUIRE([gl_THREADLIB_EARLY])
|
||||
AC_CACHE_CHECK([whether pthread_rwlock_rdlock prefers a writer to a reader],
|
||||
[gl_cv_pthread_rwlock_rdlock_prefer_writer],
|
||||
[save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LIBMULTITHREAD"
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_SOURCE([[
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define SUCCEED() exit (0)
|
||||
#define FAILURE() exit (1)
|
||||
#define UNEXPECTED(n) (exit (10 + (n)))
|
||||
|
||||
/* The main thread creates the waiting writer and the requesting reader threads
|
||||
in the default way; this guarantees that they have the same priority.
|
||||
We can reuse the main thread as first reader thread. */
|
||||
|
||||
static pthread_rwlock_t lock;
|
||||
static pthread_t reader1;
|
||||
static pthread_t writer;
|
||||
static pthread_t reader2;
|
||||
static pthread_t timer;
|
||||
/* Used to pass control from writer to reader2 and from reader2 to timer,
|
||||
as in a relay race.
|
||||
Passing control from one running thread to another running thread
|
||||
is most likely faster than to create the second thread. */
|
||||
static pthread_mutex_t baton;
|
||||
|
||||
static void *
|
||||
timer_func (void *ignored)
|
||||
{
|
||||
/* Step 13 (can be before or after step 12):
|
||||
The timer thread takes the baton, then waits a moment to make sure
|
||||
it can tell whether the second reader thread is blocked at step 12. */
|
||||
if (pthread_mutex_lock (&baton))
|
||||
UNEXPECTED (13);
|
||||
usleep (100000);
|
||||
/* By the time we get here, it's clear that the second reader thread is
|
||||
blocked at step 12. This is the desired behaviour. */
|
||||
SUCCEED ();
|
||||
}
|
||||
|
||||
static void *
|
||||
reader2_func (void *ignored)
|
||||
{
|
||||
int err;
|
||||
|
||||
/* Step 8 (can be before or after step 7):
|
||||
The second reader thread takes the baton, then waits a moment to make sure
|
||||
the writer thread has reached step 7. */
|
||||
if (pthread_mutex_lock (&baton))
|
||||
UNEXPECTED (8);
|
||||
usleep (100000);
|
||||
/* Step 9: The second reader thread requests the lock. */
|
||||
err = pthread_rwlock_tryrdlock (&lock);
|
||||
if (err == 0)
|
||||
FAILURE ();
|
||||
else if (err != EBUSY)
|
||||
UNEXPECTED (9);
|
||||
/* Step 10: Launch a timer, to test whether the next call blocks. */
|
||||
if (pthread_create (&timer, NULL, timer_func, NULL))
|
||||
UNEXPECTED (10);
|
||||
/* Step 11: Release the baton. */
|
||||
if (pthread_mutex_unlock (&baton))
|
||||
UNEXPECTED (11);
|
||||
/* Step 12: The second reader thread requests the lock. */
|
||||
err = pthread_rwlock_rdlock (&lock);
|
||||
if (err == 0)
|
||||
FAILURE ();
|
||||
else
|
||||
UNEXPECTED (12);
|
||||
}
|
||||
|
||||
static void *
|
||||
writer_func (void *ignored)
|
||||
{
|
||||
/* Step 4: Take the baton, so that the second reader thread does not go ahead
|
||||
too early. */
|
||||
if (pthread_mutex_lock (&baton))
|
||||
UNEXPECTED (4);
|
||||
/* Step 5: Create the second reader thread. */
|
||||
if (pthread_create (&reader2, NULL, reader2_func, NULL))
|
||||
UNEXPECTED (5);
|
||||
/* Step 6: Release the baton. */
|
||||
if (pthread_mutex_unlock (&baton))
|
||||
UNEXPECTED (6);
|
||||
/* Step 7: The writer thread requests the lock. */
|
||||
if (pthread_rwlock_wrlock (&lock))
|
||||
UNEXPECTED (7);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
reader1 = pthread_self ();
|
||||
|
||||
/* Step 1: The main thread initializes the lock and the baton. */
|
||||
if (pthread_rwlock_init (&lock, NULL))
|
||||
UNEXPECTED (1);
|
||||
if (pthread_mutex_init (&baton, NULL))
|
||||
UNEXPECTED (1);
|
||||
/* Step 2: The main thread acquires the lock as a reader. */
|
||||
if (pthread_rwlock_rdlock (&lock))
|
||||
UNEXPECTED (2);
|
||||
/* Step 3: Create the writer thread. */
|
||||
if (pthread_create (&writer, NULL, writer_func, NULL))
|
||||
UNEXPECTED (3);
|
||||
/* Job done. Go to sleep. */
|
||||
for (;;)
|
||||
{
|
||||
sleep (1);
|
||||
}
|
||||
}
|
||||
]])],
|
||||
[gl_cv_pthread_rwlock_rdlock_prefer_writer=yes],
|
||||
[gl_cv_pthread_rwlock_rdlock_prefer_writer=no],
|
||||
[gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"])
|
||||
LIBS="$save_LIBS"
|
||||
])
|
||||
case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
|
||||
*yes)
|
||||
AC_DEFINE([HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER], [1],
|
||||
[Define if the 'pthread_rwlock_rdlock' function prefers a writer to a reader.])
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
# quote.m4 serial 6
|
||||
dnl Copyright (C) 2002-2003, 2005-2006, 2009-2019 Free Software Foundation,
|
||||
dnl Copyright (C) 2002-2003, 2005-2006, 2009-2020 Free Software Foundation,
|
||||
dnl Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
# quotearg.m4 serial 9
|
||||
dnl Copyright (C) 2002, 2004-2019 Free Software Foundation, Inc.
|
||||
# quotearg.m4 serial 10
|
||||
dnl Copyright (C) 2002, 2004-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
AC_DEFUN([gl_QUOTEARG],
|
||||
[
|
||||
AC_REQUIRE([AC_C_RESTRICT])
|
||||
:
|
||||
])
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# rawmemchr.m4 serial 2
|
||||
dnl Copyright (C) 2003, 2007-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2003, 2007-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Look up an environment variable more securely.
|
||||
dnl Copyright 2013-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright 2013-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
98
m4/setlocale_null.m4
Normal file
98
m4/setlocale_null.m4
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
# setlocale_null.m4 serial 2
|
||||
dnl Copyright (C) 2019-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
AC_DEFUN([gl_FUNC_SETLOCALE_NULL],
|
||||
[
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([gl_PTHREADLIB])
|
||||
AC_CHECK_HEADERS_ONCE([threads.h])
|
||||
|
||||
AC_CACHE_CHECK([whether setlocale (LC_ALL, NULL) is multithread-safe],
|
||||
[gl_cv_func_setlocale_null_all_mtsafe],
|
||||
[case "$host_os" in
|
||||
# Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
|
||||
*-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
|
||||
gl_cv_func_setlocale_null_all_mtsafe=no ;;
|
||||
# Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
|
||||
*-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
|
||||
gl_cv_func_setlocale_null_all_mtsafe=yes ;;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*)
|
||||
gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
|
||||
esac
|
||||
])
|
||||
dnl On platforms without multithreading, there is no issue.
|
||||
case "$host_os" in
|
||||
mingw*) ;;
|
||||
*)
|
||||
if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
|
||||
gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
case "$gl_cv_func_setlocale_null_all_mtsafe" in
|
||||
*yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
|
||||
*) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
|
||||
esac
|
||||
AC_DEFINE_UNQUOTED([SETLOCALE_NULL_ALL_MTSAFE], [$SETLOCALE_NULL_ALL_MTSAFE],
|
||||
[Define to 1 if setlocale (LC_ALL, NULL) is multithread-safe.])
|
||||
|
||||
dnl This is about a single category (not LC_ALL).
|
||||
AC_CACHE_CHECK([whether setlocale (category, NULL) is multithread-safe],
|
||||
[gl_cv_func_setlocale_null_one_mtsafe],
|
||||
[case "$host_os" in
|
||||
# Guess no on OpenBSD, AIX.
|
||||
openbsd* | aix*)
|
||||
gl_cv_func_setlocale_null_one_mtsafe=no ;;
|
||||
# Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
|
||||
*-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
|
||||
gl_cv_func_setlocale_null_one_mtsafe=yes ;;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*)
|
||||
gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
|
||||
esac
|
||||
])
|
||||
dnl On platforms without multithreading, there is no issue.
|
||||
case "$host_os" in
|
||||
mingw*) ;;
|
||||
*)
|
||||
if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
|
||||
gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
case "$gl_cv_func_setlocale_null_one_mtsafe" in
|
||||
*yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
|
||||
*) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
|
||||
esac
|
||||
AC_DEFINE_UNQUOTED([SETLOCALE_NULL_ONE_MTSAFE], [$SETLOCALE_NULL_ONE_MTSAFE],
|
||||
[Define to 1 if setlocale (category, NULL) is multithread-safe.])
|
||||
|
||||
dnl Determine link dependencies of lib/setlocale_null.c and lib/setlocale-lock.c.
|
||||
if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
|
||||
case "$host_os" in
|
||||
mingw*) LIB_SETLOCALE_NULL= ;;
|
||||
*)
|
||||
gl_WEAK_SYMBOLS
|
||||
case "$gl_cv_have_weak" in
|
||||
*yes) LIB_SETLOCALE_NULL= ;;
|
||||
*) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
else
|
||||
LIB_SETLOCALE_NULL=
|
||||
fi
|
||||
dnl LIB_SETLOCALE_NULL is expected to be '-pthread' or '-lpthread' on AIX
|
||||
dnl with gcc or xlc, and empty otherwise.
|
||||
AC_SUBST([LIB_SETLOCALE_NULL])
|
||||
])
|
||||
|
||||
# Prerequisites of lib/setlocale-lock.c.
|
||||
AC_DEFUN([gl_PREREQ_SETLOCALE_LOCK],
|
||||
[
|
||||
gl_VISIBILITY
|
||||
])
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
# size_max.m4 serial 11
|
||||
dnl Copyright (C) 2003, 2005-2006, 2008-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2003, 2005-2006, 2008-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# sleep.m4 serial 10
|
||||
dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
|
||||
# sleep.m4 serial 11
|
||||
dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -52,8 +52,8 @@ handle_alarm (int sig)
|
|||
*-musl*) gl_cv_func_sleep_works="guessing yes" ;;
|
||||
# Guess no on native Windows.
|
||||
mingw*) gl_cv_func_sleep_works="guessing no" ;;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_sleep_works="guessing no" ;;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_sleep_works="$gl_cross_guess_normal" ;;
|
||||
esac
|
||||
])])
|
||||
case "$gl_cv_func_sleep_works" in
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# ssize_t.m4 serial 5 (gettext-0.18.2)
|
||||
dnl Copyright (C) 2001-2003, 2006, 2010-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2001-2003, 2006, 2010-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Checks for stat-related time functions.
|
||||
|
||||
# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2019 Free Software
|
||||
# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2020 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# This file is free software; the Free Software Foundation
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# serial 15
|
||||
# serial 16
|
||||
|
||||
# Copyright (C) 2009-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2009-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
|
@ -47,8 +47,8 @@ AC_DEFUN([gl_FUNC_STAT],
|
|||
linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
|
||||
# Guess yes on glibc systems.
|
||||
*-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_stat_file_slash="guessing no" ;;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
|
||||
esac
|
||||
])
|
||||
rm -f conftest.tmp conftest.lnk])
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
# or later is installed everywhere a Gnulib program might be developed.
|
||||
|
||||
|
||||
# Copyright (C) 2001-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Check for stdalign.h that conforms to C11.
|
||||
|
||||
dnl Copyright 2011-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright 2011-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,22 +1,36 @@
|
|||
# Check for stdbool.h that conforms to C99.
|
||||
|
||||
dnl Copyright (C) 2002-2006, 2009-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2002-2006, 2009-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
#serial 7
|
||||
#serial 8
|
||||
|
||||
# Prepare for substituting <stdbool.h> if it is not supported.
|
||||
|
||||
AC_DEFUN([AM_STDBOOL_H],
|
||||
[
|
||||
AC_REQUIRE([AC_CHECK_HEADER_STDBOOL])
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
|
||||
# Define two additional variables used in the Makefile substitution.
|
||||
|
||||
dnl On some platforms, <stdbool.h> does not exist or does not conform to C99.
|
||||
dnl On Solaris 10 with CC=cc CXX=CC, <stdbool.h> exists but is not usable
|
||||
dnl in C++ mode (and no <cstdbool> exists). In this case, we use our
|
||||
dnl replacement, also in C mode (for binary compatibility between C and C++).
|
||||
if test "$ac_cv_header_stdbool_h" = yes; then
|
||||
STDBOOL_H=''
|
||||
case "$host_os" in
|
||||
solaris*)
|
||||
if test -z "$GCC"; then
|
||||
STDBOOL_H='stdbool.h'
|
||||
else
|
||||
STDBOOL_H=''
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
STDBOOL_H=''
|
||||
;;
|
||||
esac
|
||||
else
|
||||
STDBOOL_H='stdbool.h'
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
dnl A placeholder for <stddef.h>, for platforms that have issues.
|
||||
# stddef_h.m4 serial 6
|
||||
dnl Copyright (C) 2009-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
25
m4/stdint.m4
25
m4/stdint.m4
|
|
@ -1,5 +1,5 @@
|
|||
# stdint.m4 serial 53
|
||||
dnl Copyright (C) 2001-2019 Free Software Foundation, Inc.
|
||||
# stdint.m4 serial 54
|
||||
dnl Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -17,21 +17,12 @@ AC_DEFUN_ONCE([gl_STDINT_H],
|
|||
AC_REQUIRE([gl_LIMITS_H])
|
||||
AC_REQUIRE([gt_TYPE_WINT_T])
|
||||
|
||||
dnl Check for long long int and unsigned long long int.
|
||||
AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
|
||||
if test $ac_cv_type_long_long_int = yes; then
|
||||
HAVE_LONG_LONG_INT=1
|
||||
else
|
||||
HAVE_LONG_LONG_INT=0
|
||||
fi
|
||||
AC_SUBST([HAVE_LONG_LONG_INT])
|
||||
AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
|
||||
if test $ac_cv_type_unsigned_long_long_int = yes; then
|
||||
HAVE_UNSIGNED_LONG_LONG_INT=1
|
||||
else
|
||||
HAVE_UNSIGNED_LONG_LONG_INT=0
|
||||
fi
|
||||
AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT])
|
||||
dnl For backward compatibility. Some packages may still be testing these
|
||||
dnl macros.
|
||||
AC_DEFINE([HAVE_LONG_LONG_INT], [1],
|
||||
[Define to 1 if the system has the type 'long long int'.])
|
||||
AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
|
||||
[Define to 1 if the system has the type 'unsigned long long int'.])
|
||||
|
||||
dnl Check for <wchar.h>, in the same way as gl_WCHAR_H does.
|
||||
AC_CHECK_HEADERS_ONCE([wchar.h])
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# stdint_h.m4 serial 9
|
||||
dnl Copyright (C) 1997-2004, 2006, 2008-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 1997-2004, 2006, 2008-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# stdio_h.m4 serial 49
|
||||
dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
|
||||
# stdio_h.m4 serial 50
|
||||
dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -107,6 +107,8 @@ AC_DEFUN([gl_STDIO_H],
|
|||
gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
|
||||
]], [dprintf fpurge fseeko ftello getdelim getline gets pclose popen
|
||||
renameat snprintf tmpfile vdprintf vsnprintf])
|
||||
|
||||
AC_REQUIRE([AC_C_RESTRICT])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# stdlib_h.m4 serial 48
|
||||
dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
|
||||
# stdlib_h.m4 serial 49
|
||||
dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -27,6 +27,8 @@ AC_DEFUN([gl_STDLIB_H],
|
|||
posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray
|
||||
realpath rpmatch secure_getenv setenv setstate setstate_r srandom
|
||||
srandom_r strtod strtold strtoll strtoull unlockpt unsetenv])
|
||||
|
||||
AC_REQUIRE([AC_C_RESTRICT])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# stpcpy.m4 serial 8
|
||||
dnl Copyright (C) 2002, 2007, 2009-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2002, 2007, 2009-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# strcase.m4 serial 11
|
||||
dnl Copyright (C) 2002, 2005-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2002, 2005-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# strchrnul.m4 serial 9
|
||||
dnl Copyright (C) 2003, 2007, 2009-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2003, 2007, 2009-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# strerror.m4 serial 20
|
||||
dnl Copyright (C) 2002, 2007-2019 Free Software Foundation, Inc.
|
||||
# strerror.m4 serial 21
|
||||
dnl Copyright (C) 2002, 2007-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -28,8 +28,8 @@ AC_DEFUN([gl_FUNC_STRERROR],
|
|||
*-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
|
||||
# Guess yes on musl systems.
|
||||
*-musl*) gl_cv_func_working_strerror="guessing yes" ;;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_working_strerror="guessing no" ;;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
|
||||
esac
|
||||
])
|
||||
])
|
||||
|
|
@ -86,8 +86,8 @@ AC_DEFUN([gl_FUNC_STRERROR_0],
|
|||
*-musl*) gl_cv_func_strerror_0_works="guessing yes" ;;
|
||||
# Guess yes on native Windows.
|
||||
mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_strerror_0_works="guessing no" ;;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
|
||||
esac
|
||||
])
|
||||
])
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
# Configure a GNU-like replacement for <string.h>.
|
||||
|
||||
# Copyright (C) 2007-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2007-2020 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 22
|
||||
# serial 23
|
||||
|
||||
# Written by Paul Eggert.
|
||||
|
||||
|
|
@ -18,7 +18,6 @@ AC_DEFUN([gl_HEADER_STRING_H],
|
|||
|
||||
AC_DEFUN([gl_HEADER_STRING_H_BODY],
|
||||
[
|
||||
AC_REQUIRE([AC_C_RESTRICT])
|
||||
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
|
||||
gl_NEXT_HEADERS([string.h])
|
||||
|
||||
|
|
@ -30,6 +29,8 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY],
|
|||
[ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul
|
||||
strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r
|
||||
strerror_r strsignal strverscmp])
|
||||
|
||||
AC_REQUIRE([AC_C_RESTRICT])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_STRING_MODULE_INDICATOR],
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Configure a replacement for <strings.h>.
|
||||
# serial 6
|
||||
|
||||
# Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# strndup.m4 serial 22
|
||||
dnl Copyright (C) 2002-2003, 2005-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2002-2003, 2005-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# strnlen.m4 serial 13
|
||||
dnl Copyright (C) 2002-2003, 2005-2007, 2009-2019 Free Software Foundation,
|
||||
dnl Copyright (C) 2002-2003, 2005-2007, 2009-2020 Free Software Foundation,
|
||||
dnl Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# strverscmp.m4 serial 8
|
||||
dnl Copyright (C) 2002, 2005-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2002, 2005-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# sys_socket_h.m4 serial 24
|
||||
dnl Copyright (C) 2005-2019 Free Software Foundation, Inc.
|
||||
# sys_socket_h.m4 serial 25
|
||||
dnl Copyright (C) 2005-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -95,6 +95,8 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
|
|||
#include <sys/socket.h>
|
||||
]], [socket connect accept bind getpeername getsockname getsockopt
|
||||
listen recv send recvfrom sendto setsockopt shutdown accept4])
|
||||
|
||||
AC_REQUIRE([AC_C_RESTRICT])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_PREREQ_SYS_H_SOCKET],
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# sys_stat_h.m4 serial 31 -*- Autoconf -*-
|
||||
dnl Copyright (C) 2006-2019 Free Software Foundation, Inc.
|
||||
# sys_stat_h.m4 serial 33 -*- Autoconf -*-
|
||||
dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
@ -48,7 +48,9 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
|
|||
gl_WARN_ON_USE_PREPARE([[#include <sys/stat.h>
|
||||
]], [fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat
|
||||
mknod mknodat stat utimensat])
|
||||
]) # gl_HEADER_SYS_STAT_H
|
||||
|
||||
AC_REQUIRE([AC_C_RESTRICT])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR],
|
||||
[
|
||||
|
|
@ -88,6 +90,7 @@ AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
|
|||
HAVE_MKNOD=1; AC_SUBST([HAVE_MKNOD])
|
||||
HAVE_MKNODAT=1; AC_SUBST([HAVE_MKNODAT])
|
||||
HAVE_UTIMENSAT=1; AC_SUBST([HAVE_UTIMENSAT])
|
||||
REPLACE_FCHMODAT=0; AC_SUBST([REPLACE_FCHMODAT])
|
||||
REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT])
|
||||
REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT])
|
||||
REPLACE_FUTIMENS=0; AC_SUBST([REPLACE_FUTIMENS])
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Configure a replacement for <sys/time.h>.
|
||||
# serial 9
|
||||
|
||||
# Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# sys_types_h.m4 serial 9
|
||||
dnl Copyright (C) 2011-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# sys_wait_h.m4 serial 6
|
||||
dnl Copyright (C) 2008-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# sysexits.m4 serial 6
|
||||
dnl Copyright (C) 2003, 2005, 2007, 2009-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2003, 2005, 2007, 2009-2020 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#serial 5
|
||||
|
||||
# Copyright (C) 2006-2007, 2009-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006-2007, 2009-2020 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue