diff options
author | Sam James <sam@gentoo.org> | 2022-01-22 03:54:42 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-01-22 03:57:14 +0000 |
commit | 939685dff9998a9b09fe332e3a906763435bb51a (patch) | |
tree | 1003457b14a3281a3b6c0684e048a4cc82cfbb10 | |
parent | 3e1a27a98110d31c42397562490150247dd7dc6a (diff) |
build: use AC_CANONICAL_HOST, not AC_CANONICAL_TARGET
htop is a program which will be run on CHOST after cross-compilation;
CTARGET is only for a small number of cases where a program itself outputs
code (so you might cross-compile a compiler which spits out code for a third
architecture/platform).
We want to use AC_CANONICAL_HOST to check CHOST for the platform currently
being used to build htop.
The confusion around this issue was compounded by a mistake in autoconf-archive
which has since been fixed (AX_PTHREAD pulled it in incorrectly).
See: https://github.com/libstatgrab/libstatgrab/pull/131
See: https://github.com/fenrus75/powertop/pull/90#discussion_r705803725
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | configure.ac | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 4ecac1ec..e659d6f5 100644 --- a/configure.ac +++ b/configure.ac @@ -12,7 +12,7 @@ AC_CONFIG_SRCDIR([htop.c]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([config.h]) -AC_CANONICAL_TARGET +AC_CANONICAL_HOST AM_INIT_AUTOMAKE([-Wall std-options subdir-objects]) # ---------------------------------------------------------------------- @@ -22,7 +22,7 @@ AM_INIT_AUTOMAKE([-Wall std-options subdir-objects]) # Checks for platform. # ---------------------------------------------------------------------- -case "$target_os" in +case "$host_os" in linux*|gnu*) my_htop_platform=linux AC_DEFINE([HTOP_LINUX], [], [Building for Linux.]) |