summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2012-01-17 20:21:41 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2012-01-18 14:29:40 -0800
commitc32c291c02cfd299d42e6d0b6560adcdabba7808 (patch)
tree2b5b6fd9d4ef01d5d9c5d87233d316f0fa5adf70 /configure.ac
parent4a54dee95260d36d0c8b5f8a35ac905f36b36f17 (diff)
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 <alan.coopersmith@oracle.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 4 insertions, 2 deletions
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 <stdlib.h>, Solaris requires <sys/loadavg.h>
+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])