Debian Codegraph @

etc/building.man

raw
1 '\" t
2 .\"
3 .\" fstrcmp - fuzzy string compare library
4 .\" Copyright (C) 2009 Peter Miller
5 .\" Written by Peter Miller <[email protected]>
6 .\"
7 .\" This program is free software; you can redistribute it and/or modify
8 .\" it under the terms of the GNU General Public License as published by
9 .\" the Free Software Foundation; either version 3 of the License, or
10 .\" (at your option) any later version.
11 .\"
12 .\" This program is distributed in the hope that it will be useful,
13 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
14 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 .\" General Public License for more details.
16 .\"
17 .\" You should have received a copy of the GNU General Public License
18 .\" along with this program. If not, see <http://www.gnu.org/licenses/>.
19 .\"
20 .\"
21 .TH Build fstrcmp fstrcmp "Reference Manual"
22 .so etc/version.so
23 .if n .hy 0
24 .if n .ad l
25 .if n .nr IN 8n
26 .SH NAME
27 How to build fstrcmp
28 .XX "" "How to build fstrcmp"
29 .SH SPACE REQUIREMENTS
30 You will need about 3MB to unpack and build the \f[I]fstrcmp\fP package.
31 Your milage may vary.
32 .br
33 .ne 1i
34 .SH BEFORE YOU START
35 There are a few pieces of software you may want to fetch and install
36 before you proceed with your installation of fstrcmp
37 .TP 8n
38 GNU libtool
39 The libtool program is used to build shared libraries. It understands
40 neccesary weird and wonderful compiler and linker tricks on many weird
41 and wonderful systems.
42 .br
43 http://www.gnu.org/software/libtool/
44 .TP 8n
45 GNU Groff
46 The documentation for the \f[I]fstrcmp\fP package was prepared using the
47 GNU Groff package (version 1.14 or later). This distribution includes
48 full documentation, which may be processed into PostScript or DVI files
49 at install time \- if GNU Groff has been installed.
50 .TP 8n
51 GCC
52 You may also want to consider fetching and installing the GNU C Compiler
53 if you have not done so already. This is not essential. The fstrcmp
54 program was developed using the GNU C compiler.
55 .PP
56 The GNU FTP archives may be found at \f[CW]ftp.gnu.org\fP, and are
57 mirrored around the world.
58 .br
59 .ne 1i
60 .SH SITE CONFIGURATION
61 The \f[B]fstrcmp\fP package is configured using the \f[I]configure\fP
62 program included in the source distribution.
63 .PP
64 The \f[I]configure\fP shell script attempts to guess correct values for
65 various system-dependent variables used during compilation, and creates
66 the \f[I]Makefile\fP and \f[I]lib/config.h\fP files. It also creates
67 a shell script \f[I]config.status\fP that you can run in the future to
68 recreate the current configuration.
69 .PP
70 Normally, you just \f[I]cd\fP to the directory containing
71 \f[I]fstrcmp\fP's source code and then type
72 .RS
73 .ft CW
74 .nf
75 \f[B]% \fP./configure
76 \f[I]\&...lots of output...\fP
77 \f[B]%\fP
78 .fi
79 .ft R
80 .RE
81 If you're using \f[I]csh\fP on an old version of System V, you might
82 need to type
83 .RS
84 .ft CW
85 .nf
86 \f[B]% \fPsh configure
87 \f[I]\&...lots of output...\fP
88 \f[B]%\fP
89 .fi
90 .ft R
91 .RE
92 instead, to prevent \f[I]csh\fP from trying to execute \f[I]configure\fP
93 itself.
94 .PP
95 Running \f[I]configure\fP takes a minute or two. While it is running,
96 it prints some messages that tell what it is doing. If you don't want
97 to see the messages, run \f[I]configure\fP using the quiet option; for
98 example,
99 .RS
100 .FT CW
101 .nf
102 \f[B]% \fP./configure --quiet
103 \bB%\fP
104 .fi
105 .ft R
106 .RE
107 .PP
108 To compile the \f[B]fstrcmp\fP package in a different directory from the
109 one containing the source code, you must use a version of \f[I]make\fP
110 that supports the \f[I]VPATH\fP variable, such as \f[I]GNU make\fP.
111 Then \f[I]cd\fP to the directory where you want the object files
112 and executables to go and run the \f[I]configure\fP script. The
113 \f[I]configure\fP script automatically checks for the source code in
114 the directory that \f[I]configure\fP is in and in \fI..\fP (the parent
115 directory). If for some reason \f[I]configure\fP is not in the source
116 code directory that you are configuring, then it will report that it
117 can't find the source code. In that case, run \f[I]configure\fP with
118 the option \f[CW]--srcdir=\fP\f[I]DIR\fP, where \f[I]DIR\fP is the
119 directory that contains the source code.
120 .PP
121 By default, \f[I]configure\fP will arrange for the \f[I]make
122 install\fP command to install the \f[B]fstrcmp\fP package's
123 files in \f[I]/usr/local/bin\fP, \f[I]/usr/local/lib\fP,
124 \f[I]/usr/local/include\fP, and \f[I]/usr/local/man\fP. There are
125 options which allow you to control the placement of these files.
126 .TP 8n
127 \f[CW]--prefix=\fP\f[I]PATH\fP
128 This specifies the path prefix to be used in the installation.
129 Defaults to \f[I]/usr/local\fP unless otherwise specified.
130 .TP 8n
131 \f[CW]--exec-prefix=\fP\f[I]PATH\fP
132 You can specify separate installation prefixes for architecture-specific
133 files files.
134 Defaults to \f[I]${prefix}\fP unless otherwise specified.
135 .TP 8n
136 \f[CW]--bindir=\fP\f[I]PATH\fP
137 This directory contains executable programs. On a network, this
138 directory may be shared between machines with identical hardware
139 and operating systems; it may be mounted read-only. Defaults to
140 \f[I]${exec_prefix}/bin\fP unless otherwise specified.
141 .TP 8n
142 \f[CW]--mandir=\fP\f[I]PATH\fP
143 This directory contains the on-line manual entries. On a network, this
144 directory may be shared between all machines; it may be mounted
145 read-only. Defaults to \f[I]${prefix}/man\fP unless otherwise specified.
146 .PP
147 The \f[I]configure\fP script ignores most other arguments that you give
148 it; use the \f[CW]--help\fP option for a complete list.
149 .br
150 .ne 2i
151 .PP
152 On systems that require unusual options for compilation or linking that
153 the \f[I]fstrcmp\fP package's \f[I]configure\fP script does not know
154 about, you can give \f[I]configure\fP initial values for variables by
155 setting them in the environment. In Bourne-compatible shells, you can
156 do that on the command line like this:
157 .RS
158 .ft CW
159 .nf
160 \f[B]$ \fPCXX='gcc -traditional' LIBS=-lposix ./configure
161 \f[I]\&...lots of output...\fP
162 \f[B]$\fP
163 .fi
164 .ft R
165 .RE
166 Here are the \f[I]make\fP variables that you might want to override with
167 environment variables when running the \f[I]configure\fP script:
168 .TP 8n
169 Variable: CC
170 C compiler program. The default is \f[I]cc\fP.
171 .TP 8n
172 Variable: CPPFLAGS
173 Preprocessor flags, commonly defines and include search paths.
174 Defaults to empty.
175 It is common to use \f[CW]CPPFLAGS=-I/usr/local/include\fP to access other
176 installed packages.
177 .TP 8n
178 Variable: INSTALL
179 Program to use to install files. The default is \f[I]install\fP if you
180 have it, \f[I]cp\fP otherwise.
181 .TP 8n
182 Variable: LIBS
183 Libraries to link with, in the form \f[CW]-l\fP\f[I]foo\fP
184 \f[CW]-l\fP\f[I]bar\fP. The \f[I]configure\fP script will
185 append to this, rather than replace it. It is common to use
186 \f[CW]LIBS=-L/usr/local/lib\fP to access other installed packages.
187 .PP
188 If you need to do unusual things to compile the package, the author
189 encourages you to figure out how the \f[I]configure\fP script could
190 check whether to do them, and mail diffs or instructions to the author
191 so that they can be included in the next release.
192 .br
193 .ne 1i
194 .SH BUILDING FSTRCMP
195 All you should need to do is use the
196 .RS
197 .ft CW
198 .nf
199 \f[B]% \fPmake
200 \f[I]\&...lots of output...\fP
201 \f[B]%\fP
202 .fi
203 .ft R
204 .RE
205 command and wait.
206 .PP
207 You can remove the program binaries and object files from the
208 source directory by using the
209 .RS
210 .ft CW
211 .nf
212 \f[B]% \fPmake clean
213 \f[I]\&...lots of output...\fP
214 \f[B]%\fP
215 .fi
216 .ft R
217 .RE
218 command. To remove all of the above files, and also remove the
219 \f[I]Makefile\fP and \f[I]lib/config.h\fP and \f[I]config.status\fP
220 files, use the
221 .RS
222 .ft CW
223 .nf
224 \f[B]% \fPmake distclean
225 \f[I]\&...lots of output...\fP
226 \f[B]%\fP
227 .fi
228 .ft R
229 .RE
230 command.
231 .PP
232 The file \f[I]etc/configure.ac\fP is used to create \f[I]configure\fP
233 by a GNU program called \f[I]autoconf\fP. You only need to know this
234 if you want to regenerate \f[I]configure\fP using a newer version of
235 \f[I]autoconf\fP.
236 .br
237 .ne 1i
238 .SH TESTING FSTRCMP
239 The \f[I]fstrcmp\fP package comes with a test suite. To run this test
240 suite, use the command
241 .RS
242 .ft CW
243 .nf
244 \f[B]% \fPmake sure
245 \f[I]\&...lots of output...\fP
246 .if n \f[B]Passed All Tests\fP
247 .if t \f[CB]Passed All Tests\fP
248 \f[B]%\fP
249 .fi
250 .ft R
251 .RE
252 .PP
253 The tests take a fraction of a second each, with most very fast, and a
254 couple very slow, but it varies greatly depending on your CPU.
255 .PP
256 If all went well, the message
257 .RS
258 .ft CW
259 Passed All Tests
260 .ft R
261 .RE
262 should appear at the end of the make.
263 .br
264 .ne 1i
265 .SH INSTALLING FSTRCMP
266 As explained in the \f[I]SITE CONFIGURATION\fP section, above, the
267 \f[I]fstrcmp\fP package is installed under the \f[I]/usr/local\fP
268 tree by default. Use the \f[CW]--prefix=\fP\f[I]PATH\fP option
269 to \f[I]configure\fP if you want some other path. More specific
270 installation locations are assignable, use the \f[CW]--help\fP option to
271 the \f[I]configure\fP script for details.
272 .PP
273 All that is required to install the \f[I]fstrcmp\fP package is to use the
274 .RS
275 .ft CW
276 .nf
277 \f[B]% \fPmake install
278 \f[I]\&...lots of output...\fP
279 \f[B]%\fP
280 .fi
281 .ft R
282 .RE
283 command. Control of the directories used may be found in the first
284 few lines of the \f[I]Makefile\fP file and the other files written
285 by the \f[I]configure\fP script; it is best to reconfigure using the
286 \f[I]configure\fP script, rather than attempting to do this by hand.
287 .br
288 .ne 1i
289 .SH GETTING HELP
290 If you need assistance with the \f[I]fstrcmp\fP package, please do not
291 hesitate to contact the author at
292 .RS
293 .ft CW
294 Peter Miller <[email protected]>
295 .ft R
296 .RE
297 Any and all feedback is welcome.
298 .PP
299 When reporting problems, please include the version number given by the
300 .RS
301 .ft CW
302 .nf
303 \f[B]% \f[P]explain -version
304 .if n \f[B]explain version\fP \f[I]\*(V)\fP
305 .if t \f[CB]explain version\fP \f[I]\*(V)\fP
306 \f[I]\&...warranty disclaimer...\fP
307 \f[B]%\fP
308 .fi
309 .ft R
310 .RE
311 command. Please do not send this example; run the program for the exact
312 version number.
313 .br
314 .ne 2i
315 .so man/man1/z_copyright.so
316 .PP
317 This program is free software; you can redistribute it and/or modify it
318 under the terms of the GNU General Public License as published by
319 the Free Software Foundation; either version 3 of the License, or (at
320 your option) any later version.
321 .PP
322 This program is distributed in the hope that it will be useful,
323 but WITHOUT ANY WARRANTY; without even the implied warranty of
324 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
325 General Public License for more details.
326 .PP
327 You should have received a copy of the GNU General Public License
328 along with this program. If not, see <http://www.gnu.org/licenses/>.
329 .PP
330 It should be in the \f[I]LICENSE\fP file included in the source distribution.