. "$GRIMOIRE/FUNCTIONS" &&

depends slibtool LIBTOOL=slibtool-shared &&
depends  smgl-fhs       &&
depends  zlib           &&
depends automake &&
depends libcap-ng --with-cap-ng && # to build setpriv (needed by sorcery)

if spell_ok automake && is_version_less $(installed_version automake) 1.14; then
  force_depends automake
fi &&

optional_depends nfs-utils '' '' 'for NFS mount support' &&

optional_depends libselinux \
                 '--with-selinux' \
                 '--without-selinux' \
                 'for NSA Security Enhanced Linux' &&

optional_depends linux-pam \
                 "--enable-runuser" \
                 "--disable-runuser" \
                 "for Linux Pluggable Authentication Module support" &&

optional_depends GETTEXT \
                 "--enable-nls" \
                 "--disable-nls" \
                 "for Native Language Support" &&

optional_depends PYTHON \
                 "--with-python" \
                 "--without-python" \
                 "to generate Python bindings" &&

#
# NOTE:
# --with-ncurses  build with non-wide ncurses, default is wide version
#                 (--without-ncurses disables all ncurses(w) support)
#
optional_depends -sub "UTF8" ncurses \
                 '' \
                 '--without-ncurses' \
                 'for cfdisk' &&

optional_depends slang \
                 "--with-slang" \
                 "--without-slang" \
                 "for cfdisk with slang support" &&

optional_depends sqlite \
                 "--enable-liblastlog2" \
                 "--disable-liblastlog2" \
                 "for lastlog2 support" &&

optional_depends readline '--with-readline' '--without-readline' 'Readline support' &&

optional_depends po4a "--enable-poman" "--disable-poman" "to generate translated man pages"
