dslinux/user/wget AUTHORS COPYING ChangeLog ChangeLog.README INSTALL MACHINES MAILING-LIST Makefile Makefile.cvs Makefile.in NEWS PATCHES README README.cvs TODO aclocal.m4 config.guess config.sub configure configure.bat configure.bat.in configure.in install-sh libtool.m4 ltmain.sh mkinstalldirs stamp-h.in

amadeus dslinux_amadeus at user.in-berlin.de
Thu Aug 31 11:32:35 CEST 2006


Update of /cvsroot/dslinux/dslinux/user/wget
In directory antilope:/tmp/cvs-serv14346/user/wget

Added Files:
	AUTHORS COPYING ChangeLog ChangeLog.README INSTALL MACHINES 
	MAILING-LIST Makefile Makefile.cvs Makefile.in NEWS PATCHES 
	README README.cvs TODO aclocal.m4 config.guess config.sub 
	configure configure.bat configure.bat.in configure.in 
	install-sh libtool.m4 ltmain.sh mkinstalldirs stamp-h.in 
Log Message:
Add some more applications

--- NEW FILE: mkinstalldirs ---
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman at prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain

errstatus=0
dirmode=""

usage="\
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."

# process command line arguments
while test $# -gt 0 ; do
  case $1 in
    -h | --help | --h*)         # -h for help
      echo "$usage" 1>&2
      exit 0
      ;;
    -m)                         # -m PERM arg
      shift
      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
      dirmode=$1
      shift
      ;;
    --)                         # stop option processing
      shift
      break
      ;;
    -*)                         # unknown option
      echo "$usage" 1>&2
      exit 1
      ;;
    *)                          # first non-opt arg
      break
      ;;
  esac
done

for file
do
  if test -d "$file"; then
    shift
  else
    break
  fi
done

case $# in
  0) exit 0 ;;
esac

case $dirmode in
  '')
    if mkdir -p -- . 2>/dev/null; then
      echo "mkdir -p -- $*"
      exec mkdir -p -- "$@"
    fi
    ;;
  *)
    if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
      echo "mkdir -m $dirmode -p -- $*"
      exec mkdir -m "$dirmode" -p -- "$@"
    fi
    ;;
esac

for file
do
  set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
  shift

  pathcomp=
  for d
  do
    pathcomp="$pathcomp$d"
    case $pathcomp in
      -*) pathcomp=./$pathcomp ;;
    esac

    if test ! -d "$pathcomp"; then
      echo "mkdir $pathcomp"

      mkdir "$pathcomp" || lasterr=$?

      if test ! -d "$pathcomp"; then
  	errstatus=$lasterr
      else
  	if test ! -z "$dirmode"; then
	  echo "chmod $dirmode $pathcomp"
    	  lasterr=""
  	  chmod "$dirmode" "$pathcomp" || lasterr=$?

  	  if test ! -z "$lasterr"; then
  	    errstatus=$lasterr
  	  fi
  	fi
      fi
    fi

    pathcomp="$pathcomp/"
  done
done

exit $errstatus

# Local Variables:
# mode: shell-script
# sh-indentation: 2
# End:
# mkinstalldirs ends here

--- NEW FILE: ChangeLog.README ---
Please note that Wget has more than one ChangeLog file:

    ./ChangeLog: documents changes to files in the top-level directory
                 and to files in subdirectories like po/ that don't have
                 their own ChangeLogs 

    doc/ChangeLog: documents only changes to files in the doc directory

    src/ChangeLog: documents only changes to files in the src directory

When checking to see if a patch you sent in has been applied, please
look in the appropriate ChangeLog(s).

In addition, you'll notice the ChangeLog-branches directories.

In late 2000, time constraints delayed the release of Wget 1.6.  While
it was awaiting release, people had new features and other changes they
wanted added to the CVS archive, but these were deemed not safe to
introduce just before a release.

The solution was to split the stable 1.6 off onto its own branch, while
free-wheeling development continued on the main branch (whose version
was changed from 1.5.3+dev to 1.7-dev).

Unfortunately it's difficult to portray this branched development in the
flat ChangeLog file.  Either you include 1.6-branch changes in the
1.7-branch ChangeLog, in which case it becomes impossible to tell what
release version a given change first went into Wget, just judging by
date and position in the ChangeLog, or you omit all 1.6-branch changes
from the 1.7-branch ChangeLog, in which case all evidence of the
existence of 1.6 (and further information about that branch) disappears
from future versions of Wget.

The solution that was decided upon was to make a subdirectory called
ChangeLog-branches adjacent to each ChangeLog file.  Inside is the
corresponding ChangeLog from the most recent release on the stable
branch (e.g. 1.6_branch.ChangeLog).  This way, no information is lost
and there's no misleading information in the ChangeLog.

--- NEW FILE: PATCHES ---
* Guidelines for patch submissions.
===================================

** What is a patch?
-------------------

A patch file, also known as a "diff", is a textual representation of
changes to source code.  Patches are readable enough to be reviewed by
humans and at the same time regular enough to be processed by
programs.  The `patch' utility is used to change the source code in
the manner that the patch describes, this being called "applying" the
patch.  Patches work even on files that have been modified
independently of the modifications in the patch, as long as those
other changes do not conflict with the patch.

Because of these properties, patches are the preferred means of
distributing the changes to a free software project.  If you have made
a change to Wget and would like to contribute it, you will need to
create a patch and send it to the developers; please read on.

** Where to send the patches.
-----------------------------

Patches intended to be applied to Wget should be mailed to
<wget-patches at sunsite.dk>.  Each patch will be reviewed by the
developers, and will be acked and added to the distribution, or
rejected with an explanation.  Unfortunately, the developers are often
busy with their day jobs, so the review process can take a while.

If you want to discuss your patch with the community of Wget users and
developers, it is OK to send it to the main list at <wget at sunsite.dk>.
If the patch is really huge (more than 100K or so), you may want to
put it on the web and post the URL.

EVERY patch should be accompanied by an explanation of what the patch
changes, and why the change is desirable or necessary.  The
explanation need not be long, but please don't just send a patch
without any accompanying text.

Normally, a patch can be just inserted into the message, after the
explanation and the ChangeLog entry.  However, if your mail composer
or gateway is inclined to munge patches, e.g. by wrapping long lines,
please send them out as a MIME attachment.  It is important that the
patch survives the travel unchanged so that we can feed it to the
`patch' utility after reviewing it.

** How to create patches.
-------------------------

First, please make sure that you are working with the latest version
of the source -- changing obsolete code is a waste of time.  Working
on the latest release is acceptable in most cases, but it is better
yet to download the very latest sources from the public CVS server and
work on those.  The web page at <http://sunsite.dk/wget/> explains
what CVS is and how to check out Wget's source code from the public
repository.

Patches are created using the `diff' program.  When making patches,
please use the `-u' option, or if your diff doesn't support it, `-c'.
Ordinary (context-free) diffs are notoriously prone to errors, since
line numbers tend to change when others make changes to the same
source file.

In the general case, `diff' is used like this:

    diff -u ORIGFILE CHANGEDFILE > patch.txt

Also, it is helpful if you create the patch in the top level of
the Wget source directory.  For example:

    cp src/http.c src/http.c.orig
    ... modify src/http.c ....
    diff -u src/http.c.orig src/http.c > patch.txt

If your patch changes more than one file, feel free to simply
concatenate the diffs of different files into a large diff:

    (diff -u foo.orig foo; diff -u bar.orig bar) > patch.txt

The alternative is to leave the unchanged source lying around and use
the `-r' option to compare entire directories:

    diff -ru wget-1.9.orig wget-1.9 > patch.txt

If you do that, please be careful not to include the differences to
automatically generated files, such as `.info*'.

If you are using CVS, generating diffs is much simpler -- after
changing the files, all you need to do is run the following command
from Wget's top-level directory:

    cvs diff -u > patch.txt

