]> Using LibGTop in the Gnome Project Martin Baulig
martin@home-of-linux.org
1998 Martin Baulig This documentation is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA For more details see the file COPYING in the source distribution of LibGTop. This is a short introduction in how to use libgtop in the GNOME project. It describes the additional options configure takes and the information stored in the automatically generated gtopConf.sh configuration script.
Configuration The configure script of libgtop takes some non-standard options to let you decide which parts of the library should be build. Normally, configure decides whether or not using the server is required. Depending upon this decision, it adds either -lgtop (when it's needed) or -lgtop_systems (when it's not needed) to GTOP_LIBS and GTOP_GUILE_LIBS. You can change this behaviour with the following options: --enable-libgtop-server Use the server regardless whether or not it is required. --disable-libgtop-server Do not use the server regardless wheter or not it is required. Normally, the guile interface of libgtop is build when guile can be found on the system. --disable-libgtop-guile Disables building the guile interface even if you have guile installed. --enable-libgtop-guile Has no effect at all since you cannot build the guile interface without having guile installed on your system. If you do not need the names subdirs, you can disable their building with the following option: when guile can be found on the system. --disable-libgtop-names Disables building of the names subdirs. --enable-libgtop-names Is the default. To disable building of the examples, you can say: --without-examples Disables building of the examples. The <filename>gtopConf.sh</filename> script After a successful build of libgtop, a gtopConf.sh script is generated which will later be used to decide how to link a program with libgtop. It defines the following variables: GTOP_LIBDIR Defaults to $(prefix)/lib. It is the directory where the libgtop libraries get installed. GTOP_INCLUDEDIR Defaults to $(prefix)/include. It is the directory where the libgtop header files get installed. GTOP_LIBS Contains everything that you need to add to the _LDADD variable of automake to link a program with libgtop. GTOP_INCS Contains everything that you need to add to the _INCLUDES variable of automake to compile a program that uses libgtop. GTOP_GUILE_INCS Contains everything that you need to add to the _INCLUDES variable of automake to compile a program that uses both libgtop and its guile interface. GTOP_BINDIR Defaults to $(bindir). It is the directory where the libgtop binaries get installed. GTOP_SERVER Defaults to $(bindir)/gtop_server. It is the full pathname where the server gets installed. GTOP_SYSDEPS_DIR The sysdeps directory that is used on your system. GTOP_NEED_SERVER Is either yes or no and tells you whether using the server is needed or not. GTOP_USE_MACHINE_H Is either yes or no and tells you whether glibtop_machine_h should be included in glibtop.h. The system dependent part of the library may provide an additional header file, glibtop_machine_h. In this case, they define a structure _glibtop_machine in this header file. This structure represents the machine member of _glibtop. GTOP_GUILE_FOUND Is either yes or no and tells you whether guile has been found on your system (or if building the guile interface was disabled). GTOP_WANT_NAMES Is either yes or no and tells you whether the sysdeps/names subdirectory was build. GTOP_WANT_GUILE_NAMES Is either yes or no and tells you whether the sysdeps/guile/names subdirectory was build. GTOP_WANT_EXAMPLES Is either yes or no and tells you whether the examples were build. Sample <filename>gtopConf.sh</filename> >opConf.sh;