# Depends on fltk
# Depends on openssl shared libs
# Depends on libxft

# Exit on error:
set -e

wget http://www.dillo.org/download/dillo-3.0.5.tar.bz2
tar xf dillo-3.0.5.tar.bz2
cd dillo-3.0.5

./configure \
    --prefix= \
    --enable-ssl

make install
cd ..
rm -rf dillo-3.0.5
rm dillo-3.0.5.tar.bz2

cat > cookiesrc << EOF
# Deny all cookies from all domains not otherwise specified.
DEFAULT       DENY

# Accept all cookies from fltk.org, and save them to
# ~/.dillo/cookies.txt when the cookies dpi exits.
#fltk.org      ACCEPT

# Accept all cookies from all subdomains of host.com, but do not save
# them when the dpi exits.
#.host.com     ACCEPT_SESSION
EOF

echo ''
echo 'To manage cookies, you can copy cookiesrc to ~/.dillo/cookiesrc'
echo 'inside your home directory.'

exit 0