If you run on Windows and don't have `diff' handy, please get one.
It's extremely hard to review changes to files unless they're in the
form of a patch.  If you really cannot use a variant of `diff', then
mail us the whole new file and specify which version of Wget you
changed; that way we will be able to generate the diff ourselves.

Finally, if your changes introduce new files, or if they change the
old files past all recognition (e.g. by completely reimplementing the
old stuff), sending a patch obviously doesn't make sense.  In that
case, just attach the files along with an explanation of what is being
changed.

** Standards and coding style.
------------------------------

Wget abides by the GNU coding standards, available at:

    http://www.gnu.org/prep/standards.html

I consider perhaps the most important single point in that entire
document to be the "no arbitrary limits" rule.  Even where Wget's
coding is less than exemplary, it respects that rule.  There should be
no exceptions.

Here is a short recap of the GNU formatting and naming conventions,
partly borrowed from XEmacs:

  * Put a space after every comma.

  * Put a space before the parenthesis that begins a function call,
    macro call, function declaration or definition, or control
    statement (if, while, switch, for).  (DO NOT do this for macro
    definitions; this is invalid preprocessor syntax.)

  * The brace that begins a control statement (if, while, for, switch,
    do) or a function definition should go on a line by itself.

  * In function definitions, put the return type and all other
    qualifiers on a line before the function name.  Thus, the function
    name is always at the beginning of a line.

  * Indentation level is two spaces.  (However, the first and
    following statements of a while/for/if/etc. block are indented
    four spaces from the while/for/if keyword.  The opening and
    closing braces are indented two spaces.)

  * Variable and function names should be all lowercase, with
    underscores separating words, except for a prefixing tag, which may
    be in uppercase.  Do not use the mixed-case convention (e.g.
    SetVariableToValue ()) and *especially* do not use Microsoft
    Hungarian notation (char **rgszRedundantTag).

  * Preprocessor constants and enumerations should be all uppercase,
    and should be prefixed with a tag that groups related constants
    together.

** ChangeLog policy.
--------------------

Each patch should be accompanied by an update to the appropriate
ChangeLog file.  Please don't mail diffs of ChangeLog files because
they have an extremely high rate of failure; just mail us the new
entries you added to the ChangeLog.  Patches without a ChangeLog entry
will be accepted, but this creates additional work for the
maintainers, so please do take the time to write one.

Guidelines for writing ChangeLog entries are also governed by the GNU
coding standards, under the "Change Logs" section.

--- NEW FILE: libtool.m4 ---
# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
## Copyright 1996, 1997, 1998, 1999, 2000, 2001
## Free Software Foundation, Inc.
## Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##
[...3665 lines suppressed...]
      ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
      cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
      # 40000 chars as input seems more than enough
      test $_count -gt 10 && break
      _count=`expr $_count + 1`
      if test $_count -gt $_max; then
        _max=$_count
        lt_cv_path_SED=$_sed
      fi
    done
  done
  rm -rf "$tmp"
])
if test "X$SED" != "X"; then
  lt_cv_path_SED=$SED
else
  SED=$lt_cv_path_SED
fi
AC_MSG_RESULT([$SED])
])

--- NEW FILE: configure.in ---
dnl Template file for GNU Autoconf
dnl Copyright (C) 1995, 1996, 1997, 2001 Free Software Foundation, Inc.

dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.

dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
dnl GNU General Public License for more details.

dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

dnl In addition, as a special exception, the Free Software Foundation
dnl gives permission to link the code of its release of Wget with the
dnl OpenSSL project's "OpenSSL" library (or with modified versions of it
dnl that use the same license as the "OpenSSL" library), and distribute
dnl the linked executables.  You must obey the GNU General Public License
dnl in all respects for all of the code used other than "OpenSSL".  If you
dnl modify this file, you may extend this exception to your version of the
dnl file, but you are not obligated to do so.  If you do not wish to do
dnl so, delete this exception statement from your version.

dnl
dnl Process this file with autoconf to produce a configure script.
dnl

AC_INIT(src/version.c)
AC_PREREQ(2.50)
AC_CONFIG_HEADER(src/config.h)

dnl
dnl What version of Wget are we building?
dnl
VERSION=`sed -e 's/^.*"\(.*\)";$/\1/' ${srcdir}/src/version.c`
echo "configuring for GNU Wget $VERSION"
AC_SUBST(VERSION)
PACKAGE=wget
AC_SUBST(PACKAGE)

dnl
dnl Get cannonical host
dnl
AC_CANONICAL_HOST
AC_DEFINE_UNQUOTED(OS_TYPE, "$host_os")

dnl
dnl Process features.
dnl
AC_ARG_WITH(socks,
[  --with-socks            use the socks library],
[AC_DEFINE(HAVE_SOCKS)])

AC_ARG_WITH(ssl,
[[  --with-ssl[=SSL-ROOT]   link with SSL support [default=auto]
  --without-ssl           disable SSL autodetection]])

AC_ARG_ENABLE(opie,
[  --disable-opie          disable support for opie or s/key FTP login],
USE_OPIE=$enableval, USE_OPIE=yes)
test x"${USE_OPIE}" = xyes && AC_DEFINE(USE_OPIE)

AC_ARG_ENABLE(digest,
[  --disable-digest        disable support for HTTP digest authorization],
USE_DIGEST=$enableval, USE_DIGEST=yes)
test x"${USE_DIGEST}" = xyes && AC_DEFINE(USE_DIGEST)

AC_ARG_ENABLE(debug,
[  --disable-debug         disable support for debugging output],
ENABLE_DEBUG=$enableval, ENABLE_DEBUG=yes)
test x"${ENABLE_DEBUG}" = xyes && AC_DEFINE(ENABLE_DEBUG)

wget_need_md5=no

case "${USE_OPIE}${USE_DIGEST}" in
*yes*)
	wget_need_md5=yes
esac
if test x"$USE_OPIE" = xyes; then
  OPIE_OBJ='ftp-opie$o'
fi
AC_SUBST(OPIE_OBJ)

dnl
dnl Whether make sets $(MAKE)...
dnl
AC_PROG_MAKE_SET

dnl
dnl Find a good install
dnl
AC_PROG_INSTALL

dnl
dnl Find the compiler
dnl

dnl We want these before the checks, so the checks can modify their values.
test -z "$CFLAGS"  && CFLAGS= auto_cflags=1
test -z "$CC" && cc_specified=yes

AC_PROG_CC

dnl
dnl if the user hasn't specified CFLAGS, then
dnl   if compiler is gcc, then use -O2 and some warning flags
dnl   else use os-specific flags or -O
dnl
if test -n "$auto_cflags"; then
  if test -n "$GCC"; then
    CFLAGS="$CFLAGS -O2 -Wall -Wno-implicit"
  else
    case "$host_os" in
      *hpux*)  CFLAGS="$CFLAGS +O3"                      ;;
      *ultrix* | *osf*) CFLAGS="$CFLAGS -O -Olimit 2000" ;;
      *)       CFLAGS="$CFLAGS -O" ;;
    esac
  fi
fi

dnl
dnl Handle AIX
dnl
AC_AIX

dnl
dnl Configure our included libtool and make sure it's regenerated when needed
dnl
AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)

dnl
dnl In case of {cyg,gnu}win32.  Should be a _target_ test.
dnl Might also be erelevant for DJGPP.
dnl
case "$host_os" in
  *win32) exeext='.exe';;
  *) exeext='';;
esac
AC_SUBST(exeext)

dnl
dnl Check if we can handle prototypes.
dnl
AM_C_PROTOTYPES

dnl
dnl Checks for typedefs, structures, and compiler characteristics.
dnl
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_TYPE_PID_T
AC_C_BIGENDIAN

dnl
dnl Check integral type sizes.
dnl
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
AC_CHECK_HEADERS(inttypes.h)
AC_CHECK_TYPES(uint32_t)

dnl
dnl Checks for headers
dnl
AC_CHECK_HEADERS(string.h stdarg.h unistd.h sys/time.h utime.h sys/utime.h pwd.h)
AC_CHECK_HEADERS(termios.h sys/ioctl.h sys/select.h sys/utsname.h)
AC_CHECK_HEADERS(signal.h setjmp.h)
AC_HEADER_TIME

dnl
dnl Return type of signal-handlers
dnl
AC_TYPE_SIGNAL

dnl
dnl Call several of Wget's macros.
dnl
WGET_STRUCT_UTIMBUF
WGET_SOCKLEN_T
WGET_FNMATCH

dnl
dnl Checks for library functions.
dnl
AC_FUNC_ALLOCA
AC_FUNC_MMAP
AC_CHECK_FUNCS(strdup strstr strcasecmp strncasecmp strpbrk memmove)
AC_CHECK_FUNCS(gettimeofday mktime strptime strerror snprintf vsnprintf)
AC_CHECK_FUNCS(select sigblock sigsetjmp signal symlink access isatty)
AC_CHECK_FUNCS(uname gethostname usleep)

dnl
dnl Check if we need to compile in getopt.c.
dnl
AC_CHECK_FUNC(getopt_long, [], [
  GETOPT_OBJ='getopt$o'
])
AC_SUBST(GETOPT_OBJ)

dnl
dnl Checks for libraries.
dnl

dnl On Solaris, -lnsl is needed to use gethostbyname.  On "NCR MP-RAS
dnl 3.0", however, gethostbyname is in libc, but -lnsl is still needed
dnl to use -lsocket, as well as for functions such as inet_ntoa.  We
dnl look for such known offenders and if one of them is not found, we
dnl check if -lnsl is needed.

wget_check_in_nsl=NONE
AC_CHECK_FUNCS(gethostbyname, [], [
  wget_check_in_nsl=gethostbyname
])
AC_CHECK_FUNCS(inet_ntoa, [], [
  wget_check_in_nsl=inet_ntoa
])
if test $wget_check_in_nsl != NONE; then
  AC_CHECK_LIB(nsl, $wget_check_in_nsl)
fi

AC_CHECK_LIB(socket, socket)

dnl #### This appears to be deficient with later versions of SOCKS.
if test "x${with_socks}" = xyes
then
  AC_CHECK_LIB(resolv, main)
  AC_CHECK_LIB(socks, Rconnect)
fi

dnl $with_ssl can be one of:
dnl  - empty string or "auto", meaning autodetect SSL and use it if found.
dnl  - "yes", meaning link with SSL or bail out.
dnl  - "no", meaning don't link with SSL.
dnl  - anything else, meaning use that as the SSL root, and bail out
dnl    if it fails.

if test x"$with_ssl" = x; then
  dnl Canonicalize unspecified with-ssl setting to "auto".  This
  dnl implements the "auto-detect by default" feature.  If you want to
  dnl change this to "ignore SSL by default", change "auto" to "no".
  with_ssl=auto
fi

dnl Detection of OpenSSL is much hairier than the detection of other
dnl libraries because OpenSSL can be compiled as a third-party
dnl library, which means it will not be found without additional
dnl linker magic.  It would be really nice to rework this check into
dnl an AC_DEFUN so that we can reuse it for other third-party
dnl libraries.

if test x"$with_ssl" != x"no"; then

  wget_force_ssl=no
  if test x"$with_ssl" = x"yes"; then
    wget_force_ssl=yes
  fi

  if test x"$with_ssl" = x"yes" || test x"$with_ssl" = x"auto"; then
    dnl OpenSSL's root was not specified, so we have to guess.  First
    dnl try the system default location, then "/usr/local/ssl" (where
    dnl OpenSSL installs by default), then "/usr/local" (traditional
    dnl choice for installation root), then "/opt".
    ssl_all_roots="system-default /usr/local/ssl /usr/local /opt"
  else
    dnl Root has been specified by the user.
    ssl_all_roots=$with_ssl
    wget_force_ssl=yes
  fi

  wget_save_CC=$CC
  wget_save_LIBS=$LIBS
  wget_save_LDFLAGS=$LDFLAGS
  wget_save_CPPFLAGS=$CPPFLAGS

  dnl Use libtool for OpenSSL tests so we can specify "-R<rpath>"
  dnl without having to know how the linker handles it.
  CC="$SHELL ./libtool $CC"

  dnl Unfortunately, as of this writing (OpenSSL 0.9.6), the libcrypto
  dnl shared library doesn't record its dependency on libdl, so we
  dnl need to check for it ourselves so we won't fail to link due to a
  dnl lack of -ldl.  Most OSes use dlopen(), but HP-UX uses
  dnl shl_load().
  AC_CHECK_LIB(dl,dlopen)
  AC_CHECK_LIB(dl,shl_load)

  ssl_success=no

  dnl Now try to find SSL libraries in each of the likely SSL roots.
  for ssl_root in $ssl_all_roots
  do
    if test x"$ssl_root" = x"system-default"; then
      dnl Try the default include and library locations.
      SSL_INCLUDES=
    else
      dnl Try this specific root.
      SSL_INCLUDES=-I$ssl_root/include
      dnl It's OK to use -R directly because libtool will
      dnl interpret it for us.
      LDFLAGS="-L$ssl_root/lib -R$ssl_root/lib $wget_save_LDFLAGS"
    fi

    AC_MSG_RESULT([Looking for SSL libraries in $ssl_root])

    dnl Check whether the compiler can find the include files.  On
    dnl some systems Gcc finds libraries in /usr/local/lib, but fails
    dnl to find the includes in /usr/local/include.

    ssl_found_includes=no
    CPPFLAGS="$SSL_INCLUDES $wget_save_CPPFLAGS"

    AC_MSG_CHECKING([for includes])

    AC_TRY_CPP([#include <openssl/ssl.h>
#include <openssl/rsa.h>
],
      AC_MSG_RESULT(found); ssl_found_includes=yes,
      AC_MSG_RESULT([not found])
    )

    if test x"$ssl_found_includes" = xno; then
      continue
    fi

    ssl_link_failure=no

    dnl Make sure that the checks don't run afoul of the cache.  It
    dnl would be nicer to temporarily turn off the cache, but
    dnl apparently Autoconf doesn't allow that.

    unset ac_cv_lib_crypto_RSA_new
    unset ac_cv_lib_ssl_SSL_new

    dnl These checks need to be in this order, or you'll get a link
    dnl failure if you use a static libcrypto.a and libssl.a rather
    dnl than shared libraries.

    AC_CHECK_LIB(crypto, RSA_new, , ssl_link_failure=yes)
    AC_CHECK_LIB(ssl, SSL_new, , ssl_link_failure=yes)

    if test x"$ssl_link_failure" = xyes; then
      dnl One or both libs failed to link.
      continue
    fi

    dnl The libraries link.  But we still need to check if the program
    dnl linked with those libraries under these settings with run.  On
    dnl some systems (Solaris), Gcc adds -L/usr/local/lib to the
    dnl linking line, but fails to add -R/usr/local/lib, thus creating
    dnl executables that link, but fail to run.

    dnl If we are cross-compiling, just assume that working linkage
    dnl implies working executable.

    ssl_run_failure=no

    AC_MSG_CHECKING([whether SSL libs are resolved at runtime])
    AC_TRY_RUN([
int RSA_new();
int SSL_new();
main(){return 0;}
],
      AC_MSG_RESULT(yes),
      AC_MSG_RESULT(no); ssl_run_failure=yes,
      AC_MSG_RESULT(cross)
    )

    if test x"$ssl_run_failure" = xno; then
      ssl_success=yes
      break
    fi
  done

  if test x"$ssl_success" = xyes; then
    dnl AC_MSG_RESULT doesn't look right here, but I'm not sure what
    dnl to use instead.
    AC_MSG_RESULT([Compiling in support for SSL in $ssl_root])
    AC_DEFINE(HAVE_SSL)
    AC_SUBST(SSL_INCLUDES)
    SSL_OBJ='gen_sslfunc$o'
    AC_SUBST(SSL_OBJ)
  else
    LDFLAGS=$wget_save_LDFLAGS
    LIBS=$wget_save_LIBS

    dnl If linking with SSL was forced rather than auto-detected, then
    dnl bail out if SSL failed.
    if test x"$wget_force_ssl" = x"yes"; then
      exec >&2
      echo "ERROR: Failed to find OpenSSL libraries."
      exit 2
    fi
  fi

  dnl Restore the compiler setting.
  CC=$wget_save_CC

  dnl Restore the CPPFLAGS.  Do this regardless of whether linking
  dnl with SSL succeeded -- SSL includes will be handled using
  dnl @SSL_INCLUDES at .
  CPPFLAGS=$wget_save_CPPFLAGS
fi

dnl
dnl Find an md5 implementation.
dnl

if test x"$wget_need_md5" = xyes
then
  MD5_OBJ='gen-md5$o'

  found_md5=no

  dnl Check for the system MD5 library on Solaris.  We don't check for
  dnl something simple like "MD5Update" because there are a number of
  dnl MD5 implementations that use that name.  md5_calc is, hopefully,
  dnl specific to the Solaris MD5 library.
  if test x"$found_md5" = xno; then
    AC_CHECK_LIB(md5, md5_calc, [
      dnl Some installations have bogus <md5.h> in the compiler's
      dnl include path, making the system md5 library useless.
      AC_MSG_CHECKING([whether md5.h can be included])
      AC_COMPILE_IFELSE([#include <md5.h>
                        ], [
        AC_MSG_RESULT(yes)
        AC_DEFINE(HAVE_SOLARIS_MD5)
        LIBS="-lmd5 $LIBS"
        found_md5=yes
        AC_MSG_NOTICE([using the Solaris MD5 implementation])
      ], [AC_MSG_RESULT(no)])
    ])
  fi

  dnl Then see if we're linking OpenSSL anyway; if yes, use its md5
  dnl implementation.
  if test x"$found_md5" = xno; then
    if test x"$ssl_success" = xyes; then
      AC_DEFINE(HAVE_OPENSSL_MD5)
      found_md5=yes
      AC_MSG_NOTICE([using the OpenSSL MD5 implementation])
    fi
  fi

  dnl If none of the above worked, use the one we ship with Wget.
  if test x"$found_md5" = xno; then
    AC_DEFINE(HAVE_BUILTIN_MD5)
    MD5_OBJ="$MD5_OBJ gnu-md5\$o"
    found_md5=yes
    AC_MSG_NOTICE([using the GNU MD5 implementation])
  fi
fi
AC_DEFINE(HAVE_MD5)
AC_SUBST(MD5_OBJ)

dnl **********************************************************************
dnl Checks for IPv6
dnl **********************************************************************

ipv6=
check_for_ipv6=no
AC_ARG_ENABLE(ipv6,
  AC_HELP_STRING([--disable-ipv6],[disable IPv6 support]),
  [case "${enable_ipv6}" in
  no)
    AC_MSG_NOTICE([Disabling IPv6 at user request])
    ipv6=no
    ;;
  *)
    ipv6=yes
    ;;
  esac],
  [check_for_ipv6=no]
)

if test "X$ipv6" = "Xyes" || test "X$check_for_ipv6" = "Xyes"; then
  AC_CHECK_FUNCS(getaddrinfo,[
    GETADDRINFO_AI_ADDRCONFIG(
      AC_DEFINE(
        [HAVE_GETADDRINFO_AI_ADDRCONFIG], 1, 
        [Define if the system headers support the AI_ADDRCONFIG flag.]
      )
    )
    GETADDRINFO_AI_V4MAPPED(
      AC_DEFINE(
        [HAVE_GETADDRINFO_AI_V4MAPPED], 1, 
        [Define if the system headers support the AI_V4MAPPED flag.]
      )
    )
    GETADDRINFO_AI_ALL(
      AC_DEFINE(
        [HAVE_GETADDRINFO_AI_ALL], 1, 
        [Define if the system headers support the AI_ALL flag.]
      )
    )
  ],[
    AC_MSG_NOTICE([Disabling IPv6 support: your system does not support getaddrinfo(3)])
    ipv6=no
  ])
fi
  
if test "X$ipv6" = "Xyes" || test "X$check_for_ipv6" = "Xyes"; then
  PROTO_INET6(,[
    AC_MSG_NOTICE([Disabling IPv6 support: your system does not support the PF_INET6 protocol family])
    ipv6=no
  ])
fi

if test "X$ipv6" = "Xyes" || test "X$check_for_ipv6" = "Xyes"; then
  TYPE_STRUCT_SOCKADDR_IN6([
    ipv6=yes
  ],[
    AC_MSG_NOTICE([Disabling IPv6 support: your system does not support 'struct sockaddr_in6'])
    ipv6=no
  ])
  if test "X$ipv6" = "Xyes"; then
    MEMBER_SIN6_SCOPE_ID
  fi
fi

if test "X$ipv6" = "Xyes"; then
  AC_DEFINE([ENABLE_IPV6], 1, [Define if IPv6 support is enabled.])
fi


dnl
dnl Set of available languages.
dnl
ALL_LINGUAS=`(cd ${srcdir}/po && ls *.po | sed -e 's/\.po$//' | tr '\012' ' ')`

dnl Originally this used to be static, looking like this:
dnl     ALL_LINGUAS="cs de hr it ..."
dnl The downside was that configure needed to be rebuilt whenever a
dnl new language was added.

dnl internationalization macros
WGET_WITH_NLS

dnl
dnl Find makeinfo.  If makeinfo is not found, look for Emacs.  If
dnl Emacs cannot be found, look for XEmacs.
dnl

AC_CHECK_PROGS(MAKEINFO, makeinfo emacs xemacs)

case "${MAKEINFO}" in
   *makeinfo) MAKEINFO="${MAKEINFO} \$(srcdir)/wget.texi"  ;;
   *emacs | *xemacs) MAKEINFO="${MAKEINFO} -batch -q -no-site-file -eval '(find-file \"\$(srcdir)/wget.texi\")' -l texinfmt -f texinfo-format-buffer -f save-buffer"  ;;
   *) MAKEINFO="makeinfo \$(srcdir)/wget.texi"            ;;
esac

dnl
dnl Find perl and pod2man
dnl

AC_PATH_PROGS(PERL, perl5 perl, no)
AC_PATH_PROG(POD2MAN, pod2man, no)

if test "x${POD2MAN}" = xno; then
  COMMENT_IF_NO_POD2MAN="# "
else
  COMMENT_IF_NO_POD2MAN=
fi
AC_SUBST(COMMENT_IF_NO_POD2MAN)

dnl
dnl Create output
dnl
AC_OUTPUT([Makefile src/Makefile doc/Makefile util/Makefile po/Makefile.in
           windows/Makefile],
[WGET_PROCESS_PO
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])

--- NEW FILE: Makefile.in ---
# Makefile for `Wget' utility
# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

