-# Make sure it is really in the library, if we think we found it.
-AC_REPLACE_FUNCS(getloadavg)
-
-if test $ac_cv_func_getloadavg = yes; then
- AC_DEFINE(HAVE_GETLOADAVG)
- ac_have_func=yes
-else
- AC_DEFINE(C_GETLOADAVG, 1, [Define if using getloadavg.c.])
- # Figure out what our getloadavg.c needs.
- ac_have_func=no
- AC_CHECK_HEADER(sys/dg_sys_info.h,
- [ac_have_func=yes; AC_DEFINE(DGUX)
- AC_CHECK_LIB(dgc, dg_sys_info)])
-
- AC_CHECK_HEADER(locale.h)
- AC_CHECK_FUNCS(setlocale)
-
- # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
- # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
- # Irix 4.0.5F has the header but not the library.
- if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then
- ac_have_func=yes; AC_DEFINE(SVR4)
- fi
-
- if test $ac_have_func = no; then
- AC_CHECK_HEADER(inq_stats/cpustats.h,
- [ac_have_func=yes; AC_DEFINE(UMAX)
- AC_DEFINE(UMAX4_3)])
- fi
-
- if test $ac_have_func = no; then
- AC_CHECK_HEADER(sys/cpustats.h,
- [ac_have_func=yes; AC_DEFINE(UMAX)])
- fi
-
- if test $ac_have_func = no; then
- AC_CHECK_HEADERS(mach/mach.h)
- fi
-
- AC_CHECK_HEADER(nlist.h,
- [AC_DEFINE(NLIST_STRUCT)
- AC_CACHE_CHECK([for n_un in struct nlist], ac_cv_struct_nlist_n_un,
- [AC_TRY_COMPILE([#include <nlist.h>],
- [struct nlist n; n.n_un.n_name = 0;],
- ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])
- if test $ac_cv_struct_nlist_n_un = yes; then
- AC_DEFINE(NLIST_NAME_UNION)
- fi
- ])dnl
-fi # Do not have getloadavg in system libraries.