ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/ihost/configure.in
(Generate patch)

Comparing projects/cms/source/ihost/configure.in (file contents):
Revision 1.2 by tdb, Wed May 29 23:03:53 2002 UTC vs.
Revision 1.30 by tdb, Mon Jan 5 16:02:20 2004 UTC

# Line 1 | Line 1
1 < AC_INIT(ihost.c)
2 < AM_INIT_AUTOMAKE(ihost, 1.0rc1)
3 < dnl AC_CONFIG_SRCDIR([ihost.c])
4 < AM_CONFIG_HEADER([config.h])
1 > #                                               -*- Autoconf -*-
2 > # Process this file with autoconf to produce a configure script.
3 > #
4 > # configure.in for i-scream ihost
5 > # $Id$
6 > #
7  
8 + # Change these to change the package name and version
9 + AC_INIT(ihost, 1.5.7, bugs@i-scream.org)
10 + AM_INIT_AUTOMAKE(ihost, 1.5.7)
11 +
12 + # Revision number (automatically updated)
13 + AC_REVISION($Revision$)
14 +
15 + # Might work with older autoconfs... but tested on 2.57
16 + AC_PREREQ(2.57)
17 +
18 + # The file we use to pass #define's to the source
19 + AM_CONFIG_HEADER(config.h)
20 +
21 + # Checks for programs
22   AC_PROG_CC
23   AC_PROG_INSTALL
8 AC_PROG_RANLIB
24  
25 < dnl AC_HEADER_DIRENT
25 > # User specified libstatgrab prefix
26 > AC_ARG_WITH([libstatgrab-prefix],
27 >        [  --with-libstatgrab-prefix=PATH        libstatgrab is in PATH],
28 >        [
29 >                if test -d "$withval/lib"; then
30 >                        LDFLAGS="-L${withval}/lib ${LDFLAGS}"
31 >                fi
32 >                if test -d "$withval/include"; then
33 >                        CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
34 >                fi
35 >        ]
36 > )
37 >
38 > # User specified libukcprog prefix
39 > AC_ARG_WITH([libukcprog-prefix],
40 >        [  --with-libukcprog-prefix=PATH         libukcprog is in PATH],
41 >        [
42 >                if test -d "$withval/lib"; then
43 >                        LDFLAGS="-L${withval}/lib ${LDFLAGS}"
44 >                fi
45 >                if test -d "$withval/include"; then
46 >                        CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
47 >                fi
48 >        ]
49 > )
50 >
51 > # Checks for header files
52   AC_HEADER_STDC
53 < dnl AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h memory.h mntent.h netdb.h netinet/in.h stddef.h stdlib.h string.h sys/mount.h sys/param.h sys/socket.h sys/statvfs.h sys/time.h sys/vfs.h syslog.h unistd.h utmp.h])
53 > AC_CHECK_HEADERS(statgrab.h,,[AC_MSG_ERROR([need statgrab.h])])
54 > AC_CHECK_HEADERS(ukcprog.h,,[AC_MSG_ERROR([need ukcprog.h])])
55  
56 < dnl AC_C_CONST
57 < dnl AC_TYPE_UID_T
16 < dnl AC_TYPE_PID_T
17 < dnl AC_TYPE_SIZE_T
18 < dnl AC_HEADER_TIME
56 > # Checks for typedefs, structures, and compiler characteristics
57 > AC_C_CONST
58  
59 < dnl AC_FUNC_FORK
60 < AC_FUNC_GETLOADAVG
61 < dnl AC_FUNC_MALLOC
62 < dnl AC_CHECK_FUNCS([gethostbyname getmntent getmntinfo getpagesize inet_ntoa memmove memset socket strchr strdup strncasecmp strrchr strtol uname])
59 > # Checks for library functions
60 > AC_FUNC_MALLOC
61 > AC_FUNC_REALLOC
62 > AC_FUNC_FORK
63 > AC_CHECK_FUNCS(strlcat)
64  
65 + # Figure out details about the host - we need the OS
66   AC_CANONICAL_HOST
67  
68 + # Default needing setgid kmem to false
69 + AM_CONDITIONAL(SETGIDKMEM, false)
70 +
71 + # Set things up for different OS's
72 + # We define the name of the OS so the code can act accordingly
73 + # We also need to add the right LDFLAGS
74   case $host_os in
75   solaris2.*)
76 +        AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])],[-lnsl -lsocket])
77          AC_DEFINE(SOLARIS, , [Building on Solaris 2.x])
78 <        LDFLAGS="$LDFLAGS -lnsl -lsocket -lkstat"
78 >        LIBS="$LIBS -lnsl -lsocket -lkstat -ldevinfo -lstatgrab -lukcprog"
79          ;;
80 < freebsd4.*)
81 <        AC_DEFINE(FREEBSD, , [Building on FreeBSD 4.x])
82 <        LDFLAGS="$LDFLAGS -lkvm"
80 > freebsd*)
81 >        AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])])
82 >        AC_DEFINE(ALLBSD, , [Building on a BSD-derived system])
83 >        AC_DEFINE(FREEBSD, , [Building on FreeBSD])
84 >        LIBS="$LIBS -lstatgrab -lkvm -ldevstat -lukcprog"
85 >        # FreeBSD needs ihost to be setgid kmem
86 >        AM_CONDITIONAL(SETGIDKMEM, true)
87          ;;
88 + netbsdelf*)
89 +        AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])])
90 +        AC_DEFINE(ALLBSD, , [Building on a BSD-derived system])
91 +        AC_DEFINE(NETBSD, , [Building on NetBSD])
92 +        LIBS="$LIBS -lstatgrab -lkvm -lukcprog"
93 +        AM_CONDITIONAL(SETGIDKMEM, true)
94 +        ;;
95   linux-gnu)
96 <        AC_DEFINE(LINUX, , [Building on GNU/Lunix])
96 >        AC_CHECK_LIB(ukcprog, fpgetline,[:],[AC_MSG_ERROR([need libukcprog])])
97 >        AC_DEFINE(LINUX, , [Building on GNU/Linux])
98 >        LIBS="$LIBS -lstatgrab -lukcprog"
99          ;;
100 + cygwin)
101 +        AC_MSG_ERROR([libstatgrab doesn't fully support cygwin, yet])
102 +        ;;
103   *)
104 <        AC_MSG_ERROR([Cannot build on unknown OS: $build_os])
104 >        AC_MSG_ERROR([Cannot build on unknown OS: $host_os])
105          ;;
106   esac
107  
108 < AC_ARG_WITH([pid-file], AC_HELP_STRING([--with-pid-file=FILE],[location of PID file (default: /var/tmp/.ihost.pid)]), [pid_file=$withval], [pid_file=[/var/tmp/.ihost.pid]])
109 < AC_DEFINE_UNQUOTED([PID_FILE], ["$pid_file"], [Location of PID file])
108 > # Check for libstatgrab
109 > AC_CHECK_LIB(statgrab, get_general_stats,[:],[AC_MSG_ERROR([need libstatgrab])])
110  
111 < AC_ARG_WITH([max-udp-size], AC_HELP_STRING([--with-max-udp-size=SIZE],[maximum size of UDP packets in kilobytes (default: 8192kb)]), [max_udp_size=$withval], [max_udp_size=[8192]])
112 < AC_DEFINE_UNQUOTED([UDP_MAX_PACKET_SIZE], [$max_udp_size], [Maximum size of UDP packets in kilobytes])
111 > # Check for the --with-pid-file option
112 > 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]])
113 > AC_DEFINE_UNQUOTED([PID_FILE], ["$pidfile"], [Location of PID file])
114  
115 < AC_CONFIG_FILES([Makefile libstatgrab/Makefile libukcprog/Makefile])
115 > # Check for the --with-max-udp-size option
116 > 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]])
117 > AC_DEFINE_UNQUOTED([MAX_UDP_PACKET_SIZE], [$max_udp_size], [Maximum size of UDP packets in kilobytes])
118 >
119 > # Check for the --with-log-file option
120 > AC_ARG_WITH([log-file], [  --with-log-file=FILE    location of log file (default: /var/log/ihost.log)], [logfile=$withval], [logfile=[/var/log/ihost.log]])
121 > AC_DEFINE_UNQUOTED([LOG_FILE], ["$logfile"], [Location of log file])
122 >
123 > # Check for the --with-server-name option
124 > AC_ARG_WITH([server-name], [  --with-server-name=NAME default server name (default: i-scream)], [servername=$withval], [servername=[i-scream]])
125 > AC_DEFINE_UNQUOTED([DEF_SERVER_NAME], ["$servername"], [Default Server Name])
126 >
127 > # Check for the --with-server-port option
128 > AC_ARG_WITH([server-port], [  --with-server-port=PORT default server port (default: 4567)], [serverport=$withval], [serverport=[4567]])
129 > AC_DEFINE_UNQUOTED([DEF_SERVER_PORT], [$serverport], [Default Server Port])
130 >
131 > # And finish by changing these files
132 > AC_CONFIG_FILES([Makefile])
133  
134   AC_OUTPUT

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines