Load the "glibtop-backend-kernel" before "glibtop-backend-command" and

2000-01-23  Martin Baulig  <martin@home-of-linux.org>

	* lib/sysdeps-init-kernel.c: Load the "glibtop-backend-kernel" before
	"glibtop-backend-command" and "glibtop-backend-sysdeps".

	* libgtop-sysdeps.m4: "kernel" is now a backend and no longer a
	sysdeps port; we compile the normal "linux" sysdeps dir when we
	have it.

	* backends/Makefile.am: Only compile `server' and `sysdeps'
	directories if appropriate.
This commit is contained in:
Martin Baulig
2000-01-22 23:58:55 +00:00
committed by Martin Baulig
parent 3455d025a2
commit 8a85be8f00
6 changed files with 61 additions and 17 deletions

View File

@@ -1,3 +1,15 @@
2000-01-23 Martin Baulig <martin@home-of-linux.org>
* lib/sysdeps-init-kernel.c: Load the "glibtop-backend-kernel" before
"glibtop-backend-command" and "glibtop-backend-sysdeps".
* libgtop-sysdeps.m4: "kernel" is now a backend and no longer a
sysdeps port; we compile the normal "linux" sysdeps dir when we
have it.
* backends/Makefile.am: Only compile `server' and `sysdeps'
directories if appropriate.
2000-01-22 Martin Baulig <martin@home-of-linux.org>
* include/glibtop/backend.h (_glibtop_backend_module): Added

View File

@@ -1 +1,15 @@
SUBDIRS = server sysdeps common
if NEED_LIBGTOP
server_dir = server
else
server_dir =
endif
if HAVE_SYSDEPS
sysdeps_dir = sysdeps
else
sysdeps_dir =
endif
SUBDIRS = $(server_dir) $(sysdeps_dir) common
DIST_SUBDIRS = server sysdeps common

View File

@@ -123,7 +123,11 @@ AC_SUBST(sysdeps_dir)
AC_SUBST(sysdeps_name)
AC_MSG_CHECKING(for sysdeps_init_file)
sysdeps_init_file='sysdeps-init-'"$libgtop_sysdeps_name"'.c'
if x$linux_sysctl = xyes ; then
sysdeps_init_file='sysdeps-init-kernel.c'
else
sysdeps_init_file='sysdeps-init-'"$libgtop_sysdeps_name"'.c'
fi
AC_SUBST(sysdeps_init_file)
AC_MSG_RESULT($sysdeps_init_file)

View File

