diff options
author | Nathan Scott <nathans@redhat.com> | 2021-03-02 15:58:11 +1100 |
---|---|---|
committer | Nathan Scott <nathans@redhat.com> | 2021-03-04 13:40:11 +1100 |
commit | 5b50ae3aa3a418f3f84ff2fdb172ab447753814f (patch) | |
tree | 17fcbba67e6935b2da236dc8dba4ee7fbfab4177 /configure.ac | |
parent | 2328e52403dfa52d122a9f7ccbd365beaedb8c9f (diff) |
Separate display from sampling in SysArch and Hostname Meters
Several of our newer meters have merged coding concerns in terms
of extracting values and displaying those values. This commit
rectifies that for the SysArch and Hostname meters, allowing use
of this code with alternative front/back ends. The SysArch code
is also refined to detect whether the platform has an os-release
file at all and/or the sys/utsname.h header via configure.ac.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index ee7e8ee5..95b01143 100644 --- a/configure.ac +++ b/configure.ac @@ -108,6 +108,7 @@ AC_CHECK_HEADERS([ \ strings.h \ sys/param.h \ sys/time.h \ + sys/utsname.h \ unistd.h ], [], [AC_MSG_ERROR([can not find required generic header files])]) @@ -316,6 +317,18 @@ case "$enable_hwloc" in ;; esac +AC_ARG_WITH([os-release], + [AS_HELP_STRING([--with-os-release=FILE], + [location of an os-release file @<:@default=/etc/os-release@:>@])], + [], + [with_os_release=/etc/os-release]) +if test -n "$with_os_release" -a ! -f "$with_os_release"; then + if test -f "/usr/lib/os-release"; then + with_os_release="/usr/lib/os-release" + fi +fi +AC_DEFINE_UNQUOTED([OSRELEASEFILE], ["$with_os_release"], [File with OS release details.]) + # ---------------------------------------------------------------------- @@ -608,6 +621,7 @@ AC_MSG_RESULT([ ${PACKAGE_NAME} ${VERSION} platform: $my_htop_platform + os-release file: $with_os_release (Linux) proc directory: $with_proc (Linux) openvz: $enable_openvz (Linux) vserver: $enable_vserver |