summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 45ae66d)
raw | patch | inline | side by side (parent: 45ae66d)
author | octo <octo> | |
Sun, 4 Dec 2005 18:34:48 +0000 (18:34 +0000) | ||
committer | octo <octo> | |
Sun, 4 Dec 2005 18:34:48 +0000 (18:34 +0000) |
Makefile.am | [new file with mode: 0644] | patch | blob |
configure.in | patch | blob | history | |
src/config.h.in | patch | blob | history | |
src/users.h | patch | blob | history |
diff --git a/Makefile.am b/Makefile.am
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,8 @@
+AUTOMAKE_OPTIONS = dist-bzip2
+
+SUBDIRS = src
+
+EXTRA_DIST = collectd.spec contrib debian
+
+dist-hook:
+ find $(distdir) -type d -name '.svn' | xargs rm -rf
diff --git a/configure.in b/configure.in
index 14f4806f399b963ff5981d6b1dcdf966d369b03c..ad43b17d34f8511f8cabdeb264743f3d87418a41 100644 (file)
--- a/configure.in
+++ b/configure.in
AC_CHECK_HEADERS(netdb.h)
AC_CHECK_HEADERS(syslog.h)
AC_CHECK_HEADERS(dlfcn.h)
+AC_CHECK_HEADERS(utmpx.h)
dnl Checking for libraries
AC_CHECK_LIB(m, ext)
AC_CHECK_FUNCS(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname))
AC_CHECK_FUNCS(strchr memcpy strstr strcmp strncmp strncpy strlen)
AC_CHECK_FUNCS(strncasecmp strcasecmp strncmp)
+AC_CHECK_FUNCS(getutxent)
AC_MSG_CHECKING([for kernel type ($host_os)])
case $host_os in
AC_ARG_ENABLE(users, AC_HELP_STRING([--disable-users], [Disable user count statistics]),, [enable_users="yes"])
if test "x$enable_users" != "xno"
then
- if test "x$ac_system" = "xLinux"
+ if test "x$ac_system" = "xLinux" -o "x$ac_system" = "xSolaris"
then
enable_users="yes"
else
diff --git a/src/config.h.in b/src/config.h.in
index fd97bf6345e5848642d81f4914548df795354c3e..72bf7e2e999f6979d807e88685eb448d2e5e7a33 100644 (file)
--- a/src/config.h.in
+++ b/src/config.h.in
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
+/* Define to 1 if you have the `getutxent' function. */
+#undef HAVE_GETUTXENT
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define to 1 if you have the <utmpx.h> header file. */
+#undef HAVE_UTMPX_H
+
/* True if program is to be compiled for a Linux kernel */
#undef KERNEL_LINUX
diff --git a/src/users.h b/src/users.h
index 360c595b6f909b0e35f26a6249a60b2f6493c4d1..f8b95445bcf6c118ab01b3f0f904057c00fd7abf 100644 (file)
--- a/src/users.h
+++ b/src/users.h
#include "config.h"
#ifndef COLLECT_USERS
+#if defined(HAVE_UTMPX_H) && defined(HAVE_GETUTXENT)
#define COLLECT_USERS 1
+#else
+#define COLLECT_USERS 0
+#endif
#endif /* ! defined(COLLECT_USERS) */
void users_init(void);