# In addition, as a special exception, the Free Software Foundation
# gives permission to link the code of its release of Wget with the
# OpenSSL project's "OpenSSL" library (or with modified versions of it
# that use the same license as the "OpenSSL" library), and distribute
# the linked executables.  You must obey the GNU General Public License
# in all respects for all of the code used other than "OpenSSL".  If you
# modify this file, you may extend this exception to your version of the
# file, but you are not obligated to do so.  If you do not wish to do
# so, delete this exception statement from your version.

#
# Version: @VERSION@
#

SHELL = /bin/sh
@SET_MAKE@

top_builddir = .

srcdir = @srcdir@
VPATH  = @srcdir@

#
# User configuration section
#

#
# Install variables
#
prefix      = @prefix@
exec_prefix = @exec_prefix@
bindir      = @bindir@
infodir     = @infodir@
sysconfdir  = @sysconfdir@
mandir      = @mandir@
manext      = 1
localedir   = $(prefix)/share/locale

CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
DEFS = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\"
LIBS = @LIBS@
LDFLAGS = @LDFLAGS@

#
# End of user configuration section.  There should be no need to change
# anything below this line.
#

DISTNAME = wget- at VERSION@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
RM = rm -f

# These are used for maintenance only, so they are safe without
# special autoconf cruft.
FIND = find
GZIP = gzip
TAR = tar

# flags passed to recursive makes in subdirectories
MAKEDEFS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' DEFS='$(DEFS)' \
CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \
infodir='$(infodir)' mandir='$(mandir)' manext='$(manext)'

# subdirectories in the distribution
SUBDIRS = src doc po util windows

# default target
all: libtool src/config.h Makefile $(SUBDIRS)

check: all

$(SUBDIRS): FORCE
	cd $@ && $(MAKE) $(MAKEDEFS)

# install everything
install: install.bin install.info install.wgetrc \
	 install.mo @COMMENT_IF_NO_POD2MAN at install.man

# install/uninstall the binary
install.bin uninstall.bin:
	cd src && $(MAKE) $(MAKEDEFS) $@

# install/uninstall the info/man pages
install.info uninstall.info install.man uninstall.man install.wgetrc:
	cd doc && $(MAKE) $(MAKEDEFS) $@

# Install `.mo' files
install.mo:
	cd po && $(MAKE) $(MAKEDEFS) $@

# Regenerate libtool if ltconfig and/or ltmain are updated
libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status --recheck

# Create configure.bat from configure.bat.in by DOS-ifying the lines.
# This is invoked by `make dist' and deleted by `make realclean' (not
# `make distclean' because we want to preserve it for distribution).
configure.bat: $(srcdir)/configure.bat.in
	awk '{ print $$0 ($$0 ~ /\r$$/ ? "" : "\r") }' $< > $@

# create tag files for Emacs
TAGS:
	cd src && $(MAKE) $@

dist: $(srcdir)/configure $(srcdir)/configure.bat DISTFILES
	mkdir $(DISTNAME)
	for d in `$(FIND) . -type d ! -name CVS -a ! -name RCS -print`; do \
		if [ "$$d" != "." -a "$$d" != "./$(DISTNAME)" ]; then \
			mkdir $(DISTNAME)/$$d; \
		fi; \
	done
	for f in `cat DISTFILES`; do \
		ln $(srcdir)/$$f $(DISTNAME)/$$f || \
		{ echo copying $$f; cp -p $(srcdir)/$$f $(DISTNAME)/$$f ; } \
	done
	(cd $(DISTNAME); $(MAKE) distclean)
	$(TAR) chvf - $(DISTNAME) | $(GZIP) -c --best >$(DISTNAME).tar.gz
	$(RM) -r $(DISTNAME)
	$(RM) DISTFILES

DISTFILES: FORCE
	rm -rf $(DISTNAME)	
	(cd $(srcdir); find . ! -type d -print) \
	| sed '/\/\(CVS\|RCS\)\//d; \
		/$@/d; \
		/\.tar.*/d; \
	  	s/^.\///; /^\.$$/d;' \
	| sort | uniq > $@

#
# Cleanup dependencies
#

clean:		clean-recursive		clean-top
distclean:	distclean-recursive	distclean-top
realclean:	realclean-recursive	realclean-top

clean-top:
	$(RM) *~ *.bak $(DISTNAME).tar.gz
	$(RM) -r .libs

