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