From 939685dff9998a9b09fe332e3a906763435bb51a Mon Sep 17 00:00:00 2001 From: Sam James Date: Sat, 22 Jan 2022 03:54:42 +0000 Subject: [PATCH] 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 --- configure.ac | 4 ++-- 1 file 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.])