This file is indexed.

/usr/share/gtk-doc/html/gmime-2.6/gmime-building.html is in libgmime-2.6-doc 2.6.20-0ubuntu1.

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
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GMime 2.6 Reference Manual: Compiling the GMime libraries</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GMime 2.6 Reference Manual">
<link rel="up" href="gmime.html" title="Part I. GMime Overview">
<link rel="prev" href="gmime.html" title="Part I. GMime Overview">
<link rel="next" href="gmime-compiling.html" title="Compiling GMime Applications">
<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="gmime.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gmime.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gmime-compiling.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gmime-building"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle">Compiling the GMime libraries</span></h2>
<p>Compiling the GMime Libraries — How to compile GMime itself</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="overview"></a><h2>Building GMime on UNIX-like systems</h2>
<p>
      This chapter covers building and installing GMime on UNIX and
      UNIX-like systems such as Linux. Compiling GMime on Microsoft
      Windows is not a goal of the project, however if you are able
      build on a Microsoft Windows platform, do send me building and 
      installing instructions and I will add them to this document.
    </p>
<p>
      Before we get into the details of how to compile GMime, I should
      mention that binary packages of GMime prebuilt for your operating 
      system may be available either from your operating system vendor 
      or from independent sources such as http://rpmfind.net. If you
      can find them, it may be the easiest way of getting started
      developing GMime.
    </p>
<p>
      On UNIX-like systems GMime uses the standard GNU build system,
      using <span class="application">autoconf</span> for package
      configuration and resolving portability issues,
      <span class="application">automake</span> for building makefiles that
      comply with the GNU Coding Standards, and
      <span class="application">libtool</span> for building shared libraries
      on multiple platforms.
    </p>
<p>
      If you are building GMime from the distributed source packages,
      then you won't need these tools installed; the necessary pieces
      of the tools are already included in the source packages. But
      it's useful to know a bit about how packages that use these
      tools work. A source package is distributed as a
      <code class="literal">tar.gz</code> file which you unpack into a 
      directory full of the source files as follows:
    </p>
<pre class="programlisting">
      tar -zxvf gmime-2.6.x.tar.gz
    </pre>
<p>
      In the toplevel of the directory that is created, there will be
      a shell script called <code class="filename">configure</code> which
      you then run to take the template makefiles called
      <code class="filename">Makefile.in</code> in the package and create
      makefiles customized for your operating system. The 
      <code class="filename">configure</code> script can be passed various 
      command line arguments to determine how the package is built and 
      installed. The most commonly useful argument is the 
      <code class="systemitem">--prefix</code> argument which specifies where 
      the package is installed. To install a package into 
      <code class="filename">/opt/gmime</code> you would run configure as:
    </p>
<pre class="programlisting">
      ./configure --prefix=/opt/gmime
    </pre>
<p>
      A full list of options can be found by running
      <code class="filename">configure</code> with the
      <code class="systemitem">--help</code> argument. In general, the defaults 
      are right and should be trusted. After you've run
      <code class="filename">configure</code>, you then run the
      <span class="command"><strong>make</strong></span> command to build the package and install
      it.
    </p>
<pre class="programlisting">
      make
      make install
    </pre>
<p>
      If you don't have permission to write to the directory you are
      installing in, you may have to change to root temporarily before
      running <code class="literal">make install</code>. A quick way to do this is 
      to use the <span class="command"><strong>su</strong></span> command with the 
      <code class="systemitem">-c</code> option 
      (ex. <code class="literal">su -c "make install"</code>). Also, if you are
      installing in a system directory, on some systems (such as
      Linux), you will need to run <span class="command"><strong>ldconfig</strong></span> after
      <code class="literal">make install</code> so that the newly installed
      libraries will be found.
    </p>
<p>
      Several environment variables are useful to pass to set before
      running configure. <code class="envar">CPPFLAGS</code> contains options to
      pass to the C compiler, and is used to tell the compiler where
      to look for include files. The <code class="envar">LDFLAGS</code> variable
      is used in a similar fashion for the linker. Finally the
      <code class="envar">PKG_CONFIG_PATH</code> environment variable contains
      a search path that <span class="command"><strong>pkg-config</strong></span> (see below)
      uses when looking for a file describing how to compile
      programs using different libraries. If you were installing GMime
      and it's dependencies into <code class="filename">/opt/gmime</code>, you 
      might want to set these variables as:
    </p>
<pre class="programlisting">
      CPPFLAGS="-I/opt/gmime/include"
      LDFLAGS="-L/opt/gmime/lib"
      PKG_CONFIG_PATH="/opt/gmime/lib/pkgconfig"
      export CPPFLAGS LDFLAGS PKG_CONFIG_PATH
    </pre>
<p>
      You may also need to set the <code class="envar">LD_LIBRARY_PATH</code>
      environment variable so the systems dynamic linker can find
      the newly installed libraries, and the <code class="envar">PATH</code>
      environment program so that utility binaries installed by
      the various libraries will be found.
    </p>
<pre class="programlisting">
      LD_LIBRARY_PATH="/opt/gmime/lib"
      PATH="/opt/gmime/bin:$PATH"
      export LD_LIBRARY_PATH PATH
    </pre>
