summaryrefslogtreecommitdiff
path: root/m4/getloadavg.m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2023-02-04 14:45:11 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2023-02-04 15:14:16 -0800
commit04d97e76a96854a9a9f4778cb1202a87537731de (patch)
tree9c70da51ec099c2c1c0ca95dbace29190e563f8a /m4/getloadavg.m4
parent7e1c7db1cb5a33a66115bb767224bdc79a257266 (diff)
downloademacs-04d97e76a96854a9a9f4778cb1202a87537731de.tar.gz
Update from Gnulib by running admin/merge-gnulib
Diffstat (limited to 'm4/getloadavg.m4')
-rw-r--r--m4/getloadavg.m414
1 files changed, 10 insertions, 4 deletions
diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4
index 79e420baae8..ee83b32f1e0 100644
--- a/m4/getloadavg.m4
+++ b/m4/getloadavg.m4
@@ -7,7 +7,7 @@
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-#serial 10
+#serial 12
# Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent.
# New applications should use gl_GETLOADAVG instead.
@@ -25,8 +25,13 @@ gl_save_LIBS=$LIBS
# getloadavg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
HAVE_GETLOADAVG=1
-AC_CHECK_FUNC([getloadavg], [],
- [gl_func_getloadavg_done=no
+gl_CHECK_FUNCS_ANDROID([getloadavg], [[#include <stdlib.h>]])
+if test $ac_cv_func_getloadavg != yes; then
+ case "$gl_cv_onwards_func_getloadavg" in
+ future*) REPLACE_GETLOADAVG=1 ;;
+ esac
+
+ gl_func_getloadavg_done=no
# Some systems with -lutil have (and need) -lkvm as well, some do not.
# On Solaris, -lkvm requires nlist from -lelf, so check that first
@@ -73,7 +78,8 @@ AC_CHECK_FUNC([getloadavg], [],
AC_DEFINE([DGUX], [1], [Define to 1 for DGUX with <sys/dg_sys_info.h>.])
AC_CHECK_LIB([dgc], [dg_sys_info])])
fi
- fi])
+ fi
+fi
if test "x$gl_save_LIBS" = x; then
GETLOADAVG_LIBS=$LIBS