]> sjero.net Git - wget/blob - INSTALL
[svn] Document external dependencies.
[wget] / INSTALL
1                                                             -*- text -*-
2                    GNU Wget Installation Procedure
3                    ===============================
4
5 0. Preparation
6 --------------
7
8 To build GNU Wget from source code and install it on your system, you
9 need to unpack the archive (which you have presumably done, since you
10 are reading this) and read on.  Like most GNU utilities, Wget uses the
11 GNU Autoconf mechanism for build and installation; users familiar with
12 compiling GNU software should feel at home.  Please note that
13 instructions in this file do not concern to installation on Windows,
14 for which see windows/README.
15
16 The system requirements include: a Unix-like system with the utilities
17 typically shipped with Unix (sh, grep, awk, sed, etc.) and a C
18 compilation environment, including the compiler, system headers,
19 `make', and so on.
20
21 External dependencies (all optional):
22   - OpenSSL, for "https" URLs.
23   - GNU gettext, for translated messages.
24
25 1. Configuration
26 ----------------
27
28 Before compiling Wget, you need to "configure" it using the provided
29 `configure' script.  Configuration serves two purposes: it enables the
30 compilation system to inspect certain features of your operating
31 system for more robust compilation, and it enables you to choose which
32 features you want the resulting Wget to have.
33
34 The simplest way to configure Wget is by running the configure script
35 provided with the distribution without additional arguments.  After
36 running some programming-related tests, it will create the Makefiles
37 needed to compile Wget.  If you have experience with Autoconf-based
38 build systems, you may use the standard arguments such configure
39 scripts take, the most important ones being:
40
41   --help                  display a help message and exit
42
43   --prefix=PREFIX         install architecture-independent files in PREFIX
44                           (/usr/local by default)
45   --bindir=DIR            user executables in DIR (PREFIX/bin)
46   --infodir=DIR           info documentation in DIR [PREFIX/info]
47   --mandir=DIR            man documentation in DIR [PREFIX/man]
48
49 For example, if you are not root and want to install Wget in your home
50 directory, you can use:
51
52     ./configure --prefix=$HOME
53
54 Options beginning with "--disable", such as `--disable-opie' or
55 `--disable-ntlm', allow you to turn off certain built-in functionality
56 you don't need in order to reduce the size of the executable.  Options
57 beginning with "--with" turning off autodetection and use of external
58 software Wget can link with, such as the SSL libraries.  Recognized
59 "--enable" and "--with" options include:
60
61   --without-ssl           disable SSL autodetection (used for https support)
62   --with-libssl-prefix=DIR search for libssl in DIR/lib
63   --disable-opie          disable support for opie or s/key FTP login
64   --disable-digest        disable support for HTTP digest authorization
65   --disable-ntlm          disable support for HTTP NTLM authorization
66   --disable-debug         disable support for debugging output
67   --disable-nls           do not use Native Language Support
68   --disable-largefile     omit support for large files
69   --disable-ipv6          disable IPv6 support
70   --disable-rpath         do not hardcode runtime library paths
71
72 You can inspect the decisions made by configure by editing the
73 generated Makefiles and the `src/config.h' include file.  The defaults
74 should work without intervention, but if you know what you are doing,
75 editing the generated files before compilation is fine -- they will
76 not be regenerated until you run configure again.
77
78 configure will try to find a compiler in your PATH, defaulting to
79 `gcc', but falling back to `cc' if the former is unavailable.  This is
80 a reasonable default on most Unix-like systems, but sometimes you
81 might want to override it.  The compiler choice is overridden by
82 setting the `CC' environment variable to the desired compiler file
83 name.  For example, to force compilation with the Unix `cc' compiler,
84 invoke configure like this:
85
86     ./configure CC=cc
87
88 This assumes that `cc' is in your path -- if it is not, simply use
89 CC=/path/to/cc instead.  Note that environment variables that affect
90 configure can be set with the usual shell syntax `VAR=value
91 ./configure' (assuming sh syntax), but can also be specified as
92 arguments to configure, as shown above.  The latter method, while
93 being specific to configure, works unmodified in all shells.
94
95 Environment variables that affect `configure' include: CFLAGS for C
96 compiler flags, CPPFLAGS for C preprocessor flags, LDFLAGS for linker
97 flags, and LIBS for libraries.
98
99 Barring the use of --without-* flags, configure will try to autodetect
100 external libraries needed by Wget, currently only the OpenSSL
101 libraries.  If they are installed in the system library directories or
102 in the same prefix where you plan to install Wget, configure should be
103 able to autodetect them.  If they are installed elsewhere, use the
104 `--with-libNAME' option to specify the root directory under which
105 libraries reside in the `lib/' subdirectory and the corresponding
106 header files reside in the `include/' subdirectory.  For example, if
107 the OpenSSL libraries are installed under the /usr/local/ssl prefix,
108 use `--with-libssl=/usr/local/ssl'.
109
110 Sometimes external libraries will be installed on the system, but the
111 header files will be missing.  This often happens on Linux if you
112 forget to install the "-devel" or "-dev" package that corresponds to
113 the library and that is typically *not* installed by default.  In that
114 case configure will not find the library and you will not be able to
115 use the features provided by the library until you install the devel
116 package and rerun configure.  If you believe you have the necessary
117 headers, but configure still fails to detect the library, please
118 report it as a bug.
119
120 2. Compilation
121 --------------
122
123 To compile GNU Wget after it has been configured, simply type make.
124 Wget requires a compiler and standard library compliant with the 1990
125 ISO C standard, which includes the vast majority of compilation
126 environments present on systems in use today.
127
128 After the compilation a ready-to-use `wget' executable should reside
129 in the src directory.  At this point there is no formal test suite for
130 testing the binary, but it should be easy enough to test whether the
131 basic functionality works.
132
133 3. Installation
134 ---------------
135
136 Use `make install' to install GNU Wget to directories specified to
137 configure.  To install it in a system directory (which is the
138 default), you will need to be root.  The standard prefix is
139 "/usr/local/", which can be changed using the `--prefix' configure
140 option.
141
142 The installation process will copy the wget binary to $PREFIX/bin,
143 install the wget.info* info pages to $PREFIX/info, the generated
144 manual page (where available) wget.1 to $PREFIX/man/man1, and the
145 default config file to $PREFIX/etc, unless a config file already
146 exists there.  You can customize these directories either through the
147 configuration process or making the necessary changes in the Makefile.
148
149 To delete the files created by Wget installation, you can use `make
150 uninstall'.