]> sjero.net Git - wget/blobdiff - INSTALL
[svn] Document external dependencies.
[wget] / INSTALL
diff --git a/INSTALL b/INSTALL
index 7c1dd4067dc9b9aa18e291b71e68d96bcbda1d2d..5e463d8c861cc4d826e6ad04080fb8c0a410ab66 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,21 +1,44 @@
-                                                                   -*- text -*-
-                       Installation Procedure
-
-0) Preparation
-
-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.
-Like most GNU utilities, Wget uses the GNU Autoconf mechanism for
-build and installation; those of you familiar with compiling GNU
-software will feel at home.
-
-1) Configuration
-
-To configure Wget, run the configure script provided with the
-distribution.  You may use all the standard arguments configure
-scripts take.  The most important ones are:
-
-  --help                  print help message
+                                                            -*- text -*-
+                  GNU Wget Installation Procedure
+                   ===============================
+
+0. Preparation
+--------------
+
+To build GNU Wget from source code and install it on your system, you
+need to unpack the archive (which you have presumably done, since you
+are reading this) and read on.  Like most GNU utilities, Wget uses the
+GNU Autoconf mechanism for build and installation; users familiar with
+compiling GNU software should feel at home.  Please note that
+instructions in this file do not concern to installation on Windows,
+for which see windows/README.
+
+The system requirements include: a Unix-like system with the utilities
+typically shipped with Unix (sh, grep, awk, sed, etc.) and a C
+compilation environment, including the compiler, system headers,
+`make', and so on.
+
+External dependencies (all optional):
+  - OpenSSL, for "https" URLs.
+  - GNU gettext, for translated messages.
+
+1. Configuration
+----------------
+
+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
 
   --prefix=PREFIX         install architecture-independent files in PREFIX
                           (/usr/local by default)
@@ -23,65 +46,105 @@ scripts take.  The most important ones are:
   --infodir=DIR           info documentation in DIR [PREFIX/info]
   --mandir=DIR            man documentation in DIR [PREFIX/man]
 
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
+For example, if you are not root and want to install Wget in your home
+directory, you can use:
 
---enable and --with options recognized (mostly Wget-specific):
-  --with-ssl[=SSL_ROOT]   link with libssl [in SSL_ROOT/lib] for https: support
+    ./configure --prefix=$HOME
+
+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-digest        disable support for HTTP digest authorization
+  --disable-ntlm          disable support for HTTP NTLM authorization
   --disable-debug         disable support for debugging output
   --disable-nls           do not use Native Language Support
   --disable-largefile     omit support for large files
   --disable-ipv6          disable IPv6 support
-
-So, if you want to configure Wget for installation in your home
-directory, you can type:
-
-    ./configure --prefix=$HOME
-
-You can customize many default settings by editing Makefile and
-config.h.  The program will work very well without your touching these
-files, but it is useful to have a look at things you can change there.
-
-If you have OpenSSL libraries installed in one of the default
-directories, such as /usr/local/lib or /usr/local/ssl/lib, you can
-simply `configure --with-ssl'.  If you have it installed elsewhere,
-you need to specify your alternate OpenSSL root directory.  For
-instance, if libcrypto.* and libssl.* are in /opt/openssl/lib, you
-need to `configure --with-ssl=/opt/openssl'.
-
-To configure Wget on Windows, read the instructions in
-`windows/README'. If this doesn't work for any reason, talk to the
-Windows developers listed there; I do not maintain the port.  That
-does not apply to the "Cygwin" environment, where Wget should compile
-out of the box as described here.
-
-2) Compilation
-
-To compile the program, type make and cross your fingers.  If you do
-not have an ANSI compiler, Wget will try to KNR-ize its sources "on
-the fly".  This should make GNU Wget compilable on almost any
-Unix-like system out there.
-
-After the compilation a ready to use `wget' executable should reside
-in the src directory.  I do not have any kind of test-suite as of this
-moment, but it should be easy enough to test whether the basic stuff
-works.
-
-3) Installation
+  --disable-rpath         do not hardcode runtime library paths
+
+You can inspect the decisions made by configure by editing the
+generated Makefiles and the `src/config.h' include file.  The defaults
+should work without intervention, but if you know what you are doing,
+editing the generated files before compilation is fine -- they will
+not be regenerated until you run configure again.
+
+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
+a reasonable default on most Unix-like systems, but sometimes you
+might want to override it.  The compiler choice is overridden by
+setting the `CC' environment variable to the desired compiler file
+name.  For example, to force compilation with the Unix `cc' compiler,
+invoke configure like this:
+
+    ./configure CC=cc
+
+This assumes that `cc' is in your path -- if it is not, simply use
+CC=/path/to/cc instead.  Note that environment variables that affect
+configure can be set with the usual shell syntax `VAR=value
+./configure' (assuming sh syntax), but can also be specified as
+arguments to configure, as shown above.  The latter method, while
+being specific to configure, works unmodified in all shells.
+
+Environment variables that affect `configure' include: CFLAGS for C
+compiler flags, CPPFLAGS for C preprocessor flags, LDFLAGS for linker
+flags, and LIBS for libraries.
+
+Barring the use of --without-* flags, configure will try to autodetect
+external libraries needed by Wget, currently only the OpenSSL
+libraries.  If they are installed in the system library directories or
+in the same prefix where you plan to install Wget, configure should be
+able to autodetect them.  If they are installed 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'.
+
+Sometimes external libraries will be installed on the system, but the
+header files will be missing.  This often happens on Linux if you
+forget to install the "-devel" or "-dev" package that corresponds to
+the library and that is typically *not* installed by default.  In that
+case 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 believe you have the necessary
+headers, but configure still fails to detect the library, please
+report it as a bug.
+
+2. Compilation
+--------------
+
+To compile GNU Wget after it has been configured, simply type make.
+Wget requires a compiler and standard library compliant with the 1990
+ISO C standard, which includes the vast majority of compilation
+environments present on systems in use today.
+
+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
+testing the binary, but it should be easy enough to test whether the
+basic functionality works.
+
+3. Installation
+---------------
 
 Use `make install' to install GNU Wget to directories specified to
-configure.  The standard prefix is "/usr/local/", which can be changed
-using the `--prefix' configure option.
+configure.  To install it in a system directory (which is the
+default), you will need to be root.  The standard prefix is
+"/usr/local/", which can be changed using the `--prefix' configure
+option.
 
 The installation process will copy the wget binary to $PREFIX/bin,
-install the wget.info* info pages to $PREFIX/info, the autogenerated
+install the wget.info* info pages to $PREFIX/info, the generated
 manual page (where available) wget.1 to $PREFIX/man/man1, and the
 default config file to $PREFIX/etc, unless a config file already
 exists there.  You can customize these directories either through the
 configuration process or making the necessary changes in the Makefile.
 
-To delete the files created by Wget installation, you can use make
-uninstall.
+To delete the files created by Wget installation, you can use `make
+uninstall'.