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.76 by tdb, Tue Aug 24 20:45:29 2004 UTC vs.
Revision 1.103 by tdb, Sun Oct 3 18:35:56 2010 UTC

# Line 6 | Line 6
6   #
7  
8   # Change these to change the package name and version
9 < AC_INIT(libstatgrab, 0.10.4, bugs@i-scream.org)
10 < AM_INIT_AUTOMAKE(libstatgrab, 0.10.4)
9 > AC_INIT(libstatgrab, 0.18, bugs@i-scream.org)
10 > AM_INIT_AUTOMAKE(libstatgrab, 0.18)
11  
12   # Revision number (automatically updated)
13   AC_REVISION($Revision$)
# Line 23 | Line 23 | AC_PROG_CC
23   AC_PROG_INSTALL
24   AC_PROG_LIBTOOL
25  
26 + dnl Check for extra flags to enable some kind of behavior
27 + AC_CHECK_DECL([_AIX],[ac_cv_need_minus_d_linux_source_compat="yes"])
28 +
29 + AS_IF([test "x$ac_cv_need_minus_d_linux_source_compat" = "xyes"],
30 +      [CPPFLAGS="$CPPFLAGS -D_LINUX_SOURCE_COMPAT"])
31 +
32   # Checks for header files
33   AC_HEADER_STDC
34  
# Line 31 | Line 37 | AC_C_CONST
37  
38   # Checks for library functions
39   AC_FUNC_MALLOC
40 < AC_FUNC_REALLOC
35 < AC_CHECK_FUNCS(atoll)
40 > AC_CHECK_FUNCS(atoll seteuid setegid setresuid setresgid)
41  
42   # Disk IO read and write statistics are only present on recent NetBSD.
43   AC_CHECK_MEMBER(struct disk_sysctl.dk_rbytes,
# Line 52 | Line 57 | AC_CHECK_MEMBER(struct statvfs.f_fstypename,
57                  [],
58                  [#include <sys/statvfs.h>])
59  
60 + # FreeBSD 9 (and others) uses utmpx rather than utmp
61 + AC_CHECK_MEMBER(struct utmpx.ut_type,
62 +                [AC_DEFINE(HAVE_UTMPX, , [utmpx])],
63 +                [],
64 +                [#include <utmpx.h>])
65 +
66   # Check for sys/loadavg.h
67   AC_CHECK_HEADERS([sys/loadavg.h])
68  
# Line 62 | Line 73 | AC_CHECK_HEADERS([libdevinfo.h])
73   AM_CONDITIONAL(SETGIDBINS, false)
74   AM_CONDITIONAL(SETUIDBINS, false)
75  
76 + # Default MINGW setting
77 + AM_CONDITIONAL(MINGW, false)
78 +
79   # Set things up for different OS's
80   # We define the name of the OS so the code can act accordingly
81   # We also need to add the right LDFLAGS
# Line 75 | Line 89 | solaris2.[[6-7]])
89          BIN_PERM="4755"
90          LINKFLAGS="-lkstat -lsocket -lnsl"
91          AC_CHECK_LIB(devinfo, di_init, [LINKFLAGS="$LINKFLAGS -ldevinfo"])
92 +        AC_CHECK_LIB(m, fabs, [SAIDARLIBS="$SAIDARLIBS -lm"])
93          ;;
94   solaris2.*)
95          AC_CHECK_HEADERS([kstat.h],,[AC_MSG_ERROR([need kstat.h])])
96          AC_DEFINE(SOLARIS, , [Building on Solaris 2.x])
97          LINKFLAGS="-lkstat -ldevinfo -lsocket -lnsl"
98 +        AC_CHECK_LIB(m, fabs, [SAIDARLIBS="$SAIDARLIBS -lm"])
99          ;;
100 + hpux11.11*|hpux11.[[23]]*)
101 +        AC_DEFINE(HPUX, , [Building on HP-UX 11.11+])
102 +        ;;
103 + aix[[5-9]]*)
104 +        AC_DEFINE(AIX, , [Building on AIX 5.x - 9.x])
105 +        AC_CHECK_LIB(perfstat, perfstat_cpu_total, [LINKFLAGS="$LINKFLAGS -ldevinfo"])
106 +        ;;
107   freebsd4.*)
108          AC_DEFINE(ALLBSD, , [Building on a BSD-derived system])
109          AC_DEFINE(FREEBSD, , [Building on FreeBSD])
# Line 89 | Line 112 | freebsd4.*)
112          BIN_PERM="2755"
113          LINKFLAGS="-lkvm -ldevstat"
114          ;;
115 < freebsd[[5-6]].*)
115 > freebsd[[5-9]].*)
116          AC_DEFINE(ALLBSD, , [Building on a BSD-derived system])
117          AC_DEFINE(FREEBSD, , [Building on FreeBSD])
118 <        AC_DEFINE(FREEBSD5, , [Building on FreeBSD 5.x or 6.x])
118 >        AC_DEFINE(FREEBSD5, , [Building on FreeBSD 5.x - 9.x])
119          LINKFLAGS="-ldevstat"
120          ;;
121   netbsdelf1*)
122          AC_DEFINE(ALLBSD, , [Building on a BSD-derived system])
123          AC_DEFINE(NETBSD, , [Building on NetBSD])
124          ;;
125 < netbsdelf2*)
125 > netbsdelf[[2-3]]*)
126          AC_DEFINE(ALLBSD, , [Building on a BSD-derived system])
127          AC_DEFINE(NETBSD, , [Building on NetBSD])
128          AC_DEFINE(NETBSD2, , [Building on NetBSD 2.x])
# Line 116 | Line 139 | dragonfly*)
139          BIN_PERM="2755"
140          LINKFLAGS="-lkvm -ldevstat"
141          ;;
142 < linux-gnu)
142 > linux-gnu*)
143          AC_DEFINE(LINUX, , [Building on GNU/Linux])
144          AM_CONDITIONAL(SETUIDBINS, true)
145          BIN_OWNER="root"
146          BIN_PERM="4755"
147          ;;
148 + kfreebsd*-gnu*)
149 +        AC_DEFINE(ALLBSD, , [Building on a BSD-derived system])
150 +        AC_DEFINE(FREEBSD, , [Building on FreeBSD])
151 +        AC_DEFINE(FREEBSD5, , [Building on FreeBSD 5.x - 9.x])
152 +        LINKFLAGS="-ldevstat"
153 +        ;;
154   cygwin)
155          AC_DEFINE(CYGWIN, , [Building on Cygwin])
156          ;;
157 + mingw32)
158 +        AC_DEFINE(MINGW, , [Building on MinGW])
159 +        AC_DEFINE(WINVER, 0x0500, [Building for Windows 2000])
160 +        AM_CONDITIONAL(MINGW, true)
161 +        LINKFLAGS="-lpdh -lIphlpapi -lpsapi -lnetapi32"
162 +        ;;
163   *)
164          AC_MSG_ERROR([Cannot build on unknown OS: $host_os])
165          ;;
# Line 138 | Line 173 | AC_ARG_WITH([curses-prefix],
173                          SAIDARLIBS="-L${withval}/lib ${SAIDARLIBS}"
174                  fi
175                  if test -d "$withval/include"; then
176 <                        SAIDARCPPFLAGS="-I${withval}/include -I${withval}/include/ncurses ${SAIRDARCPPFLAGS}"
176 >                        SAIDARCPPFLAGS="-I${withval}/include ${SAIRDARCPPFLAGS}"
177                  fi
178          ]
179   )
# Line 237 | Line 272 | AC_SUBST(BIN_GROUP)
272   AC_SUBST(BIN_PERM)
273  
274   # And finish by changing these files
275 < 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])
275 > 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])
276  
277   AC_OUTPUT

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines