};
/* These are sorted by the display string */
-static struct CompileOptions comp_opts[] = {
+
+static struct CompileOptions comp_opts_default[] = {
{ "attach_headers_color", 1 },
+ { "compose_to_sender", 1 },
+ { "compress", 1 },
+ { "cond_date", 1 },
+ { "encrypt_to_self", 1 },
+ { "forgotten_attachments", 1 },
+ { "forwref", 1 },
+ { "ifdef", 1 },
+ { "imap", 1 },
+ { "index_color", 1 },
+ { "initials", 1 },
+ { "keywords", 1 },
+ { "limit_current_thread", 1 },
+ { "lmdb", 1 },
+ { "multiple_fcc", 1 },
+ { "nested_if", 1 },
+ { "new_mail", 1 },
+ { "nntp", 1 },
+ { "pop", 1 },
+ { "progress", 1 },
+ { "quasi_delete", 1 },
+ { "regcomp", 1 },
+ { "reply_with_xorig", 1 },
+ { "sensible_browser", 1 },
+ { "sidebar", 1 },
+ { "skip_quoted", 1 },
+ { "smtp", 1 },
+ { "status_color", 1 },
+ { "timeout", 1 },
+ { "tls_sni", 1 },
+ { "trash", 1 },
+ { NULL, 0 },
+};
+
+static struct CompileOptions comp_opts[] = {
#ifdef HAVE_BKGDSET
{ "bkgdset", 1 },
#else
#else
{ "color", 0 },
#endif
- { "compose_to_sender", 1 },
- { "compress", 1 },
- { "cond_date", 1 },
#ifdef HAVE_CURS_SET
{ "curs_set", 1 },
#else
#else
{ "debug", 0 },
#endif
- { "encrypt_to_self", 1 },
#ifdef USE_FCNTL
{ "fcntl", 1 },
#else
#else
{ "fmemopen", 0 },
#endif
- { "forgotten_attachments", 1 },
- { "forwref", 1 },
#ifdef HAVE_FUTIMENS
{ "futimens", 1 },
#else
#else
{ "iconv_nontrans", 0 },
#endif
- { "ifdef", 1 },
- { "imap", 1 },
- { "index_color", 1 },
- { "initials", 1 },
- { "keywords", 1 },
#ifdef HAVE_LIBIDN
{ "idn", 1 },
#else
{ "idn", 0 },
#endif
- { "limit_current_thread", 1 },
- { "lmdb", 1 },
#ifdef LOCALES_HACK
{ "locales_hack", 1 },
#else
#else
{ "mixmaster", 0 },
#endif
- { "multiple_fcc", 1 },
- { "nested_if", 1 },
- { "new_mail", 1 },
#ifdef ENABLE_NLS
{ "nls", 1 },
#else
{ "nls", 0 },
#endif
- { "nntp", 1 },
#ifdef USE_NOTMUCH
{ "notmuch", 1 },
#else
#else
{ "pgp", 0 },
#endif
- { "pop", 1 },
- { "progress", 1 },
- { "quasi_delete", 1 },
- { "regcomp", 1 },
- { "reply_with_xorig", 1 },
#ifdef HAVE_RESIZETERM
{ "resizeterm", 1 },
#else
#else
{ "sasl", 0 },
#endif
- { "sensible_browser", 1 },
- { "sidebar", 1 },
- { "skip_quoted", 1 },
#ifdef CRYPT_BACKEND_CLASSIC_SMIME
{ "smime", 1 },
#else
{ "smime", 0 },
#endif
- { "smtp", 1 },
#ifdef HAVE_START_COLOR
{ "start_color", 1 },
#else
{ "start_color", 0 },
#endif
- { "status_color", 1 },
#ifdef SUN_ATTACHMENT
{ "sun_attachment", 1 },
#endif
- { "timeout", 1 },
- { "tls_sni", 1 },
- { "trash", 1 },
#ifdef HAVE_TYPEAHEAD
{ "typeahead", 1 },
#else
};
/**
- * print_compile_options - Print a list of enabled/disabled features
+ * print_compile_options - Print a list of enabled/disabled features.
+ *
+ * Two lists are generated and passed to this function:
*
- * The configure script lets uses enable/disable features.
- * This shows the Mutt user which features are/aren't available.
+ * One list which just uses the configure state of each feature.
+ * One list which just uses feature which are set to on directly in NeoMutt.
*
* The output is of the form: "+enabled_feature -disabled_feature" and is
* wrapped to SCREEN_WIDTH characters.
*/
-static void print_compile_options(void)
+static void print_compile_options(struct CompileOptions *co)
{
int len;
int used = 2;
bool tty = stdout ? isatty(fileno(stdout)) : false;
printf(" ");
- for (int i = 0; comp_opts[i].name; i++)
+ for (int i = 0; co[i].name; i++)
{
- len = strlen(comp_opts[i].name) + 2; /* +/- and a space */
+ len = strlen(co[i].name) + 2; /* +/- and a space */
if ((used + len) > SCREEN_WIDTH)
{
used = 2;
printf("\n ");
}
used += len;
- if (comp_opts[i].enabled)
+ if (co[i].enabled)
{
if (tty)
- printf("\033[1;32m+%s\033[0m ", comp_opts[i].name);
+ printf("\033[1;32m+%s\033[0m ", co[i].name);
else
- printf("+%s ", comp_opts[i].name);
+ printf("+%s ", co[i].name);
}
else
{
if (tty)
- printf("\033[1;31m-%s\033[0m ", comp_opts[i].name);
+ printf("\033[1;31m-%s\033[0m ", co[i].name);
else
- printf("-%s ", comp_opts[i].name);
+ printf("-%s ", co[i].name);
}
}
puts("");
rstrip_in_place((char *) cc_cflags);
printf("\nCompilation CFLAGS: %s\n", (char *) cc_cflags);
+ puts(_("\nDefault options:"));
+ print_compile_options(comp_opts_default);
+
puts(_("\nCompile options:"));
- print_compile_options();
+ print_compile_options(comp_opts);
#ifdef DOMAIN
printf("DOMAIN=\"%s\"\n", DOMAIN);
{
if (!name)
return false;
+ for (int i = 0; comp_opts_default[i].name; i++)
+ {
+ if (mutt_strcmp(name, comp_opts_default[i].name) == 0)
+ {
+ return true;
+ }
+ }
for (int i = 0; comp_opts[i].name; i++)
{
if (mutt_strcmp(name, comp_opts[i].name) == 0)