blob: a8b75dcdefc1cb9b6c481a100a127a147727f042 [file] [log] [blame]
Hisham Muhammadd6231ba2006-03-04 18:16:49 +00001# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
Christian Göttschef3623b72021-01-22 19:14:50 +01004# ----------------------------------------------------------------------
5# Autoconf initialization.
6# ----------------------------------------------------------------------
7
Christian Göttsche38b6a012021-01-22 19:14:53 +01008AC_PREREQ([2.69])
Nathan Scott9d16d0a2023-02-05 09:32:28 +11009AC_INIT([htop], [3.3.0-dev], [htop@groups.io], [], [https://htop.dev/])
Hisham Muhammad3383d8e2015-01-21 23:27:31 -020010
Explorer09b71b07f2016-03-12 12:02:06 +080011AC_CONFIG_SRCDIR([htop.c])
Christian Göttsche38b6a012021-01-22 19:14:53 +010012AC_CONFIG_AUX_DIR([build-aux])
Explorer09b71b07f2016-03-12 12:02:06 +080013AC_CONFIG_HEADERS([config.h])
Explorer09b71b07f2016-03-12 12:02:06 +080014
Sam James939685d2022-01-22 03:54:42 +000015AC_CANONICAL_HOST
Christian Göttsche38b6a012021-01-22 19:14:53 +010016AM_INIT_AUTOMAKE([-Wall std-options subdir-objects])
Hisham Muhammadd6231ba2006-03-04 18:16:49 +000017
Hisham Muhammad300af4b2014-11-19 23:17:16 -020018# ----------------------------------------------------------------------
Christian Göttschef3623b72021-01-22 19:14:50 +010019
20
21# ----------------------------------------------------------------------
22# Checks for platform.
23# ----------------------------------------------------------------------
24
Sam James939685d2022-01-22 03:54:42 +000025case "$host_os" in
Christian Göttschef3623b72021-01-22 19:14:50 +010026linux*|gnu*)
27 my_htop_platform=linux
28 AC_DEFINE([HTOP_LINUX], [], [Building for Linux.])
29 ;;
30freebsd*|kfreebsd*)
31 my_htop_platform=freebsd
32 AC_DEFINE([HTOP_FREEBSD], [], [Building for FreeBSD.])
33 ;;
fraggerfox4b49de42021-03-15 13:14:39 +053034netbsd*)
35 my_htop_platform=netbsd
36 AC_DEFINE([HTOP_NETBSD], [], [Building for NetBSD.])
37 ;;
Christian Göttschef3623b72021-01-22 19:14:50 +010038openbsd*)
39 my_htop_platform=openbsd
40 AC_DEFINE([HTOP_OPENBSD], [], [Building for OpenBSD.])
41 ;;
42dragonfly*)
43 my_htop_platform=dragonflybsd
44 AC_DEFINE([HTOP_DRAGONFLYBSD], [], [Building for DragonFlyBSD.])
45 ;;
46darwin*)
47 my_htop_platform=darwin
48 AC_DEFINE([HTOP_DARWIN], [], [Building for Darwin.])
49 ;;
50solaris*)
51 my_htop_platform=solaris
52 AC_DEFINE([HTOP_SOLARIS], [], [Building for Solaris.])
53 ;;
54*)
55 my_htop_platform=unsupported
56 AC_DEFINE([HTOP_UNSUPPORTED], [], [Building for an unsupported platform.])
57 ;;
58esac
Hisham Muhammad4df76d12008-03-05 09:46:47 +000059
Christian Göttsche38b6a012021-01-22 19:14:53 +010060# Enable extensions, required by hwloc scripts
Explorer09b71b07f2016-03-12 12:02:06 +080061AC_USE_SYSTEM_EXTENSIONS
62
Hisham Muhammadeb229d92014-11-24 18:55:03 -020063# ----------------------------------------------------------------------
Hisham Muhammadeb229d92014-11-24 18:55:03 -020064
Christian Göttschef3623b72021-01-22 19:14:50 +010065
Hisham Muhammad300af4b2014-11-19 23:17:16 -020066# ----------------------------------------------------------------------
Christian Göttschef3623b72021-01-22 19:14:50 +010067# Checks for compiler.
Hisham Muhammad300af4b2014-11-19 23:17:16 -020068# ----------------------------------------------------------------------
Hisham Muhammade46f1422006-07-12 01:15:14 +000069
Christian Göttschef3623b72021-01-22 19:14:50 +010070AC_PROG_CC
71AM_PROG_CC_C_O
Christian Göttschea5e2eff2021-08-25 10:23:30 +020072m4_version_prereq([2.70], [], [AC_PROG_CC_C99])
Christian Göttsche38b6a012021-01-22 19:14:53 +010073AS_IF([test "x$ac_cv_prog_cc_c99" = xno], [AC_MSG_ERROR([htop is written in C99. A newer compiler is required.])])
Hisham Muhammadd6231ba2006-03-04 18:16:49 +000074
Christian Göttschef3623b72021-01-22 19:14:50 +010075# ----------------------------------------------------------------------
76
77
78# ----------------------------------------------------------------------
Christian Göttsche575edff2021-01-22 19:14:59 +010079# Checks for static build.
80# ----------------------------------------------------------------------
81
82AC_ARG_ENABLE([static],
83 [AS_HELP_STRING([--enable-static],
84 [build a static htop binary @<:@default=no@:>@])],
85 [],
86 [enable_static=no])
87case "$enable_static" in
88 no)
89 ;;
90 yes)
91 AC_DEFINE([BUILD_STATIC], [1], [Define if building static binary.])
92 CFLAGS="$CFLAGS -static"
93 LDFLAGS="$LDFLAGS -static"
94 ;;
95 *)
96 AC_MSG_ERROR([bad value '$enable_static' for --enable-static option])
97 ;;
98esac
99
100# ----------------------------------------------------------------------
101
Nathan Scottc14a45b2021-02-17 14:43:56 +1100102# ----------------------------------------------------------------------
103# Checks for a PCP-based htop build. (https://pcp.io)
104# ----------------------------------------------------------------------
105
106AC_ARG_ENABLE([pcp],
107 [AS_HELP_STRING([--enable-pcp],
Nathan Scott9ce95572021-04-14 11:34:47 +1000108 [build a pcp-htop binary @<:@default=no@:>@])],
Nathan Scottc14a45b2021-02-17 14:43:56 +1100109 [],
110 [enable_pcp=no])
111case "$enable_pcp" in
112 no)
113 ;;
114 yes)
115 AC_CHECK_HEADERS([pcp/pmapi.h], [my_htop_platform=pcp],
Benny Baumann92324d32021-06-13 19:46:13 +0200116 [AC_MSG_ERROR([can not find PCP header file])])
Nathan Scott94d37982021-06-08 09:46:02 +1000117 AC_SEARCH_LIBS([pmNewContext], [pcp], [], [AC_MSG_ERROR([can not find PCP library])])
118 AC_DEFINE([HTOP_PCP], [1], [Define if building pcp-htop binary.])
Daniel Langefc2377f2021-08-14 10:35:11 +0200119 AC_CONFIG_FILES([pcp-htop.5])
Nathan Scottc14a45b2021-02-17 14:43:56 +1100120 ;;
121 *)
Nathan Scott6bb59f82021-02-19 14:13:27 +1100122 AC_MSG_ERROR([bad value '$enable_pcp' for --enable-pcp option])
Nathan Scottc14a45b2021-02-17 14:43:56 +1100123 ;;
124esac
125
126# ----------------------------------------------------------------------
127
Christian Göttsche575edff2021-01-22 19:14:59 +0100128
129# ----------------------------------------------------------------------
Christian Göttschef3623b72021-01-22 19:14:50 +0100130# Checks for generic header files.
131# ----------------------------------------------------------------------
132
133AC_HEADER_DIRENT
Christian Göttschea5e2eff2021-08-25 10:23:30 +0200134m4_version_prereq([2.70], [AC_CHECK_INCLUDES_DEFAULT], [AC_HEADER_STDC])
Christian Göttschef3623b72021-01-22 19:14:50 +0100135AC_CHECK_HEADERS([ \
136 stdlib.h \
137 string.h \
138 strings.h \
139 sys/param.h \
140 sys/time.h \
Nathan Scott5b50ae32021-03-02 15:58:11 +1100141 sys/utsname.h \
Christian Göttschef3623b72021-01-22 19:14:50 +0100142 unistd.h
Christian Göttsche759a3402021-01-22 19:14:55 +0100143 ], [], [AC_MSG_ERROR([can not find required generic header files])])
Christian Göttschef3623b72021-01-22 19:14:50 +0100144
145AC_HEADER_MAJOR
146dnl glibc 2.25 deprecates 'major' and 'minor' in <sys/types.h> and requires to
147dnl include <sys/sysmacros.h>. However the logic in AC_HEADER_MAJOR has not yet
148dnl been updated in Autoconf 2.69, so use a workaround:
149m4_version_prereq([2.70], [],
150[if test "x$ac_cv_header_sys_mkdev_h" != xyes; then
151 AC_CHECK_HEADER([sys/sysmacros.h], [AC_DEFINE([MAJOR_IN_SYSMACROS], [1],
152 [Define to 1 if `major', `minor', and `makedev' are declared in <sys/sysmacros.h>.])])
153fi])
154
155# Optional Section
156
157AC_CHECK_HEADERS([execinfo.h])
158
159if test "$my_htop_platform" = darwin; then
160 AC_CHECK_HEADERS([mach/mach_time.h])
161fi
162
163# ----------------------------------------------------------------------
164
165
166# ----------------------------------------------------------------------
167# Checks for typedefs, structures, and compiler characteristics.
168# ----------------------------------------------------------------------
169
Christian Göttschef3623b72021-01-22 19:14:50 +0100170AC_TYPE_PID_T
171AC_TYPE_UID_T
172AC_TYPE_UINT8_T
173AC_TYPE_UINT16_T
174AC_TYPE_UINT32_T
175AC_TYPE_UINT64_T
176
Benny Baumann44d12002021-06-27 12:44:01 +0200177AC_MSG_CHECKING(for alloc_size)
178old_CFLAGS="$CFLAGS"
179CFLAGS="$CFLAGS -Wno-error -Werror=attributes"
180AC_COMPILE_IFELSE([
181 AC_LANG_SOURCE(
182 [
183 __attribute__((alloc_size(1))) char* my_alloc(int size) { return 0; }
184 ],[]
185 )],
186 AC_DEFINE([HAVE_ATTR_ALLOC_SIZE], 1, [The alloc_size attribute is supported.])
187 AC_MSG_RESULT(yes),
188 AC_MSG_RESULT(no))
189CFLAGS="$old_CFLAGS"
190
Christian Göttsche8387df12023-02-04 17:34:08 +0100191AC_MSG_CHECKING(for access)
192old_CFLAGS="$CFLAGS"
193CFLAGS="$CFLAGS -Wno-error -Werror=attributes"
194AC_COMPILE_IFELSE([
195 AC_LANG_SOURCE(
196 [
197 __attribute__((access(read_only, 1, 2))) extern int foo(const char* str, unsigned len);
198 ],[]
199 )],
200 AC_DEFINE([HAVE_ATTR_ACCESS], 1, [The access attribute is supported.])
201 AC_MSG_RESULT(yes),
202 AC_MSG_RESULT(no))
203CFLAGS="$old_CFLAGS"
204
Christian Göttscheaa0424a2021-08-08 16:54:20 +0200205AC_MSG_CHECKING(for NaN support)
206AC_RUN_IFELSE([
207 AC_LANG_PROGRAM(
208 [[
209 #include <math.h>
210 ]],
211 [[
212 double x = NAN; return !isnan(x);
213 ]]
214 )],
215 [AC_MSG_RESULT(yes)],
216 [
217 AC_MSG_RESULT(no)
218 AC_MSG_WARN([Compiler does not respect NaN, some functionality might break; consider using '-fno-finite-math-only'])
219 ],
220 [AC_MSG_RESULT(skipped)])
221
Christian Göttschef3623b72021-01-22 19:14:50 +0100222# ----------------------------------------------------------------------
223
224
225# ----------------------------------------------------------------------
226# Checks for generic library functions.
227# ----------------------------------------------------------------------
228
Christian Göttschee34c3872022-08-09 21:37:14 +0200229AC_SEARCH_LIBS([ceil], [m], [], [AC_MSG_ERROR([can not find required function ceil()])])
Christian Göttschef3623b72021-01-22 19:14:50 +0100230
231if test "$my_htop_platform" = dragonflybsd; then
Christian Göttsche759a3402021-01-22 19:14:55 +0100232 AC_SEARCH_LIBS([kvm_open], [kvm], [], [AC_MSG_ERROR([can not find required function kvm_open()])])
Christian Göttschef3623b72021-01-22 19:14:50 +0100233fi
234
235if test "$my_htop_platform" = freebsd; then
Christian Göttschecae47bb2021-02-05 15:15:01 +0100236 if test "$enable_static" = yes; then
237 AC_SEARCH_LIBS([elf_version], [elf], [], [AC_MSG_ERROR([can not find required function elf_version()])])
238 fi
Christian Göttsche759a3402021-01-22 19:14:55 +0100239 AC_SEARCH_LIBS([kvm_open], [kvm], [], [AC_MSG_ERROR([can not find required function kvm_open()])])
240 AC_SEARCH_LIBS([devstat_checkversion], [devstat], [], [AC_MSG_ERROR([can not find required function devstat_checkversion()])])
Christian Göttschef3623b72021-01-22 19:14:50 +0100241fi
242
243if test "$my_htop_platform" = linux; then
Christian Göttsche575edff2021-01-22 19:14:59 +0100244 if test "$enable_static" != yes; then
245 AC_SEARCH_LIBS([dlopen], [dl dld], [], [AC_MSG_ERROR([can not find required function dlopen()])])
246 fi
Christian Göttschef3623b72021-01-22 19:14:50 +0100247fi
248
fraggerfox4b49de42021-03-15 13:14:39 +0530249if test "$my_htop_platform" = netbsd; then
250 AC_SEARCH_LIBS([kvm_open], [kvm], [], [AC_MSG_ERROR([can not find required function kvm_open()])])
niafdcdc542021-07-26 19:04:44 +0200251 AC_SEARCH_LIBS([prop_dictionary_get], [prop], [], [AC_MSG_ERROR([can not find required function prop_dictionary_get()])])
fraggerfox4b49de42021-03-15 13:14:39 +0530252fi
253
Christian Göttschef3623b72021-01-22 19:14:50 +0100254if test "$my_htop_platform" = openbsd; then
Christian Göttsche759a3402021-01-22 19:14:55 +0100255 AC_SEARCH_LIBS([kvm_open], [kvm], [], [AC_MSG_ERROR([can not find required function kvm_open()])])
Christian Göttschef3623b72021-01-22 19:14:50 +0100256fi
257
258if test "$my_htop_platform" = solaris; then
Christian Göttsche759a3402021-01-22 19:14:55 +0100259 AC_SEARCH_LIBS([kstat_open], [kstat], [], [AC_MSG_ERROR([can not find required function kstat_open()])])
260 AC_SEARCH_LIBS([Pgrab_error], [proc], [], [AC_MSG_ERROR([can not find required function Pgrab_error()])])
261 AC_SEARCH_LIBS([free], [malloc], [], [AC_MSG_ERROR([can not find required function free()])])
Christian Göttschef3623b72021-01-22 19:14:50 +0100262fi
263
264# Optional Section
265
266AC_SEARCH_LIBS([clock_gettime], [rt])
267
268AC_CHECK_FUNCS([ \
269 clock_gettime \
Christian Göttsche29e1fcf2021-05-16 20:45:09 +0200270 dladdr \
Christian Göttschef3623b72021-01-22 19:14:50 +0100271 faccessat \
272 fstatat \
273 host_get_clock_service \
Christian Göttsche7b1fa1b2020-12-25 11:03:15 +0100274 memfd_create\
Christian Göttschef3623b72021-01-22 19:14:50 +0100275 openat \
276 readlinkat \
Christian Göttscheda494892023-01-10 19:40:04 +0100277 sched_getscheduler \
278 sched_setscheduler \
Christian Göttschef3623b72021-01-22 19:14:50 +0100279 ])
280
Christian Göttschef3623b72021-01-22 19:14:50 +0100281if test "$my_htop_platform" = darwin; then
282 AC_CHECK_FUNCS([mach_timebase_info])
283fi
Christian Goettschec2fdfd92020-10-21 17:06:32 +0200284
Nathan Scottd58180b2022-09-13 12:14:40 +1000285if test "$my_htop_platform" = pcp; then
286 AC_CHECK_FUNCS([pmLookupDescs])
287fi
288
Christian Göttsche575edff2021-01-22 19:14:59 +0100289if test "$my_htop_platform" = linux && test "x$enable_static" = xyes; then
290 AC_CHECK_LIB([systemd], [sd_bus_open_system])
291fi
292
Hisham Muhammad300af4b2014-11-19 23:17:16 -0200293# ----------------------------------------------------------------------
Hisham Muhammadeb229d92014-11-24 18:55:03 -0200294
Hisham Muhammadd6231ba2006-03-04 18:16:49 +0000295
Christian Göttschef3623b72021-01-22 19:14:50 +0100296# ----------------------------------------------------------------------
297# Checks for cross-platform features and flags.
298# ----------------------------------------------------------------------
Hisham Muhammada5dfaa22008-09-23 04:31:13 +0000299
Hisham Muhammaddb682862015-12-09 17:17:30 -0200300# HTOP_CHECK_SCRIPT(LIBNAME, FUNCTION, DEFINE, CONFIG_SCRIPT, ELSE_PART)
301m4_define([HTOP_CHECK_SCRIPT],
Hisham Muhammad96c929f2015-11-30 16:36:22 -0200302[
Ricardo Martincoski78b82d02016-07-11 20:12:07 -0300303 if test ! -z "m4_toupper($HTOP_[$1]_CONFIG_SCRIPT)"; then
304 # to be used to set the path to ncurses*-config when cross-compiling
Michael Kleinbc5d4692018-02-26 14:19:01 +0100305 htop_config_script_libs=$(m4_toupper($HTOP_[$1]_CONFIG_SCRIPT) --libs 2> /dev/null)
306 htop_config_script_cflags=$(m4_toupper($HTOP_[$1]_CONFIG_SCRIPT) --cflags 2> /dev/null)
Ricardo Martincoski78b82d02016-07-11 20:12:07 -0300307 else
Michael Kleinbc5d4692018-02-26 14:19:01 +0100308 htop_config_script_libs=$([$4] --libs 2> /dev/null)
309 htop_config_script_cflags=$([$4] --cflags 2> /dev/null)
Ricardo Martincoski78b82d02016-07-11 20:12:07 -0300310 fi
Hisham Muhammaddb682862015-12-09 17:17:30 -0200311 htop_script_success=no
Michael Kleinbc5d4692018-02-26 14:19:01 +0100312 htop_save_CFLAGS="$CFLAGS"
313 if test ! "x$htop_config_script_libs" = x; then
Michael Kleinbc5d4692018-02-26 14:19:01 +0100314 CFLAGS="$htop_config_script_cflags $CFLAGS"
Hisham Muhammaddb682862015-12-09 17:17:30 -0200315 AC_CHECK_LIB([$1], [$2], [
316 AC_DEFINE([$3], 1, [The library is present.])
Michael Kleinbc5d4692018-02-26 14:19:01 +0100317 LIBS="$htop_config_script_libs $LIBS "
Hisham Muhammaddb682862015-12-09 17:17:30 -0200318 htop_script_success=yes
Michael Kleinbc5d4692018-02-26 14:19:01 +0100319 ], [
Benny Baumann880eeca2020-12-12 19:49:52 +0100320 CFLAGS="$htop_save_CFLAGS"
Christian Göttsche575edff2021-01-22 19:14:59 +0100321 ], [
322 $htop_config_script_libs
Michael Kleinbc5d4692018-02-26 14:19:01 +0100323 ])
Hisham Muhammadc2377022015-12-06 19:06:23 -0200324 fi
Hisham Muhammadcccc18d2015-12-09 17:34:57 -0200325 if test "x$htop_script_success" = xno; then
Hisham Muhammaddb682862015-12-09 17:17:30 -0200326 [$5]
327 fi
328])
329
330# HTOP_CHECK_LIB(LIBNAME, FUNCTION, DEFINE, ELSE_PART)
331m4_define([HTOP_CHECK_LIB],
332[
Hisham Muhammad96c929f2015-11-30 16:36:22 -0200333 AC_CHECK_LIB([$1], [$2], [
Christian Göttsche575edff2021-01-22 19:14:59 +0100334 AC_DEFINE([$3], [1], [The library is present.])
Hisham Muhammaddb682862015-12-09 17:17:30 -0200335 LIBS="-l[$1] $LIBS "
336 ], [$4])
Hisham Muhammad96c929f2015-11-30 16:36:22 -0200337])
338
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100339AC_ARG_ENABLE([unicode],
340 [AS_HELP_STRING([--enable-unicode],
341 [enable Unicode support @<:@default=yes@:>@])],
342 [],
343 [enable_unicode=yes])
Hisham Muhammad8fa33dc2008-03-09 02:33:23 +0000344if test "x$enable_unicode" = xyes; then
Christian Göttschefd8c0612021-01-28 17:40:33 +0100345 HTOP_CHECK_SCRIPT([ncursesw6], [waddwstr], [HAVE_LIBNCURSESW], "ncursesw6-config",
346 HTOP_CHECK_SCRIPT([ncursesw], [waddwstr], [HAVE_LIBNCURSESW], "ncursesw6-config",
347 HTOP_CHECK_SCRIPT([ncursesw], [wadd_wch], [HAVE_LIBNCURSESW], "ncursesw5-config",
348 HTOP_CHECK_SCRIPT([ncurses], [wadd_wch], [HAVE_LIBNCURSESW], "ncurses5-config",
349 HTOP_CHECK_LIB([ncursesw6], [addnwstr], [HAVE_LIBNCURSESW],
350 HTOP_CHECK_LIB([ncursesw], [addnwstr], [HAVE_LIBNCURSESW],
351 HTOP_CHECK_LIB([ncurses], [addnwstr], [HAVE_LIBNCURSESW],
Christian Göttsche759a3402021-01-22 19:14:55 +0100352 AC_MSG_ERROR([can not find required library libncursesw; you may want to use --disable-unicode])
Diederik de Grootb258d6e2017-04-19 16:12:17 +0200353 )))))))
Hisham Muhammaddb682862015-12-09 17:17:30 -0200354
Christian Göttsche759a3402021-01-22 19:14:55 +0100355 AC_CHECK_HEADERS([ncursesw/curses.h], [],
356 [AC_CHECK_HEADERS([ncurses/ncurses.h], [],
357 [AC_CHECK_HEADERS([ncurses/curses.h], [],
358 [AC_CHECK_HEADERS([ncurses.h], [],
359 [AC_MSG_ERROR([can not find required ncurses header file])])])])])
Christian Göttscheead978b2020-12-07 15:30:56 +0100360
361 # check if additional linker flags are needed for keypad(3)
362 # (at this point we already link against a working ncurses library with wide character support)
363 AC_SEARCH_LIBS([keypad], [tinfow tinfo])
Hisham Muhammad8fa33dc2008-03-09 02:33:23 +0000364else
Christian Göttsche575edff2021-01-22 19:14:59 +0100365 HTOP_CHECK_SCRIPT([ncurses6], [wnoutrefresh], [HAVE_LIBNCURSES], [ncurses6-config],
366 HTOP_CHECK_SCRIPT([ncurses], [wnoutrefresh], [HAVE_LIBNCURSES], [ncurses5-config],
Christian Göttschefd8c0612021-01-28 17:40:33 +0100367 HTOP_CHECK_LIB([ncurses6], [doupdate], [HAVE_LIBNCURSES],
368 HTOP_CHECK_LIB([ncurses], [doupdate], [HAVE_LIBNCURSES],
nia09c7e3e2021-07-13 17:53:47 +0200369 HTOP_CHECK_LIB([curses], [doupdate], [HAVE_LIBNCURSES],
370 AC_MSG_ERROR([can not find required curses/ncurses library])
371 )))))
Christian Göttscheb92f62f2020-08-21 10:37:33 +0200372
Christian Göttsche759a3402021-01-22 19:14:55 +0100373 AC_CHECK_HEADERS([curses.h], [],
374 [AC_CHECK_HEADERS([ncurses/curses.h], [],
375 [AC_CHECK_HEADERS([ncurses/ncurses.h], [],
376 [AC_CHECK_HEADERS([ncurses.h] ,[],
377 [AC_MSG_ERROR([can not find required ncurses header file])])])])])
Christian Göttscheead978b2020-12-07 15:30:56 +0100378
379 # check if additional linker flags are needed for keypad(3)
380 # (at this point we already link against a working ncurses library)
381 AC_SEARCH_LIBS([keypad], [tinfo])
Hisham Muhammad4c51ad02007-08-10 05:07:14 +0000382fi
Christian Göttsche575edff2021-01-22 19:14:59 +0100383if test "$enable_static" = yes; then
384 AC_SEARCH_LIBS([Gpm_GetEvent], [gpm])
385fi
Christian Göttscheee9e7ed2021-05-20 18:27:10 +0200386if test "$my_htop_platform" = "solaris"; then
387 # On OmniOS /usr/include/sys/regset.h redefines ERR to 13 - \r, breaking the Enter key.
Nathan Scottca06e682021-09-08 12:11:51 +1000388 # Since ncurses macros use the ERR macro, we can not use another name.
Christian Göttscheee9e7ed2021-05-20 18:27:10 +0200389 AC_DEFINE([ERR], [(-1)], [Predefine ncurses macro.])
390fi
Benny Baumann18e3fd52021-07-04 16:50:41 +0200391AC_CHECK_FUNCS( [set_escdelay] )
nia2ab8fb82021-07-14 20:17:13 +0200392AC_CHECK_FUNCS( [getmouse] )
Hisham Muhammad4c51ad02007-08-10 05:07:14 +0000393
gmbroome697f5bb2018-03-02 16:20:46 -0500394
Christian Göttsche1fb0c722021-06-13 11:29:39 +0200395AC_ARG_ENABLE([affinity],
396 [AS_HELP_STRING([--enable-affinity],
397 [enable sched_setaffinity and sched_getaffinity for affinity support, conflicts with hwloc @<:@default=check@:>@])],
398 [],
399 [enable_affinity=check])
400if test "x$enable_affinity" = xcheck; then
401 if test "x$enable_hwloc" = xyes; then
402 enable_affinity=no
403 else
404 AC_MSG_CHECKING([for usable sched_setaffinity])
405 AC_RUN_IFELSE([
406 AC_LANG_PROGRAM([[
407 #include <sched.h>
408 #include <errno.h>
409 static cpu_set_t cpuset;
410 ]], [[
411 CPU_ZERO(&cpuset);
412 sched_setaffinity(0, sizeof(cpu_set_t), &cpuset);
413 if (errno == ENOSYS) return 1;
414 ]])],
415 [enable_affinity=yes
416 AC_MSG_RESULT([yes])],
417 [enable_affinity=no
418 AC_MSG_RESULT([no])],
419 [AC_MSG_RESULT([yes (assumed while cross compiling)])])
420 fi
421fi
422if test "x$enable_affinity" = xyes; then
423 if test "x$enable_hwloc" = xyes; then
424 AC_MSG_ERROR([--enable-hwloc and --enable-affinity are mutual exclusive. Specify at most one of them.])
425 fi
426 AC_DEFINE([HAVE_AFFINITY], [1], [Define if sched_setaffinity and sched_getaffinity are to be used.])
427fi
428
429
Christian Göttsche29e1fcf2021-05-16 20:45:09 +0200430AC_ARG_ENABLE([unwind],
431 [AS_HELP_STRING([--enable-unwind],
432 [enable unwind support for printing backtraces; requires libunwind @<:@default=check@:>@])],
433 [],
434 [enable_unwind=check])
435case "$enable_unwind" in
436 check)
437 enable_unwind=yes
438 if test "$enable_static" = yes; then
439 AC_CHECK_LIB([lzma], [lzma_index_buffer_decode])
440 fi
441 AC_CHECK_LIB([unwind], [backtrace], [], [enable_unwind=no])
Christian Göttsche63880332021-12-14 17:36:57 +0100442 AC_CHECK_HEADERS([libunwind.h], [], [
443 old_CFLAGS="$CFLAGS"
444 CFLAGS="$CFLAGS -I/usr/include/libunwind"
445 AC_CHECK_HEADERS([libunwind/libunwind.h], [], [
446 enable_unwind=no
447 CFLAGS="$old_CFLAGS"
448 ])
449 ])
Christian Göttsche29e1fcf2021-05-16 20:45:09 +0200450 ;;
451 no)
452 ;;
453 yes)
454 AC_CHECK_LIB([unwind], [backtrace], [], [AC_MSG_ERROR([can not find required library libunwind])])
Christian Göttsche63880332021-12-14 17:36:57 +0100455 AC_CHECK_HEADERS([libunwind.h], [], [
456 CFLAGS="$CFLAGS -I/usr/include/libunwind"
457 AC_CHECK_HEADERS([libunwind/libunwind.h], [], [AC_MSG_ERROR([can not find required header file libunwind.h])])
458 ])
Christian Göttsche29e1fcf2021-05-16 20:45:09 +0200459 ;;
460 *)
461 AC_MSG_ERROR([bad value '$enable_unwind' for --enable-unwind])
462 ;;
463esac
464if test "x$enable_unwind" = xno; then
465 # Fall back to backtrace(3) and add -lexecinfo if needed
466 AC_SEARCH_LIBS([backtrace], [execinfo])
467fi
468
469
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100470AC_ARG_ENABLE([hwloc],
471 [AS_HELP_STRING([--enable-hwloc],
Christian Göttsche1fb0c722021-06-13 11:29:39 +0200472 [enable hwloc support for CPU affinity; disables affinity support; requires libhwloc @<:@default=no@:>@])],
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100473 [],
474 [enable_hwloc=no])
475case "$enable_hwloc" in
476 no)
477 ;;
478 yes)
Fabrice Fontaine4ccad462022-04-02 17:27:01 +0200479 m4_ifdef([PKG_PROG_PKG_CONFIG], [
480 PKG_PROG_PKG_CONFIG()
481 PKG_CHECK_MODULES(HWLOC, hwloc, [
Christian Göttschec8a61852023-04-05 01:21:14 +0200482 CFLAGS="$CFLAGS $HWLOC_CFLAGS"
483 LIBS="$LIBS $HWLOC_LIBS"
484 AC_DEFINE([HAVE_LIBHWLOC], [1], [Define to 1 if you have the `hwloc' library (-lhwloc).])
Fabrice Fontaine4ccad462022-04-02 17:27:01 +0200485 ], [
486 AC_CHECK_LIB([hwloc], [hwloc_get_proc_cpubind], [], [AC_MSG_ERROR([can not find required library libhwloc])])
487 AC_CHECK_HEADERS([hwloc.h], [], [AC_MSG_ERROR([can not find require header file hwloc.h])])
488 ])
489 ], [
490 AC_CHECK_LIB([hwloc], [hwloc_get_proc_cpubind], [], [AC_MSG_ERROR([can not find required library libhwloc])])
491 AC_CHECK_HEADERS([hwloc.h], [], [AC_MSG_ERROR([can not find require header file hwloc.h])])
492 ])
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100493 ;;
494 *)
495 AC_MSG_ERROR([bad value '$enable_hwloc' for --enable-hwloc])
496 ;;
497esac
Christian Göttsche005c4d12020-09-08 16:25:22 +0200498
Christian Göttsche29e1fcf2021-05-16 20:45:09 +0200499
Nathan Scott5b50ae32021-03-02 15:58:11 +1100500AC_ARG_WITH([os-release],
501 [AS_HELP_STRING([--with-os-release=FILE],
Christian Göttsche8ba4ef32021-03-12 16:37:17 +0100502 [location of an os-release file @<:@default=/etc/os-release@:>@])],
Nathan Scott5b50ae32021-03-02 15:58:11 +1100503 [],
504 [with_os_release=/etc/os-release])
Christian Göttsche8ba4ef32021-03-12 16:37:17 +0100505if test -n "$with_os_release" && test ! -f "$with_os_release"; then
Nathan Scott5b50ae32021-03-02 15:58:11 +1100506 if test -f "/usr/lib/os-release"; then
507 with_os_release="/usr/lib/os-release"
508 fi
509fi
510AC_DEFINE_UNQUOTED([OSRELEASEFILE], ["$with_os_release"], [File with OS release details.])
511
Christian Göttschef3623b72021-01-22 19:14:50 +0100512# ----------------------------------------------------------------------
513
514
515# ----------------------------------------------------------------------
516# Checks for Linux features and flags.
517# ----------------------------------------------------------------------
518
519AC_ARG_WITH([proc],
520 [AS_HELP_STRING([--with-proc=DIR],
521 [location of a Linux-compatible proc filesystem @<:@default=/proc@:>@])],
522 [],
523 [with_proc=/proc])
524if test -z "$with_proc"; then
525 AC_MSG_ERROR([bad empty value for --with-proc option])
526fi
527AC_DEFINE_UNQUOTED([PROCDIR], ["$with_proc"], [Path of proc filesystem.])
528
529
530AC_ARG_ENABLE([openvz],
531 [AS_HELP_STRING([--enable-openvz],
532 [enable OpenVZ support @<:@default=no@:>@])],
533 [],
534 [enable_openvz=no])
535if test "x$enable_openvz" = xyes; then
536 AC_DEFINE([HAVE_OPENVZ], [1], [Define if openvz support enabled.])
537fi
538
539
540AC_ARG_ENABLE([vserver],
541 [AS_HELP_STRING([--enable-vserver],
542 [enable VServer support @<:@default=no@:>@])],
543 [],
544 [enable_vserver=no])
545if test "x$enable_vserver" = xyes; then
Christian Göttsche284f8c52021-09-02 22:32:46 +0200546 AC_DEFINE([HAVE_VSERVER], [1], [Define if VServer support enabled.])
Christian Göttschef3623b72021-01-22 19:14:50 +0100547fi
548
549
550AC_ARG_ENABLE([ancient_vserver],
551 [AS_HELP_STRING([--enable-ancient-vserver],
552 [enable ancient VServer support (implies --enable-vserver) @<:@default=no@:>@])],
553 [],
554 [enable_ancient_vserver=no])
555if test "x$enable_ancient_vserver" = xyes; then
Christian Göttsche284f8c52021-09-02 22:32:46 +0200556 if test "x$enable_vserver" != xyes; then
557 enable_vserver=implied
558 fi
559 AC_DEFINE([HAVE_VSERVER], [1], [Define if VServer support enabled.])
560 AC_DEFINE([HAVE_ANCIENT_VSERVER], [1], [Define if ancient vserver support enabled.])
Christian Göttschef3623b72021-01-22 19:14:50 +0100561fi
562
563
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100564AC_ARG_ENABLE([capabilities],
565 [AS_HELP_STRING([--enable-capabilities],
566 [enable Linux capabilities support; requires libcap @<:@default=check@:>@])],
567 [],
568 [enable_capabilities=check])
569case "$enable_capabilities" in
570 no)
571 ;;
572 check)
573 enable_capabilities=yes
574 AC_CHECK_LIB([cap], [cap_init], [], [enable_capabilities=no])
575 AC_CHECK_HEADERS([sys/capability.h], [], [enable_capabilities=no])
576 ;;
577 yes)
Christian Göttsche759a3402021-01-22 19:14:55 +0100578 AC_CHECK_LIB([cap], [cap_init], [], [AC_MSG_ERROR([can not find required library libcap])])
579 AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([can not find required header file sys/capability.h])])
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100580 ;;
581 *)
582 AC_MSG_ERROR([bad value '$enable_capabilities' for --enable-capabilities])
583 ;;
584esac
Christian Göttschef4404ef2020-09-02 14:39:25 +0200585
Christian Göttschef3623b72021-01-22 19:14:50 +0100586
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100587AC_ARG_ENABLE([delayacct],
588 [AS_HELP_STRING([--enable-delayacct],
589 [enable Linux delay accounting support; requires pkg-config, libnl-3 and libnl-genl-3 @<:@default=check@:>@])],
590 [],
591 [enable_delayacct=check])
592case "$enable_delayacct" in
593 no)
594 ;;
595 check)
Christian Göttsche69cfaf22021-05-16 20:01:25 +0200596 if test "$my_htop_platform" != linux; then
597 enable_delayacct=no
598 elif test "$enable_static" = yes; then
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100599 enable_delayacct=no
Christian Göttsche575edff2021-01-22 19:14:59 +0100600 else
601 m4_ifdef([PKG_PROG_PKG_CONFIG], [
602 enable_delayacct=yes
603 PKG_PROG_PKG_CONFIG()
604 PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [], [enable_delayacct=no])
605 PKG_CHECK_MODULES(LIBNL3GENL, libnl-genl-3.0, [], [enable_delayacct=no])
606 if test "$enable_delayacct" = yes; then
607 CFLAGS="$CFLAGS $LIBNL3_CFLAGS $LIBNL3GENL_CFLAGS"
608 LIBS="$LIBS $LIBNL3_LIBS $LIBNL3GENL_LIBS"
609 AC_DEFINE([HAVE_DELAYACCT], [1], [Define if delay accounting support should be enabled.])
610 fi
611 ], [
612 enable_delayacct=no
613 AC_MSG_NOTICE([Linux delay accounting support can not be enabled, cause pkg-config is required for checking its availability])
614 ])
615 fi
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100616 ;;
617 yes)
618 m4_ifdef([PKG_PROG_PKG_CONFIG], [
619 PKG_PROG_PKG_CONFIG()
Christian Göttsche759a3402021-01-22 19:14:55 +0100620 PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [], [AC_MSG_ERROR([can not find required library libnl3])])
621 PKG_CHECK_MODULES(LIBNL3GENL, libnl-genl-3.0, [], [AC_MSG_ERROR([can not find required library libnl3genl])])
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100622 CFLAGS="$CFLAGS $LIBNL3_CFLAGS $LIBNL3GENL_CFLAGS"
623 LIBS="$LIBS $LIBNL3_LIBS $LIBNL3GENL_LIBS"
624 AC_DEFINE([HAVE_DELAYACCT], [1], [Define if delay accounting support should be enabled.])
625 ], [
626 pkg_m4_absent=1
627 m4_warning([configure is generated without pkg.m4. 'make dist' target will be disabled.])
628 AC_MSG_ERROR([htop on Linux requires pkg-config for checking delayacct requirements. Please install pkg-config and run ./autogen.sh to rebuild the configure script.])
629 ])
630 ;;
631 *)
632 AC_MSG_ERROR([bad value '$enable_delayacct' for --enable-delayacct])
633 ;;
634esac
André Carvalhob7b66b72017-12-04 00:15:29 -0200635
Christian Göttschef3623b72021-01-22 19:14:50 +0100636
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100637AC_ARG_ENABLE([sensors],
638 [AS_HELP_STRING([--enable-sensors],
639 [enable libsensors support for reading temperature data; requires only libsensors headers at compile time, at runtime libsensors is loaded via dlopen @<:@default=check@:>@])],
640 [],
641 [enable_sensors=check])
642case "$enable_sensors" in
643 no)
644 ;;
645 check)
646 enable_sensors=yes
Christian Göttsche575edff2021-01-22 19:14:59 +0100647 if test "$enable_static" = yes; then
648 AC_CHECK_LIB([sensors], [sensors_init], [], [enable_sensors=no])
649 fi
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100650 AC_CHECK_HEADERS([sensors/sensors.h], [], [enable_sensors=no])
651 ;;
652 yes)
Christian Göttsche575edff2021-01-22 19:14:59 +0100653 if test "$enable_static" = yes; then
654 AC_CHECK_LIB([sensors], [sensors_init], [], [AC_MSG_ERROR([can not find required library libsensors])])
655 fi
656 AC_CHECK_HEADERS([sensors/sensors.h], [], [AC_MSG_ERROR([can not find required header file sensors/sensors.h])])
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100657 ;;
658 *)
659 AC_MSG_ERROR([bad value '$enable_sensors' for --enable-sensors])
660 ;;
661esac
Christian Göttschefd2a0cf2020-12-22 20:02:01 +0100662if test "$enable_sensors" = yes || test "$my_htop_platform" = freebsd; then
663 AC_DEFINE([BUILD_WITH_CPU_TEMP], [1], [Define if CPU temperature option should be enabled.])
664fi
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100665
Christian Göttschef3623b72021-01-22 19:14:50 +0100666# ----------------------------------------------------------------------
667
668
669# ----------------------------------------------------------------------
670# Checks for compiler warnings.
671# ----------------------------------------------------------------------
Christian Göttsche1b225cd2020-09-10 19:56:33 +0200672
Christian Göttschef4602f72020-09-08 14:25:46 +0200673AM_CFLAGS="\
674 -Wall\
675 -Wcast-align\
Christian Göttschedb472072020-10-04 14:30:35 +0200676 -Wcast-qual\
Christian Göttschef4602f72020-09-08 14:25:46 +0200677 -Wextra\
Benny Baumannba0fca12020-09-18 16:58:03 +0200678 -Wfloat-equal\
Christian Göttschec150e4b2020-12-18 15:49:37 +0100679 -Wformat=2\
Christian Göttsche4dadbe32021-01-21 19:49:07 +0100680 -Winit-self\
Christian Göttschef4602f72020-09-08 14:25:46 +0200681 -Wmissing-format-attribute\
682 -Wmissing-noreturn\
Christian Göttsche4e282eb2020-09-25 14:03:55 +0200683 -Wmissing-prototypes\
Christian Göttschef4602f72020-09-08 14:25:46 +0200684 -Wpointer-arith\
685 -Wshadow\
686 -Wstrict-prototypes\
687 -Wundef\
688 -Wunused\
689 -Wwrite-strings"
690
Christian Göttsche64a1ab82021-02-05 15:20:00 +0100691# FreeBSD uses C11 _Generic in its isnan implementation, even with -std=c99
692if test "$my_htop_platform" = freebsd; then
693 AM_CFLAGS="$AM_CFLAGS -Wno-c11-extensions"
694fi
695
Christian Göttschef3623b72021-01-22 19:14:50 +0100696dnl https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
697AC_DEFUN([AX_CHECK_COMPILE_FLAG],
Christian Göttsche38b6a012021-01-22 19:14:53 +0100698[
Christian Göttschef3623b72021-01-22 19:14:50 +0100699AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
700AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
701 ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
702 _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
703 AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
704 [AS_VAR_SET(CACHEVAR,[yes])],
705 [AS_VAR_SET(CACHEVAR,[no])])
706 _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
707AS_VAR_IF(CACHEVAR,yes,
708 [m4_default([$2], :)],
709 [m4_default([$3], :)])
710AS_VAR_POPDEF([CACHEVAR])dnl
711])dnl AX_CHECK_COMPILE_FLAGS
712
Christian Göttsche970885e2021-08-14 11:21:54 +0200713AX_CHECK_COMPILE_FLAG([-Wextra-semi-stmt], [AM_CFLAGS="$AM_CFLAGS -Wextra-semi-stmt"], , [-Werror=unknown-warning-option]) dnl the autoconf check itself generates -Wextra-semi-stmt
Christian Göttsche53732ab2021-08-14 11:26:43 +0200714AX_CHECK_COMPILE_FLAG([-Wimplicit-int-conversion], [AM_CFLAGS="$AM_CFLAGS -Wimplicit-int-conversion"], , [-Werror])
715AX_CHECK_COMPILE_FLAG([-Wnull-dereference], [AM_CFLAGS="$AM_CFLAGS -Wnull-dereference"], , [-Werror])
Benny Baumann2cde4a72020-09-18 19:32:41 +0200716
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100717AC_ARG_ENABLE([werror],
718 [AS_HELP_STRING([--enable-werror],
719 [Treat warnings as errors @<:@default=no@:>@])],
720 [],
721 [enable_werror=no])
722if test "x$enable_werror" = xyes; then
723 AM_CFLAGS="$AM_CFLAGS -Werror"
724fi
725
726AC_ARG_ENABLE([debug],
727 [AS_HELP_STRING([--enable-debug],
Daniel Lange135efd52021-02-16 11:22:02 +0100728 [Enable compiling with maximum debug info, asserts and internal sanity checks @<:@default=no@:>@])],
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100729 [],
730 [enable_debug=no])
731if test "x$enable_debug" != xyes; then
732 AM_CPPFLAGS="$AM_CPPFLAGS -DNDEBUG"
Daniel Lange135efd52021-02-16 11:22:02 +0100733else
734 AM_CPPFLAGS="$AM_CPPFLAGS -ggdb3"
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100735fi
Christian Göttscheb7f63292020-09-17 22:23:05 +0200736
Christian Göttschef3623b72021-01-22 19:14:50 +0100737
Christian Göttsche57254cd2020-08-21 10:37:20 +0200738AC_SUBST([AM_CFLAGS])
Christian Göttscheb7f63292020-09-17 22:23:05 +0200739AC_SUBST([AM_CPPFLAGS])
740
Christian Göttschef3623b72021-01-22 19:14:50 +0100741# ----------------------------------------------------------------------
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100742
Christian Göttschef3623b72021-01-22 19:14:50 +0100743
744# ----------------------------------------------------------------------
Hisham Muhammad300af4b2014-11-19 23:17:16 -0200745# We're done, let's go!
746# ----------------------------------------------------------------------
Christian Göttschef3623b72021-01-22 19:14:50 +0100747
Daniel Langef3201712023-01-08 16:02:34 +0100748AC_DEFINE_UNQUOTED([COPYRIGHT], ["(C) 2004-2019 Hisham Muhammad. (C) 2020-2023 htop dev team."], [Copyright message.])
Christian Göttschef3623b72021-01-22 19:14:50 +0100749
Hisham Muhammada75161f2014-11-24 20:11:33 -0200750AM_CONDITIONAL([HTOP_LINUX], [test "$my_htop_platform" = linux])
Hisham Muhammad8915b292014-11-27 16:27:34 -0200751AM_CONDITIONAL([HTOP_FREEBSD], [test "$my_htop_platform" = freebsd])
Diederik de Grootb258d6e2017-04-19 16:12:17 +0200752AM_CONDITIONAL([HTOP_DRAGONFLYBSD], [test "$my_htop_platform" = dragonflybsd])
fraggerfox4b49de42021-03-15 13:14:39 +0530753AM_CONDITIONAL([HTOP_NETBSD], [test "$my_htop_platform" = netbsd])
Michael McConvillea9a5a532015-09-18 00:46:48 -0400754AM_CONDITIONAL([HTOP_OPENBSD], [test "$my_htop_platform" = openbsd])
David Hunt70e7c8d2015-07-12 13:47:43 -0500755AM_CONDITIONAL([HTOP_DARWIN], [test "$my_htop_platform" = darwin])
gmbroome697f5bb2018-03-02 16:20:46 -0500756AM_CONDITIONAL([HTOP_SOLARIS], [test "$my_htop_platform" = solaris])
Nathan Scottc14a45b2021-02-17 14:43:56 +1100757AM_CONDITIONAL([HTOP_PCP], [test "$my_htop_platform" = pcp])
Hisham Muhammada75161f2014-11-24 20:11:33 -0200758AM_CONDITIONAL([HTOP_UNSUPPORTED], [test "$my_htop_platform" = unsupported])
Christian Göttsche38b6a012021-01-22 19:14:53 +0100759
Hisham Muhammadeb229d92014-11-24 18:55:03 -0200760AC_SUBST(my_htop_platform)
Daniel Langefc2377f2021-08-14 10:35:11 +0200761AC_CONFIG_FILES([Makefile htop.1])
Hisham Muhammadd6231ba2006-03-04 18:16:49 +0000762AC_OUTPUT
Hisham Muhammadc39f18a2017-07-10 20:14:25 -0300763
Christian Göttschef3623b72021-01-22 19:14:50 +0100764if test "$my_htop_platform" = unsupported; then
Hisham Muhammadc39f18a2017-07-10 20:14:25 -0300765 echo ""
766 echo "****************************************************************"
767 echo "WARNING! This platform is not currently supported by htop."
768 echo ""
769 echo "The code will build, but it will produce a dummy version of htop"
770 echo "which shows no processes, using the files from the unsupported/"
771 echo "directory. This is meant to be a skeleton, to be used as a"
772 echo "starting point if you are porting htop to a new platform."
773 echo "****************************************************************"
774 echo ""
775fi
Christian Göttsche3b084db2020-08-28 12:10:31 +0200776
777AC_MSG_RESULT([
778 ${PACKAGE_NAME} ${VERSION}
779
Christian Göttscheffd90c22020-10-05 12:29:31 +0200780 platform: $my_htop_platform
Nathan Scott5b50ae32021-03-02 15:58:11 +1100781 os-release file: $with_os_release
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100782 (Linux) proc directory: $with_proc
Christian Göttscheffd90c22020-10-05 12:29:31 +0200783 (Linux) openvz: $enable_openvz
Christian Göttscheffd90c22020-10-05 12:29:31 +0200784 (Linux) vserver: $enable_vserver
785 (Linux) ancient vserver: $enable_ancient_vserver
Christian Göttscheffd90c22020-10-05 12:29:31 +0200786 (Linux) delay accounting: $enable_delayacct
Christian Göttsche5e103ff2021-01-22 19:14:46 +0100787 (Linux) sensors: $enable_sensors
788 (Linux) capabilities: $enable_capabilities
Christian Göttscheffd90c22020-10-05 12:29:31 +0200789 unicode: $enable_unicode
Christian Göttsche1fb0c722021-06-13 11:29:39 +0200790 affinity: $enable_affinity
Christian Göttsche29e1fcf2021-05-16 20:45:09 +0200791 unwind: $enable_unwind
Daniel Lange309f1d72020-11-16 13:29:37 +0100792 hwloc: $enable_hwloc
Daniel Langea8a723f2020-11-16 17:01:51 +0100793 debug: $enable_debug
Christian Göttsche575edff2021-01-22 19:14:59 +0100794 static: $enable_static
Christian Göttsche3b084db2020-08-28 12:10:31 +0200795])