aboutsummaryrefslogtreecommitdiff
path: root/m4 (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2020-03-15Build: Update m4/ax_pthread.m4 from Autoconf Archive (again).Lasse Collin1-102/+117
2020-02-24Update m4/.gitignore.Lasse Collin1-0/+1
2020-02-24tuklib: Omit an unneeded <sys/types.h> from a tests.Lasse Collin2-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).
2020-02-21Build: Add visibility.m4 from gnulib.Lasse Collin2-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.
2020-02-21tuklib_integer.m4: Optimize the check order.Lasse Collin1-27/+29
The __builtin byteswapping is the preferred one so check for it first.
2020-02-05Update m4/.gitignore.Lasse Collin1-0/+1
2020-02-03Build: Update m4/ax_pthread.m4 from Autoconf Archive.Lasse Collin1-119/+279
2019-12-31Revise tuklib_integer.h and .m4.Lasse Collin1-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
2019-06-01tuklib_integer: Autodetect support for unaligned access on ARM.Lasse Collin1-0/+11
The result is used as the default for --enable-unaligned-access. The test should work with GCC and Clang.
2016-10-24tuklib_cpucores: Add support for sched_getaffinity().Lasse Collin1-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.
2015-03-31Fix bugs and otherwise improve ax_check_capsicum.m4.Lasse Collin1-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.
2015-03-31Add m4/ax_check_capsicum.m4 for detecting Capsicum support.Lasse Collin1-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.
2015-03-29Fix the detection of installed RAM on QNX.Lasse Collin1-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.
2015-03-27Fix CPU core count detection on QNX.Lasse Collin1-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.
2015-02-10tuklib_cpucores: Use cpuset_getaffinity() on FreeBSD if available.Lasse Collin1-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.
2014-11-17Build: Update m4/ax_pthread.m4 from Autoconf Archive.Lasse Collin1-24/+47
2014-11-17Build: Replace obsolete AC_HELP_STRING with AS_HELP_STRING.Lasse Collin1-1/+1
2014-10-29Update .gitignore files.Lasse Collin1-0/+3
2014-10-09Add support for AmigaOS/AROS to tuklib_physmem().Lasse Collin1-1/+2
Thanks to Fredrik Wikstrom.
2013-08-03Windows: Add Windows support to tuklib_cpucores().Lasse Collin1-2/+17
It is used for Cygwin too. I'm not sure if that is a good or bad idea. Thanks to Vincent Torri.
2012-05-24Build: Upgrade m4/acx_pthread.m4 to the latest version.Lasse Collin1-36/+62
2011-04-05Build: Upgrade m4/acx_pthread.m4 to the latest version.Lasse Collin1-83/+87
It was renamed to ax_pthread.m4 in Autoconf Archive.
2010-09-10xz: Multiple fixes.Lasse Collin1-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.
2010-05-10Updates to tuklib_physmem and tuklib_cpucores.Lasse Collin2-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.
2010-01-12Add IRIX-specific code to tuklib_physmem and tuklib_cpucores.Lasse Collin2-3/+30
This is untested but it will get tested soon and, if needed, fixed before 5.0.0. Thanks to Stuart Shelton.
2009-11-20Update tuklib_cpucores.m4 and tuklib_physmem.m4 from tuklib,Lasse Collin2-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.
2009-10-04Use a tuklib module for integer handling.Lasse Collin1-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.
2009-09-19Various changes.Lasse Collin5-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.
2009-08-29Fix sysctl() usage.Lasse Collin2-2/+2
This fixes build on *BSDs and Darwin. Thanks to Jukka Salmi for the patches. Richard Koch reported the problem too.
2009-07-05Major update to the xzgrep and other scripts based onLasse Collin1-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.
2009-03-18Fix wrong macro names in lc_cpucores.m4 and cpucores.h.Lasse Collin1-2/+2
Thanks to Bert Wesarg.
2009-03-01Test for Linux-specific sysinfo() only on Linux systems.Lasse Collin1-9/+19
Some other systems have sysinfo() with different semantics.
2009-03-01Fix the Autoconf test for getopt_long replacement.Lasse Collin1-0/+4
It was broken by e114502b2bc371e4a45449832cb69be036360722.
2009-02-14Cleanups to the code that detects the amount of RAM andLasse Collin2-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.
2009-02-07add gitignore filesMike Frysinger1-0/+35
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-11-19Oh well, big messy commit again. Some highlights:Lasse Collin1-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
2008-03-24Replaced the range decoder optimization that used arithmeticLasse Collin1-36/+0
right shift with as fast version that doesn't need arithmetic right shift. Removed the related check from configure.ac.
2008-03-22Added autoconf check to detect if we can use arithmeticLasse Collin1-0/+36
right shift for optimizations.