@@ -31,6 +31,8 @@ void
_glibtop_open_sysdeps (glibtop *server, const char *program_name,
const unsigned long features, const unsigned flags)
{
glibtop_open_backend_l (server, "glibtop-backend-kernel",
features, NULL);
glibtop_open_backend_l (server, "glibtop-backend-common",
features, NULL);
glibtop_open_backend_l (server, "glibtop-backend-sysdeps",

View File

@@ -27,6 +27,7 @@ AC_DEFUN([LIBGTOP_HACKER_TESTS],[
#include <stdio.h>
#include <stdlib.h>
#include <sys/user.h>
#include <sys/sysctl.h>
#include <linux/libgtop.h>
@@ -63,38 +64,38 @@ AC_DEFUN([LIBGTOP_CHECK_SYSDEPS_DIR],[
case "$host_os" in
linux*)
if test x$linux_sysctl = xyes ; then
libgtop_sysdeps_dir=kernel
libgtop_use_machine_h=no
else
libgtop_sysdeps_dir=linux
libgtop_use_machine_h=no
fi
libgtop_sysdeps_dir=linux
libgtop_use_machine_h=no
libgtop_have_sysinfo=yes
libgtop_need_server=no
libgtop_has_sysdeps=yes
;;
freebsd*|netbsd*|openbsd*)
libgtop_sysdeps_dir=freebsd
libgtop_use_machine_h=yes
libgtop_need_server=yes
libgtop_has_sysdeps=no
libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server && chmod 2755 $(bindir)/libgtop_server'
;;
bsdi*)
libgtop_sysdeps_dir=freebsd
libgtop_use_machine_h=yes
libgtop_need_server=yes
libgtop_has_sysdeps=no
libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server && chmod 2755 $(bindir)/libgtop_server'
;;
solaris*)
libgtop_sysdeps_dir=solaris
libgtop_use_machine_h=yes
libgtop_need_server=yes
libgtop_has_sysdeps=yes
libgtop_postinstall='chgrp sys $(bindir)/libgtop_server && chmod 2755 $(bindir)/libgtop_server'
;;
osf*)
libgtop_sysdeps_dir=osf1
libgtop_use_machine_h=yes
libgtop_need_server=yes
libgtop_has_sysdeps=yes
;;
*)
if test x$hacker_mode = xyes ; then
@@ -105,17 +106,20 @@ AC_DEFUN([LIBGTOP_CHECK_SYSDEPS_DIR],[
libgtop_sysdeps_dir=sun4
libgtop_use_machine_h=yes
libgtop_need_server=yes
libgtop_has_sysdeps=no
;;
*)
libgtop_sysdeps_dir=stub
libgtop_use_machine_h=no
libgtop_need_server=no
libgtop_has_sysdeps=yes
;;
esac
else
libgtop_sysdeps_dir=stub
libgtop_use_machine_h=no
libgtop_need_server=no
libgtop_has_sysdeps=yes
fi
;;
esac
@@ -132,6 +136,7 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
AC_SUBST(libgtop_sysdeps_name)
AC_SUBST(libgtop_use_machine_h)
AC_SUBST(libgtop_need_server)
AC_SUBST(libgtop_has_sysdeps)
AC_ARG_ENABLE(hacker-mode,
[ --enable-hacker-mode Enable building of unstable sysdeps],
@@ -179,41 +184,41 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
libgtop_use_machine_h=no
libgtop_have_sysinfo=no
libgtop_need_server=no
libgtop_has_sysdeps=yes
;;
stub_suid)
libgtop_sysdeps_dir=stub_suid
libgtop_use_machine_h=yes
libgtop_have_sysinfo=no
libgtop_need_server=yes
libgtop_has_sysdeps=no
;;
linux)
linux|kernel)
libgtop_sysdeps_dir=linux
libgtop_use_machine_h=no
libgtop_have_sysinfo=yes
libgtop_need_server=no
;;
kernel)
libgtop_sysdeps_dir=kernel
libgtop_use_machine_h=no
libgtop_have_sysinfo=yes
libgtop_need_server=no
libgtop_has_sysdeps=yes
;;
bsd)
libgtop_sysdeps_dir=freebsd
libgtop_use_machine_h=yes
libgtop_need_server=yes
libgtop_has_sysdeps=no
libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server && chmod 2755 $(bindir)/libgtop_server'
;;
solaris)
libgtop_sysdeps_dir=solaris
libgtop_use_machine_h=yes
libgtop_need_server=yes
libgtop_has_sysdeps=yes
libgtop_postinstall='chgrp sys $(bindir)/libgtop_server && chmod 2755 $(bindir)/libgtop_server'
;;
osf)
libgtop_sysdeps_dir=osf1
libgtop_use_machine_h=yes
libgtop_need_server=yes
libgtop_has_sysdeps=yes
;;
*)
AC_MSG_ERROR(Invalid value for --with-sysdeps-dir)
@@ -348,5 +353,6 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
fi
AM_CONDITIONAL(NEED_LIBGTOP, test x$libgtop_need_server = xyes)
AM_CONDITIONAL(HAVE_SYSDEPS, test x$libgtop_has_sysdeps = xyes)
])

View File

@@ -1,4 +1,10 @@
SUBDIRS = @sysdeps_dir@ common names
if LINUX_SYSCTL
kernel_dir = kernel
else
kernel_dir =
endif
SUBDIRS = @sysdeps_dir@ $(kernel_dir) common names
DIST_SUBDIRS = common linux kernel names osf1 \
stub stub_suid sun4 freebsd solaris