6 |
|
# |
7 |
|
|
8 |
|
# Change these to change the package name and version |
9 |
< |
AC_INIT(libstatgrab, 0.16, bugs@i-scream.org) |
10 |
< |
AM_INIT_AUTOMAKE(libstatgrab, 0.16) |
11 |
< |
AM_MAINTAINER_MODE |
9 |
> |
AC_INIT(libstatgrab, 0.18, bugs@i-scream.org) |
10 |
> |
AM_INIT_AUTOMAKE(libstatgrab, 0.18) |
11 |
|
|
12 |
|
# Revision number (automatically updated) |
13 |
|
AC_REVISION($Revision$) |
23 |
|
AC_PROG_INSTALL |
24 |
|
AC_PROG_LIBTOOL |
25 |
|
|
26 |
+ |
dnl Check for extra flags to enable some kind of behavior |
27 |
+ |
AC_CHECK_DECL([_AIX],[ac_cv_need_minus_d_linux_source_compat="yes"]) |
28 |
+ |
|
29 |
+ |
AS_IF([test "x$ac_cv_need_minus_d_linux_source_compat" = "xyes"], |
30 |
+ |
[CPPFLAGS="$CPPFLAGS -D_LINUX_SOURCE_COMPAT"]) |
31 |
+ |
|
32 |
|
# Checks for header files |
33 |
|
AC_HEADER_STDC |
34 |
|
|
57 |
|
[], |
58 |
|
[#include <sys/statvfs.h>]) |
59 |
|
|
60 |
+ |
# FreeBSD 9 (and others) uses utmpx rather than utmp |
61 |
+ |
AC_CHECK_MEMBER(struct utmpx.ut_type, |
62 |
+ |
[AC_DEFINE(HAVE_UTMPX, , [utmpx])], |
63 |
+ |
[], |
64 |
+ |
[#include <utmpx.h>]) |
65 |
+ |
|
66 |
|
# Check for sys/loadavg.h |
67 |
|
AC_CHECK_HEADERS([sys/loadavg.h]) |
68 |
|
|
97 |
|
LINKFLAGS="-lkstat -ldevinfo -lsocket -lnsl" |
98 |
|
AC_CHECK_LIB(m, fabs, [SAIDARLIBS="$SAIDARLIBS -lm"]) |
99 |
|
;; |
100 |
< |
hpux11.11*) |
101 |
< |
AC_DEFINE(HPUX, , [Building on HP-UX 11.11]) |
100 |
> |
hpux11.11*|hpux11.[[23]]*) |
101 |
> |
AC_DEFINE(HPUX, , [Building on HP-UX 11.11+]) |
102 |
|
;; |
103 |
+ |
aix[[5-9]]*) |
104 |
+ |
AC_DEFINE(AIX, , [Building on AIX 5.x - 9.x]) |
105 |
+ |
AC_CHECK_LIB(perfstat, perfstat_cpu_total, [LINKFLAGS="$LINKFLAGS -ldevinfo"]) |
106 |
+ |
;; |
107 |
|
freebsd4.*) |
108 |
|
AC_DEFINE(ALLBSD, , [Building on a BSD-derived system]) |
109 |
|
AC_DEFINE(FREEBSD, , [Building on FreeBSD]) |
112 |
|
BIN_PERM="2755" |
113 |
|
LINKFLAGS="-lkvm -ldevstat" |
114 |
|
;; |
115 |
< |
freebsd[[5-8]].*) |
115 |
> |
freebsd[[5-9]].*) |
116 |
|
AC_DEFINE(ALLBSD, , [Building on a BSD-derived system]) |
117 |
|
AC_DEFINE(FREEBSD, , [Building on FreeBSD]) |
118 |
< |
AC_DEFINE(FREEBSD5, , [Building on FreeBSD 5.x - 8.x]) |
118 |
> |
AC_DEFINE(FREEBSD5, , [Building on FreeBSD 5.x - 9.x]) |
119 |
|
LINKFLAGS="-ldevstat" |
120 |
|
;; |
121 |
|
netbsdelf1*) |
144 |
|
AM_CONDITIONAL(SETUIDBINS, true) |
145 |
|
BIN_OWNER="root" |
146 |
|
BIN_PERM="4755" |
147 |
+ |
;; |
148 |
+ |
kfreebsd*-gnu*) |
149 |
+ |
AC_DEFINE(ALLBSD, , [Building on a BSD-derived system]) |
150 |
+ |
AC_DEFINE(FREEBSD, , [Building on FreeBSD]) |
151 |
+ |
AC_DEFINE(FREEBSD5, , [Building on FreeBSD 5.x - 9.x]) |
152 |
+ |
LINKFLAGS="-ldevstat" |
153 |
|
;; |
154 |
|
cygwin) |
155 |
|
AC_DEFINE(CYGWIN, , [Building on Cygwin]) |