# # Makefile helper for options handling. # # Targets and their behaviors: # # show-variables-list - shows WITH_*, WITHOUT_ variables set by default. # # show-options-list - generates OPTIONS string compatible with ports # format. Can by safely used by maintainer to # re-generate sorted options list to cut-and-paste them # into `options' file. # # $FreeBSD$ AUTH_CRAM_MD5 = "Enable CRAM-MD5 authentication mechanisms" AUTH_DOVECOT = "Enable Dovecot authentication mechanisms" AUTH_PLAINTEXT = "Enalbe plaintext authentication" AUTH_SPA = "Enable Secure Password Authentication" CDB = "Enable CDB-style lookups" DAEMON = "Don't install scripts to run as a daemon" DNSDB = "Enable DNS-style lookups" DSEARCH = "Enable directory-list lookups" EMBEDDED_PERL = "Enable embedded Perl interpreter" ICONV = "Enable header charset conversion" IPV6 = "Enable IPv6 support" LMTP = "RFC2033 SMTP over command pipe transport" LSEARCH = "Enable wildcarded-file lookups" MAILDIR = "Enable Maildir mailbox format" MAILSTORE = "Enable Mailstore mailbox format" MBX = "Enable MBX mailbox format" NIS = "Enable NIS-style lookups" OLD_DEMIME = "Enable old, deprecated \"demime\" ACL" PAM = "Enable PAM authentication mechanisms" PASSWD = "Enable /etc/passwd lookups" SUID = "Install the exim binary suid root" TLS = "Link against OpenSSL" ALT_CONFIG_PREFIX = "Allow alternate configuration files" AUTH_RADIUS = "Enable radius (RFC 2865) authentication" AUTH_SASL = "Enable use of Cyrus SASL auth library" CONTENT_SCAN = "Enable exiscan email content scanner" DCC = "Enable DCC at ACL support via dccifd" DEBUG = "Build with debugging symbols" EXIMON = "Build eximon monitor (require XFree86!)" KAS = "Build with Kaspersky AntiSpam local scan" MYSQL = "Link against libmysqlclient library" OPENLDAP = "Link against libldap" PGSQL = "Link against libpq" READLINE = "Enable readline(3) library" SASLAUTHD = "Enable use of Cyrus SASL auth daemon" SA_EXIM = "SA-Exim support" SPF = "Enable Sender Policy Framework checking" SQLITE = "Enable SQLite lookups" SRS = "Enable Sender Rewriting Scheme" SRS_ALT = "Enable alternative SRS library" TCP_WRAPPERS = "Enable /etc/hosts.allow access control" WISHLIST = "Include the unsupported patches" XCLIENT = "Enable XCLIENT command in exim" ENABLED_OPTIONS+= \ AUTH_CRAM_MD5 \ AUTH_DOVECOT \ AUTH_PLAINTEXT \ AUTH_SPA \ CDB \ DAEMON \ DNSDB \ DSEARCH \ ICONV \ IPV6 \ LMTP \ LSEARCH \ MAILDIR \ MAILSTORE \ MBX \ NIS \ OLD_DEMIME \ PAM \ PASSWD \ EMBEDDED_PERL \ SUID \ TLS DISABLED_OPTIONS+= \ ALT_CONFIG_PREFIX \ AUTH_RADIUS \ AUTH_SASL \ CONTENT_SCAN \ DCC \ DEBUG \ EXIMON \ KAS \ MYSQL \ OPENLDAP \ PGSQL \ READLINE \ SASLAUTHD \ SA_EXIM \ SPF \ SQLITE \ SRS \ SRS_ALT \ TCP_WRAPPERS \ WISHLIST \ XCLIENT ALL_OPTIONS= ${ENABLED_OPTIONS} \ ${DISABLED_OPTIONS} .if !target(show-options-list) _SELECTED_OPTIONS_ENV= .for option in ${ENABLED_OPTIONS} ${DISABLED_OPTIONS} .if !defined($(option)) _SELECTED_OPTIONS_ENV+= $(option)=$(option) .else _SELECTED_OPTIONS_ENV+= $(option)=$($(option)) .endif .endfor show-options-list: @${ECHO_CMD} OPTIONS+= \\ @for option in ${ALL_OPTIONS:O:u}; do \ _txt=$$(${_SELECTED_OPTIONS_ENV} && \ eval ${ECHO_CMD} $$\{$${option}\}); \ if ${ECHO_CMD} ${ENABLED_OPTIONS} |${GREP} -wq $${option}; \ then \ _flag=on; \ else \ _flag=off; \ fi; \ ${PRINTF} "\t $${option} \"$${_txt}\" $${_flag} \\"; \ ${ECHO_CMD}; \ done .endif .if !target(show-variables-list) show-variables-list: @for option in ${ALL_OPTIONS}; do \ if ${ECHO_CMD} ${ENABLED_OPTIONS} |${GREP} -wq $${option}; \ then \ ${ECHO_CMD} "WITH_$${option}=yes"; \ else \ ${ECHO_CMD} "WITHOUT_$${option}=yes"; \ fi; \ done .endif .include "options"