distclean-top: clean-top
	$(RM) Makefile config.status config.log config.cache libtool stamp-h
	$(RM) -r autom4te.cache

realclean-top: distclean-top
	$(RM) configure configure.bat

clean-recursive distclean-recursive realclean-recursive:
	for subdir in $(SUBDIRS); do \
	   target=`echo $@ | sed s/-recursive//`; \
	   (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \
	done

#
# Dependencies for maintenance
#

Makefile: Makefile.in config.status
	CONFIG_HEADERS= ./config.status

config.status: configure
	./config.status --recheck

configure: configure.in aclocal.m4
	cd $(srcdir) && autoconf

src/config.h: stamp-h
stamp-h: src/config.h.in config.status
	CONFIG_FILES= CONFIG_HEADERS=src/config.h ./config.status

src/config.h.in: stamp-h.in
stamp-h.in: configure.in aclocal.m4
	echo timestamp > $@

FORCE:


--- NEW FILE: Makefile ---
#
# build using configure as best we can, should work for most targets
# David McCullough <davidm at snapgear.com>
#

all: build
	$(MAKE) -C build

build: Makefile
	rm -rf build
	mkdir build
	chmod u+x configure
	( \
		cd build; \
		export CC="$(CC) $(CFLAGS)"; \
		export LDFLAGS="$(LDFLAGS)"; \
		export LIBS="$(LDLIBS)"; \
		../configure --host $(CROSS_COMPILE:-=) --prefix= ; \
	)

romfs:
	$(ROMFSINST) build/src/wget /bin/wget

clean:
	rm -rf build


--- NEW FILE: README ---
                                                          -*- text -*-
GNU Wget
========
                             Current Web home: http://wget.sunsite.dk/

GNU Wget is a free utility for non-interactive download of files from
the Web.  It supports HTTP, HTTPS, and FTP protocols, as well as
retrieval through HTTP proxies.

It can follow links in HTML pages and create local versions of remote
web sites, fully recreating the directory structure of the original
site.  This is sometimes referred to as "recursive downloading."
While doing that, Wget respects the Robot Exclusion Standard
(/robots.txt).  Wget can be instructed to convert the links in
downloaded HTML files to the local files for offline viewing.

Recursive downloading also works with FTP, where Wget can retrieves a
hierarchy of directories and files.

With both HTTP and FTP, Wget can check whether a remote file has
changed on the server since the previous run, and only download the
newer files.

Wget has been designed for robustness over slow or unstable network
connections; if a download fails due to a network problem, it will
keep retrying until the whole file has been retrieved.  If the server
supports regetting, it will instruct the server to continue the
download from where it left off.

If you are behind a firewall that requires the use of a socks style
gateway, you can get the socks library and compile wget with support
for socks.

Most of the features are configurable, either through command-line
options, or via initialization file .wgetrc.  Wget allows you to
install a global startup file (/usr/local/etc/wgetrc by default) for
site settings.

Wget works under almost all Unix variants in use today and, unlike
many of its historical predecessors, is written entirely in C, thus
requiring no additional software, such as Perl.  The external software
it does work with, such as OpenSSL, is optional.  As Wget uses the GNU
Autoconf, it is easily built on and ported to new Unix-like systems.
The installation procedure is described in the INSTALL file.

As with other GNU software, the latest version of Wget can be found at
the master GNU archive site ftp.gnu.org, and its mirrors.  Wget
resides at <ftp://ftp.gnu.org/pub/gnu/wget/>.

Please report bugs in Wget to <bug-wget at gnu.org>.

See the file `MAILING-LIST' for information about Wget mailing lists.
Wget's home page is temporarily at <http://wget.sunsite.dk/>.  It is
being migrated to <http://www.gnu.org/software/wget/>, where will be
its permanent home.


MAINTAINER: Hrvoje Niksic <hniksic at xemacs.org>

Wget was originally written by Hrvoje Niksic.  Please see the file
AUTHORS for a list of major contributors, and the ChangeLogs for a
detailed listing of all contributions.


Copyright (C) 2003 Free Software Foundation, Inc.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

In addition, as a special exception, the Free Software Foundation
gives permission to link the code of its release of Wget with the
OpenSSL project's "OpenSSL" library (or with modified versions of it
that use the same license as the "OpenSSL" library), and distribute
the linked executables.  You must obey the GNU General Public License
in all respects for all of the code used other than "OpenSSL".  If you
modify this file, you may extend this exception to your version of the
file, but you are not obligated to do so.  If you do not wish to do
so, delete this exception statement from your version.

--- NEW FILE: Makefile.cvs ---
# Makefile for preparing the sources after CVS checkout.
# Copyright (C) 2000 Karl Eichwalder.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

# In addition, as a special exception, the Free Software Foundation
# gives permission to link the code of its release of Wget with the
# OpenSSL project's "OpenSSL" library (or with modified versions of it
# that use the same license as the "OpenSSL" library), and distribute
# the linked executables.  You must obey the GNU General Public License
# in all respects for all of the code used other than "OpenSSL".  If you
# modify this file, you may extend this exception to your version of the
# file, but you are not obligated to do so.  If you do not wish to do
# so, delete this exception statement from your version.

#
# Usage:
#
#     make -f Makefile.cvs
#

SHELL = /bin/sh

prep:
	autoconf

# The following two targets are pretty lame because we don't know that
# the user wants to configure in `.', just like we don't know whether
# the `make' program is called `make'.  I'm keeping them for the sake
# of the users who expect to find them.  I don't want to make this
# file complicated by implementing smarter detections -- the user who
# needs different behavior should simply run `make -f Makefile.cvs'
# and proceed as he would have normally.

configure: prep
	./configure

make: configure
	make

--- NEW FILE: INSTALL ---
                                                                   -*- 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

  --prefix=PREFIX         install architecture-independent files in PREFIX
                          (/usr/local by default)
  --bindir=DIR            user executables in DIR (PREFIX/bin)
  --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]

--enable and --with options recognized (mostly Wget-specific):
  --with-socks            use the socks library
  --with-ssl[=SSL_ROOT]   link with libssl [in SSL_ROOT/lib] for https: support
  --disable-opie          disable support for opie or s/key FTP login
  --disable-digest        disable support for HTTP digest authorization
  --disable-debug         disable support for debugging output
  --disable-nls           do not use Native Language 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 use socks, it is useful to add -L/usr/local/lib (or wherever
the socks library is installed) to LDFLAGS in Makefile.

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.

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 virtually anywhere.

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

Use `make install' to install GNU Wget to directories specified to
configure (/usr/local/* by default).

The standard installation process will copy the wget binary to
/usr/local/bin, install the info pages (wget.info*) to
/usr/local/info.  You can customize the 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.

--- NEW FILE: aclocal.m4 ---
dnl
dnl Check for `struct utimbuf'.
dnl

AC_DEFUN([WGET_STRUCT_UTIMBUF],
[AC_MSG_CHECKING([for struct utimbuf])
if test x"$ac_cv_header_utime_h" = xyes; then
  AC_EGREP_CPP([struct[ 	]+utimbuf],
    [#include <utime.h>],
    [AC_DEFINE(HAVE_STRUCT_UTIMBUF)
      AC_MSG_RESULT(yes)],
    AC_MSG_RESULT(no))
else
  AC_MSG_RESULT(no)
fi])


dnl Check for socklen_t.  The third argument of accept, getsockname,
dnl etc. is int * on some systems, but size_t * on others.  POSIX
dnl finally standardized on socklen_t, but older systems don't have
dnl it.  If socklen_t exists, we use it, else if accept() accepts
dnl size_t *, we use that, else we use int.

AC_DEFUN([WGET_SOCKLEN_T], [
  AC_MSG_CHECKING(for socklen_t)
  AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
socklen_t x;
],
    [], [AC_MSG_RESULT(yes)], [
      AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
int accept (int, struct sockaddr *, size_t *);
],
      [], [
      AC_MSG_RESULT(size_t)
      AC_DEFINE(socklen_t, size_t)
    ], [
      AC_MSG_RESULT(int)
      AC_DEFINE(socklen_t, int)
    ])
  ])
])

dnl Check whether fnmatch.h can be included.  This doesn't use
dnl AC_FUNC_FNMATCH because Wget is already careful to only use
dnl fnmatch on certain OS'es.  However, fnmatch.h is sometimes broken
dnl even on those because Apache installs its own fnmatch.h to
dnl /usr/local/include (!), which GCC uses before /usr/include.

AC_DEFUN([WGET_FNMATCH], [
  AC_MSG_CHECKING([for working fnmatch.h])
  AC_COMPILE_IFELSE([#include <fnmatch.h>
                    ], [
    AC_MSG_RESULT(yes)
    AC_DEFINE(HAVE_WORKING_FNMATCH_H)
  ], [
    AC_MSG_RESULT(no)
  ])
])

dnl
dnl ansi2knr support: check whether C prototypes are available.
dnl

AC_DEFUN(AM_C_PROTOTYPES,
[AC_REQUIRE([AM_PROG_CC_STDC])
AC_BEFORE([$0], [AC_C_INLINE])
AC_MSG_CHECKING([for function prototypes])
if test "$am_cv_prog_cc_stdc" != no; then
  AC_MSG_RESULT(yes)
  AC_DEFINE(PROTOTYPES)
  U= ANSI2KNR=
else
  AC_MSG_RESULT(no)
  U=_ ANSI2KNR=./ansi2knr
  # Ensure some checks needed by ansi2knr itself.
  AC_HEADER_STDC
  AC_CHECK_HEADERS(string.h)
fi
AC_SUBST(U)dnl
AC_SUBST(ANSI2KNR)dnl
])


# serial 1

# @defmac AC_PROG_CC_STDC
# @maindex PROG_CC_STDC
# @ovindex CC
# If the C compiler in not in ANSI C mode by default, try to add an option
# to output variable @code{CC} to make it so.  This macro tries various
# options that select ANSI C on some system or another.  It considers the
# compiler to be in ANSI C mode if it defines @code{__STDC__} to 1 and
# handles function prototypes correctly.
#
# If you use this macro, you should check after calling it whether the C
# compiler has been set to accept ANSI C; if not, the shell variable
# @code{am_cv_prog_cc_stdc} is set to @samp{no}.  If you wrote your source
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
# program @code{ansi2knr}, which comes with Ghostscript.
# @end defmac

AC_DEFUN(AM_PROG_CC_STDC,
[AC_REQUIRE([AC_PROG_CC])
AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
AC_CACHE_VAL(am_cv_prog_cc_stdc,
[am_cv_prog_cc_stdc=no
ac_save_CC="$CC"
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX			-qlanglvl=ansi
# Ultrix and OSF/1	-std1
# HP-UX			-Aa -D_HPUX_SOURCE
for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE"
do
  CC="$ac_save_CC $ac_arg"
  AC_TRY_COMPILE(
[#if !defined(__STDC__)
choke me
#endif
/* DYNIX/ptx V4.1.3 can't compile sys/stat.h with -Xc -D__EXTENSIONS__. */
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/stat.h>
#endif
], [
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};],
[am_cv_prog_cc_stdc="$ac_arg"; break])
done
CC="$ac_save_CC"
])
AC_MSG_RESULT($am_cv_prog_cc_stdc)
case "x$am_cv_prog_cc_stdc" in
  x|xno) ;;
  *) CC="$CC $am_cv_prog_cc_stdc" ;;
esac
])


dnl ************************************************************
dnl START OF IPv6 AUTOCONFIGURATION SUPPORT MACROS
dnl ************************************************************

