| 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 sys/loadavg.h |
| 44 |
> |
AC_CHECK_HEADERS([sys/loadavg.h]) |
| 45 |
> |
|
| 46 |
> |
# Check for libdevinfo.h |
| 47 |
> |
AC_CHECK_HEADERS([libdevinfo.h]) |
| 48 |
> |
|
| 49 |
> |
# Default needing setgid/setuid to false |
| 50 |
|
AM_CONDITIONAL(SETGIDBINS, false) |
| 51 |
+ |
AM_CONDITIONAL(SETUIDBINS, false) |
| 52 |
|
|
| 53 |
|
# Set things up for different OS's |
| 54 |
|
# We define the name of the OS so the code can act accordingly |
| 58 |
|
AC_CHECK_HEADERS([kstat.h],,[AC_MSG_ERROR([need kstat.h])]) |
| 59 |
|
AC_DEFINE(SOLARIS, , [Building on Solaris 2.x]) |
| 60 |
|
AC_DEFINE(SOL7, , [Building on Solaris 2.7]) |
| 61 |
< |
LINKFLAGS="-lkstat" |
| 61 |
> |
AM_CONDITIONAL(SETUIDBINS, true) |
| 62 |
> |
LINKFLAGS="-lkstat -ldevinfo" |
| 63 |
|
;; |
| 64 |
|
solaris2.*) |
| 65 |
|
AC_CHECK_HEADERS([kstat.h],,[AC_MSG_ERROR([need kstat.h])]) |
| 66 |
|
AC_DEFINE(SOLARIS, , [Building on Solaris 2.x]) |
| 67 |
< |
LINKFLAGS="-lkstat" |
| 67 |
> |
AM_CONDITIONAL(SETUIDBINS, true) |
| 68 |
> |
LINKFLAGS="-lkstat -ldevinfo" |
| 69 |
|
;; |
| 70 |
|
freebsd4.*) |
| 71 |
|
AC_DEFINE(ALLBSD, , [Building on a BSD-derived system]) |
| 90 |
|
AC_DEFINE(LINUX, , [Building on GNU/Linux]) |
| 91 |
|
;; |
| 92 |
|
cygwin) |
| 84 |
– |
AC_DEFINE(LINUX, , [Building on GNU/Linux]) |
| 93 |
|
AC_DEFINE(CYGWIN, , [Building on Cygwin]) |
| 94 |
|
;; |
| 95 |
|
*) |
| 160 |
|
) |
| 161 |
|
|
| 162 |
|
# Check if the user wants to turn off setgid binaries |
| 155 |
– |
# (only really relevant on FreeBSD) |
| 163 |
|
AC_ARG_ENABLE(setgid-binaries, |
| 164 |
|
[ --disable-setgid-binaries disable binaries being setgid], |
| 165 |
|
[ |
| 166 |
|
if test "x$enableval" = "xno" ; then |
| 167 |
|
AM_CONDITIONAL(SETGIDBINS, false) |
| 168 |
+ |
fi |
| 169 |
+ |
] |
| 170 |
+ |
) |
| 171 |
+ |
|
| 172 |
+ |
# Check if the user wants to turn off setuid binaries |
| 173 |
+ |
AC_ARG_ENABLE(setuid-binaries, |
| 174 |
+ |
[ --disable-setuid-binaries disable binaries being setuid], |
| 175 |
+ |
[ |
| 176 |
+ |
if test "x$enableval" = "xno" ; then |
| 177 |
+ |
AM_CONDITIONAL(SETUIDBINS, false) |
| 178 |
|
fi |
| 179 |
|
] |
| 180 |
|
) |