# good old fashioned hard dependencies
depends  autoconf &&
depends  freetype2  &&
depends  archive-zip  &&
depends  zip &&
depends  unzip &&

# dependencies that are required but will use included
# OOo versions when missing (some of them might be in the openoffice 'system' tarball)
depends  libwpd '--with-system-libwpd' &&
depends  icu  '--with-system-icu' &&
depends  python '--with-system-python' &&
depends  db  '--with-system-db' &&
depends  expat '--with-system-expat'  &&
depends  libxml2 '--with-system-libxml' &&
depends  libxslt '--with-system-libxslt' &&
depends  JPEG  '--with-system-jpeg' &&
depends  SSL  '--with-system-openssl' &&
depends  zlib  '--with-system-zlib' &&
depends  poppler '--with-system-poppler' &&
depends  curl '--with-system-curl' &&
depends  boost '--with-system-boost' &&
depends  hunspell '--with-system-hunspell' &&
depends  hyphen '--with-system-altlinuxhyph' &&
#depends  mythes '--with-system-mythes' &&
# just weird, it needs to be installed but OOo won't build when you specify --with-stlport
depends  stlport  "--without-stlport"  &&
depends  vigra  '--with-system-vigra' &&
depends  sane-backends '--with-system-sane-header'  &&
depends  lp_solve '--with-system-lpsolve' &&
depends libxrender '--with-system-xrender-headers' &&
depends ttf-bitstream-vera '--without-fonts --without-afms' &&

# regular optional dependencies
optional_depends ODBC-MGR \
                 '--with-system-odbc --with-system-odbc-headers' \
                 '' \
                 'enable ODBC database access? (recommended)' &&
optional_depends JAVA \
                 '--with-java --with-system-jars' \
                 '--without-java' \
                 'enable JAVA support?' &&
if is_depends_enabled $SPELL $(get_spell_provider $SPELL JAVA); then
   depends  ant "--with-ant-home=${INSTALL_ROOT}/opt/ant/"  &&
#   depends lucene '--with-system-lucene' &&
   optional_depends -sub JAVA gcc \
                    '--enable-gcjaot' \
                    '--disable-gcjaot' \
                    'Build with[out] using Ahead of Time java compilation?'
fi &&
optional_depends  GTK2 \
                  '--enable-gtk' \
                  '--disable-gtk' \
                  'use GTK vclplug? (recommended)'  &&
if [[ "$(get_spell_provider ${SPELL} GTK2)" = 'gtk+2' ]] || \
   [[ "$(get_spell_provider ${SPELL} GTK2)" = 'gtk+2-directfb' ]]; then
optional_depends gconf2 \
                 '--enable-gconf --enable-lockdown' \
                 '--disable-gconf --disable-lockdown' \
                 'enable gconf integration, used for settings and lockdown?' &&
optional_depends evolution \
                 '--enable-evolution2' \
                 '--disable-evolution2' \
                 'enable use of evolution addressbook?' &&
optional_depends gnome-vfs2 \
                 '--enable-gnome-vfs' \
                 '--disable-gnome-vfs' \
                 'enable GNOME virtual filesystem support?'
fi &&
#probably wrong, but I have no idea what to include for KDE and which version ;)
optional_depends kdebase4 \
                 '--enable-kde4 --enable-kdeab' \
                 '--disable-kde4 --disable-kdeab' \
                 'enable KDE addressbook and vclplugin' &&
optional_depends cairo \
                 '--enable-cairo --with-system-cairo' \
                 '--disable-cairo' \
                 'use Cairo? (recommended)' &&
optional_depends OPENGL \
                 '--enable-opengl' \
                 '--disable-opengl' \
                 'use OpenGL for 3D effects?' &&
optional_depends libxrandr \
                 '--enable-randr' \
                 '--disable-randr' \
                 'enable RandR support in the vcl project?' &&
optional_depends agg \
                 '--with-agg' \
                 '--without-agg' \
                 'enable agg support?' &&
# I'm only testing with xulrunner, feel free to add others ;)
optional_depends xulrunner \
                 '--with-system-mozilla=xulrunner' \
                 '--disable-mozilla' \
                 "use xulrunner instead of 'strangely hacked up mozilla binary'? (recommended)" &&
#always --without-ppds. not needed without cups or provided by cups
optional_depends CUPS \
                 '--enable-cups --without-ppds' \
                 '--disable-cups --without-ppds' \
                 'use CUPS in the psprint project?' &&
optional_depends fontconfig \
                 '--enable-fontconfig --disable-fontooo' \
                 '--disable-fontconfig --enable-fontooo' \
                 'use fontconfig instead of FontOOo?' &&
optional_depends dbus \
                 '--enable-dbus' \
                 '--disable-dbus' \
                 'use D-BUS for screensaver control?' &&
optional_depends linux-pam \
                 '--enable-pam' \
                 '--disable-pam' \
                 'enable PAM support?' &&
optional_depends neon \
                 '--enable-neon --with-system-neon' \
                 '--disable-neon' \
                 'enable neon and the compilation of webdav binding?' &&
optional_depends libxaw \
                 '--enable-Xaw' \
                 '--disable-Xaw' \
                 'enable the use of Xaw for the Netscape/Mozilla plugin?' &&
optional_depends openldap \
                 '--enable-ldap --with-openldap' \
                 '--disable-ldap --without-openldap' \
                 "enable the use of the OpenLDAP LDAP SDK?" &&
optional_depends MYSQL \
                 '--with-system-mysql --enable-mysql-connector' \
                 '--without-system-mysql --disable-mysql-connector' \
                 "build the MySQL Connector/OOo extension?" &&
optional_depends mysqlcppapi \
                 '--with-system-mysql-cppconn' \
                 '--without-system-mysql-cppconn' \
                 "build the MySQL CPP Connector/OOo extension?"