AC_DEFUN([TYPE_STRUCT_SOCKADDR_IN6],[
  ds6_have_sockaddr_in6=
  AC_CHECK_TYPES([struct sockaddr_in6],[
    ds6_have_sockaddr_in6=yes
  ],[
    ds6_have_sockaddr_in6=no
  ],[
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
  ])

  if test "X$ds6_have_sockaddr_in6" = "Xyes"; then :
    $1
  else :
    $2
  fi
])


AC_DEFUN([MEMBER_SIN6_SCOPE_ID],[
  AC_REQUIRE([TYPE_STRUCT_SOCKADDR_IN6])
  
  ds6_member_sin6_scope_id=
  if test "X$ds6_have_sockaddr_in6" = "Xyes"; then
    AC_CHECK_MEMBER([struct sockaddr_in6.sin6_scope_id],[
      ds6_member_sin6_scope_id=yes
    ],[
      ds6_member_sin6_scope_id=no
    ],[
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
    ])
  fi

  if test "X$ds6_member_sin6_scope_id" = "Xyes"; then
    AC_DEFINE([HAVE_SOCKADDR_IN6_SCOPE_ID], 1,
      [Define if struct sockaddr_in6 has the sin6_scope_id member])
    $1
  else :
    $2
  fi
])


AC_DEFUN([PROTO_INET6],[
  AC_CACHE_CHECK([for INET6 protocol support], [ds6_cv_proto_inet6],[
    AC_TRY_CPP([
#include <sys/types.h>
#include <sys/socket.h>

#ifndef PF_INET6
#error Missing PF_INET6
#endif
#ifndef AF_INET6
#error Mlssing AF_INET6
#endif
    ],[
      ds6_cv_proto_inet6=yes
    ],[
      ds6_cv_proto_inet6=no
    ])
  ])

  if test "X$ds6_cv_proto_inet6" = "Xyes"; then :
    $1
  else :
    $2
  fi
])


AC_DEFUN([GETADDRINFO_AI_ADDRCONFIG],[
  AC_CACHE_CHECK([if getaddrinfo supports AI_ADDRCONFIG],
    [ds6_cv_gai_ai_addrconfig],[
    AC_TRY_CPP([
#include <netdb.h>

#ifndef AI_ADDRCONFIG
#error Missing AI_ADDRCONFIG
#endif
    ],[
      ds6_cv_gai_ai_addrconfig=yes
    ],[
      ds6_cv_gai_ai_addrconfig=no
    ])
  ])

  if test "X$ds6_cv_gai_ai_addrconfig" = "Xyes"; then :
    $1
  else :
    $2
  fi
])


AC_DEFUN([GETADDRINFO_AI_ALL],[
  AC_CACHE_CHECK([if getaddrinfo supports AI_ALL],[ds6_cv_gai_ai_all],[
    AC_TRY_CPP([
#include <netdb.h>

#ifndef AI_ALL
#error Missing AI_ALL
#endif
    ],[
      ds6_cv_gai_ai_all=yes
    ],[
      ds6_cv_gai_ai_all=no
    ])
  ])

  if test "X$ds6_cv_gai_ai_all" = "Xyes"; then :
    $1
  else :
    $2
  fi
])


AC_DEFUN([GETADDRINFO_AI_V4MAPPED],[
  AC_CACHE_CHECK([if getaddrinfo supports AI_V4MAPPED],[ds6_cv_gai_ai_v4mapped],[
    AC_TRY_CPP([
#include <netdb.h>

#ifndef AI_V4MAPPED
#error Missing AI_V4MAPPED
#endif
    ],[
      ds6_cv_gai_ai_v4mapped=yes
    ],[
      ds6_cv_gai_ai_v4mapped=no
    ])
  ])

  if test "X$ds6_cv_gai_ai_v4mapped" = "Xyes"; then :
    $1
  else :
    $2
  fi
])

dnl ************************************************************
dnl END OF IPv6 AUTOCONFIGURATION SUPPORT MACROS
dnl ************************************************************

# This code originates from Ulrich Drepper's AM_WITH_NLS.

