From ddbb0c2c35ca1070387b975e85f4fd12f4aaf93a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Thu, 29 Oct 2020 21:50:38 +0100 Subject: [PATCH] Add HTOP_$platform defines to config.h header Can be used to conditionally compile platform specific code. --- configure.ac | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configure.ac b/configure.ac index b10d819a..bc8592d0 100644 --- a/configure.ac +++ b/configure.ac @@ -26,24 +26,31 @@ AC_USE_SYSTEM_EXTENSIONS case "$target_os" in linux*|gnu*) my_htop_platform=linux + AC_DEFINE([HTOP_LINUX], [], [Building for Linux]) ;; freebsd*|kfreebsd*) my_htop_platform=freebsd + AC_DEFINE([HTOP_FREEBSD], [], [Building for FreeBSD]) ;; openbsd*) my_htop_platform=openbsd + AC_DEFINE([HTOP_OPENBSD], [], [Building for OpenBSD]) ;; dragonfly*) my_htop_platform=dragonflybsd + AC_DEFINE([HTOP_DRAGONFLYBSD], [], [Building for DragonFlyBSD]) ;; darwin*) my_htop_platform=darwin + AC_DEFINE([HTOP_DARWIN], [], [Building for Darwin]) ;; solaris*) my_htop_platform=solaris + AC_DEFINE([HTOP_SOLARIS], [], [Building for Solaris]) ;; *) my_htop_platform=unsupported + AC_DEFINE([HTOP_UNSUPPORTED], [], [Building for an unsupported platform]) ;; esac