254 lines
6.5 KiB
Plaintext
254 lines
6.5 KiB
Plaintext
<sect1 id="macros">
|
|
<title>Autoconf macros</title>
|
|
|
|
<para>
|
|
All you need to check for &libgtop; is in &gnome-libgtop-check.m4;,
|
|
just use <function>GNOME_INIT_LIBGTOP</function> with an optional
|
|
<parameter>fail</parameter> argument in the same way like
|
|
<function>GNOME_INIT</function>:
|
|
|
|
<example>
|
|
<title>Warn if &libgtop; cannot be found</title>
|
|
|
|
<programlisting>GNOME_INIT_LIBGTOP</programlisting>
|
|
</example>
|
|
|
|
<example>
|
|
<title>Abort if &libgtop; cannot be found</title>
|
|
|
|
<programlisting>GNOME_INIT_LIBGTOP(fail)</programlisting>
|
|
</example>
|
|
|
|
<para>
|
|
This will define a <function>HAVE_LIBGTOP</function> automake
|
|
conditional and everything from the configuration script of
|
|
&libgtop;.
|
|
|
|
<sect1 id="libgtopConf.sh">
|
|
<title>The configuration script of &libgtop; (&libgtopConf.sh;)</title>
|
|
|
|
<para>
|
|
After a successful build of &libgtop;, a &libgtopConf.sh; script
|
|
containing useful configuration variables is created.
|
|
|
|
<para>
|
|
It defines the following variables which you can use in your
|
|
<filename>Makefile.am</filename>:
|
|
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>LIBGTOP_LIBDIR</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
The directory where the library files of &libgtop; are installed.
|
|
|
|
<varlistentry>
|
|
<term><parameter>LIBGTOP_INCLUDEDIR</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
The directory where the header files of &libgtop; are installed.
|
|
|
|
<varlistentry>
|
|
<term><parameter>LIBGTOP_LIBS</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
Use this to link your program with &libgtop;.
|
|
|
|
<varlistentry>
|
|
<term><parameter>LIBGTOP_INCS</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
Use this to get the header files for &libgtop;.
|
|
|
|
<varlistentry>
|
|
<term><parameter>LIBGTOP_NAMES_LIBS</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
Use this to link your program with &libgtop; and its
|
|
names interface.
|
|
|
|
<varlistentry>
|
|
<term><parameter>LIBGTOP_NAMES_INCS</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
Use this to get the header files for &libgtop; and the
|
|
required <literal>-DGLIBTOP_NAMES</literal> to get its
|
|
names interface.
|
|
|
|
<varlistentry>
|
|
<term><parameter>LIBGTOP_GUILE_LIBS</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
Use this to link your program with &libgtop; and its
|
|
guile interface. This will also include all the required
|
|
guile libraries.
|
|
|
|
<varlistentry>
|
|
<term><parameter>LIBGTOP_GUILE_INCS</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
Use this to get the header files for &libgtop; and guile
|
|
and the required <literal>-DGLIBTOP_GUILE</literal> to get
|
|
the guile interface of &libgtop;.
|
|
|
|
<varlistentry>
|
|
<term><parameter>LIBGTOP_GUILE_NAMES_LIBS</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
Use this to link your program with &libgtop; and both its
|
|
names and its guile interface. This will also include all the
|
|
required guile libraries.
|
|
|
|
<varlistentry>
|
|
<term><parameter>LIBGTOP_GUILE_NAMES_INCS</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
Use this to get the header files for &libgtop;, its guile
|
|
and its names interface, the guile header files and the
|
|
required <literal>-DGLIBTOP_GUILE</literal> and
|
|
<literal>-DGLIBTOP_NAMES</literal>.
|
|
|
|
<varlistentry>
|
|
<term><parameter>LIBGTOP_BINDIR</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
The directory where the binaries of &libgtop; are installed.
|
|
|
|
<varlistentry>
|
|
<term><parameter>LIBGTOP_SERVER</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
Full pathname of the &libgtop; server.
|
|
|
|
<varlistentry>
|
|
<term><parameter>LIBGTOP_MAJOR_VERSION</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
Major version of &libgtop;.
|
|
|
|
<varlistentry>
|
|
<term><parameter>LIBGTOP_MINOR_VERSION</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
Minor version of &libgtop;.
|
|
|
|
<varlistentry>
|
|
<term><parameter>LIBGTOP_VERSION</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
Full version of &libgtop;.
|
|
|
|
<varlistentry>
|
|
<term><parameter>LIBGTOP_SERVER_VERSION</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
Version of the &libgtop; server. This is incremented each
|
|
time the client/server protocol changes.
|
|
|
|
<varlistentry>
|
|
<term><parameter>libgtop_sysdeps_dir</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
The sysdeps directory that is used on your system.
|
|
|
|
<varlistentry>
|
|
<term><parameter>libgtop_need_server</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
Either <literal>yes</literal> or <literal>no</literal>.
|
|
|
|
<varlistentry>
|
|
<term><parameter>libgtop_use_machine_h</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
Either <literal>yes</literal> or <literal>no</literal>.
|
|
Intended for <emphasis>internal use only</emphasis>
|
|
and may be removed in future versions.
|
|
|
|
<note>
|
|
<title>Note for &libgtop; hackers</title>
|
|
|
|
<para>
|
|
This variable gets set in
|
|
<filename>macros/gnome-libgtop-sysdeps.m4</filename>.
|
|
|
|
<para>
|
|
If this is enabled, you need to put a
|
|
<filename>glibtop_machine.h</filename> header file in the
|
|
sysdeps directory which needs to define a structure of
|
|
type <type>glibtop_machine</type>.
|
|
|
|
<para>
|
|
This structure represents the
|
|
<structfield>machine</structfield> field of
|
|
<type>glibtop</type> defined in
|
|
<filename>glibtop.h</filename>
|
|
and can be used to store some
|
|
machine dependent data.
|
|
</note>
|
|
|
|
<varlistentry>
|
|
<term><parameter>libgtop_guile_found</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
Either <literal>yes</literal> or <literal>no</literal>.
|
|
|
|
<varlistentry>
|
|
<term><parameter>libgtop_want_examples</parameter></term>
|
|
<listitem>
|
|
|
|
<para>
|
|
Considered obsolete.
|
|
|
|
</variablelist>
|
|
|
|
<para>
|
|
All this variables are taken from the
|
|
&libgtopConf.sh; script which is created during
|
|
the installation of &libgtop;.
|
|
|
|
<example>
|
|
<title>
|
|
Sample &libgtopConf.sh; (gnome and guile are installed in
|
|
<filename>/home/baulig/INSTALL</filename> and &libgtop; in
|
|
<filename>/home/norwegen/TEST</filename>)
|
|
</title>
|
|
|
|
<programlisting>&example-libgtopConf-sh;</programlisting>
|
|
</example>
|
|
|
|
</sect1>
|
|
|
|
<!--
|
|
Local Variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:2
|
|
sgml-indent-data: t
|
|
sgml-parent-document: ("gnome-hackers.sgml" "book" "chapter" "")
|
|
End:
|
|
-->
|