AC_DEFUN(WGET_WITH_NLS,
  [AC_MSG_CHECKING([whether NLS is requested])
    dnl Default is enabled NLS
    AC_ARG_ENABLE(nls,
      [  --disable-nls           do not use Native Language Support],
      HAVE_NLS=$enableval, HAVE_NLS=yes)
    AC_MSG_RESULT($HAVE_NLS)

    dnl If something goes wrong, we may still decide not to use NLS.
    dnl For this reason, defer AC_SUBST'ing HAVE_NLS until the very
    dnl last moment.

    if test x"$HAVE_NLS" = xyes; then
      AC_MSG_RESULT([language catalogs: $ALL_LINGUAS])
      AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
	[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
      AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
      AC_SUBST(MSGFMT)
      AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
      CATOBJEXT=.gmo
      INSTOBJEXT=.mo
      DATADIRNAME=share

      dnl Test whether we really found GNU xgettext.
      if test "$XGETTEXT" != ":"; then
	dnl If it is no GNU xgettext we define it as : so that the
	dnl Makefiles still can work.
	if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
	  : ;
	else
	  AC_MSG_RESULT(
	    [found xgettext programs is not GNU xgettext; ignore it])
	  XGETTEXT=":"
	fi
      fi

      AC_CHECK_HEADERS(locale.h libintl.h)

      dnl Prefer gettext found in -lintl to the one in libc.
      dnl Otherwise it can happen that we include libintl.h from
      dnl /usr/local/lib, but fail to specify -lintl, which results in
      dnl link or run-time failures.  (Symptom: libintl_bindtextdomain
      dnl not found at link-time.)

      AC_CHECK_LIB(intl, gettext, [
        dnl gettext is in libintl; announce the fact manually.
        LIBS="-lintl $LIBS"
	AC_DEFINE(HAVE_GETTEXT)
      ], [
        AC_CHECK_FUNCS(gettext, [], [
          AC_MSG_RESULT([gettext not found; disabling NLS])
          HAVE_NLS=no
        ])
      ])

      dnl These rules are solely for the distribution goal.  While doing this
      dnl we only have to keep exactly one list of the available catalogs
      dnl in configure.in.
      for lang in $ALL_LINGUAS; do
	GMOFILES="$GMOFILES $lang.gmo"
	POFILES="$POFILES $lang.po"
      done
      dnl Construct list of names of catalog files to be constructed.
      for lang in $ALL_LINGUAS; do
        CATALOGS="$CATALOGS ${lang}${CATOBJEXT}"
      done

      dnl Make all variables we use known to autoconf.
      AC_SUBST(CATALOGS)
      AC_SUBST(CATOBJEXT)
      AC_SUBST(DATADIRNAME)
      AC_SUBST(GMOFILES)
      AC_SUBST(INSTOBJEXT)
      AC_SUBST(INTLLIBS)
      AC_SUBST(POFILES)
    fi
    AC_SUBST(HAVE_NLS)
    dnl Some independently maintained files, such as po/Makefile.in,
    dnl use `USE_NLS', so support it.
    USE_NLS=$HAVE_NLS
    AC_SUBST(USE_NLS)
    if test "x$HAVE_NLS" = xyes; then
      AC_DEFINE(HAVE_NLS)
    fi
  ])

dnl Generate list of files to be processed by xgettext which will
dnl be included in po/Makefile.
dnl
dnl This is not strictly an Autoconf macro, because it is run from
dnl within `config.status' rather than from within configure.  This
dnl is why special rules must be applied for it.
AC_DEFUN(WGET_PROCESS_PO,
  [
   dnl I wonder what the following several lines do...
   if test "x$srcdir" != "x."; then
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
       posrcprefix="$srcdir/"
     else
       posrcprefix="../$srcdir/"
     fi
   else
     posrcprefix="../"
   fi
   rm -f po/POTFILES
   dnl Use `echo' rather than AC_MSG_RESULT, because this is run from
   dnl `config.status'.
   echo "generating po/POTFILES from $srcdir/po/POTFILES.in"
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\,"  \
       -e "\$s/\(.*\) \\\\/\1/" \
        < $srcdir/po/POTFILES.in > po/POTFILES
   echo "creating po/Makefile"
   sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
  ])

# Search path for a program which passes the given test.
# Ulrich Drepper <drepper at cygnus.com>, 1996.
#
# This file may be copied and used freely without restrictions.  It
# can be used in projects which are not available under the GNU Public
# License but which still want to provide support for the GNU gettext
# functionality.  Please note that the actual code is *not* freely
# available.

# serial 1

dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN(AM_PATH_PROG_WITH_TEST,
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word])
AC_CACHE_VAL(ac_cv_path_$1,
[case "[$]$1" in
  /*)
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if [$3]; then
	ac_cv_path_$1="$ac_dir/$ac_word"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
dnl If no 4th arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
])dnl
  ;;
esac])dnl
$1="$ac_cv_path_$1"
if test -n "[$]$1"; then
  AC_MSG_RESULT([$]$1)
else
  AC_MSG_RESULT(no)
fi
AC_SUBST($1)dnl
])

# Include libtool code.

builtin(include, libtool.m4)dnl

--- NEW FILE: NEWS ---
GNU Wget NEWS -- history of user-visible changes.

Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
See the end for copying conditions.

Please send GNU Wget bug reports to <bug-wget at gnu.org>.

* Wget 1.9.1 is a bugfix release with no user-visible changes.

* Changes in Wget 1.9.

** It is now possible to specify that POST method be used for HTTP
requests.  For example, `wget --post-data="id=foo&data=bar" URL' will
send a POST request with the specified contents.

** IPv6 support is available, although it's still experimental.

** The `--timeout' option now also affects DNS lookup and establishing
the TCP connection.  Previously it only affected reading and writing
data.  Those three timeouts can be set separately using
`--dns-timeout', `--connection-timeout', and `--read-timeout',
respectively.

** Download speed shown by the progress bar is based on the data
recently read, rather than the average speed of the entire download.
The ETA projection is still based on the overall average.

** It is now possible to connect to FTP servers through FWTK
firewalls.  Set ftp_proxy to an FTP URL, and Wget will automatically
log on to the proxy as "username at host".

** The new option `--retry-connrefused' makes Wget retry downloads
even in the face of refused connections, which are otherwise
considered a fatal error.

** The new option `--dns-cache=off' may be used to prevent Wget from
caching DNS lookups.

** Wget no longer escapes characters in local file names based on
whether they're appropriate in URLs.  Escaping can still occur for
nonprintable characters or for '/', but no longer for frequent
characters such as space.  You can use the new option
--restrict-file-names to relax or strengthen these rules, which can be
useful if you dislike the default or if you're downloading to
non-native partitions.

** Handling of HTML comments has been dumbed down to conform to what
users expect and other browsers do: instead of being treated as SGML
declaration, a comment is terminated at the first occurrence of "-->".
Use `--strict-comments' to revert to the old behavior.

** Wget now correctly handles relative URIs that begin with "//", such
as "//img.foo.com/foo.jpg".

** Boolean options in `.wgetrc' and on the command line now accept
values "yes" and "no" along with the traditional "on" and "off".

** It is now possible to specify decimal values for timeouts, waiting
periods, and download rate.  For instance, `--wait=0.5' now works as
expected, as does `--dns-timeout=0.5' and even `--limit-rate=2.5k'.

* Wget 1.8.2 is a bugfix release with no user-visible changes.

* Wget 1.8.1 is a bugfix release with no user-visible changes.

* Changes in Wget 1.8.

** A new progress indicator is now available and used by default.
You can choose the progress bar type with `--progress=TYPE'.  Two
types are available, "bar" (the new default), and "dot" (the old
dotted indicator).  You can permanently revert to the old progress
indicator by putting `progress = dot' in your `.wgetrc'.

** You can limit the download rate of the retrieval using the
`--limit-rate' option.  For example, `wget --limit-rate=15k URL' will
tell Wget not to download the body of the URL faster than 15 kilobytes
per second.

** Recursive retrieval and link conversion have been revamped:

*** Wget now traverses links breadth-first.  This makes the
calculation of depth much more reliable than before.  Also, recursive
downloads are faster and consume *significantly* less memory than
before.

*** Links are converted only when the entire retrieval is complete.
This is the only safe thing to do, as only then is it known what URLs
have been downloaded.

*** BASE tags are handled correctly when converting links.  Since Wget
already resolves <base href="..."> when resolving handling URLs, link
conversion now makes the BASE tags point to an empty string.

*** HTML anchors are now handled correctly.  Links to an anchor in the
same document (<a href="#anchorname">), which used to confuse Wget,
are now converted correctly.

*** When in page-requisites (-p) mode, no-parent (-np) is ignored when
retrieving for inline images, stylesheets, and other documents needed
to display the page.

*** Page-requisites (-p) mode now works with frames.  In other words,
`wget -p URL-THAT-USES-FRAMES' will now download the frame HTML files,
and all the files that they need to be displayed properly.

** `--base' now works conjunction with `--input-file', providing a
base for each URL and thereby allowing the URLs in the file to be
relative.

** If a host has more than one IP address, Wget uses the other
addresses when accessing the first one fails.

** Host directories now contain port information if the URL is at a
non-standard port.

** Wget now supports the robots.txt directives specified in
<http://www.robotstxt.org/wc/norobots-rfc.txt>.

** URL parser has been fixed, especially the infamous overzealous
quoting.  Wget no longer dequotes reserved characters, e.g. `%3F' is
no longer translated to `?', nor `%2B' to `+'.  Unsafe characters
which are not reserved are still escaped, of course.

** No more than 20 successive redirections are allowed.

* Wget 1.7.1 is a bugfix release with no user-visible changes.

* Changes in Wget 1.7.

** SSL (`https') pages now work if you compile Wget with SSL support;
use the `--with-ssl' configure flag.  You need to have OpenSSL
installed.

** Cookies are now supported.  Wget will accept cookies sent by the
server and return them in later requests.  Additionally, it can load
and save cookies to disk, in the same format that Netscape uses.

** "Keep-alive" (persistent) HTTP connections are now supported.
Using keep-alive allows Wget to share one TCP/IP connection for
many retrievals, making multiple-file downloads faster and less
stressing for the server and the network.

** Wget now recognizes FTP directory listings generated by NT and VMS
servers.

** It is now possible to recurse through FTP sites where logging in
puts you in some directory other than '/'.

** You may now use `~' to mean home directory in `.wgetrc'.  For
example, `load_cookies = ~/.netscape/cookies.txt' works as you would
expect.

** The HTML parser has been rewritten.  The new one works more
reliably, allows finer-grained control over which tags and attributes
are detected, and has better support for some features like correctly
skipping comments and declarations, decoding entities, etc.  It is
also more general.

** <meta name="robots"> tags are now respected.

** Wget's internal tables now use hash tables instead of linked lists
where appropriate.  This results in huge speedups when retrieving
large sites (thousands of documents).

** Wget now has a man page, automatically generated from the Texinfo
documentation.  (The last version that shipped with a man page was
1.4.5).  To get this, you need to have pod2man from the Perl
distribution installed on your system.

* Changes in Wget 1.6

** Administrative changes.

*** Maintainership.  Due to Hrvoje being plagued with a "real job",
Dan Harkless is the most active maintainer (not that he doesn't have a
real job as well).  Hrvoje still participates occasionally, and both
are being helped by many other people.

*** Web page.  Thanks to Jan Prikryl, Wget has an "official" web page.
Take a look at:

    http://sunsite.dk/wget/

*** Anonymous CVS.  Thanks to ever-helpful Karsten Thygesen, Wget
sources are now available at an anonymous CVS server.  Take a look at
the web page for downloading instructions.

** New -K / --backup-converted / backup_converted = on option causes files
modified due to -k to be saved with a .orig prefix before being changed.  When
using -N as well, it is these .orig files that are compared against the server.

** New --follow-tags / follow_tags = ... option allows you to restrict
Wget to following only certain HTML tags when doing a recursive
retrieval.  -G / --ignore-tags / ignore_tags = ... is just the
opposite -- all tags but the ones you specify will be followed.

** New --waitretry / waitretry = SECONDS option allows waiting between retries
of failed downloads.  Wget will use "linear" backoff, waiting 1 second after the
first failure, 2 after the second, up to SECONDS.  waitretry is set to 10 by
default in the system wgetrc.

** New -p / --page-requisites / page_requisites = on option causes
Wget to download all ancillary files necessary to display a given HTML
page properly (e.g. inlined images).

** New -E / --html-extension / html_extension = on option causes Wget
to append ".html" to text/html filenames not ending in regexp
"\.[Hh][Tt][Mm][Ll]?".

** New type of .wgetrc command -- "lockable Boolean".  Can be set to on, off,
always, or never.  This allows the .wgetrc to override the commandline.  So far,
passive_ftp is the only .wgetrc command which takes a lockable Boolean.

** A number of new translation files have been added.

** New --bind-address / bind_address = <address> option for people on hosts 
bound to multiple IP addresses.

** wget now accepts (illegal per HTTP spec) relative URLs in HTTP redirects.

* Wget 1.5.3 is a bugfix release with no user-visible changes.

* Wget 1.5.2 is a bugfix release with no user-visible changes.

* Wget 1.5.1 is a bugfix release with no user-visible changes.

* Changes in Wget 1.5.0

** Wget speaks many languages!

On systems with gettext(), Wget will output messages in the language
set by the current locale, if available.  At this time we support
Czech, German, Croatian, Italian, Norwegian and Portuguese.

** Opie (Skey) is now supported with FTP.

** HTTP Digest Access Authentication (RFC2069) is now supported.

** The new `-b' option makes Wget go to background automatically.

** The `-I' and `-X' options now accept wildcard arguments.

** The `-w' option now accepts suffixes `s' for seconds, `m' for
minutes, `h' for hours, `d' for days and `w' for weeks.

** Upon getting SIGHUP, the whole previous log is now copied to
`wget-log'.

** Wget now understands proxy settings with explicit usernames and
passwords, e.g. `http://user:password@proxy.foo.com/'.

** You can use the new `--cut-dirs' option to make Wget create less
directories.

** The `;type=a' appendix to FTP URLs is now recognized.  For
instance, the following command will retrieve the welcoming message in
ASCII type transfer:

    wget "ftp://ftp.somewhere.com/welcome.msg;type=a"

** `--help' and `--version' options have been redone to to conform to
standards set by other GNU utilities.

** Wget should now be compilable under MS Windows environment.  MS
Visual C++ and Watcom C have been used successfully.

** If the file length is known, percentages are displayed during
download.

** The manual page, now hopelessly out of date, is no longer
distributed with Wget.

* Wget 1.4.5 is a bugfix release with no user-visible changes.

* Wget 1.4.4 is a bugfix release with no user-visible changes.

* Changes in Wget 1.4.3

** Wget is now a GNU utility.

** Can do passive FTP.

** Reads .netrc.

** Info documentation expanded.

** Compiles on pre-ANSI compilers.

** Global wgetrc now goes to /usr/local/etc (i.e. $sysconfdir).

** Lots of bugfixes.

* Changes in Wget 1.4.2

** New mirror site at ftp://sunsite.auc.dk/pub/infosystems/wget/,
thanks to Karsten Thygesen.

** Mailing list!  Mail to wget-request at sunsite.auc.dk to subscribe.

** New option --delete-after for proxy prefetching.

** New option --retr-symlinks to retrieve symbolic links like plain
files.

** rmold.pl -- script to remove files deleted on the remote server

** --convert-links should work now.

** Minor bugfixes.

* Changes in Wget 1.4.1

** Minor bugfixes.

** Added -I (the opposite of -X).

** Dot tracing is now customizable; try wget --dot-style=binary

* Changes in Wget 1.4.0

** Wget 1.4.0 [formerly known as Geturl] is an extensive rewrite of
Geturl.  Although many things look suspiciously similar, most of the
stuff was rewritten, like recursive retrieval, HTTP, FTP and mostly
everything else.  Wget should be now easier to debug, maintain and,
most importantly, use.

** Recursive HTTP should now work without glitches, even with Location
changes, server-generated directory listings and other naughty stuff.

** HTTP regetting is supported on servers that support Range
specification. WWW authorization is supported -- try
wget http://user:password@hostname/

** FTP support was rewritten and widely enhanced. Globbing should now
work flawlessly. Symbolic links are created locally. All the
information the Unix-style ls listing can give is now recognized.

** Recursive FTP is supported, e.g.
    wget -r ftp://gnjilux.cc.fer.hr/pub/unix/util/

** You can specify "rejected" directories, to which you do not want to
enter, e.g. with wget -X /pub

** Time-stamping is supported, with both HTTP and FTP. Try wget -N URL.

** A new texinfo reference manual is provided.  It can be read with
Emacs, standalone info, or converted to HTML, dvi or postscript.

** Fixed a long-standing bug, so that Wget now works over SLIP
connections.

** You can have a system-wide wgetrc (/usr/local/lib/wgetrc by
default). Settings in $HOME/.wgetrc override the global ones, of
course :-)

** You can set up quota in .wgetrc to prevent sucking too much
data. Try `quota = 5M' in .wgetrc (or quota = 100K if you want your
sysadmin to like you).

** Download rate is printed after retrieval.

** Wget now sends the `Referer' header when retrieving
recursively.

** With the new --no-parent option Wget can retrieve FTP recursively
through a proxy server.

** HTML parser, as well as the whole of Wget was rewritten to be much
faster and less memory-consuming (yes, both).

** Absolute links can be converted to relative links locally. Check
wget -k.

** Wget catches hangup, filtering the output to a log file and
resuming work. Try kill -HUP %?wget.

** User-defined headers can be sent.  Try

    wget http://fly.cc.her.hr/ --header='Accept-Charset: iso-8859-2'

** Acceptance/Rejection lists may contain wildcards.

** Wget can display HTTP headers and/or FTP server response with the
new `-S' option.  It can save the original HTTP headers with `-s'.

** socks library is now supported (thanks to Antonio Rosella
<Antonio.Rosella at agip.it>). Configure with --with-socks.

** There is a nicer display of REST-ed output.

** Many new options (like -x to force directory hierarchy, or -m to
turn on mirroring options).

** Wget is now distributed under GNU General Public License (GPL).

** Lots of small features I can't remember. :-)

** A host of bugfixes.

* Changes in Geturl 1.3

** Added FTP globbing support (ftp://fly.cc.fer.hr/*)

** Added support for no_proxy

** Added support for ftp://user:password@host/

** Added support for %xx in URL syntax

** More natural command-line options

** Added -e switch to execute .geturlrc commands from the command-line

** Added support for robots.txt

** Fixed some minor bugs

* Geturl 1.2 is a bugfix release with no user-visible changes.

* Changes in Geturl 1.1

** REST supported in FTP

** Proxy servers supported

** GNU getopt used, which enables command-line arguments to be ordered
as you wish, e.g.  geturl http://fly.cc.fer.hr/ -vo log is the same as
geturl -vo log http://fly.cc.fer.hr/

** Netscape-compatible URL syntax for HTTP supported: host[:port]/dir/file

** NcFTP-compatible colon URL syntax for FTP supported: host:/dir/file

** <base href="xxx"> supported

** autoconf supported

----------------------------------------------------------------------
Copyright information:

Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.

   Permission is granted to anyone to make or distribute verbatim
   copies of this document as received, in any medium, provided that
   the copyright notice and this permission notice are preserved, thus
   giving the recipient permission to redistribute in turn.

   Permission is granted to distribute modified versions of this
   document, or of portions of it, under the above conditions,
   provided also that they carry prominent notices stating who last
   changed them.

--- NEW FILE: TODO ---
                                 Hey Emacs, this is -*- outline -*- mode

This is the to-do list for GNU Wget.  There is no timetable of when we
plan to implement these features -- this is just a list of features
we'd like to see in Wget, as well as a list of problems that need
fixing.  Patches to implement these items are likely to be accepted,
especially if they follow the coding convention outlined in PATCHES
and if they patch the documentation as well.

The items are not listed in any particular order (except that
recently-added items may tend towards the top).  Not all of these
represent user-visible changes.

* Currently Wget mirrors remote FTP permissions whenever it retrieves
  the directory listing.  This is undesirable for most users, as
  permissions like "664" are frequently used on the servers, which
  might not be what the user wants.  Wget should be changed not to
  mirror remote FTP permissions by default.  There should be a new
  option add an option that enables this back on.

* Honor `Content-Disposition: XXX; filename="FILE"' when creating the
  file name.  If possible, try not to break `-nc' and friends when
  doing that.

* Should allow retries with multiple downloads when using -O on
  regular files.  As the source comment says: "A possible solution to
  [rewind not working with multiple downloads] would be to remember
  the file position in the output document and to seek to that
  position, instead of rewinding."

  But the above won't work for -O/dev/stdout, when stdout is a pipe.
  An even better solution would be to simply keep writing to the same
  file descriptor each time, instead of reopening it in append mode.

* Wget shouldn't delete rejected files that were not downloaded, but
  just found on disk because of `-nc'.  For example, `wget -r -nc
  -A.gif URL' should allow the user to get all the GIFs without
  removing any of the existing HTML files.

* Be careful not to lose username/password information given for the
  URL on the command line.

* Add a --range parameter allowing you to explicitly specify a range
  of bytes to get from a file over HTTP (FTP only supports ranges
  ending at the end of the file, though forcibly disconnecting from
  the server at the desired endpoint might be workable).

* If multiple FTP URLs are specified that are on the same host, Wget should
  re-use the connection rather than opening a new one for each file.

* Try to devise a scheme so that, when password is unknown, Wget asks
  the user for one.

* If -c used with -N, check to make sure a file hasn't changed on the server
  before "continuing" to download it (preventing a bogus hybrid file).

* Generalize --html-extension to something like --mime-extensions and
  have it look at mime.types/mimecap file for preferred extension.
  Non-HTML files with filenames changed this way would be
  re-downloaded each time despite -N unless .orig files were saved for
  them.  Since .orig would contain the same data as non-.orig, the
  latter could be just a link to the former.  Another possibility
  would be to implement a per-directory database called something like
  .wget_url_mapping containing URLs and their corresponding filenames.

* When spanning hosts, there's no way to say that you are only interested in
  files in a certain directory on _one_ of the hosts (-I and -X apply to all).
  Perhaps -I and -X should take an optional hostname before the directory?

* --retr-symlinks should cause wget to traverse links to directories too.

* Make wget return non-zero status in more situations, like incorrect HTTP auth.

* Make -K compare X.orig to X and move the former on top of the latter if 
  they're the same, rather than leaving identical .orig files laying around.

* Make `-k' check for files that were downloaded in the past and convert links 
  to them in newly-downloaded documents.

* Add option to clobber existing file names (no `.N' suffixes).

* Introduce real "boolean" options.  Every `--foo' setting should have
  a corresponding `--no-foo' that turns off.  This is useful even for
  options turned off by default, because the default can be reversed
  in `.wgetrc'.  Get rid of `--foo=no'.  Short options would be
  handled as `-x' vs. `-nx'.

* Add option to only list wildcard matches without doing the download.

* Handle MIME types correctly.  There should be an option to (not)
  retrieve files based on MIME types, e.g. `--accept-types=image/*'.

* Allow time-stamping by arbitrary date.

* Allow size limit to files (perhaps with an option to download oversize files 
  up through the limit or not at all, to get more functionality than [u]limit.

* Download to .in* when mirroring.

* Add an option to delete or move no-longer-existent files when mirroring.

* Implement uploading (--upload URL?) in FTP and HTTP.

* Rewrite FTP code to allow for easy addition of new commands.  It
  should probably be coded as a simple DFA engine.

* Make HTTP timestamping use If-Modified-Since facility.

* Add more protocols (e.g. gopher and news), implementing them in a
  modular fashion.

* Add a "rollback" option to have continued retrieval throw away a
  configurable number of bytes at the end of a file before resuming
  download.  Apparently, some stupid proxies insert a "transfer
  interrupted" string we need to get rid of.

--- NEW FILE: MACHINES ---
This file lists the OSes and architectures on which GNU Wget has been
successfully compiled and used in the past.  If you compile Wget on a
new OS or architecture, please send a note to bug-wget at gnu.org with
the output of the ./config.guess script so this file can be updated.


Amiga NetBSD (m68k-cbm-netbsd1.2)

DEC Ultrix, Digital Unix (mips-dec-ultrix*, alpha-dec-osf*)

FreeBSD (i386-unknown-freebsd*)

GNU/Linux (armv4l-unknown-linux-gnu, i[3456]86-*-linux*)

HP BSD (m68k-hp-bsd)

HP HP-UX (hppa1.0-hp-hpux7.00, hppa1.1-hp-hpux9.01 and others)

IBM AIX (powerpc-ibm-aix4.1*, rs6000-ibm-aix4.3.3.0)

Microsoft Windows 95/NT (i[3456]86)

NeXT NeXTStep 3.3 Intel (i386-next-nextstep3)

SCO Unix (i586-pc-sco3.2v5.0.4)

SGI IRIX (mips-sgi-irix4.0.5, mips-sgi-irix5.3, mips-sgi-irix6.5)

Sun SunOS, Solaris (sparc-sun-solaris*, sparc-sun-sunos*)

Mac OS X (powerpc-apple-darwin5.2)

--- NEW FILE: configure ---
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.57.
#
# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
## M4sh Initialization.  ##
## --------------------- ##

# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
[...15344 lines suppressed...]
# config.status does its own redirection, appending to config.log.
# Unfortunately, on DOS this fails, as config.log is still kept open
# by configure, so config.status won't be able to write to it; its
# output is simply discarded.  So we exec the FD to /dev/null,
# effectively closing config.log, so it can be properly (re)opened and
# appended to by config.status.  When coming back to configure, we
# need to make the FD available again.
if test "$no_create" != yes; then
  ac_cs_success=:
  ac_config_status_args=
  test "$silent" = yes &&
    ac_config_status_args="$ac_config_status_args --quiet"
  exec 5>/dev/null
  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
  exec 5>>config.log
  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
  # would make configure fail if this is the last instruction.
  $ac_cs_success || { (exit 1); exit 1; }
fi


--- NEW FILE: stamp-h.in ---
timestamp

--- NEW FILE: configure.bat ---
@echo off
rem Configure batch file for `Wget' utility
rem Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.

rem This program is free software; you can redistribute it and/or modify
rem it under the terms of the GNU General Public License as published by
rem the Free Software Foundation; either version 2 of the License, or
rem (at your option) any later version.

rem This program is distributed in the hope that it will be useful,
rem but WITHOUT ANY WARRANTY; without even the implied warranty of
rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
rem GNU General Public License for more details.

rem You should have received a copy of the GNU General Public License
rem along with this program; if not, write to the Free Software
rem Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

rem In addition, as a special exception, the Free Software Foundation
rem gives permission to link the code of its release of Wget with the
rem OpenSSL project's "OpenSSL" library (or with modified versions of it
rem that use the same license as the "OpenSSL" library), and distribute
rem the linked executables.  You must obey the GNU General Public License
rem in all respects for all of the code used other than "OpenSSL".  If you
rem modify this file, you may extend this exception to your version of the
rem file, but you are not obligated to do so.  If you do not wish to do
rem so, delete this exception statement from your version.

cls
if .%1 == .--borland goto :borland
if .%1 == .--msvc goto :msvc
if .%1 == .--watcom goto :watcom
goto :usage

:msvc
copy windows\config.h.ms src\config.h > nul
copy windows\Makefile.top Makefile > nul
copy windows\Makefile.src src\Makefile > nul
copy windows\Makefile.doc doc\Makefile > nul

echo Type NMAKE to start compiling.
echo If it doesn't work, try executing MSDEV\BIN\VCVARS32.BAT first,
echo and then NMAKE.
goto :end

:borland
copy windows\config.h.bor src\config.h > nul
copy windows\Makefile.top.bor Makefile > nul
copy windows\Makefile.src.bor src\Makefile > nul
copy windows\Makefile.doc doc\Makefile > nul

echo Type MAKE to start compiling.
goto :end

:watcom
copy windows\config.h.ms src\config.h > nul
copy windows\Makefile.watcom src\Makefile > nul

@echo Checking environment vars
@set INCLUDE | find /I "WATCOM"
@set LIB     | find /I "WATCOM"
@echo If WATCOM directories were not displayed, you need to
@echo SET INCLUDE and SET LIB to the Watcom directories
@echo.
cd src
@echo Type WMAKE to build
goto :end

:usage
echo "Usage: configure [--borland | --msvc | --watcom]"
:end

--- NEW FILE: COPYING ---
		    GNU GENERAL PUBLIC LICENSE
		       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
                          675 Mass Ave, Cambridge, MA 02139, USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

			    Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

		    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

			    NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

		     END OF TERMS AND CONDITIONS

	    How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) 19yy  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) 19yy name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Library General
Public License instead of this License.

--- NEW FILE: ChangeLog ---
2003-11-04  Hrvoje Niksic  <hniksic at xemacs.org>

	* aclocal.m4 (WGET_FNMATCH): Check whether fnmatch.h is
	includable.

2003-11-07  Hrvoje Niksic  <hniksic at xemacs.org>

	* README: Remove explicit version reference, so that the file
	doesn't have to be updated for each new release.

2003-11-05  Hrvoje Niksic  <hniksic at xemacs.org>

	* windows/config.h.ms: MSVC doesn't have uint32_t.

2003-11-04  Hrvoje Niksic  <hniksic at xemacs.org>

	* configure.in: Also check whether #include <md5.h> works before
	deciding to use Solaris libmd5.

[...1252 lines suppressed...]
1998-02-03  Karl Eichwalder  <ke at suse.de>

	* po/POTFILES.in: Touch it (needed for NLS); add src/ftp.c,
	src/getopt.c, src/host.c, src/html.c, src/http.c, src/init.c,
	src/main.c, src/mswindows.c, src/netrc.c, src/recur.c, src/retr.c,
	src/url.c, and src/utils.c.

	* intl/po2tbl.sed.in: Add from gettext-0.10.32 (needed for NLS).

	* po/Makefile.in.in: Add from gettext-0.10.32.

	* Makefile.in (SUBDIRS): Add po/.

	* configure.in (ALL_LINGUAS): New variable.  Add "de" and "hr".
	(AM_GNU_GETTEXT): Add.
	(AC_OUTPUT): Add po/Makefile.in; run the sed command.
	
	* aclocal.m4 (AM_WITH_NLS, AM_GNU_GETTEXT, AM_LC_MESSAGES,
	AM_PATH_PROG_WITH_TEST): from gettext-0.10.32.
	

--- NEW FILE: config.guess ---
#! /bin/sh
# Attempt to guess a canonical system name.
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
#   2000, 2001, 2002 Free Software Foundation, Inc.

timestamp='2002-11-30'

# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
[...1361 lines suppressed...]
/bin/universe          = `(/bin/universe) 2>/dev/null`
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
/bin/arch              = `(/bin/arch) 2>/dev/null`
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`

UNAME_MACHINE = ${UNAME_MACHINE}
UNAME_RELEASE = ${UNAME_RELEASE}
UNAME_SYSTEM  = ${UNAME_SYSTEM}
UNAME_VERSION = ${UNAME_VERSION}
EOF

exit 1

# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:

--- NEW FILE: config.sub ---
#! /bin/sh
# Configuration validation subroutine script.
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
#   2000, 2001, 2002 Free Software Foundation, Inc.

timestamp='2002-11-30'

# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine.  It does not imply ALL GNU software can.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
[...1430 lines suppressed...]
			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
				vendor=atari
				;;
			-vos*)
				vendor=stratus
				;;
		esac
		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
		;;
esac

echo $basic_machine$os
exit 0

# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:

--- NEW FILE: ltmain.sh ---
# ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun configure.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
[...5023 lines suppressed...]
If FILE is a libtool library, all the files associated with it are deleted.
Otherwise, only FILE itself is deleted using RM."
  ;;

*)
  $echo "$modename: invalid operation mode \`$mode'" 1>&2
  $echo "$help" 1>&2
  exit 1
  ;;
esac

echo
$echo "Try \`$modename --help' for more information about other modes."

exit 0

# Local Variables:
# mode:shell-script
# sh-indentation:2
# End:

--- NEW FILE: MAILING-LIST ---
                                                                -*- text -*-

		      WGET-RELATED MAILING LISTS

Wget has several mailing lists, all hosted by SunSITE.dk.

wget at sunsite.dk:

    The mailing list for users and developers.  This is the preferred
    place to post bug reports and suggestions, as well as discuss
    development-related matters.

    To post to the list, send mail to <wget at sunsite.dk>.  To
    subscribe, send mail to <wget-subscribe at sunsite.dk>.

    NOTE: The list allows posts from non-subscribers.  This is
    intentional; I hate having to subscribe to a list if I only want
    to ask a single question.  If you're not subscribed to the list
    and ask something, don't forget to request that the responses be
    Cc'ed to you.

    This mailing list is archived at:

	http://www.mail-archive.com/wget%40sunsite.dk/

wget-patches at sunsite.dk:

    The mailing list for patch submission.  Please see the PATCHES
    file for a detailed description of how to send patches to this
    list.

    This is list is also open to non-subscribers, but it is *not* a
    discussion list.  It only ever distribute patches and immediate
    responses to a patch.  If you wish to take very active part in
    development, you might wish to subscribe to it anyway, and receive
    the new patches.  To do that, send mail to
    <wget-patches-subscribe at sunsite.dk>.

wget-cvs at sunsite.dk:

    This list just distributes notices about commits to the Wget CVS
    tree.  It has no discussions, and it is not interesting unless you
    wish to take part in development.  If so, send mail to
    <wget-cvs-subscribe at sunsite.dk> to subscribe.

As of this writing, the mail alias <bug-wget at gnu.org> is an alias for
<wget at sunsite.dk>.

--- NEW FILE: configure.bat.in ---
@echo off
rem Configure batch file for `Wget' utility
rem Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.

rem This program is free software; you can redistribute it and/or modify
rem it under the terms of the GNU General Public License as published by
rem the Free Software Foundation; either version 2 of the License, or
rem (at your option) any later version.

rem This program is distributed in the hope that it will be useful,
rem but WITHOUT ANY WARRANTY; without even the implied warranty of
rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
rem GNU General Public License for more details.

rem You should have received a copy of the GNU General Public License
rem along with this program; if not, write to the Free Software
rem Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

rem In addition, as a special exception, the Free Software Foundation
rem gives permission to link the code of its release of Wget with the
rem OpenSSL project's "OpenSSL" library (or with modified versions of it
rem that use the same license as the "OpenSSL" library), and distribute
rem the linked executables.  You must obey the GNU General Public License
rem in all respects for all of the code used other than "OpenSSL".  If you
rem modify this file, you may extend this exception to your version of the
rem file, but you are not obligated to do so.  If you do not wish to do
rem so, delete this exception statement from your version.

cls
if .%1 == .--borland goto :borland
if .%1 == .--msvc goto :msvc
if .%1 == .--watcom goto :watcom
goto :usage

:msvc
copy windows\config.h.ms src\config.h > nul
copy windows\Makefile.top Makefile > nul
copy windows\Makefile.src src\Makefile > nul
copy windows\Makefile.doc doc\Makefile > nul

echo Type NMAKE to start compiling.
echo If it doesn't work, try executing MSDEV\BIN\VCVARS32.BAT first,
echo and then NMAKE.
goto :end

:borland
copy windows\config.h.bor src\config.h > nul
copy windows\Makefile.top.bor Makefile > nul
copy windows\Makefile.src.bor src\Makefile > nul
copy windows\Makefile.doc doc\Makefile > nul

echo Type MAKE to start compiling.
goto :end

:watcom
copy windows\config.h.ms src\config.h > nul
copy windows\Makefile.watcom src\Makefile > nul

@echo Checking environment vars
@set INCLUDE | find /I "WATCOM"
@set LIB     | find /I "WATCOM"
@echo If WATCOM directories were not displayed, you need to
@echo SET INCLUDE and SET LIB to the Watcom directories
@echo.
cd src
@echo Type WMAKE to build
goto :end

:usage
echo "Usage: configure [--borland | --msvc | --watcom]"
:end

--- NEW FILE: AUTHORS ---
Authors of GNU Wget.

[ Note that this file does not attempt to list all the contributors to
  Wget; look at the ChangeLog for that.  This is a list of people who
  contributed sizeable amounts of code and assigned the copyright to the
  FSF. ]

Hrvoje Niksic.  Designed and implemented Wget.

Gordon Matzigkeit.  Wrote netrc.c and netrc.h.

Darko Budor.  Added Windows support, wrote wsstartup.c, wsstartup.h
and windecl.h.

Junio Hamano.  Added support for FTP Opie and HTTP digest
authentication.

Dan Harkless.  Added --backup-converted, --follow-tags, --html-extension,
--ignore-tags, and --page-requisites; improved documentation; etc.

Christian Fraenkel.  Implemented SSL support.

Thomas Lussnig.  Implemented IPv6 support.

Ian Abbott.  Contributed bugfixes, Windows-related fixes, provided a
prototype implementation of the new recursive code, and more.

--- NEW FILE: README.cvs ---
Important note:

To reduce bandwidth and needless updates, the CVS tree does not
contain automatically-generated files, even when those files are
normally present in the distribution tarballs.

Therefore, if you're building from the CVS sources, you'll need to
have GNU autoconf, gettext, and texinfo installed on your machine
(these do the afore-mentioned automatic generation).  The three
packages are available from <ftp://ftp.gnu.org/pub/gnu/<package>/> and
its mirrors (please choose one close to you), listed at
<http://www.gnu.org/order/ftp.html>.

In case you aren't used to running autoconf manually to generate the
necessary configure script, a file called Makefile.cvs has been
provided, and may be called using `make -f Makefile.cvs'.  Once the
Makefile has called autoconf to generate the configure script, you can
build in the usual fashion.

To summarize, once you've checked out wget from the CVS archive
(instructions for which can be found on the Development page of the
Wget website), the commands you'll execute will be as follows (barring
any extra options to `configure' or to the second `make'):

    cd wget
    make -f Makefile.cvs
    ./configure
    make

--- NEW FILE: install-sh ---
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission.  M.I.T. makes no representations about the
# suitability of this software for any purpose.  It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.  It can only install one file at a time, a restriction
# shared with many OS's install programs.


# set DOITPROG to echo to test this script

# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"


# put in absolute paths if you don't have them in your path; or use env. vars.

mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"

transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""

while [ x"$1" != x ]; do
    case $1 in
	-c) instcmd=$cpprog
	    shift
	    continue;;

	-d) dir_arg=true
	    shift
	    continue;;

	-m) chmodcmd="$chmodprog $2"
	    shift
	    shift
	    continue;;

	-o) chowncmd="$chownprog $2"
	    shift
	    shift
	    continue;;

	-g) chgrpcmd="$chgrpprog $2"
	    shift
	    shift
	    continue;;

	-s) stripcmd=$stripprog
	    shift
	    continue;;

	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
	    shift
	    continue;;

	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
	    shift
	    continue;;

	*)  if [ x"$src" = x ]
	    then
		src=$1
	    else
		# this colon is to work around a 386BSD /bin/sh bug
		:
		dst=$1
	    fi
	    shift
	    continue;;
    esac
done

if [ x"$src" = x ]
then
	echo "$0: no input file specified" >&2
	exit 1
else
	:
fi

if [ x"$dir_arg" != x ]; then
	dst=$src
	src=""

	if [ -d "$dst" ]; then
		instcmd=:
		chmodcmd=""
	else
		instcmd=$mkdirprog
	fi
else

# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.

	if [ -f "$src" ] || [ -d "$src" ]
	then
		:
	else
		echo "$0: $src does not exist" >&2
		exit 1
	fi

	if [ x"$dst" = x ]
	then
		echo "$0: no destination specified" >&2
		exit 1
	else
		:
	fi

# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic

	if [ -d "$dst" ]
	then
		dst=$dst/`basename "$src"`
	else
		:
	fi
fi

## this sed command emulates the dirname command
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`

# Make sure that the destination directory exists.
#  this part is taken from Noah Friedman's mkinstalldirs script

# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
	'
IFS="${IFS-$defaultIFS}"

oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS

pathcomp=''

while [ $# -ne 0 ] ; do
	pathcomp=$pathcomp$1
	shift

	if [ ! -d "$pathcomp" ] ;
        then
		$mkdirprog "$pathcomp"
	else
		:
	fi

	pathcomp=$pathcomp/
done
fi

if [ x"$dir_arg" != x ]
then
	$doit $instcmd "$dst" &&

	if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
	if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
else

# If we're going to rename the final executable, determine the name now.

	if [ x"$transformarg" = x ]
	then
		dstfile=`basename "$dst"`
	else
		dstfile=`basename "$dst" $transformbasename |
			sed $transformarg`$transformbasename
	fi

# don't allow the sed command to completely eliminate the filename

	if [ x"$dstfile" = x ]
	then
		dstfile=`basename "$dst"`
	else
		:
	fi

# Make a couple of temp file names in the proper directory.

	dsttmp=$dstdir/#inst.$$#
	rmtmp=$dstdir/#rm.$$#

# Trap to clean up temp files at exit.

	trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
	trap '(exit $?); exit' 1 2 13 15

# Move or copy the file name to the temp name

	$doit $instcmd "$src" "$dsttmp" &&

# and set any options; do chmod last to preserve setuid bits

# If any of these fail, we abort the whole thing.  If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.

	if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
	if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&

# Now remove or move aside any old file at destination location.  We try this
# two ways since rm can't unlink itself on some systems and the destination
# file might be busy for other reasons.  In this case, the final cleanup
# might fail but the new file should still install successfully.

{
	if [ -f "$dstdir/$dstfile" ]
	then
		$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
		$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
		{
		  echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
		  (exit 1); exit
		}
	else
		:
	fi
} &&

# Now rename the file to the real destination.

	$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"

fi &&

# The final little trick to "correctly" pass the exit status to the exit trap.

{
	(exit 0); exit
}




More information about the dslinux-commit mailing list