taskstats is only checked on runtime if the column RCHAR, WCHAR, SYSCR,
SYSCW, RBYTES, WBYTES, CNCLWB, IO_READ_RATE, IO_WRITE_RATE or IO_RATE is
selected.
taskstats is currently enabled by default.
Drop the taskstats configuration switch, to reduce the maintenance cost.
cgroup is only checked on runtime if the column CGROUP is selected.
cgroup is currently disabled by default, but most distributions do
enable it.
Drop the cgroup configuration switch, to reduce the maintenance cost.
- enable warnings in autogen script
- drop unused m4/ directory usage
- drop AC_TYPE_SIGNAL:
C99 guarantees the signal return type to be void
- drop AC_CHECK_FILE of procdir:
most of the time compilation is done on a different system than htop is run
and there is a runtime check in place
- improve linux_affinity corss compile logic:
use fourth argument instead of pre-test
Reasoning:
- implementation was unsound -- broke down when I added a fairly
basic macro definition expanding to a struct initializer in a *.c
file.
- made it way too easy (e.g. via otherwise totally innocuous git
commands) to end up with timestamps such that it always ran
MakeHeader.py but never used its output, leading to overbuild noise
when running what should be a null 'make'.
- but mostly: it's just an awkward way of dealing with C code.
Use configure.ac to handle platform differences where some
build hosts have only a python3, or only python, binary.
Related to https://github.com/htop-dev/htop/pull/6
A logic mistake in pull request #746 causes <sys/sysmacro.h> to be
*not* included when AC_HEADER_MAJOR (before autoconf-2.70) finds
'major' in <sys/types.h>. Though this would still build htop, it would
still bring deprecation warning in systems using glibc 2.25-2.27. Fix
the logic and suppress the warning.
Also, include config.h in Process.c for the sake of strengthening the
code.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
This would prevent a careless future package maintainer from creating a
release tarball with a defective configure script. :)
Also, add a warning in the autogen.sh phase if pkg.m4 is unused.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
With this commit:
* if pkgconfig is installed, it will expand the code inside the shell if, adding the pkgconfig-based tests for the dependencies of Linux delay accounting.
* if pkgconfig is not installed, it will add an error message inside the test of Linux delay accounting, telling the user to install pkgconfig and rebuild the configure script if they want to use Linux delay accounting.
The end result is:
* people running Linux
* will not need pkgconfig when not using delay accounting
* will need pkgconfig when using delay accounting
* if they don't have it
* they are told by configure they need to install it and re-run autogen.sh when running from Git
* they are told by configure they need to install it and re-run configure when running from the tarball
* people not running Linux
* will never need pkgconfig
...and in none of the above scenarios the generated configure script produces unexpanded macros for users checking out the sources from Git.