Print system and compile info to a file.
389{
390 if (!fp)
391 return false;
392
393 struct utsname uts = { 0 };
394 bool tty = isatty(fileno(fp));
395
396 const char *col_cyan = "";
397 const char *col_bold = "";
398 const char *col_end = "";
399
400 if (tty)
401 {
402 col_cyan = "\033[1;36m";
403 col_bold = "\033[1m";
404 col_end = "\033[0m";
405 }
406
408 fprintf(fp,
"%s\n",
_(
Notice));
409
410 uname(&uts);
411
412 fprintf(fp, "%sSystem:%s ", col_bold, col_end);
413#ifdef SCO
414 fprintf(fp, "SCO %s", uts.release);
415#else
416 fprintf(fp, "%s %s", uts.sysname, uts.release);
417#endif
418
419 fprintf(fp, " (%s)", uts.machine);
420
421 fprintf(fp, "\n%sncurses:%s %s", col_bold, col_end, curses_version());
422#ifdef NCURSES_VERSION
423 fprintf(fp, " (compiled with %s.%d)", NCURSES_VERSION, NCURSES_VERSION_PATCH);
424#endif
425
426#ifdef _LIBICONV_VERSION
427 fprintf(fp, "\n%slibiconv:%s %d.%d", col_bold, col_end,
428 _LIBICONV_VERSION >> 8, _LIBICONV_VERSION & 0xff);
429#endif
430
431#ifdef HAVE_LIBIDN
433#endif
434
435#ifdef CRYPT_BACKEND_GPGME
437#endif
438
439#ifdef USE_SSL_OPENSSL
440#ifdef LIBRESSL_VERSION_TEXT
441 fprintf(fp, "\n%sLibreSSL:%s %s", col_bold, col_end, LIBRESSL_VERSION_TEXT);
442#endif
443#ifdef OPENSSL_VERSION_TEXT
444 fprintf(fp, "\n%sOpenSSL:%s %s", col_bold, col_end, OPENSSL_VERSION_TEXT);
445#endif
446#endif
447
448#ifdef USE_SSL_GNUTLS
449 fprintf(fp, "\n%sGnuTLS:%s %s", col_bold, col_end, GNUTLS_VERSION);
450#endif
451
452#ifdef HAVE_NOTMUCH
453 fprintf(fp, "\n%slibnotmuch:%s %d.%d.%d", col_bold, col_end, LIBNOTMUCH_MAJOR_VERSION,
454 LIBNOTMUCH_MINOR_VERSION, LIBNOTMUCH_MICRO_VERSION);
455#endif
456
457#ifdef HAVE_PCRE2
458 {
459 char version[24] = { 0 };
460 pcre2_config(PCRE2_CONFIG_VERSION, version);
461 fprintf(fp, "\n%sPCRE2:%s %s", col_bold, col_end, version);
462 }
463#endif
464
465#ifdef USE_HCACHE
467 fprintf(fp, "\n%sstorage:%s %s", col_bold, col_end, backends);
469#ifdef USE_HCACHE_COMPRESSION
471 fprintf(fp, "\n%scompression:%s %s", col_bold, col_end, backends);
473#endif
474#endif
475
477 fprintf(fp,
"\n\n%sConfigure options:%s %s\n", col_bold, col_end, (
char *)
configure_options);
478
480 fprintf(fp,
"\n%sCompilation CFLAGS:%s %s\n", col_bold, col_end, (
char *)
cc_cflags);
481
482 fprintf(fp,
"\n%s%s%s\n", col_bold,
_(
"Compile options:"), col_end);
484
486 {
487 fprintf(fp,
"\n%s%s%s\n", col_bold,
_(
"Devel options:"), col_end);
489 }
490
491 fprintf(fp, "\n");
492#ifdef DOMAIN
493 fprintf(fp, "DOMAIN=\"%s\"\n", DOMAIN);
494#endif
495#ifdef ISPELL
496 fprintf(fp,
"ISPELL=\"%s\"\n",
ISPELL);
497#endif
498 fprintf(fp, "MAILPATH=\"%s\"\n", MAILPATH);
499 fprintf(fp, "PKGDATADIR=\"%s\"\n", PKGDATADIR);
500 fprintf(fp, "SENDMAIL=\"%s\"\n", SENDMAIL);
501 fprintf(fp, "SYSCONFDIR=\"%s\"\n", SYSCONFDIR);
502
503 fprintf(fp, "\n");
505
506 fflush(fp);
507 return !ferror(fp);
508}
const char * compress_list(void)
Get a list of compression backend names.
const char * mutt_gpgme_print_version(void)
Get version of GPGME.
const char * mutt_idna_print_version(void)
Create an IDN version string.
static void print_compile_options(const struct CompileOptions *co, FILE *fp)
Print a list of enabled/disabled features.
static const char * ReachingUs
CLI Version: How to reach the NeoMutt Team.
const char * mutt_make_version(void)
Generate the NeoMutt version string.
static const struct CompileOptions CompOpts[]
Compile options strings for neomutt -v output.
unsigned char configure_options[]
static const struct CompileOptions DebugOpts[]
Debug options strings for neomutt -v output.
unsigned char cc_cflags[]
static char * rstrip_in_place(char *s)
Strip a trailing carriage return.
static const char * Notice
CLI Version: Warranty notice.
const char * store_backend_list(void)
Get a list of backend names.