summaryrefslogtreecommitdiff
path: root/m4
Commit message (Collapse)AuthorAgeFilesLines
* Build: Update comments about unaligned access to mention 64-bit.Lasse Collin2023-03-171-2/+2
|
* Build: Fix config.h comments.Lasse Collin2023-01-021-1/+1
|
* Build: Only define HAVE_PROGRAM_INVOCATION_NAME if it is set to 1.Jia Tan2023-01-021-1/+4
| | | | | | | | HAVE_DECL_PROGRAM_INVOCATION_NAME is renamed to HAVE_PROGRAM_INVOCATION_NAME. Previously, HAVE_DECL_PROGRAM_INVOCATION_NAME was always set when building with autotools. CMake would only set this when it was 1, and the dos/config.h did not define it. The new macro definition is consistent across build systems.
* Build: Update m4/ax_pthread.m4 from Autoconf Archive.Lasse Collin2022-10-251-7/+22
|
* tuklib_cpucores: Use HW_NCPUONLINE on OpenBSD.Lasse Collin2022-10-201-0/+5
| | | | | | | | On OpenBSD the number of cores online is often less than what HW_NCPU would return because OpenBSD disables simultaneous multi-threading (SMT) by default. Thanks to Christian Weisgerber.
* tuklib_integer: Add 64-bit endianness-converting reads and writes.Lasse Collin2022-10-051-4/+4
| | | | | | Also update the comment in liblzma's memcmplen.h. Thanks to Michał Górny for the original patch for the reads.
* Build: Update m4/ax_pthread.m4 from Autoconf Archive (again).Lasse Collin2020-03-151-102/+117
|
* Update m4/.gitignore.Lasse Collin2020-02-241-0/+1
|
* tuklib: Omit an unneeded <sys/types.h> from a tests.Lasse Collin2020-02-242-2/+0
| | | | | | | tuklib_cpucores.c and tuklib_physmem.c don't include <sys/types.h> even via other files in this package, so clearly that header isn't needed in the tests either (no one has reported build problems due to a missing header in a .c file).
* Build: Add visibility.m4 from gnulib.Lasse Collin2020-02-212-1/+77
| | | | | | Appears that this file used to get included as a side effect of gettext. After the change to gettext version requirements this file no longer got copied to the package and so the build was broken.
* tuklib_integer.m4: Optimize the check order.Lasse Collin2020-02-211-27/+29
| | | | The __builtin byteswapping is the preferred one so check for it first.
* Update m4/.gitignore.Lasse Collin2020-02-051-0/+1
|
* Build: Update m4/ax_pthread.m4 from Autoconf Archive.Lasse Collin2020-02-031-119/+279
|
* Revise tuklib_integer.h and .m4.Lasse Collin2019-12-311-1/+45
| | | | | | | | | | | | | | | | | | | | | | | Add a configure option --enable-unsafe-type-punning to get the old non-conforming memory access methods. It can be useful with old compilers or in some other less typical situations but shouldn't normally be used. Omit the packed struct trick for unaligned access. While it's best in some cases, this is simpler. If the memcpy trick doesn't work, one can request unsafe type punning from configure. Because CRC32/CRC64 code needs fast aligned reads, if no very safe way to do it is found, type punning is used as a fallback. This sucks but since it currently works in practice, it seems to be the least bad option. It's never needed with GCC >= 4.7 or Clang >= 3.6 since these support __builtin_assume_aligned and thus fast aligned access can be done with the memcpy trick. Other things: - Support GCC/Clang __builtin_bswapXX - Cleaner bswap fallback macros - Minor cleanups
* tuklib_integer: Autodetect support for unaligned access on ARM.Lasse Collin2019-06-011-0/+11
| | | | | The result is used as the default for --enable-unaligned-access. The test should work with GCC and Clang.
* tuklib_cpucores: Add support for sched_getaffinity().Lasse Collin2016-10-241-1/+29
| | | | | | | | | | | | | | | | It's available in glibc (GNU/Linux, GNU/kFreeBSD). It's better than sysconf(_SC_NPROCESSORS_ONLN) because sched_getaffinity() gives the number of cores available to the process instead of the total number of cores online. As a side effect, this commit fixes a bug on GNU/kFreeBSD where configure would detect the FreeBSD-specific cpuset_getaffinity() but it wouldn't actually work because on GNU/kFreeBSD it requires using -lfreebsd-glue when linking. Now the glibc-specific function will be used instead. Thanks to Sebastian Andrzej Siewior for the original patch and testing.
* Fix bugs and otherwise improve ax_check_capsicum.m4.Lasse Collin2015-03-311-52/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | AU_ALIAS was removed because the new version is incompatible with the old version. It no longer checks for <sys/capability.h> separately. It's enough to test for it as part of AC_CHECK_DECL. The defines HAVE_CAPSICUM_SYS_CAPSICUM_H and HAVE_CAPSICUM_SYS_CAPABILITY_H were removed as unneeded. HAVE_SYS_CAPSICUM_H from AC_CHECK_HEADERS is enough. It no longer does a useless search for the Capsicum library if the header wasn't found. Fixed a bug in ACTION-IF-FOUND (the first argument). Specifying the argument omitted the default action but the given action wasn't used instead. AC_DEFINE([HAVE_CAPSICUM]) is now always called when Capsicum support is found. Previously it was part of the default ACTION-IF-FOUND which a custom action would override. Now the default action only prepends ${CAPSICUM_LIB} to LIBS. The documentation was updated. Since there as no serial number, "#serial 2" was added.
* Add m4/ax_check_capsicum.m4 for detecting Capsicum support.Lasse Collin2015-03-311-0/+86
| | | | | | | The file was loaded from this web page: https://github.com/google/capsicum-test/blob/dev/autoconf/m4/ax_check_capsicum.m4 Thanks to Loganaden Velvindron for pointing it out for me.
* Fix the detection of installed RAM on QNX.Lasse Collin2015-03-291-3/+3
| | | | | | | The earlier version compiled but didn't actually work since sysconf(_SC_PHYS_PAGES) always fails (or so I was told). Thanks to Ole André Vadla Ravnås for the patch and testing.
* Fix CPU core count detection on QNX.Lasse Collin2015-03-271-4/+11
| | | | | | | | | | | | It tried to use sysctl() on QNX but - it broke the build because sysctl() needs -lsocket on QNX; - sysctl() doesn't work for detecting the core count on QNX even if it compiled. sysconf() works. An alternative would have been to use QNX-specific SYSPAGE_ENTRY(num_cpu) from <sys/syspage.h>. Thanks to Ole André Vadla Ravnås.
* tuklib_cpucores: Use cpuset_getaffinity() on FreeBSD if available.Lasse Collin2015-02-101-1/+22
| | | | | | | | In FreeBSD, cpuset_getaffinity() is the preferred way to get the number of available cores. Thanks to Rui Paulo for the patch. I edited it slightly, but hopefully I didn't break anything.
* Build: Update m4/ax_pthread.m4 from Autoconf Archive.Lasse Collin2014-11-171-24/+47
|
* Build: Replace obsolete AC_HELP_STRING with AS_HELP_STRING.Lasse Collin2014-11-171-1/+1
|
* Update .gitignore files.Lasse Collin2014-10-291-0/+3
|
* Add support for AmigaOS/AROS to tuklib_physmem().Lasse Collin2014-10-091-1/+2
| | | | Thanks to Fredrik Wikstrom.
* Windows: Add Windows support to tuklib_cpucores().Lasse Collin2013-08-031-2/+17
| | | | | | | It is used for Cygwin too. I'm not sure if that is a good or bad idea. Thanks to Vincent Torri.
* Build: Upgrade m4/acx_pthread.m4 to the latest version.Lasse Collin2012-05-241-36/+62
|
* Build: Upgrade m4/acx_pthread.m4 to the latest version.Lasse Collin2011-04-051-83/+87
| | | | It was renamed to ax_pthread.m4 in Autoconf Archive.
* xz: Multiple fixes.Lasse Collin2010-09-101-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code assumed that printing numbers with thousand separators and decimal points would always produce only US-ASCII characters. This was used for buffer sizes (with snprintf(), no overflows) and aligning columns of the progress indicator and --list. That assumption was wrong (e.g. LC_ALL=fi_FI.UTF-8 with glibc), so multibyte character support was added in this commit. The old way is used if the operating system doesn't have enough multibyte support (e.g. lacks wcwidth()). The sizes of buffers were increased to accomodate multibyte characters. I don't know how big they should be exactly, but they aren't used for anything critical, so it's not too bad. If they still aren't big enough, I hopefully get a bug report. snprintf() takes care of avoiding buffer overflows. Some static buffers were replaced with buffers allocated on stack. double_to_str() was removed. uint64_to_str() and uint64_to_nicestr() now share the static buffer and test for thousand separator support. Integrity check names "None" and "Unknown-N" (2 <= N <= 15) were marked to be translated. I had forgot these, plus they wouldn't have worked correctly anyway before this commit, because printing tables with multibyte strings didn't work. Thanks to Marek Černocký for reporting the bug about misaligned table columns in --list output.
* Updates to tuklib_physmem and tuklib_cpucores.Lasse Collin2010-05-102-8/+97
| | | | | | | | | | | | | | | | Don't use #error to generate compile error, because some compilers actually don't take it as an error. This fixes tuklib_physmem on IRIX. Fix incorrect error check for sysconf() return values. Add AIX, HP-UX, and Tru64 specific code to detect the amount RAM. Add HP-UX specific code to detect the number of CPU cores. Thanks a lot to Peter O'Gorman for initial patches, testing, and debugging these fixes.
* Add IRIX-specific code to tuklib_physmem and tuklib_cpucores.Lasse Collin2010-01-122-3/+30
| | | | | | | This is untested but it will get tested soon and, if needed, fixed before 5.0.0. Thanks to Stuart Shelton.
* Update tuklib_cpucores.m4 and tuklib_physmem.m4 from tuklib,Lasse Collin2009-11-202-36/+45
| | | | | | which now use AC_CACHE_CHECK. Using the cache variable, configure now warns if there is no method to detect the amount of RAM and recommends using --enable-assume-ram.
* Use a tuklib module for integer handling.Lasse Collin2009-10-041-0/+74
| | | | | | | | | This replaces bswap.h and integer.h. The tuklib module uses <byteswap.h> on GNU, <sys/endian.h> on *BSDs and <sys/byteorder.h> on Solaris, which may contain optimized code like inline assembly.
* Various changes.Lasse Collin2009-09-195-118/+215
| | | | | | | | | | | | | | | Separate a few reusable components from XZ Utils specific code. The reusable code is now in "tuklib" modules. A few more could be separated still, e.g. bswap.h. Fix some bugs in lzmainfo. Fix physmem and cpucores code on OS/2. Thanks to Elbert Pol for help. Add OpenVMS support into physmem. Add a few #ifdefs to ease building XZ Utils on OpenVMS. Thanks to Jouk Jansen for the original patch.
* Fix sysctl() usage.Lasse Collin2009-08-292-2/+2
| | | | | | | This fixes build on *BSDs and Darwin. Thanks to Jukka Salmi for the patches. Richard Koch reported the problem too.
* Major update to the xzgrep and other scripts based onLasse Collin2009-07-051-0/+63
| | | | | | | | | | | | | | the latest versions found from gzip CVS repository. configure will try to find a POSIX shell to be used by the scripts. This should ease portability on systems which have pre-POSIX /bin/sh. xzgrep and xzdiff support .xz, .lzma, .gz, and .bz2 files. xzmore and xzless support only .xz and .lzma files. The name of the xz executable used in these scripts is now correct even if --program-transform-name has been used.
* Fix wrong macro names in lc_cpucores.m4 and cpucores.h.Lasse Collin2009-03-181-2/+2
| | | | Thanks to Bert Wesarg.
* Test for Linux-specific sysinfo() only on Linux systems.Lasse Collin2009-03-011-9/+19
| | | | Some other systems have sysinfo() with different semantics.
* Fix the Autoconf test for getopt_long replacement.Lasse Collin2009-03-011-0/+4
| | | | It was broken by e114502b2bc371e4a45449832cb69be036360722.
* Cleanups to the code that detects the amount of RAM andLasse Collin2009-02-142-0/+131
| | | | | | | | | | the number of CPU cores. Added support for using sysinfo() on Linux systems whose libc lacks appropriate sysconf() support (at least dietlibc). The Autoconf macros were split into separate files, and CPU core count detection was moved from hardware.c to cpucores.h. The core count isn't used for anything real for now, so a problematic part in process.c was commented out.
* add gitignore filesMike Frysinger2009-02-071-0/+35
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Oh well, big messy commit again. Some highlights:Lasse Collin2008-11-191-40/+24
| | | | | | | | | | | | - Updated to the latest, probably final file format version. - Command line tool reworked to not use threads anymore. Threading will probably go into liblzma anyway. - Memory usage limit is now about 30 % for uncompression and about 90 % for compression. - Progress indicator with --verbose - Simplified --help and full --long-help - Upgraded to the last LGPLv2.1+ getopt_long from gnulib. - Some bug fixes
* Replaced the range decoder optimization that used arithmeticLasse Collin2008-03-241-36/+0
| | | | | | right shift with as fast version that doesn't need arithmetic right shift. Removed the related check from configure.ac.
* Added autoconf check to detect if we can use arithmeticLasse Collin2008-03-221-0/+36
| | | | right shift for optimizations.
* Imported to git.Lasse Collin2007-12-092-0/+362