From c32c291c02cfd299d42e6d0b6560adcdabba7808 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 17 Jan 2012 20:21:41 -0800 Subject: Solaris: use getloadavg from libc instead of kstats The simpler interface (based on the BSD function) has been in libc since Solaris 7, and avoids datasize bugs like the previous fix, so might as well use it. Purge all the other ancient Solaris & SunOS support variants as well. This does mean if you want to keep running xload on a Sun OS version from before 1998 you will need to use a branch of xload from before 2012 (such as the one included in those old releases). Signed-off-by: Alan Coopersmith --- configure.ac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 7c94abf..c33871c 100644 --- a/configure.ac +++ b/configure.ac @@ -28,6 +28,7 @@ AC_INIT([xload], [1.1.0], AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) +AC_USE_SYSTEM_EXTENSIONS # Initialize Automake AM_INIT_AUTOMAKE([foreign dist-bzip2]) @@ -62,8 +63,9 @@ AM_CONDITIONAL(USE_GETTEXT, test "x$USE_GETTEXT" = "xyes") ### How to check load average on various OS'es: -# Solaris: libkstat -AC_CHECK_LIB([kstat], [kstat_open]) +# getloadavg: 4.3BSD-Reno & later, glibc 2.2 & later, Solaris 7 & later +# BSD & GNU libc use , Solaris requires +AC_CHECK_FUNCS([getloadavg], [AC_CHECK_HEADERS([sys/loadavg.h])]) # Checks for pkg-config packages PKG_CHECK_MODULES(XLOAD, xaw7 xmu xt x11 [xproto >= 7.0.17]) -- cgit v1.2.3