]> sjero.net Git - wget/blob - INSTALL
[svn] Mention that make install requires root.
[wget] / INSTALL
1                                                                    -*- text -*-
2                         Installation Procedure
3
4 0) Preparation
5
6 To build and install GNU Wget, you need to unpack the archive (which
7 you have presumably done, since you are reading this), and read on.
8 Like most GNU utilities, Wget uses the GNU Autoconf mechanism for
9 build and installation; those of you familiar with compiling GNU
10 software will feel at home.
11
12 1) Configuration
13
14 To configure Wget, run the configure script provided with the
15 distribution.  It will create the Makefiles needed to start the
16 compilation.  You may use the standard arguments Autoconf-created
17 configure scripts take, the most important ones being:
18
19   --help                  display a help message and exit
20
21   --prefix=PREFIX         install architecture-independent files in PREFIX
22                           (/usr/local by default)
23   --bindir=DIR            user executables in DIR (PREFIX/bin)
24   --infodir=DIR           info documentation in DIR [PREFIX/info]
25   --mandir=DIR            man documentation in DIR [PREFIX/man]
26
27   --build=BUILD           configure for building on BUILD [BUILD=HOST]
28   --host=HOST             configure for HOST [guessed]
29   --target=TARGET         configure for TARGET [TARGET=HOST]
30
31 --enable and --with options recognized (mostly Wget-specific):
32   --with-ssl[=SSL_ROOT]   link with libssl [in SSL_ROOT/lib] for https: support
33   --disable-opie          disable support for opie or s/key FTP login
34   --disable-digest        disable support for HTTP digest authorization
35   --disable-ntlm          disable support for HTTP NTLM authorization
36   --disable-debug         disable support for debugging output
37   --disable-nls           do not use Native Language Support
38   --disable-largefile     omit support for large files
39   --disable-ipv6          disable IPv6 support
40
41 If you want to configure Wget for installation in your home directory,
42 you can type:
43
44     ./configure --prefix=$HOME
45
46 You can customize many settings simply by editing the Makefiles and
47 `src/config.h'.  The defaults should work without intervention, but it
48 is useful to have a look at things you can change there.
49
50 configure will try to find a compiler in your PATH, defaulting to
51 `gcc', but falling back to `cc' if the former is unavailable.  This is
52 a reasonable default on most Unix-like systems, but sometimes you
53 might want to override it.  The compiler choice is overridden with the
54 value of the `CC' environment variable.  For example, to force
55 compilation with the Unix `cc' compiler, invoke configure like this:
56
57     ./configure CC=cc
58
59 This assumes that `cc' is in your path -- if it is not, simply replace
60 "cc" with "/path/to/cc".  Note that environment variables that affect
61 configure can be set with the usual shell syntax `var=value
62 ./configure' (assuming an sh-compatible shell).  In addition to that,
63 configure allows environment variables to be specified as arguments in
64 the form "var=value", which are shell-independent.
65
66 Environment variables that affect `configure' include: CFLAGS for
67 compilation flags, LDFLAGS for linker flags, and CPPFLAGS for
68 preprocessor flags.
69
70 If you have OpenSSL libraries installed at one of the default
71 locations, such as the system library directories or /usr/local/lib or
72 /usr/local/ssl/lib, configure will autodetect them.  If they are
73 installed elsewhere, you need to specify the OpenSSL root directory.
74 For instance, if libcrypto.* and libssl.* are in /opt/openssl/lib, you
75 need to `configure --with-ssl=/opt/openssl'.
76
77 To configure Wget on Windows, read the instructions in
78 `windows/README'.  If this doesn't work for any reason, talk to the
79 Windows developers listed there; I do not maintain the port.  Those
80 instructions do not apply to the "Cygwin" environment, where Wget
81 should build out of the box as described here.
82
83 2) Compilation
84
85 To compile GNU Wget after it has been configured, simply type make.
86 If you do not have an ISO C (C89) compiler, Wget will try to K&R-ize
87 its sources on the fly.  This should make GNU Wget compilable on
88 almost any Unix-like system you are likely to encounter.
89
90 After the compilation a ready-to-use `wget' executable should reside
91 in the src directory.  At this point there is no formal test suite for
92 testing the binary, but it should be easy enough to test whether the
93 basic functionality works.
94
95 3) Installation
96
97 Use `make install' to install GNU Wget to directories specified to
98 configure.  To install it in a system directory (which is the
99 default), you will need to be root.  The standard prefix is
100 "/usr/local/", which can be changed using the `--prefix' configure
101 option.
102
103 The installation process will copy the wget binary to $PREFIX/bin,
104 install the wget.info* info pages to $PREFIX/info, the generated
105 manual page (where available) wget.1 to $PREFIX/man/man1, and the
106 default config file to $PREFIX/etc, unless a config file already
107 exists there.  You can customize these directories either through the
108 configuration process or making the necessary changes in the Makefile.
109
110 To delete the files created by Wget installation, you can use `make
111 uninstall'.