~ubuntu-branches/ubuntu/utopic/gettext/utopic

« back to all changes in this revision

Viewing changes to gettext-runtime/libasprintf/INSTALL

  • Committer: Colin Watson
  • Date: 2010-08-01 21:36:08 UTC
  • mfrom: (2.1.10 sid)
  • Revision ID: cjwatson@canonical.com-20100801213608-yy7vkm8lpatep3ci
merge from Debian 0.18.1.1-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
These are generic installation instructions.
 
2
 
 
3
Prerequisites
 
4
=============
 
5
 
 
6
   This package depends on a few other packages.  They are listed in
 
7
the file `DEPENDENCIES'.  It is recommended to install the listed
 
8
packages before installing this package.
 
9
 
1
10
Basic Installation
2
11
==================
3
12
 
4
 
   These are generic installation instructions.
5
 
 
6
13
   The `configure' shell script attempts to guess correct values for
7
14
various system-dependent variables used during compilation.  It uses
8
15
those values to create a `Makefile' in each directory of the package.
76
83
one architecture, use `make distclean' before reconfiguring for another
77
84
architecture.
78
85
 
 
86
   On MacOS X 10.5 and later systems, you can create libraries and
 
87
executables that work on multiple system types--known as "fat" or
 
88
"universal" binaries--by specifying multiple '-arch' options to the
 
89
compiler but only a single '-arch' option to the preprocessor.  Like
 
90
this:
 
91
 
 
92
     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
 
93
                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
 
94
                 CPP="gcc -E" CXXCPP="g++ -E"
 
95
 
 
96
   This is not guaranteed to produce working output in all cases.  You
 
97
may have to build one architecture at a time and combine the results
 
98
using the 'lipo' tool if you have problems.
 
99
 
79
100
Installation Names
80
101
==================
81
102
 
99
120
with an extra prefix or suffix on their names by giving `configure' the
100
121
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
101
122
 
102
 
Relocatable Installation
103
 
========================
104
 
 
105
 
   By default, `make install' will install a package with hardwired
106
 
file names, and the package will not work correctly when copied or
107
 
moved to a different location in the filesystem.
108
 
 
109
 
   Some packages pay attention to the `--enable-relocatable' option to
110
 
`configure'.  This option makes the entire installed package
111
 
relocatable.  This means, it can be moved or copied to a different
112
 
location on the filesystem.  It is possible to make symlinks to the
113
 
installed and moved programs, and invoke them through the symlink.  It
114
 
is possible to do the same thing  with a hard link _only_ if the hard
115
 
linked file is in the same directory as the real program.
116
 
 
117
 
   For reliability it is best to give together with --enable-relocatable
118
 
a `--prefix' option pointing to an otherwise unused (and never used
119
 
again) directory, for example, `--prefix=/tmp/inst$$'.  This is
120
 
recommended because on some OSes the executables remember the location
121
 
of shared libraries (and prefer them over LD_LIBRARY_PATH !), therefore
122
 
such an executable will look for its shared libraries first in the
123
 
original installation directory and only then in the current
124
 
installation directory.
125
 
 
126
 
   Installation with `--enable-relocatable' will not work for setuid /
127
 
setgid executables.  (This is because such an executable kills its
128
 
LD_LIBRARY_PATH variable when it is launched.)
129
 
 
130
 
   The runtime penalty and size penalty are nearly zero on Linux 2.2 or
131
 
newer (just one system call more when an executable is launched), and
132
 
small on other systems (the wrapper program just sets an environment
133
 
variable and execs the real program).
 
123
Enabling Relocatability
 
124
=======================
 
125
 
 
126
   It has been a pain for many users of GNU packages for a long time
 
127
that packages are not relocatable.  It means a user cannot copy a
 
128
program, installed by another user on the same machine, to his home
 
129
directory, and have it work correctly (including i18n).  So many users
 
130
need to go through `configure; make; make install' with all its
 
131
dependencies, options, and hurdles.
 
132
 
 
133
   Red Hat, Debian, and similar package systems solve the "ease of
 
134
installation" problem, but they hardwire path names, usually to `/usr'
 
135
or `/usr/local'.  This means that users need root privileges to install
 
136
a binary package, and prevents installing two different versions of the
 
137
same binary package.
 
138
 
 
139
   A relocatable program can be moved or copied to a different location
 
140
on the filesystem.  It is possible to make symlinks to the installed
 
141
and moved programs, and invoke them through the symlink. It is possible
 
142
to do the same thing with a hard link _only_ if the hard link file is
 
143
in the same directory as the real program.
 
144
 
 
145
   To configure a program to be relocatable, add `--enable-relocatable'
 
146
to the `configure' command line.
 
147
 
 
148
   On some OSes the executables remember the location of shared
 
149
libraries and prefer them over any other search path.  Therefore, such
 
150
an executable will look for its shared libraries first in the original
 
151
installation directory and only then in the current installation
 
152
directory.  Thus, for reliability, it is best to also give a `--prefix'
 
153
option pointing to a directory that does not exist now and which never
 
154
will be created, e.g.  `--prefix=/nonexistent'.  You may use
 
155
`DESTDIR=DEST-DIR' on the `make' command line to avoid installing into
 
156
that directory.
 
157
 
 
158
   We do not recommend using a prefix writable by unprivileged users
 
159
(e.g. `/tmp/inst$$') because such a directory can be recreated by an
 
160
unprivileged user after the original directory has been removed.  We
 
161
also do not recommend prefixes that might be behind an automounter
 
162
(e.g. `$HOME/inst$$') because of the performance impact of directory
 
163
searching.
 
164
 
 
165
   Here's a sample installation run that takes into account all these
 
166
recommendations:
 
167
 
 
168
     ./configure --enable-relocatable --prefix=/nonexistent
 
169
     make
 
170
     make install DESTDIR=/tmp/inst$$
 
171
 
 
172
   Installation with `--enable-relocatable' will not work for setuid or
 
173
setgid executables, because such executables search only system library
 
174
paths for security reasons.  Also, installation with
 
175
`--enable-relocatable' might not work on OpenBSD, when the package
 
176
contains shared libraries and libtool versions 1.5.xx are used.
 
177
 
 
178
   The runtime penalty and size penalty are negligible on GNU/Linux
 
179
(just one system call more when an executable is launched), and small on
 
180
other systems (the wrapper program just sets an environment variable
 
181
and executes the real program).
134
182
 
135
183
Optional Features
136
184
=================
164
212
is not installed, it is recommended to use the following options in order
165
213
to use an ANSI C compiler:
166
214
 
167
 
     ./configure CC="cc -Ae"
168
 
 
169
 
   On OSF/1 a.k.a. Tru64, some versions of the default C compiler don't grok
170
 
its <wchar.h> header file.  The option -nodtk can be used as a workaround.
171
 
If GNU CC is not installed, it is therefore recommended to try
 
215
     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
 
216
 
 
217
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
 
218
 
 
219
   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
 
220
parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
 
221
a workaround.  If GNU CC is not installed, it is therefore recommended
 
222
to try
172
223
 
173
224
     ./configure CC="cc"
174
225
 
182
233
 
183
234
     ./configure CC="xlc -D_ALL_SOURCE"
184
235
 
 
236
   On Haiku, software installed for all users goes in /boot/common, not
 
237
/usr/local.  It is recommended to use the following options:
 
238
 
 
239
     ./configure --prefix=/boot/common
 
240
 
185
241
   On BeOS, user installed software goes in /boot/home/config, not
186
242
/usr/local.  It is recommended to use the following options:
187
243