# The following options are used to enable or disable netatalk features
# They take the form -Dwith-feature=true || false

# The value: argument corresponds to the default setting

option(
    'with-acls',
    type: 'boolean',
    value: true,
    description: 'Enable ACL support',
)
option(
    'with-afpstats',
    type: 'boolean',
    value: true,
    description: 'Enable AFP statistics via D-Bus',
)
option(
    'with-cracklib',
    type: 'boolean',
    value: true,
    description: 'Enable cracklib support',
)
option(
    'with-cups',
    type: 'boolean',
    value: true,
    description: 'Enable CUPS support',
)
option(
    'with-cups-pap-backend',
    type: 'boolean',
    value: false,
    description: 'Install the pap backend for CUPS',
)
option(
    'with-appletalk',
    type: 'boolean',
    value: false,
    description: 'Enable the AppleTalk transport layer, services and utilities',
)
option(
    'with-debug',
    type: 'boolean',
    value: true,
    description: 'Enable verbose debug code',
)
option(
    'with-debugging',
    type: 'boolean',
    value: false,
    description: 'Enable SIGALARM timers and DSI tickles (eg for debugging with gdb/dbx/...)',
)
option(
    'with-docs-l10n',
    type: 'boolean',
    value: false,
    description: 'Build and install the localized documentation',
)
option(
    'with-dtrace',
    type: 'boolean',
    value: true,
    description: 'Enable dtrace probes',
)
option(
    'with-gssapi',
    type: 'boolean',
    value: true,
    description: 'Enable GSSAPI support',
)
option(
    'with-homebrew',
    type: 'boolean',
    value: false,
    description: 'Build and link with headers and libraries supplied by Homebrew',
)
option(
    'with-init-hooks',
    type: 'boolean',
    value: true,
    description: 'Enable install hooks for the configured init system',
)
option(
    'with-install-hooks',
    type: 'boolean',
    value: true,
    description: 'Enable OS specific install hooks',
)
option(
    'with-kerberos',
    type: 'boolean',
    value: true,
    description: 'Enable Kerberos V API support',
)
option(
    'with-krbV-uam',
    type: 'boolean',
    value: true,
    description: 'Enable build of Kerberos V UAM module',
)
option(
    'with-ldap',
    type: 'boolean',
    value: true,
    description: 'Enable LDAP support'
)
option(
    'with-ldsoconf',
    type: 'boolean',
    value: false,
    description: 'Enable custom library search path for the run-time linker',
)
option(
    'with-libiconv',
    type: 'boolean',
    value: true,
    description: 'Enable iconv support',
)
option(
    'with-overwrite',
    type: 'boolean',
    value: false,
    description: 'Overwrite configuration files during installation',
)
option(
    'with-pam',
    type: 'boolean',
    value: true,
    description: 'Enable PAM support',
)
option(
    'with-quota',
    type: 'boolean',
    value: true,
    description: 'Enable quota support',
)
option(
    'with-rpath',
    type: 'boolean',
    value: true,
    description: 'Enable RPATH/RUNPATH',
)
option(
    'with-sendfile',
    type: 'boolean',
    value: true,
    description: 'Enable sendfile syscall',
)
option(
    'with-shell-check',
    type: 'boolean',
    value: true,
    description: 'Enable checking for a valid shell',
)
option(
    'with-spotlight',
    type: 'boolean',
    value: true,
    description: 'Enable Spotlight support',
)
option(
    'with-statedir-creation',
    type: 'boolean',
    value: true,
    description: 'Create the Netatalk state directories if they do not exist',
)
option(
    'with-tcp-wrappers',
    type: 'boolean',
    value: true,
    description: 'Enable TCP wrappers support',
)
option(
    'with-tests',
    type: 'boolean',
    value: false,
    description: 'Compile tests',
)
option(
    'with-testsuite',
    type: 'boolean',
    value: false,
    description: 'Compile the AFP test suite',
)
option(
    'with-unicode-data',
    type: 'boolean',
    value: false,
    description: 'Rebuild the Unicode source files from UnicodeData.txt',
)
option(
    'with-webmin',
    type: 'boolean',
    value: false,
    description: 'Package and install the Netatalk Webmin module',
)
option(
    'with-website',
    type: 'boolean',
    value: false,
    description: 'Build documentation for the Netatalk website (admin use only)',
)
option(
    'with-zeroconf',
    type: 'boolean',
    value: true,
    description: 'Enable Zeroconf support',
)

# The following options are used to find dependencies that are installed in
# unconventional locations.
# They take the form -Dwith-dependency-path=/path/to/dependency
# The dependency directory must include lib and include dirs

