6 |
|
# |
7 |
|
|
8 |
|
# Change these to change the package name and version |
9 |
< |
AC_INIT(libstatgrab, 0.7.1, bugs@i-scream.org) |
10 |
< |
AM_INIT_AUTOMAKE(libstatgrab, 0.7.1) |
9 |
> |
AC_INIT(libstatgrab, 0.8.2, bugs@i-scream.org) |
10 |
> |
AM_INIT_AUTOMAKE(libstatgrab, 0.8.2) |
11 |
|
|
12 |
|
# Revision number (automatically updated) |
13 |
|
AC_REVISION($Revision$) |
40 |
|
[], |
41 |
|
[#include <sys/disk.h>]) |
42 |
|
|
43 |
< |
# Default needing setgid to false |
43 |
> |
# Check for loadavg.h |
44 |
> |
AC_CHECK_HEADERS([sys/loadavg.h]) |
45 |
> |
|
46 |
> |
# Default needing setgid/setuid to false |
47 |
|
AM_CONDITIONAL(SETGIDBINS, false) |
48 |
+ |
AM_CONDITIONAL(SETUIDBINS, false) |
49 |
|
|
50 |
|
# Set things up for different OS's |
51 |
|
# We define the name of the OS so the code can act accordingly |
55 |
|
AC_CHECK_HEADERS([kstat.h],,[AC_MSG_ERROR([need kstat.h])]) |
56 |
|
AC_DEFINE(SOLARIS, , [Building on Solaris 2.x]) |
57 |
|
AC_DEFINE(SOL7, , [Building on Solaris 2.7]) |
58 |
< |
LINKFLAGS="-lkstat" |
58 |
> |
AM_CONDITIONAL(SETUIDBINS, true) |
59 |
> |
LINKFLAGS="-lkstat -ldevinfo" |
60 |
|
;; |
61 |
|
solaris2.*) |
62 |
|
AC_CHECK_HEADERS([kstat.h],,[AC_MSG_ERROR([need kstat.h])]) |
63 |
|
AC_DEFINE(SOLARIS, , [Building on Solaris 2.x]) |
64 |
< |
LINKFLAGS="-lkstat" |
64 |
> |
AM_CONDITIONAL(SETUIDBINS, true) |
65 |
> |
LINKFLAGS="-lkstat -ldevinfo" |
66 |
|
;; |
67 |
|
freebsd4.*) |
68 |
|
AC_DEFINE(ALLBSD, , [Building on a BSD-derived system]) |
86 |
|
linux-gnu) |
87 |
|
AC_DEFINE(LINUX, , [Building on GNU/Linux]) |
88 |
|
;; |
89 |
+ |
cygwin) |
90 |
+ |
AC_DEFINE(CYGWIN, , [Building on Cygwin]) |
91 |
+ |
;; |
92 |
|
*) |
93 |
|
AC_MSG_ERROR([Cannot build on unknown OS: $host_os]) |
94 |
|
;; |
157 |
|
) |
158 |
|
|
159 |
|
# Check if the user wants to turn off setgid binaries |
151 |
– |
# (only really relevant on FreeBSD) |
160 |
|
AC_ARG_ENABLE(setgid-binaries, |
161 |
|
[ --disable-setgid-binaries disable binaries being setgid], |
162 |
|
[ |
163 |
|
if test "x$enableval" = "xno" ; then |
164 |
|
AM_CONDITIONAL(SETGIDBINS, false) |
165 |
+ |
fi |
166 |
+ |
] |
167 |
+ |
) |
168 |
+ |
|
169 |
+ |
# Check if the user wants to turn off setuid binaries |
170 |
+ |
AC_ARG_ENABLE(setuid-binaries, |
171 |
+ |
[ --disable-setuid-binaries disable binaries being setuid], |
172 |
+ |
[ |
173 |
+ |
if test "x$enableval" = "xno" ; then |
174 |
+ |
AM_CONDITIONAL(SETUIDBINS, false) |
175 |
|
fi |
176 |
|
] |
177 |
|
) |