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.48 by tdb, Tue Jan 6 17:02:48 2004 UTC vs.
Revision 1.88 by tdb, Thu Mar 2 09:41:44 2006 UTC

# Line 6 | Line 6
6   #
7  
8   # Change these to change the package name and version
9 < AC_INIT(libstatgrab, 0.8.1, bugs@i-scream.org)
10 < AM_INIT_AUTOMAKE(libstatgrab, 0.8.1)
9 > AC_INIT(libstatgrab, 0.13, bugs@i-scream.org)
10 > AM_INIT_AUTOMAKE(libstatgrab, 0.13)
11 > AM_MAINTAINER_MODE
12  
13   # Revision number (automatically updated)
14   AC_REVISION($Revision$)
# Line 31 | Line 32 | AC_C_CONST
32  
33   # Checks for library functions
34   AC_FUNC_MALLOC
35 < AC_FUNC_REALLOC
35 < AC_CHECK_FUNCS(atoll)
35 > AC_CHECK_FUNCS(atoll seteuid setegid setresuid setresgid)
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])],
39 >                [AC_DEFINE(HAVE_DK_RBYTES, , [New-style NetBSD disk stats])],
40                  [],
41                  [#include <sys/disk.h>])
42  
43 + # Disk IO read and write statistics are only present on recent OpenBSD.
44 + AC_CHECK_MEMBER(struct diskstats.ds_rbytes,
45 +                [AC_DEFINE(HAVE_DS_RBYTES, , [New-style OpenBSD disk stats])],
46 +                [],
47 +                [#include <sys/disk.h>])
48 +
49 + # NetBSD 2.0 uses statvfs rather than statfs
50 + AC_CHECK_MEMBER(struct statvfs.f_fstypename,
51 +                [AC_DEFINE(HAVE_STATVFS, , [NetBSD 2.0 statvfs])],
52 +                [],
53 +                [#include <sys/statvfs.h>])
54 +
55 + # Check for sys/loadavg.h
56 + AC_CHECK_HEADERS([sys/loadavg.h])
57 +
58 + # Check for libdevinfo.h
59 + AC_CHECK_HEADERS([libdevinfo.h])
60 +
61   # Default needing setgid/setuid to false
62   AM_CONDITIONAL(SETGIDBINS, false)
63   AM_CONDITIONAL(SETUIDBINS, false)
64  
65 + # Default MINGW setting
66 + AM_CONDITIONAL(MINGW, false)
67 +
68   # Set things up for different OS's
69   # We define the name of the OS so the code can act accordingly
70   # We also need to add the right LDFLAGS
# Line 51 | Line 72 | case $host_os in
72   solaris2.[[6-7]])
73          AC_CHECK_HEADERS([kstat.h],,[AC_MSG_ERROR([need kstat.h])])
74          AC_DEFINE(SOLARIS, , [Building on Solaris 2.x])
75 <        AC_DEFINE(SOL7, , [Building on Solaris 2.7])
75 >        AC_DEFINE(SOL7, , [Building on Solaris 2.6 or 2.7])
76          AM_CONDITIONAL(SETUIDBINS, true)
77 <        LINKFLAGS="-lkstat -ldevinfo"
77 >        BIN_OWNER="root"
78 >        BIN_PERM="4755"
79 >        LINKFLAGS="-lkstat -lsocket -lnsl"
80 >        AC_CHECK_LIB(devinfo, di_init, [LINKFLAGS="$LINKFLAGS -ldevinfo"])
81          ;;
82   solaris2.*)
83          AC_CHECK_HEADERS([kstat.h],,[AC_MSG_ERROR([need kstat.h])])
84          AC_DEFINE(SOLARIS, , [Building on Solaris 2.x])
85 <        AM_CONDITIONAL(SETUIDBINS, true)
62 <        LINKFLAGS="-lkstat -ldevinfo"
85 >        LINKFLAGS="-lkstat -ldevinfo -lsocket -lnsl"
86          ;;
87 + hpux11.11*)
88 +        AC_DEFINE(HPUX, , [Building on HP-UX 11.11])
89 +        ;;
90   freebsd4.*)
91          AC_DEFINE(ALLBSD, , [Building on a BSD-derived system])
92          AC_DEFINE(FREEBSD, , [Building on FreeBSD])
93          AM_CONDITIONAL(SETGIDBINS, true)
94 +        BIN_GROUP="kmem"
95 +        BIN_PERM="2755"
96          LINKFLAGS="-lkvm -ldevstat"
97          ;;
98 < freebsd5.*)
98 > freebsd[[5-7]].*)
99          AC_DEFINE(ALLBSD, , [Building on a BSD-derived system])
100          AC_DEFINE(FREEBSD, , [Building on FreeBSD])
101 <        AC_DEFINE(FREEBSD5, , [Building on FreeBSD 5.x])
102 <        AM_CONDITIONAL(SETGIDBINS, true)
75 <        LINKFLAGS="-lkvm -ldevstat"
101 >        AC_DEFINE(FREEBSD5, , [Building on FreeBSD 5.x - 7.x])
102 >        LINKFLAGS="-ldevstat"
103          ;;
104 < netbsdelf*)
104 > netbsdelf1*)
105          AC_DEFINE(ALLBSD, , [Building on a BSD-derived system])
106          AC_DEFINE(NETBSD, , [Building on NetBSD])
107 +        ;;
108 + netbsdelf2*)
109 +        AC_DEFINE(ALLBSD, , [Building on a BSD-derived system])
110 +        AC_DEFINE(NETBSD, , [Building on NetBSD])
111 +        AC_DEFINE(NETBSD2, , [Building on NetBSD 2.x])
112 +        ;;
113 + openbsd*)
114 +        AC_DEFINE(ALLBSD, , [Building on a BSD-derived system])
115 +        AC_DEFINE(OPENBSD, , [Building on OpenBSD])
116 +        ;;
117 + dragonfly*)
118 +        AC_DEFINE(ALLBSD, , [Building on a BSD-derived system])
119 +        AC_DEFINE(DFBSD, , [Building on DragonFlyBSD])
120          AM_CONDITIONAL(SETGIDBINS, true)
121 <        LINKFLAGS="-lkvm"
121 >        BIN_GROUP="kmem"
122 >        BIN_PERM="2755"
123 >        LINKFLAGS="-lkvm -ldevstat"
124          ;;
125   linux-gnu)
126          AC_DEFINE(LINUX, , [Building on GNU/Linux])
127 +        AM_CONDITIONAL(SETUIDBINS, true)
128 +        BIN_OWNER="root"
129 +        BIN_PERM="4755"
130          ;;
131   cygwin)
132          AC_DEFINE(CYGWIN, , [Building on Cygwin])
133          ;;
134 + mingw32)
135 +        AC_DEFINE(MINGW, , [Building on MinGW])
136 +        AC_DEFINE(WINVER, 0x0500, [Building for Windows 2000])
137 +        AM_CONDITIONAL(MINGW, true)
138 +        LINKFLAGS="-lpdh -lIphlpapi -lpsapi -lnetapi32"
139 +        ;;
140   *)
141          AC_MSG_ERROR([Cannot build on unknown OS: $host_os])
142          ;;
# Line 173 | Line 224 | AC_ARG_ENABLE(setuid-binaries,
224          ]
225   )
226  
227 + # Check if the user would prefer not to include compatibility code
228 + AM_CONDITIONAL(DEPRECATED, true)
229 + AC_ARG_ENABLE(deprecated,
230 +        [  --disable-deprecated    disable inclusion of pre-0.10 compatibility code],
231 +        [
232 +                if test "x$enableval" = "xno" ; then
233 +                        AM_CONDITIONAL(DEPRECATED, false)
234 +                fi
235 +        ]
236 + )
237 +
238   # The LIBS and CPPFLAGS that saidar needs
239   AC_SUBST(SAIDARLIBS)
240   AC_SUBST(SAIDARCPPFLAGS)
# Line 181 | Line 243 | AC_SUBST(SAIDARCPPFLAGS)
243   # (ie. our dependencies)
244   AC_SUBST(LINKFLAGS)
245  
246 + # Ownership and permissions possibly needed for binaries
247 + AC_SUBST(BIN_OWNER)
248 + AC_SUBST(BIN_GROUP)
249 + AC_SUBST(BIN_PERM)
250 +
251   # And finish by changing these files
252 < 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])
252 > AC_CONFIG_FILES([Makefile src/Makefile src/libstatgrab/Makefile src/statgrab/Makefile docs/Makefile docs/libstatgrab/Makefile docs/statgrab/Makefile docs/saidar/Makefile examples/Makefile libstatgrab.pc src/statgrab/statgrab-make-mrtg-config src/statgrab/statgrab-make-mrtg-index src/saidar/Makefile])
253  
254   AC_OUTPUT

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines