1 |
tdb |
1.1 |
dnl configure.in for libstatgrab |
2 |
|
|
dnl $Id$ |
3 |
|
|
|
4 |
|
|
dnl Change these to change the package name and version |
5 |
|
|
AC_INIT(libstatgrab, 0.1, dev@i-scream.org.uk) |
6 |
|
|
AM_INIT_AUTOMAKE(libstatgrab, 0.1) |
7 |
|
|
|
8 |
|
|
dnl The file we use to pass #define's to the source |
9 |
|
|
AM_CONFIG_HEADER(config.h) |
10 |
|
|
|
11 |
|
|
dnl We need a CC, install, and ranlib |
12 |
|
|
AC_PROG_CC |
13 |
|
|
AC_PROG_INSTALL |
14 |
|
|
AC_PROG_RANLIB |
15 |
|
|
|
16 |
|
|
dnl And we probably need the standard C bits |
17 |
|
|
AC_HEADER_STDC |
18 |
|
|
|
19 |
|
|
dnl The program needs to know whether it can use getloadavg |
20 |
|
|
AC_CHECK_FUNCS(getloadavg) |
21 |
|
|
|
22 |
|
|
dnl Figure out details about the host - we need the OS |
23 |
|
|
AC_CANONICAL_HOST |
24 |
|
|
|
25 |
|
|
dnl Set things up for different OS's |
26 |
|
|
dnl We define the name of the OS so the code can act accordingly |
27 |
|
|
dnl We also need to add the right LDFLAGS |
28 |
|
|
case $host_os in |
29 |
|
|
solaris2.*) |
30 |
|
|
AC_DEFINE(SOLARIS, , [Building on Solaris 2.x]) |
31 |
|
|
LDFLAGS="$LDFLAGS -lkstat" |
32 |
|
|
;; |
33 |
|
|
freebsd4.*) |
34 |
|
|
AC_DEFINE(FREEBSD, , [Building on FreeBSD 4.x]) |
35 |
|
|
LDFLAGS="$LDFLAGS -lkvm" |
36 |
|
|
;; |
37 |
|
|
linux-gnu) |
38 |
|
|
AC_DEFINE(LINUX, , [Building on GNU/Linux]) |
39 |
|
|
;; |
40 |
|
|
*) |
41 |
|
|
AC_MSG_ERROR([Cannot build on unknown OS: $host_os]) |
42 |
|
|
;; |
43 |
|
|
esac |
44 |
|
|
|
45 |
|
|
dnl And finish by changing these files |
46 |
|
|
AC_OUTPUT([Makefile]) |