Call `_glibtop_open_sysdeps'.

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

	* lib/init.c (glibtop_init_s): Call `_glibtop_open_sysdeps'.

	* include/glibtop/open.h (_glibtop_open_sysdeps): Declare this
	when we are _IN_LIBGTOP.

	* configure.in (sysdeps_name): Define and AC_SUBST this.
	(sysdeps_init_file): Define and AC_SUBST this to
	`sysdeps-init-${sysdeps_name}.c'.

	* libgtop-sysdeps.m4 (GNOME_LIBGTOP_SYSDEPS): Define and AC_SUBST
	`libgtop_sysdeps_name'.
This commit is contained in:
Martin Baulig
2000-01-12 22:46:29 +00:00
committed by Martin Baulig
parent 2a86a5de49
commit 20c306fc6d
6 changed files with 44 additions and 16 deletions

View File

@@ -1,3 +1,17 @@
2000-01-12 Martin Baulig <martin@home-of-linux.org>
* lib/init.c (glibtop_init_s): Call `_glibtop_open_sysdeps'.
* include/glibtop/open.h (_glibtop_open_sysdeps): Declare this
when we are _IN_LIBGTOP.
* configure.in (sysdeps_name): Define and AC_SUBST this.
(sysdeps_init_file): Define and AC_SUBST this to
`sysdeps-init-${sysdeps_name}.c'.
* libgtop-sysdeps.m4 (GNOME_LIBGTOP_SYSDEPS): Define and AC_SUBST
`libgtop_sysdeps_name'.
2000-01-12 Martin Baulig <martin@home-of-linux.org>
* include/glibtop/errors.h (GLIBTOP_ERROR_NO_BACKEND_OPENED):

View File

@@ -113,6 +113,16 @@ AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes)
GNOME_LIBGTOP_SYSDEPS
GNOME_LIBGTOP_TYPES
sysdeps_dir="$libgtop_sysdeps_dir"
sysdeps_name="$libgtop_sysdeps_name"
AC_SUBST(sysdeps_dir)
AC_SUBST(sysdeps_name)
AC_MSG_CHECKING(for sysdeps_init_file)
sysdeps_init_file='sysdeps-init-'"$libgtop_sysdeps_name"'.c'
AC_SUBST(sysdeps_init_file)
AC_MSG_RESULT($sysdeps_init_file)
LIBGTOP_XML_CHECK
AC_ARG_WITH(libgtop-inodedb,
@@ -137,7 +147,8 @@ AM_CONDITIONAL(ENABLE_SHARED, test x$enable_static = xyes)
AM_PROG_LIBTOOL
AM_PATH_GLIB(1.2.0,,AC_MSG_ERROR(GLIB >= 1.2.0 is required for LibGTop))
AM_PATH_GLIB(1.2.0,,AC_MSG_ERROR(GLIB >= 1.2.0 is required for LibGTop),
[gmodule])
dnl You need to uncomment the following line if you want to use
dnl libGTop without Gnome.
@@ -323,9 +334,6 @@ LIBGTOP_INCS="$LIBGTOP_INCS $SUPPORTINCS $GLIB_CFLAGS"
LIBGTOP_BINDIR='$(bindir)'
LIBGTOP_SERVER='$(bindir)/libgtop_server'
sysdeps_dir="$libgtop_sysdeps_dir"
AC_SUBST(sysdeps_dir)
LIBGTOP_EXTRA_LIBS="$LIBGTOP_EXTRA_LIBS $GLIB_LIBS $LIBGTOP_XML_LIB"
LIBGTOP_LIBS="$LIBGTOP_LIBS -lgtop_sysdeps -lgtop_common -lgtop"

View File

@@ -68,6 +68,13 @@ void
glibtop_open_s (glibtop *server, const char *program_name,
const unsigned long features, const unsigned flags);
#ifdef _IN_LIBGTOP
void
_glibtop_open_sysdeps (glibtop *server, const char *program_name,
const unsigned long features, const unsigned flags);
#endif /* _IN_LIBGTOP */
END_LIBGTOP_DECLS

View File

@@ -4,9 +4,12 @@ INCLUDES = @INCLUDES@
lib_LTLIBRARIES = libgtop.la
sysdeps_init_file = @sysdeps_init_file@
libgtop_la_SOURCES = init.c open.c close.c lib.c parameter.c \
sysdeps.c errors.c glib-arrays.c \
backend.c init-backends.c open-backend.c
backend.c init-backends.c open-backend.c \
$(sysdeps_init_file)
libgtop_la_LDFLAGS = $(LT_VERSION_INFO)
libgtop_la_LIBADD = $(LIBGTOP_XML_LIB)
@@ -28,7 +31,5 @@ structures.h: structures.pl $(top_builddir)/config.h \
structures.h > tmp-s
mv tmp-s structures.h
EXTRA_DIST = lib.pl structures.pl
CLEANFILES = $(BUILT_SOURCES)

View File

@@ -247,9 +247,6 @@ glibtop *
glibtop_init_s (glibtop **server_ptr, unsigned long features, unsigned flags)
{
glibtop *server;
#if 0
glibtop_init_func_t *init_fkt;
#endif
if (server_ptr == NULL)
return NULL;
@@ -264,20 +261,15 @@ glibtop_init_s (glibtop **server_ptr, unsigned long features, unsigned flags)
if (flags & GLIBTOP_INIT_NO_INIT)
return server;
#if 0
/* Do the initialization, but only if not already initialized. */
if ((server->flags & _GLIBTOP_INIT_STATE_SYSDEPS) == 0) {
glibtop_open_s (server, "glibtop", features, flags);
for (init_fkt = _glibtop_init_hook_s; *init_fkt; init_fkt++)
(*init_fkt) (server);
_glibtop_open_sysdeps (server, "glibtop", features, flags);
server->sysdeps.pointer_size = sizeof (void*)*8;
server->flags |= _GLIBTOP_INIT_STATE_SYSDEPS;
}
#endif
return server;
}

View File

@@ -4,6 +4,7 @@ dnl
dnl It defines the following variables:
dnl
dnl * 'libgtop_sysdeps_dir' - sysdeps dir for libgtop.
dnl * 'libgtop_sysdeps_name' - name of the sysdeps dir.
dnl * 'libgtop_use_machine_h' - some of system dependend parts of libgtop provide
dnl their own header file. In this case we need to
dnl define 'HAVE_GLIBTOP_MACHINE_H'.
@@ -128,6 +129,7 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_SUBST(libgtop_sysdeps_dir)
AC_SUBST(libgtop_sysdeps_name)
AC_SUBST(libgtop_use_machine_h)
AC_SUBST(libgtop_need_server)
@@ -219,6 +221,10 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
esac
fi
AC_MSG_CHECKING(for libgtop sysdeps name)
libgtop_sysdeps_name=`echo $libgtop_sysdeps_dir | sed -e 's/_/-/g'`
AC_MSG_RESULT($libgtop_sysdeps_name)
AC_SUBST(libgtop_sysdeps_dir)
AC_SUBST(libgtop_postinstall)
AC_SUBST(libgtop_have_sysinfo)