option(
    'with-bdb-path',
    type: 'string',
    value: '',
    description: 'Set path to Berkeley DB installation. Must contain lib and include dirs',
)
option(
    'with-bdb-include-path',
    type: 'string',
    value: '',
    description: 'Set path to Berkeley DB include dir. When defined, -Dwith-bdb-path is used only for lib dir',
)
option(
    'with-bdb-version',
    type: 'string',
    value: '',
    description: 'Set installed Berkeley DB version x.y (major.minor) to link against',
)
option(
    'with-cracklib-path',
    type: 'string',
    value: '',
    description: 'Set location of cracklib dictionary',
)
option(
    'with-cups-libdir-path',
    type: 'string',
    value: '',
    description: 'Set path to the prefix of the CUPS library directory',
)
option(
    'with-dbus-daemon-path',
    type: 'string',
    value: '',
    description: 'Set path to D-Bus daemon',
)
option(
    'with-dbus-sysconf-path',
    type: 'string',
    value: '',
    description: 'Set path to D-Bus system bus security configuration directory',
)
option(
    'with-docbook-path',
    type: 'string',
    value: '',
    description: 'Set path to Docbook XSL directory',
)
option(
    'with-gssapi-path',
    type: 'string',
    value: '',
    description: 'Set path to GSSAPI for Kerberos V UAM. Must contain lib and include dirs',
)
option(
    'with-iniparser-path',
    type: 'string',
    value: '',
    description: 'Set path to iniparser installation. Must contain lib and include dirs',
)
option(
    'with-init-dir',
    type: 'string',
    value: '',
    description: 'Set path to OS specific init directory',
)
option(
    'with-kerberos-path',
    type: 'string',
    value: '',
    description: 'Set path to Kerberos V library. Must contain lib and include dirs',
)
option(
    'with-ldap-path',
    type: 'string',
    value: '',
    description: 'Set path to LDAP library. Must contain lib and include dirs'
)
option(
    'with-libgcrypt-path',
    type: 'string',
    value: '',
    description: 'Set path to libgcrypt installation. Must contain lib and include dirs',
)
option(
    'with-libiconv-path',
    type: 'string',
    value: '',
    description: 'Set path to libiconv installation. Must contain lib and include dirs',
)
option(
    'with-lockfile-path',
    type: 'string',
    value: '',
    description: 'Set path to directory that contains the Netatalk lockfiles',
)
option(
    'with-manual-install-path',
    type: 'string',
    value: '',
    description: 'Set path where to install manual html pages',
)
option(
    'with-pam-path',
    type: 'string',
    value: '',
    description: 'Set path to PAM installation. Must contain lib and include dirs',
)
option(
    'with-pam-config-path',
    type: 'string',
    value: '',
    description: 'Set path to PAM config directory',
)
option(
    'with-perl-path',
    type: 'string',
    value: '',
    description: 'Set path to directory that containts the perl runtime binary',
)
option(
    'with-pkgconfdir-path',
    type: 'string',
    value: '',
    description: 'Set path to the package conf dir that overrides sysconfdir',
)
option(
    'with-spooldir',
    type: 'string',
    value: '',
    description: 'Set path for spooldir used for CUPS support',
)
option(
    'with-statedir-path',
    type: 'string',
    value: '',
    description: 'Set path for statedir used for CNID databases etc.',
)
option(
    'with-uams-path',
    type: 'string',
    value: 'libdir / netatalk',
    description: 'Set path to UAMs',
)
option(
    'with-unicode-data-path',
    type: 'string',
    value: '',
    description: 'Set path to UnicodeData.txt',
)

# The following options offer a choice from pre-defined selections

option(
    'with-cnid-backends',
    type: 'array',
    choices: [
        'dbd',
        'last',
        'mysql',
        'sqlite',
    ],
    value: ['dbd', 'last', 'mysql', 'sqlite'],
    description: 'Choose the CNID backends to build and install',
)
option(
    'with-cnid-default-backend',
    type: 'combo',
    choices: [
        '',
        'dbd',
        'last',
        'mysql',
        'sqlite',
    ],
    value: '',
    description: 'Set default CNID scheme',
)
option(
    'with-docs',
    type: 'array',
    choices: [
        'man',
        'html_manual',
        'readmes',
    ],
    value: ['man', 'html_manual', 'readmes'],
    description: 'Choose the type documentation to build and install',
)
option(
    'with-init-style',
    type: 'array',
    choices: [
        'none',
        'auto',
        'debian-sysv',
        'freebsd',
        'macos-launchd',
        'netbsd',
        'openbsd',
        'openrc',
        'solaris',
        'systemd',
    ],
    value: ['auto'],
    description: 'Use OS specific init config',
)
