depends  zlib  &&

if [[ "$CURL_SSL" == "gnutls" ]]; then
     depends  gnutls     \
     "--with-gnutls \
      --with-ca-bundle=$INSTALL_ROOT/etc/ssl/certs/ca-certificates.crt \
      --without-ssl --without-nss" &&
     depends ca-certificates
elif [[ "$CURL_SSL" == "openssl" ]]; then
     depends  openssl         \
     "--with-ssl \
      --without-ca-bundle \
      --with-ca-path=$INSTALL_ROOT/etc/ssl/certs \
      --without-gnutls --without-nss"  &&
      depends ca-certificates
elif [[ "$CURL_SSL" == "nss" ]]; then
     depends  -sub PEM nss         \
     "--with-nss \
      --with-ca-bundle=$INSTALL_ROOT/etc/ssl/certs/ca-certificates.crt \
      --without-gnutls --without-ssl"  &&
     depends ca-certificates
fi &&

optional_depends  libssh2                              \
                  "--with-libssh2=$INSTALL_ROOT/usr"   \
                  '--without-libssh2'                  \
                  "for SSH (SCP and SFTP) support"     &&

optional_depends rtmpdump \
                 "" \
                 '--without-librtmp' \
                 "for RTMP streaming media support" &&

optional_depends  c-ares                                                       \
                  "--enable-ares=$INSTALL_ROOT/usr"                            \
                  '--disable-ares'                                             \
                  "to performs DNS requests and name resolves asynchronously"  &&

optional_depends  libidn                                   \
                  "--with-libidn=$INSTALL_ROOT/usr"        \
                  '--without-libidn'                       \
                  'for International Domain Name support'  &&

if [[ "$CURL_SSL" != "none" ]]; then
  optional_depends  openldap                                             \
                    '--enable-ldap --enable-ldaps'                       \
                    '--disable-ldap --disable-ldaps'                     \
                    'for Lightweight Directory Access Protocol support'
else
  optional_depends  openldap                                             \
                    '--enable-ldap'                                      \
                    '--disable-ldap'                                     \
                    'for Lightweight Directory Access Protocol support'
fi
