/usr/share/gtk-doc/html/libtranslate/compiling-modules.html is in libtranslate-dev 0.99-0ubuntu9.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Compiling libtranslate Modules</title><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.html" title="libtranslate Reference Manual"><link rel="up" href="overview.html" title="Overview"><link rel="prev" href="ch01s02.html" title="Compiling libtranslate Applications"><link rel="next" href="tutorials.html" title="Tutorials"><meta name="generator" content="GTK-Doc V1.2 (XML mode)"><style type="text/css">
.synopsis, .classsynopsis {
background: #eeeeee;
border: solid 1px #aaaaaa;
padding: 0.5em;
}
.programlisting {
background: #eeeeff;
border: solid 1px #aaaaff;
padding: 0.5em;
}
.variablelist {
padding: 4px;
margin-left: 3em;
}
.navigation {
background: #ffeeee;
border: solid 1px #ffaaaa;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.navigation a {
color: #770000;
}
.navigation a:visited {
color: #550000;
}
.navigation .title {
font-size: 200%;
}
</style></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="ch01s02.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="overview.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">libtranslate Reference Manual</th><td><a accesskey="n" href="tutorials.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="compiling-modules"></a>Compiling libtranslate Modules</h2></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2533906"></a>Compiling on UNIX</h3></div></div></div><p>
To compile a libtranslate module, you need to tell the compiler
where to find the libtranslate header files. This is done with the
<span><b class="command">pkg-config</b></span> utility.
</p><p>
For instance, to compile a libtranslate Hello World module, you
would type the following:
</p><pre class="programlisting">$ cc `pkg-config --cflags libtranslate` -shared -fPIC hello.c -o hello.so</pre><p>
</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2533929"></a>Compiling on UNIX With Autoconf, Automake and Libtool</h3></div></div></div><p>
To compile a libtranslate module using <a href="http://www.gnu.org/software/autoconf" target="_top">GNU
Autoconf</a>, <a href="http://www.gnu.org/software/automake" target="_top">GNU
Automake</a> and <a href="http://www.gnu.org/software/libtool" target="_top">GNU
Libtool</a>, insert the following line at the
appropriate place in the <tt class="filename">configure.ac</tt>
file:
</p><pre class="programlisting">PKG_CHECK_MODULES(LIBTRANSLATE, libtranslate,, [AC_MSG_ERROR([unable to find libtranslate])])</pre><p>
and insert the following lines in the appropriate
<tt class="filename">Makefile.am</tt> file:
</p><pre class="programlisting">modulesdir = $(libdir)/libtranslate/modules
modules_LTLIBRARIES = hello.la
hello_la_SOURCES = hello.c
hello_la_CPPFLAGS = $(LIBTRANSLATE_CFLAGS)
hello_la_LDFLAGS = -avoid-version -module</pre><p>
</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2534058"></a>Module Search Paths</h3></div></div></div><p>
libtranslate loads modules from <tt class="filename"><i class="replaceable"><tt>prefix</tt></i>/libtranslate/modules</tt>
(where <i class="replaceable"><tt>prefix</tt></i> is the prefix where
libtranslate is installed) and from <tt class="filename"><i class="replaceable"><tt>~</tt></i>/.libtranslate/modules</tt>
(where <i class="replaceable"><tt>~</tt></i> is the path to your home
directory). Filenames not having the system-specific shared
object extension (usually .so) are ignored.
</p></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="ch01s02.html"><b><< Compiling libtranslate Applications</b></a></td><td align="right"><a accesskey="n" href="tutorials.html"><b>Tutorials >></b></a></td></tr></table></body></html>
|