summaryrefslogtreecommitdiff
path: root/configure.ac
Commit message (Collapse)AuthorAgeFilesLines
* build: avoid spurious failures due to lack of EGREP definitionJim Meyering2023-01-301-0/+1
| | | | | | * configure.ac: Use AC_PROG_EGREP, since many doc and test rules use $EGREP. * cfg.mk (sc_tests_list_consistency): Use grep -E, not $(EGREP) here.
* maint: update all copyright year number rangesPádraig Brady2023-01-011-1/+1
| | | | | | | | | | Update to latest gnulib with new copyright year. Run "make update-copyright" and then... * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Manually update copyright year, until we fully sync with gnulib at a later stage. * tests/sample-test: Adjust to use the single most recent year.
* doc: use bold style for man page referencesPádraig Brady2022-02-151-0/+14
| | | | | | | | | | | | | | It's more common to use bold style than not, for references to other man pages. Ideally each man page renderer would highlight references, but currently some rely on styles in the page itself. * man/help2man: Implement a --bold-refs option that will mark up references like "name(1)" with bold style around the "name" component. * man/local.mk: Pass --bold-refs to our help2man unless disabled. * configure.ac: Add a --disable-bold-man-page-references option. Addresses https://bugs.gnu.org/53977
* maint: suppress bogus noreturn warningsPaul Eggert2022-01-311-30/+36
| | | | | | | | | | | * configure.ac: Move the single-binary code before the gcc-warnings code, so that the latter can depend on the former. Suppress -Wsuggest-attribute=noreturn with single binaries, to avoid diagnostics like the following: src/expr.c: In function 'single_binary_main_expr': error: function might be candidate for attribute 'noreturn' Problem reported by Pádraig Brady in: https://lists.gnu.org/r/coreutils/2022-01/msg00061.html
* maint: update all copyright year number rangesPádraig Brady2022-01-021-1/+1
| | | | | | | | | Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
* build: be more careful about PerlPaul Eggert2021-12-281-5/+1
| | | | | | Problem reported by Serge Belyshev (Bug#52844). * configure.ac (HAVE_PERL): Rely on latest Gnulib gl_PERL, which sets gl_cv_prog_perl.
* cp: clone on macOSPaul Eggert2021-11-211-0/+3
| | | | | | | * configure.ac: Check for fclonefileat. * src/copy.c [HAVE_FCLONEFILEAT && !USE_XATTR]: Include <sys/clonefile.h>. (copy_reg): If possible, use fclonefileat to clone.
* maint: enable -Wsuggest-attribute=formatPaul Eggert2021-10-311-1/+1
| | | | | | | | | | | | * configure.ac (WERROR_CFLAGS): Enable -Wsuggest-attribute=format for lib/ and src/. * src/copy.c (copy_attr_error, copy_attr_allerror): Add ATTRIBUTE_FORMAT. (copy_attr): Ignore -Wsuggest-attribute=format in the small section of code that needs it ignored. * src/test.c (test_syntax_error): Mark with ATTRIBUTE_FORMAT. (binary_operator): Omit unnecessary NULL args, pacifying -Wsuggest-attribute=format.
* maint: fix white spacePaul Eggert2021-07-261-9/+14
|
* build: fix __get_cpuid_count check to catch link failureCarl Edquist2021-05-101-2/+2
| | | | | | | | | | The test program will compile successfully even if __get_cpuid_count is not declared. The error for the missing symbol will only show up at link time. Thus, use AC_LINK_IFELSE instead of AC_COMPILE_IFELSE. * configure.ac (__get_cpuid_count check): Use C_LINK_IFELSE instead of AC_COMPILE_IFELSE. (__get_cpuid check): Likewise.
* wc: use avx2 optimization when counting only linesKristoffer Brånemyr2021-05-021-0/+49
| | | | | | | | | | | | | | | | | Use cpuid to detect CPU support for avx2 instructions. Performance was seen to improve by 5x for a file with only newlines, while the performance for a file with no such characters is unchanged. * configure.ac [USE_AVX2_WC_LINECOUNT]: A new conditional, set when __get_cpuid_count() and avx2 compiler intrinsics are supported. * src/wc.c (avx2_supported): A new function using __get_cpuid_count() to determine if avx2 instructions are supported. (wc_lines): A new function refactored from wc(), which implements the standard line counting logic, and provides the fallback implementation for when avx2 is not supported. * src/wc_avx2.c: A new module to implement using avx2 intrinsics. * src/local.mk: Reference the new module. Note we build as a separate lib so that it can be portably built with separate -mavx2 etc. flags.
* maint: port to Autoconf 2.71Paul Eggert2021-04-261-1/+1
| | | | | | | | | | | | | * configure.ac: Use AC_PROG_CC, not AC_PROG_CC_STDC. * gl/modules/smack (configure.ac): * m4/jm-macros.m4 (coreutils_MACROS): * m4/xattr.m4 (gl_FUNC_XATTR): Use AS_HELP_STRING, not AC_HELP_STRING. * m4/check-decl.m4 (gl_CHECK_DECLS): Do not require AC_HEADER_TIME; we no longer care about it directly. * m4/jm-macros.m4 (coreutils_MACROS): Do not require AC_ISC_POSIX, which became obsolete in 2006. Use AC_LINK_IFELSE instead of AC_TRY_LINK.
* cksum: use pclmul hardware instruction for CRC32 calculationKristoffer Brånemyr2021-03-151-0/+51
| | | | | | | | | | | | | | | | | | | | Use cpuid to detect CPU support for hardware instruction. Fall back to slice by 8 algorithm if not supported. A 500MiB file improves from 1.40s to 0.67s on an i3-2310M * configure.ac [USE_PCLMUL_CRC32]: A new conditional, set when __get_cpuid() and clmul compiler intrinsics are supported. * src/cksum.c (pclmul_supported): A new function using __get_cpuid() to determine if pclmul instructions are supported. (cksum): A new function refactored from cksum_slice8(), which calls pclmul_supported() and then cksum_slice8() or cksum_pclmul() as appropriate. * src/cksum.h: Export the crctab array for use in the new module. * src/cksum_pclmul.c: A new module to implement using pclmul intrinsics. * po/POTFILES.in: Reference the new cksum_pclmul module. * src/local.mk: Likewise. Note we build it as a separate library so that it can be portably built with separate -mavx etc. flags. * tests/misc/cksum.sh: Add new test modes for pertinent buffer sizes.
* maint: update all copyright year number rangesPádraig Brady2021-01-011-1/+1
| | | | | | | | | Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
* build: be less aggressive about -fanalyzerPaul Eggert2020-07-101-6/+16
| | | | | | * configure.ac: Don’t enable -fanalyzer unless configured with the new --enable-gcc-warnings=expensive option. See thread at: https://lists.gnu.org/r/coreutils/2020-07/msg00011.html
* maint: use Gnulib libgmp modulePaul Eggert2020-07-071-2/+0
| | | | | | | | | | | This lets use assume multiple-precision arithmetic on all platforms, simplifying the code. * bootstrap.conf (gnulib_modules): Add libgmp. * configure.ac: Don’t call cu_GMP, as this is now done by Gnulib. * m4/gmp.m4: Remove. * src/expr.c, src/factor.c: Use gmp.h unconditionally. * src/factor.c: Use the simpler ‘#ifndef mpz_inits’ to determine whether there is an mpz_inits macro.
* build: once again distribute .tar.gz filesJan Nieuwenhuizen2020-02-271-2/+1
| | | | | | | | * configure.ac: Reenable distribution of gzip-compressed tarballs, for Guix bootstrapping reasons as discussed at: https://lists.gnu.org/r/coreutils/2020-02/msg00042.html * THANKS.in: Remove me, as now a committer. * NEWS (Build-related): Mention this.
* maint: avoid syntax-check failure in previous commitPádraig Brady2020-02-091-1/+2
| | | | * configure.ac: Restrict lines to 80 chars.
* build: suppress new FP warning from gcc-10.0.1Jim Meyering2020-02-081-0/+4
| | | | | | * configure.ac (GNULIB_WARN_CFLAGS): Add -Wno-return-local-addr to avoid FP warning about careadlinkat.c. Discussed starting in https://lists.gnu.org/r/coreutils/2020-02/msg00006.html
* build: avoid vector performance warnings in randpermPádraig Brady2020-02-031-0/+2
| | | | | | * configure.ac: Add -Wno-vector-operation-performance to suppress the following gcc-9.2 error in gl/lib/randperm.c: error: vector operation will be expanded piecewise
* build: auto enable use of openssl with >= version 3Pádraig Brady2020-01-011-0/+1
| | | | | | | * configure.ac: Set --with-openssl=auto-gpl-compat as the default, so that openssl is used for md5sum etc., with openssl >= 3, which is newly licensed under ASL v2. * gnulib: Update to include "auto-gpl-compat" support.
* maint: update all copyright year number rangesPádraig Brady2020-01-011-1/+1
| | | | | | | | | Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
* build: don’t worry about logical-op checkingPaul Eggert2019-10-221-6/+0
| | | | | | * configure.ac: Remove code tailoring --enable-gcc-warnings to GCC 4.7 and earlier, as developers no longer need to worry about GCCs that old.
* build: re-enable type-limits checkingPaul Eggert2019-10-221-2/+0
| | | | | | | | | * configure.ac: When --enable-gcc-warnings is used, omit -Wno-type-limits. The need for -Wno-type-limits has passed, now that intprops.h uses builtin primitives for GCC 5 and later, given that recent GCCs issue type-limits warnings only for non-constant expressions. --enable-gcc-warnings is not intended for use with old compilers, so we can drop -Wno-type-limits now.
* cp: fix /dev/stdin problem on SolarisPaul Eggert2019-05-281-0/+9
| | | | | | | | | | Problem reported by Jakub Kulik (Bug#35713). * NEWS: Mention this. * configure.ac (DEV_FD_MIGHT_BE_CHR): New macro. * src/copy.c (DEV_FD_MIGHT_BE_CHR): Default to false. (follow_fstatat): New function. (copy_internal): Use it. * src/copy.h (XSTAT): Remove; no longer used.
* b2sum: port to HP-UX aCCPaul Eggert2019-05-151-12/+0
| | | | | | | | | | | | | | Its support for the -include option is flaky. Problem reported by Michael Osipov (Bug#35650). Plus, we could run into other compilers that don’t support any option like -include. Change the code so that -include is not needed. Although this causes us to depart from the upstream version, we’re already doing that for other reasons. * configure.ac (USE_XLC_INCLUDE): Remove, as there’s no guarantee a compiler will support something like -include. * src/blake2/b2sum.c [HAVE_CONFIG_H]: Include <config.h>. * src/local.mk (src_b2sum_CPPFLAGS): Add -DHAVE_CONFIG_H. Do not use -include or a substitute.
* stdbuf: port configure-time checking to HP-UX aCCPaul Eggert2019-05-141-0/+3
| | | | | | Problem reported by Michael Osipov (Bug#35650). * configure.ac: Use AC_LANG_WERROR to pay attention to compiler and linker warnings when testing whether stdbuf will work.
* stat: print birth time on systems supporting statxMartin Bukatovic2019-03-031-0/+3
| | | | | | * configure.ac: Check for statx(), available on glibc >= 2.28. * src/stat.c (get_birthtime): Call statx() when available. * NEWS: Mention the improvement.
* build: ensure VLAs are not usedPádraig Brady2019-01-191-1/+0
| | | | | | | | | Fail developer builds if VLAs are used, as there are portability concerns to consider with them. * configure.ac: Enable -Wvla which is implicit in the full list added. * m4/jm-macros.m4: Define GNULIB_NO_VLA which disables use of VLAs within gnulib code.
* maint: update all copyright year number rangesAssaf Gordon2019-01-011-1/+1
| | | | | | | | | Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
* maint: update all copyright year number rangesPádraig Brady2018-01-011-1/+1
| | | | | | | | | Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
* maint: ensure https:// URLs are used in --help and man pagesPádraig Brady2017-11-051-1/+4
| | | | | * configure.ac(AC_INIT): Specify the URL explicitly, so we're not dependent on unreleased autoconf.
* all: prefer HTTPS in URLsPaul Eggert2017-09-191-1/+1
|
* build: use the appropriate single file include option with xlcPádraig Brady2017-08-131-0/+12
| | | | | | * configure.ac: Set USE_XLC_INCLUDE when __xlc__ is defined. * src/local.mk: Use it to select the appropriate include option. Reported by Michael Felt.
* build: adjust warning options to work with latest GCCJim Meyering2017-08-121-0/+4
| | | | | | | | * configure.ac: Disable some new warnings to avoid false positives. Building with warnings enabled and latest gcc would evoke build failure without these changes. Disable the following in coreutils proper: -Wformat-overflow=2 -Wformat-truncation=2, and disable these for gnulib: -Wformat-truncation=2 -Wduplicated-branches
* timeout: fix race possibly terminating wrong processTobias Stoeckmann2017-02-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | The race is unlikely, as timeout(1) needs to receive a signal in the few operations between waitpid() returning and exit(). Also the system needs to have reallocated the just released pid in this time window. Previously we never disabled the signal handler that sent the termination signal to the "child" pid. However once waitpid() has reaped the child, the system is free to allocate that pid, so we must ensure we don't process any further signals. * build-aux/gen-lists-of-programs.sh: Build timeout(1) optionally... * configure.ac: ...predicated on sigsuspend() being available. * src/timeout.c (block_cleanup): A new function to ensure the cleanup() handler is disabled after waitpid has returned. (main): Use sigsuspend() to wait with cleanup() enabled but disabled once it returns, and thus disabled for the waitpid() call. (monitored_pid): Change to the more accurate pid_t. * NEWS: Mention the fix. Fixes http://bugs.gnu.org/25624
* maint: modernize URLsPaul Eggert2017-01-141-1/+1
| | | | | | | A lot of this is converting http: to https:. Also, gmane went away, so remove URLs that no longer work and are not easy to figure out what they were. Some of this stuff is so old that it no longer matters anyway.
* maint: update all copyright year number rangesPádraig Brady2017-01-011-1/+1
| | | | | | | | | Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
* pr: fix integer overflow in buffer size calcsPaul Eggert2016-11-231-0/+2
| | | | | | | | | | Problem reported by Marcel Böhme (Bug#24996). * configure.ac (WERROR_CFLAGS): Avoid -Wtype-limits. * src/pr.c (col_sep_string): Now a const pointer. All uses changed. (integer_overflow): New function. (separator_string, main, init_parameters, init_store_cols): Check for integer overflow. (align_column, read_line, print_stored): Avoid integer overflow.
* maint: update all copyright year number rangesPádraig Brady2016-01-011-1/+1
| | | | | | | | | Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
* build: port to Studio C on Solaris 12Paul Eggert2015-12-031-7/+14
| | | | | | Reported by Rich Burridge in: http://bugs.gnu.org/22087 * configure.ac (HAVE_UT_HOST, HAVE_C_LINE, stdbuf): Pacify picky compilers that complain about unreachable statements.
* tests: ensure programs are built before testingPádraig Brady2015-11-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | programs may not be built due to missing system dependencies, or any program can be excluded at configure time with --enable-no-install-program. So ensure we're not testing the system versions in these cases. * init.cfg (print_ver_): Call require_built_ first. * tests/misc/tty-eof.pl: Skip programs not built. * tests/Coreutils.pm (run_tests): Likewise. * tests/misc/ls-misc.pl: Use 'env test' rather than abs path. * tests/misc/test-diag.pl: Likewise. * tests/local.mk: Adjust include order for dependencies. * tests/misc/arch.sh: Remove redundant calls to require_built_. * tests/misc/chroot-fail.sh: Likewise. * tests/misc/groups-dash.sh: Likewise. * tests/misc/groups-version.sh: Likewise. * tests/misc/stdbuf.sh: Likewise. * tests/cp/acl.sh: Remove problematic call to print_ver_ [gs]etfacl. * tests/mv/acl.sh: Likewise. * cfg.mk (sc_env_test_dependencies): A new syntax check to enforce specifying dependencies with print_ver_ for programs specified through the env command. * du/bigtime.sh: Add new print_ver_ dependencies. * du/max-depth.sh: Likewise. * dd/ascii.sh: Likewise. * tests/ls/capability.sh: Likewise. * tests/ls/root-rel-symlink-color.sh: Likewise. * tests/misc/chroot-fail.sh: Likewise. * tests/misc/readlink-fp-loop.sh: Likewise. * tests/misc/sort-debug-keys.sh: Likewise. * tests/readlink/can-e.sh: Likewise. * tests/readlink/can-f.sh: Likewise. * tests/readlink/can-m.sh: Likewise. * tests/tail-2/inotify-race.sh: Likewise. * tests/tail-2/inotify-race2.sh: Likewise. * tests/touch/no-create-missing.sh: Likewise. * tests/touch/no-dereference.sh: Likewise. * tests/misc/printenv.sh: Tweak to avoid syntax check trigger. * tests/misc/help-version.sh: Likewise. * tests/misc/yes.sh: Likewise. * tests/misc/printf-quote.sh: Use previously unused $prog. * configure.ac (EXTRA_MANS): Add $gl_no_install_prog to the list so that check-x-vs-1 syntax check is satisfied.
* tests: fix false failure in recent test adjustmentPádraig Brady2015-06-061-5/+3
| | | | | | | | | * configure.ac: Comment on why we link rather than run the test, and remove the moot __ELF__ check since we never ran it anyway, and the new CFLAGS and LDFLAGS are a more direct test of support. * tests/misc/wc-parallel.sh: Fix a syntax error in the previous change. * tests/misc/md5sum-parallel.sh: Use better error checking, consistent with that used in wc-parallel.sh.
* build: port to AIXPaul Eggert2015-06-061-4/+14
| | | | | | | | | | | | | Problems reported by Michael Felt, and and part of this fix taken from code suggested by Pádraig Brady in: http://bugs.gnu.org/20733#112 * configure.ac (stdbuf_supported): Check for warnings, and for -fPIC and -shared, for AIX. * src/stat.c (STRUCT_STATVFS): Define to struct statvfs64 if STATFS is statvfs64. * src/sync.c (sync_arg) [_AIX]: Open in write mode, since AIX fsync doesn't work on read-only file descriptors. * tests/misc/wc-parallel.sh: Skip test if xargs -P does not work.
* build: remove workarounds for unsupported gettext versionsPádraig Brady2015-05-281-1/+1
| | | | | | | | | | | | | | | | | Now that we depend on gettext >= 0.19.2 remove the workaround for issues in autopoint 0.18.3. Note the scheme currently used in newer gettext (autopoint) to avoid these issues requires autoconf >= 2.69, therefore we update this requirement also. Note the gettext version dependence from gnulib comes from gnulib using gettext macros, and coreutils indirectly depends on the gettext module due to: http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=41dca647 bootstrap will then update m4/po.m4 and thus require a supportng gettext version. * bootstrap: Remove moot warning (resyncing with gnulib). * configure.ac (AC_PREREQ): Change to 2.69 (now 3 years old).
* build: rely on gnulib to determine printf routines are safePádraig Brady2015-04-271-6/+0
| | | | | | | gnulib now only checks that the printf routines never crash, which is all coreutils currrently requires, and so we revert commit v8.23-81-gf57bfbb to let gnulib decide whether to replace the system printf routines.
* build: reduce gettext dependency to 0.19.2Pádraig Brady2015-04-271-1/+1
| | | | | | | | * bootstrap.conf: 0.19.2 is available on openSUSE-13.2, Debian-8.0, and Ubuntu-14.10. Given there were issues with earlier 0.19 gettext releases, set this as the new minimum. * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise. Reported by Bernhard Voelker
* build: update gnulib submodule to latestPaul Eggert2015-04-261-1/+1
| | | | | | | | | * bootstrap.conf (gnulib_modules): Add file-has-acl. (buildreq): Bump autopoint and gettext to 0.19.4. * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.19.4. * gl/lib/tempname.c.diff, gl/lib/tempname.h.diff: Merge recent gnulib changes.
* maint: update all copyright year number rangesPádraig Brady2015-01-011-1/+1
| | | | | | | | Run "make update-copyright" and then... * tests/sample-test: Adjust to use the single most recent year. * tests/du/bind-mount-dir-cycle-v2.sh: Fix case in copyright message, so that year is updated automatically in future.
* build: use the system printf routines in most casesPádraig Brady2014-12-101-0/+6
| | | | | | | | | | | | | | | | | | | | glibc <= 2.5 would crash when passed invalid long double values, therefore internal gnulib routines were used, essentially only by od, to output such invalid values. Later glibc versions don't crash, as per https://sourceware.org/bugzilla/show_bug.cgi?id=4586 and subsequently od was adjusted to use the system printf routines through the use of the ftoastr module with commit v8.7-22-ga71c22f. Consequently our testing of this feature was moot, and use of the gnulib printf replacement for printf(1), od(1) and error(3) etc. was redundant. * configure.ac (gl_printf_safe): Unset so that we don't check that "nan" is output for these long double values. * tests/misc/od-float.sh: Adjust all existing checks to fail if od exits with failure status (like crashing for example). Add a new case for one of the problematic invalid long double values for x86_64. We only check that od exits successfully at present, which may change if https://sourceware.org/bugzilla/show_bug.cgi?id=17661 is resolved.