1 |
dnl configure.in for libstatgrab |
2 |
dnl $Id: configure.in,v 1.2 2003/02/19 18:49:18 tdb Exp $ |
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 |
AC_CONFIG_HEADER(config.h) |
10 |
|
11 |
dnl We need a CC, install, and libtool |
12 |
AC_PROG_CC |
13 |
AC_PROG_INSTALL |
14 |
AC_PROG_LIBTOOL |
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 Set things up for different OS's |
23 |
dnl We define the name of the OS so the code can act accordingly |
24 |
dnl We also need to add the right LDFLAGS |
25 |
case $host_os in |
26 |
solaris2.*) |
27 |
AC_DEFINE(SOLARIS, , [Building on Solaris 2.x]) |
28 |
LDFLAGS="$LDFLAGS -lkstat" |
29 |
;; |
30 |
freebsd4.*) |
31 |
AC_DEFINE(FREEBSD, , [Building on FreeBSD 4.x]) |
32 |
LDFLAGS="$LDFLAGS -lkvm" |
33 |
;; |
34 |
linux-gnu) |
35 |
AC_DEFINE(LINUX, , [Building on GNU/Linux]) |
36 |
;; |
37 |
*) |
38 |
AC_MSG_ERROR([Cannot build on unknown OS: $host_os]) |
39 |
;; |
40 |
esac |
41 |
|
42 |
dnl And finish by changing these files |
43 |
AC_OUTPUT([Makefile src/Makefile]) |