cd
test -f installed/w3c-libwww-5.4.0.tgz &&
mv installed/w3c-libwww-5.4.0.tgz .
test ! -f w3c-libwww-5.4.0.tgz &&
wget http://www.w3.org/Library/Distribution/w3c-libwww-5.4.0.tgz
cd /usr/local/src
find -type d -maxdepth 1 -name "w3c-libwww-*" -exec rm -r {} \;
tar xzvf ~/w3c-libwww-5.4.0.tgz
cd w3c-libwww-5.4.0
chown -R root.root .
# I use the source-installed OpenSSL which is installed under
# /usr/local/ssl. If yours is installed under the /usr prefix, which is
# probably the case if it was installed from a binary package, you can
# probably just leave off the =/usr/local/ssl part of the --with-ssl configure
# flag, and the whole CPPFLAGS part (just run 'make').
./configure --with-zlib --with-ssl=/usr/local/ssl
make CPPFLAGS=-I/usr/local/ssl/include/openssl
make install
ldconfig
cd
mkdir -p -m 0700 installed
rm -f installed/w3c-libwww-*.tar.*
mv w3c-libwww-5.4.0.tgz installed/
# If you ever need to uninstall libwww, cd into the source directory and
# run 'make uninstall'