</div>
<div class="refsect1">
<a name="dependencies"></a><h2>Dependencies</h2>
<p>
      Before you can compile the GMime library, you need to have
      various other tools and libraries installed on your
      system. The two tools needed during the build process (as
      differentiated from the tools used in when creating GMime
      mentioned above such as <span class="application">autoconf</span>)
      are <span class="command"><strong>pkg-config</strong></span> and GNU make.
    </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p><a class="ulink" href="http://www.freedesktop.org/software/pkgconfig/" target="_top">pkg-config</a>
	  is a tool for tracking the compilation flags needed for
	  libraries that are used by the GMime libraries. (For each
	  library, a small <code class="literal">.pc</code> text file is installed in a standard
	  location that contains the compilation flags needed for that
	  library along with version number information.)  The version
	  of <span class="command"><strong>pkg-config</strong></span> needed to build GMime is
	  mirrored in the <code class="filename">dependencies</code> directory
	  on the <a class="ulink" href="ftp://ftp.gtk.org/pub/gtk/v2.0/" target="_top">GTK+ FTP
	  site.</a></p></li>
<li class="listitem"><p>
	  The GMime makefiles will mostly work with different versions
	  of <span class="command"><strong>make</strong></span>, however, there tends to be
	  a few incompatibilities, so the GMime team recommends
	  installing <a class="ulink" href="http://www.gnu.org/software/make" target="_top">GNU
	    make</a> if you don't already have it on your system
	  and using it. (It may be called <span class="command"><strong>gmake</strong></span>
	  rather than <span class="command"><strong>make</strong></span>.)
	</p></li>
</ul></div>
<p>
      GMime depends on the existance of two (2) libraries: GLib and iconv.
    </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>
	  The GLib library provides core non-graphical functionality
	  such as high level data types, Unicode manipulation, and
	  a object and type system to C programs. It is available
	  from the <a class="ulink" href="ftp://ftp.gtk.org/pub/gtk/v2.0/" target="_top">GTK+
	  FTP site.</a>
	</p></li>
<li class="listitem"><p>
	  The <a class="ulink" href="http://www.gnu.org/software/libiconv/" target="_top">GNU
	  libiconv library</a> is needed to build GLib and GMime 
          if your system doesn't already have the 
          <code class="function">iconv()</code> function for doing conversion 
          between character encodings. Most modern systems should have
	  <code class="function">iconv()</code>.
	</p></li>
</ul></div>
</div>
<div class="refsect1">
<a name="building"></a><h2>Building and testing GMime</h2>
<p>
      First make sure that you have the necessary external
      dependencies installed: <span class="command"><strong>pkg-config</strong></span>, GNU make,
      and, if necessary, libiconv. To get detailed information about 
      building these packages, see the documentation provided with the
      individual packages. On a newer Linux system, it's quite likely 
      that you'll have all of these installed already.
    </p>
<p>
      Then build and install the GMime libraries in the order:
      libiconv, GLib, then GMime. For each library, follow the
      steps of <code class="literal">configure</code>, <code class="literal">make</code>,
      <code class="literal">make install</code> mentioned above. If you're
      lucky, this will all go smoothly, and you'll be ready to
      <a class="link" href="gmime-compiling.html" title="Compiling GMime Applications">start compiling your own GMime
	applications</a>. You can test your GMime installation
      by running <span class="command"><strong>pkg-config --modversion gmime-2.6</strong></span>
      and making sure that it can both find GMime and reports the 
      correct version.
    </p>
<p>
      If one of the <code class="filename">configure</code> scripts fails or running
      <span class="command"><strong>make</strong></span> fails, look closely at the error
      messages printed; these will often provide useful information
      as to what went wrong. When <code class="filename">configure</code>
      fails, extra information, such as errors that a test compilation
      ran into, is found in the file <code class="filename">config.log</code>.
      Looking at the last couple of hundred lines in this file will
      frequently make clear what went wrong. If all else fails, you
      can ask for help by emailing me, fejj@gnome.org
    </p>
</div>
<div class="refsect1">
<a name="extra-configuration-options"></a><h2>Extra Configuration Options</h2>
<p>
	In addition to the normal options, the
	<span class="command"><strong>configure</strong></span> script for the GMime library
	supports a number of additional arguments. (Command line
	arguments for the other GMime libraries are described in
	the documentation distributed with those libraries.)

	</p>
<div class="cmdsynopsis"><p><code class="command">./configure</code>  [[--enable-profiling] |  [--enable-warnings] |  [--enable-mono] |  [--enable-gtk-doc] |  [--enable-largfile]]</p></div>
<p>
    </p>
<p><b>
        <code class="systemitem">--enable-profiling</code></b>
        Normally GMime will not pass the <code class="literal">-pg</code> flag to 
        <span class="command"><strong>gcc</strong></span> when building. This option will enable
        the use of that flag thus building profiling information into 
        the GMime libraries for use with the GNU Profiler, gprof. Odds
        are you do not care about this option unless you are either me
        or desire to profile GMime and/or your program.
      </p>
<p><b>
        <code class="systemitem">--enable-warnings</code></b>
        This option enables parser warnings about invalid MIME to be
        logged to stderr at runtime. Again, it is unlikely you will
        care to use this option.
      </p>
<p><b>
        <code class="systemitem">--enable-mono</code></b>
        This option will include the Mono .NET bindings as part of
        the build.
      </p>
<p><b>
        <code class="systemitem">--enable-gtk-doc</code></b>
        This option will enable the building of the reference
        documentation for GMime (e.g. the html pages you are
        reading now).
      </p>
<p><b>
        <code class="systemitem">--enable-largefile</code></b>
        This option will enable large file support (e.g. files larger
        than 2GB) on 32bit systems. This flag is enabled by default
        starting with GMime 2.4.5.
      </p>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.20</div>
</body>
</html>