ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/ihost/configure.in
Revision: 1.8
Committed: Mon Feb 3 16:33:29 2003 UTC (21 years, 3 months ago) by tdb
Branch: MAIN
Changes since 1.7: +3 -3 lines
Log Message:
Fix, or rather alter, the getloadavg testing.
Added some more info to the init thing.

File Contents

# User Rev Content
1 tdb 1.5 dnl configure.in for i-scream ihost
2 tdb 1.8 dnl $Id: configure.in,v 1.7 2002/05/31 14:34:48 tdb Exp $
3 tdb 1.5
4     dnl Change these to change the package name and version
5 tdb 1.8 AC_INIT(ihost, 1.0rc1, dev@i-scream.org.uk)
6 tdb 1.1 AM_INIT_AUTOMAKE(ihost, 1.0rc1)
7 tdb 1.5
8     dnl The file we use to pass #define's to the source
9 tdb 1.6 AM_CONFIG_HEADER(config.h)
10 tdb 1.1
11 tdb 1.5 dnl We need a CC, install, and ranlib
12 tdb 1.1 AC_PROG_CC
13     AC_PROG_INSTALL
14     AC_PROG_RANLIB
15    
16 tdb 1.5 dnl And we probably need the standard C bits
17 tdb 1.1 AC_HEADER_STDC
18    
19 tdb 1.5 dnl The program needs to know whether it can use getloadavg
20 tdb 1.8 AC_CHECK_FUNCS(getloadavg)
21 tdb 1.1
22 tdb 1.5 dnl Figure out details about the host - we need the OS
23 tdb 1.1 AC_CANONICAL_HOST
24    
25 tdb 1.5 dnl Default needing setgid kmem to false
26 tdb 1.6 AM_CONDITIONAL(SETGIDKMEM, false)
27 tdb 1.4
28 tdb 1.5 dnl Set things up for different OS's
29     dnl We define the name of the OS so the code can act accordingly
30     dnl We also need to add the right LDFLAGS
31 tdb 1.1 case $host_os in
32     solaris2.*)
33     AC_DEFINE(SOLARIS, , [Building on Solaris 2.x])
34     LDFLAGS="$LDFLAGS -lnsl -lsocket -lkstat"
35     ;;
36     freebsd4.*)
37     AC_DEFINE(FREEBSD, , [Building on FreeBSD 4.x])
38     LDFLAGS="$LDFLAGS -lkvm"
39 tdb 1.5 dnl FreeBSD needs ihost to be setgid kmem
40 tdb 1.6 AM_CONDITIONAL(SETGIDKMEM, true)
41 tdb 1.1 ;;
42     linux-gnu)
43 tdb 1.7 AC_DEFINE(LINUX, , [Building on GNU/Linux])
44 tdb 1.1 ;;
45     *)
46 tdb 1.7 AC_MSG_ERROR([Cannot build on unknown OS: $host_os])
47 tdb 1.1 ;;
48     esac
49    
50 tdb 1.5 dnl Check for the --with-pid-file option
51     dnl define accordingly for the code, and subst for the scripts
52 tdb 1.6 AC_ARG_WITH([pid-file], [ --with-pid-file=FILE location of PID file (default: /var/tmp/.ihost.pid)], [pidfile=$withval], [pidfile=[/var/tmp/.ihost.pid]])
53 tdb 1.3 AC_DEFINE_UNQUOTED([PID_FILE], ["$pidfile"], [Location of PID file])
54     AC_SUBST([pidfile], [$pidfile])
55 tdb 1.2
56 tdb 1.5 dnl Check for the --with-max-udp-size option
57     dnl define accordingly for the code
58 tdb 1.6 AC_ARG_WITH([max-udp-size], [ --with-max-udp-size=KB maximum size of UDP packets in kilobytes (default: 8192kb)], [max_udp_size=$withval], [max_udp_size=[8192]])
59 tdb 1.2 AC_DEFINE_UNQUOTED([UDP_MAX_PACKET_SIZE], [$max_udp_size], [Maximum size of UDP packets in kilobytes])
60    
61 tdb 1.6 dnl And finish by changing these files
62     AC_OUTPUT([Makefile libstatgrab/Makefile libukcprog/Makefile ihostchk.sh], [chmod ugo+x ihostchk.sh])