1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Expanded and updated with the current options.

This commit is contained in:
hniksic 2005-06-24 14:53:01 -07:00
parent db31c2f437
commit 68f8b83d63

132
INSTALL
View File

@ -1,20 +1,34 @@
-*- text -*- -*- text -*-
Installation Procedure GNU Wget Installation Procedure
===============================
0) Preparation 0. Preparation
--------------
To build and install GNU Wget, you need to unpack the archive (which To build and install GNU Wget, you need to unpack the archive (which
you have presumably done, since you are reading this), and read on. you have presumably done, since you are reading this), and read on.
Like most GNU utilities, Wget uses the GNU Autoconf mechanism for Like most GNU utilities, Wget uses the GNU Autoconf mechanism for
build and installation; those of you familiar with compiling GNU build and installation; users familiar with compiling GNU software
software will feel at home. should feel at home.
1) Configuration Note that instructions in this file do not pertain to installation on
Windows, for which see windows/README.
To configure Wget, run the configure script provided with the 1. Configuration
distribution. It will create the Makefiles needed to start the ----------------
compilation. You may use the standard arguments Autoconf-created
configure scripts take, the most important ones being: Before compiling Wget, you need to "configure" it using the provided
`configure' script. Configuration serves two purposes: it enables the
compilation system to inspect certain features of your operating
system for more robust compilation, and it enables you to choose which
features you want the resulting Wget to have.
The simplest way to configure Wget is by running the configure script
provided with the distribution without additional arguments. After
running some programming-related tests, it will create the Makefiles
needed to compile Wget. If you have experience with Autoconf-based
build systems, you may use the standard arguments such configure
scripts take, the most important ones being:
--help display a help message and exit --help display a help message and exit
@ -24,12 +38,20 @@ configure scripts take, the most important ones being:
--infodir=DIR info documentation in DIR [PREFIX/info] --infodir=DIR info documentation in DIR [PREFIX/info]
--mandir=DIR man documentation in DIR [PREFIX/man] --mandir=DIR man documentation in DIR [PREFIX/man]
--build=BUILD configure for building on BUILD [BUILD=HOST] For example, if you are not root and want to install Wget in your home
--host=HOST configure for HOST [guessed] directory, you can use:
--target=TARGET configure for TARGET [TARGET=HOST]
--enable and --with options recognized (mostly Wget-specific): ./configure --prefix=$HOME
--with-ssl[=SSL_ROOT] link with libssl [in SSL_ROOT/lib] for https: support
Options beginning with "--disable", such as `--disable-opie' or
`--disable-ntlm', allow you to turn off certain built-in functionality
you don't need in order to reduce the size of the executable. Options
beginning with "--with" turning off autodetection and use of external
software Wget can link with, such as the SSL libraries. Recognized
"--enable" and "--with" options include:
--without-ssl disable SSL autodetection (used for https support)
--with-libssl-prefix=DIR search for libssl in DIR/lib
--disable-opie disable support for opie or s/key FTP login --disable-opie disable support for opie or s/key FTP login
--disable-digest disable support for HTTP digest authorization --disable-digest disable support for HTTP digest authorization
--disable-ntlm disable support for HTTP NTLM authorization --disable-ntlm disable support for HTTP NTLM authorization
@ -37,62 +59,70 @@ configure scripts take, the most important ones being:
--disable-nls do not use Native Language Support --disable-nls do not use Native Language Support
--disable-largefile omit support for large files --disable-largefile omit support for large files
--disable-ipv6 disable IPv6 support --disable-ipv6 disable IPv6 support
--disable-rpath do not hardcode runtime library paths
If you want to configure Wget for installation in your home directory, You can inspect the decisions made by configure by editing the
you can type: generated Makefiles and the `src/config.h' include file. The defaults
should work without intervention, but if you know what you are doing,
./configure --prefix=$HOME editing the generated files before compilation is fine -- they will
not be regenerated until you run configure again.
You can customize many settings simply by editing the Makefiles and
`src/config.h'. The defaults should work without intervention, but it
is useful to have a look at things you can change there.
configure will try to find a compiler in your PATH, defaulting to configure will try to find a compiler in your PATH, defaulting to
`gcc', but falling back to `cc' if the former is unavailable. This is `gcc', but falling back to `cc' if the former is unavailable. This is
a reasonable default on most Unix-like systems, but sometimes you a reasonable default on most Unix-like systems, but sometimes you
might want to override it. The compiler choice is overridden with the might want to override it. The compiler choice is overridden by
value of the `CC' environment variable. For example, to force setting the `CC' environment variable to the desired compiler file
compilation with the Unix `cc' compiler, invoke configure like this: name. For example, to force compilation with the Unix `cc' compiler,
invoke configure like this:
./configure CC=cc ./configure CC=cc
This assumes that `cc' is in your path -- if it is not, simply replace This assumes that `cc' is in your path -- if it is not, simply use
"cc" with "/path/to/cc". Note that environment variables that affect CC=/path/to/cc instead. Note that environment variables that affect
configure can be set with the usual shell syntax `var=value configure can be set with the usual shell syntax `VAR=value
./configure' (assuming an sh-compatible shell). In addition to that, ./configure' (assuming sh syntax), but can also be specified as
configure allows environment variables to be specified as arguments in arguments to configure, as shown above. The latter method, while
the form "var=value", which are shell-independent. being specific to configure, works unmodified in all shells.
Environment variables that affect `configure' include: CFLAGS for Environment variables that affect `configure' include: CFLAGS for C
compilation flags, LDFLAGS for linker flags, and CPPFLAGS for compiler flags, CPPFLAGS for C preprocessor flags, LDFLAGS for linker
preprocessor flags. flags, and LIBS for libraries.
If you have OpenSSL libraries installed at one of the default Barring a the use of --without-* flags, configure will try to
locations, such as the system library directories or /usr/local/lib or autodetect certain external libraries needed by Wget, currently only
/usr/local/ssl/lib, configure will autodetect them. If they are the OpenSSL libraries. If they are installed in the system library
installed elsewhere, you need to specify the OpenSSL root directory. directories or in the same prefix where you plan to install Wget,
For instance, if libcrypto.* and libssl.* are in /opt/openssl/lib, you configure should be able to autodetect them. If they are installed
need to `configure --with-ssl=/opt/openssl'. elsewhere, use the `--with-libNAME' option to specify the root
directory under which libraries reside in the `lib/' subdirectory and
the corresponding header files reside in the `include/' subdirectory.
For example, if the OpenSSL libraries are installed under the
/usr/local/ssl prefix, use `--with-libssl=/usr/local/ssl'.
To configure Wget on Windows, read the instructions in Sometimes external libraries will be installed on the system, but the
`windows/README'. If this doesn't work for any reason, talk to the header files will be missing, which happens on Linux if you forget to
Windows developers listed there; I do not maintain the port. Those install the "-devel" or "-dev" package that corresponds to the library
instructions do not apply to the "Cygwin" environment, where Wget and that is typically *not* installed by default. In that case
should build out of the box as described here. configure will not find the library and you will not be able to use
the features provided by the library until you install the devel
package and rerun configure. If you have all the necessary headers,
but configure still fails to detect the library, report a bug.
2) Compilation 2. Compilation
--------------
To compile GNU Wget after it has been configured, simply type make. To compile GNU Wget after it has been configured, simply type make.
If you do not have an ISO C (C89) compiler, Wget will try to K&R-ize Wget requires a compiler and standard library compliant with the 1990
its sources on the fly. This should make GNU Wget compilable on ISO C standard, which includes the vast majority of compilation
almost any Unix-like system you are likely to encounter. environments present on systems in use today.
After the compilation a ready-to-use `wget' executable should reside After the compilation a ready-to-use `wget' executable should reside
in the src directory. At this point there is no formal test suite for in the src directory. At this point there is no formal test suite for
testing the binary, but it should be easy enough to test whether the testing the binary, but it should be easy enough to test whether the
basic functionality works. basic functionality works.
3) Installation 3. Installation
---------------
Use `make install' to install GNU Wget to directories specified to Use `make install' to install GNU Wget to directories specified to
configure. To install it in a system directory (which is the configure. To install it in a system directory (which is the