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

Comparing projects/libstatgrab/configure.in (file contents):
Revision 1.10 by tdb, Fri Mar 21 14:27:22 2003 UTC vs.
Revision 1.46 by tdb, Fri Dec 12 09:48:20 2003 UTC

# Line 6 | Line 6
6   #
7  
8   # Change these to change the package name and version
9 < AC_INIT(libstatgrab, 0.3.2, dev@i-scream.org.uk)
10 < AM_INIT_AUTOMAKE(libstatgrab, 0.3.2)
9 > AC_INIT(libstatgrab, 0.7.1, bugs@i-scream.org)
10 > AM_INIT_AUTOMAKE(libstatgrab, 0.7.1)
11  
12   # Revision number (automatically updated)
13   AC_REVISION($Revision$)
# Line 32 | Line 32 | AC_C_CONST
32   # Checks for library functions
33   AC_FUNC_MALLOC
34   AC_FUNC_REALLOC
35 + AC_CHECK_FUNCS(atoll)
36  
37 + # Disk IO read and write statistics are only present on recent NetBSD.
38 + AC_CHECK_MEMBER(struct disk_sysctl.dk_rbytes,
39 +                [AC_DEFINE(HAVE_DK_RBYTES, , [New-style NetBSD stats])],
40 +                [],
41 +                [#include <sys/disk.h>])
42 +
43 + # Default needing setgid/setuid to false
44 + AM_CONDITIONAL(SETGIDBINS, false)
45 + AM_CONDITIONAL(SETUIDBINS, false)
46 +
47   # Set things up for different OS's
48   # We define the name of the OS so the code can act accordingly
49   # We also need to add the right LDFLAGS
# Line 41 | Line 52 | solaris2.[[6-7]])
52          AC_CHECK_HEADERS([kstat.h],,[AC_MSG_ERROR([need kstat.h])])
53          AC_DEFINE(SOLARIS, , [Building on Solaris 2.x])
54          AC_DEFINE(SOL7, , [Building on Solaris 2.7])
55 <        LDFLAGS="$LDFLAGS -lkstat"
55 >        AM_CONDITIONAL(SETUIDBINS, true)
56 >        LINKFLAGS="-lkstat -ldevinfo"
57          ;;
58   solaris2.*)
59          AC_CHECK_HEADERS([kstat.h],,[AC_MSG_ERROR([need kstat.h])])
60          AC_DEFINE(SOLARIS, , [Building on Solaris 2.x])
61 <        LDFLAGS="$LDFLAGS -lkstat"
61 >        AM_CONDITIONAL(SETUIDBINS, true)
62 >        LINKFLAGS="-lkstat -ldevinfo"
63          ;;
64   freebsd4.*)
65 <        AC_DEFINE(FREEBSD, , [Building on FreeBSD 4.x])
66 <        LDFLAGS="$LDFLAGS -lkvm"
65 >        AC_DEFINE(ALLBSD, , [Building on a BSD-derived system])
66 >        AC_DEFINE(FREEBSD, , [Building on FreeBSD])
67 >        AM_CONDITIONAL(SETGIDBINS, true)
68 >        LINKFLAGS="-lkvm -ldevstat"
69          ;;
70 + freebsd5.*)
71 +        AC_DEFINE(ALLBSD, , [Building on a BSD-derived system])
72 +        AC_DEFINE(FREEBSD, , [Building on FreeBSD])
73 +        AC_DEFINE(FREEBSD5, , [Building on FreeBSD 5.x])
74 +        AM_CONDITIONAL(SETGIDBINS, true)
75 +        LINKFLAGS="-lkvm -ldevstat"
76 +        ;;
77 + netbsdelf*)
78 +        AC_DEFINE(ALLBSD, , [Building on a BSD-derived system])
79 +        AC_DEFINE(NETBSD, , [Building on NetBSD])
80 +        AM_CONDITIONAL(SETGIDBINS, true)
81 +        LINKFLAGS="-lkvm"
82 +        ;;
83   linux-gnu)
84          AC_DEFINE(LINUX, , [Building on GNU/Linux])
85          ;;
86 + cygwin)
87 +        AC_DEFINE(CYGWIN, , [Building on Cygwin])
88 +        ;;
89   *)
90          AC_MSG_ERROR([Cannot build on unknown OS: $host_os])
91          ;;
92   esac
93  
94 + # User specified curses/ncurses prefix
95 + AC_ARG_WITH([curses-prefix],
96 +        [  --with-curses-prefix=PATH     curses (or ncurses) is in PATH],
97 +        [
98 +                if test -d "$withval/lib"; then
99 +                        SAIDARLIBS="-L${withval}/lib ${SAIDARLIBS}"
100 +                fi
101 +                if test -d "$withval/include"; then
102 +                        SAIDARCPPFLAGS="-I${withval}/include -I${withval}/include/ncurses ${SAIRDARCPPFLAGS}"
103 +                fi
104 +        ]
105 + )
106 +
107 + # Check if user wants to disable statgrab
108 + AM_CONDITIONAL(STATGRAB, true)
109 + AC_ARG_ENABLE(statgrab,
110 +        [  --disable-statgrab      disable building of statgrab],
111 +        [
112 +                if test "x$enableval" = "xno" ; then
113 +                        AM_CONDITIONAL(STATGRAB, false)
114 +                fi
115 +        ]
116 + )
117 +
118 + # Check if user wants to disable saidar
119 + AM_CONDITIONAL(SAIDAR, true)
120 + AC_ARG_ENABLE(saidar,
121 +        [  --disable-saidar        disable building of saidar],
122 +        [
123 +                if test "x$enableval" = "xno" ; then
124 +                        AM_CONDITIONAL(SAIDAR, false)
125 +                fi
126 +        ],
127 +        [
128 +                # saidar needs curses
129 +                # (if we don't find curses we disable saidar)
130 +                MP_WITH_CURSES
131 +        ]
132 + )
133 +
134 + # Check if the user would prefer not to build examples
135 + AM_CONDITIONAL(EXAMPLES, true)
136 + AC_ARG_ENABLE(examples,
137 +        [  --disable-examples      disable building of examples],
138 +        [
139 +                if test "x$enableval" = "xno" ; then
140 +                        AM_CONDITIONAL(EXAMPLES, false)
141 +                fi
142 +        ]
143 + )
144 +
145 + # Check if user wants to install manpages
146 + AM_CONDITIONAL(MANPAGES, true)
147 + AC_ARG_ENABLE(manpages,
148 +        [  --disable-manpages      disable installation of manpages],
149 +        [
150 +                if test "x$enableval" = "xno" ; then
151 +                        AM_CONDITIONAL(MANPAGES, false)
152 +                fi
153 +        ]
154 + )
155 +
156 + # Check if the user wants to turn off setgid binaries
157 + AC_ARG_ENABLE(setgid-binaries,
158 +        [  --disable-setgid-binaries     disable binaries being setgid],
159 +        [
160 +                if test "x$enableval" = "xno" ; then
161 +                        AM_CONDITIONAL(SETGIDBINS, false)
162 +                fi
163 +        ]
164 + )
165 +
166 + # Check if the user wants to turn off setuid binaries
167 + AC_ARG_ENABLE(setuid-binaries,
168 +        [  --disable-setuid-binaries     disable binaries being setuid],
169 +        [
170 +                if test "x$enableval" = "xno" ; then
171 +                        AM_CONDITIONAL(SETUIDBINS, false)
172 +                fi
173 +        ]
174 + )
175 +
176 + # The LIBS and CPPFLAGS that saidar needs
177 + AC_SUBST(SAIDARLIBS)
178 + AC_SUBST(SAIDARCPPFLAGS)
179 +
180 + # The flags needed to link to libstatgrab
181 + # (ie. our dependencies)
182 + AC_SUBST(LINKFLAGS)
183 +
184   # And finish by changing these files
185 < AC_CONFIG_FILES([Makefile src/Makefile])
185 > AC_CONFIG_FILES([Makefile src/Makefile src/libstatgrab/Makefile src/statgrab/Makefile docs/Makefile examples/Makefile libstatgrab.pc src/statgrab/statgrab-make-mrtg-config src/statgrab/statgrab-make-mrtg-index src/saidar/Makefile])
186  
187   AC_OUTPUT

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines