~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to m4/getloadavg.m4

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-28 03:03:42 UTC
  • mfrom: (8.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20121128030342-21zanj8354gas5gr
Tags: 8.20-3ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Make 'uname -i -p' return the real processor/hardware, instead of
    unknown.
  - Build-depend on gettext:any instead of on gettext, so that apt-get can
    properly resolve build-dependencies on the tool when cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Check for getloadavg.
2
2
 
3
 
# Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2011 Free Software
 
3
# Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2012 Free Software
4
4
# Foundation, Inc.
5
5
 
6
6
# This file is free software; the Free Software Foundation
7
7
# gives unlimited permission to copy and/or distribute it,
8
8
# with or without modifications, as long as this notice is preserved.
9
9
 
10
 
#serial 4
 
10
#serial 6
11
11
 
12
12
# Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent.
13
13
# New applications should use gl_GETLOADAVG instead.
22
22
 
23
23
gl_save_LIBS=$LIBS
24
24
 
25
 
# getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0,
 
25
# getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
26
26
# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
27
27
HAVE_GETLOADAVG=1
28
28
AC_CHECK_FUNC([getloadavg], [],
91
91
  HAVE_SYS_LOADAVG_H=0
92
92
fi
93
93
AC_CHECK_DECL([getloadavg], [], [HAVE_DECL_GETLOADAVG=0],
94
 
  [#if HAVE_SYS_LOADAVG_H
95
 
   # include <sys/loadavg.h>
96
 
   #endif
97
 
   #include <stdlib.h>])
 
94
  [[#if HAVE_SYS_LOADAVG_H
 
95
    # include <sys/loadavg.h>
 
96
    #endif
 
97
    #include <stdlib.h>]])
98
98
])# gl_GETLOADAVG
99
99
 
100
100
 
101
101
# gl_PREREQ_GETLOADAVG
102
102
# --------------------
103
 
# Set up the AC_LIBOBJ replacement of `getloadavg'.
 
103
# Set up the AC_LIBOBJ replacement of 'getloadavg'.
104
104
AC_DEFUN([gl_PREREQ_GETLOADAVG],
105
105
[
106
106
# Figure out what our getloadavg.c needs.
107
107
 
 
108
AC_CHECK_HEADERS_ONCE([sys/param.h])
 
109
 
108
110
# On HPUX9, an unprivileged user can get load averages this way.
109
111
if test $gl_func_getloadavg_done = no; then
110
112
  AC_CHECK_FUNCS([pstat_getdynamic], [gl_func_getloadavg_done=yes])