Print system and compile info to a file.
394{
395 if (!fp)
396 return false;
397
398 struct utsname uts = { 0 };
399 bool tty = isatty(fileno(fp));
400
401 const char *col_cyan = "";
402 const char *col_bold = "";
403 const char *col_end = "";
404
405 if (tty)
406 {
407 col_cyan = "\033[1;36m";
408 col_bold = "\033[1m";
409 col_end = "\033[0m";
410 }
411
413 fprintf(fp,
"%s\n",
_(
Notice));
414
415 uname(&uts);
416
417 fprintf(fp, "%sSystem:%s ", col_bold, col_end);
418#ifdef SCO
419 fprintf(fp, "SCO %s", uts.release);
420#else
421 fprintf(fp, "%s %s", uts.sysname, uts.release);
422#endif
423
424 fprintf(fp, " (%s)", uts.machine);
425
426 fprintf(fp, "\n%sncurses:%s %s", col_bold, col_end, curses_version());
427#ifdef NCURSES_VERSION
428 fprintf(fp, " (compiled with %s.%d)", NCURSES_VERSION, NCURSES_VERSION_PATCH);
429#endif
430
431#ifdef _LIBICONV_VERSION
432 fprintf(fp, "\n%slibiconv:%s %d.%d", col_bold, col_end,
433 _LIBICONV_VERSION >> 8, _LIBICONV_VERSION & 0xff);
434#endif
435
436#ifdef HAVE_LIBIDN
438#endif
439
440#ifdef CRYPT_BACKEND_GPGME
442#endif
443
444#ifdef USE_SSL_OPENSSL
445#ifdef LIBRESSL_VERSION_TEXT
446 fprintf(fp, "\n%sLibreSSL:%s %s", col_bold, col_end, LIBRESSL_VERSION_TEXT);
447#endif
448#ifdef OPENSSL_VERSION_TEXT
449 fprintf(fp, "\n%sOpenSSL:%s %s", col_bold, col_end, OPENSSL_VERSION_TEXT);
450#endif
451#endif
452
453#ifdef USE_SSL_GNUTLS
454 fprintf(fp, "\n%sGnuTLS:%s %s", col_bold, col_end, GNUTLS_VERSION);
455#endif
456
457#ifdef HAVE_NOTMUCH
458 fprintf(fp, "\n%slibnotmuch:%s %d.%d.%d", col_bold, col_end, LIBNOTMUCH_MAJOR_VERSION,
459 LIBNOTMUCH_MINOR_VERSION, LIBNOTMUCH_MICRO_VERSION);
460#endif
461
462#ifdef HAVE_PCRE2
463 {
464 char version[24] = { 0 };
465 pcre2_config(PCRE2_CONFIG_VERSION, version);
466 fprintf(fp, "\n%sPCRE2:%s %s", col_bold, col_end, version);
467 }
468#endif
469
470#ifdef USE_HCACHE
472 fprintf(fp, "\n%sstorage:%s %s", col_bold, col_end, backends);
474#ifdef USE_HCACHE_COMPRESSION
476 fprintf(fp, "\n%scompression:%s %s", col_bold, col_end, backends);
478#endif
479#endif
480
482 fprintf(fp,
"\n\n%sConfigure options:%s %s\n", col_bold, col_end, (
char *)
configure_options);
483
485 fprintf(fp,
"\n%sCompilation CFLAGS:%s %s\n", col_bold, col_end, (
char *)
cc_cflags);
486
487 fprintf(fp,
"\n%s%s%s\n", col_bold,
_(
"Compile options:"), col_end);
489
491 {
492 fprintf(fp,
"\n%s%s%s\n", col_bold,
_(
"Devel options:"), col_end);
494 }
495
496 fprintf(fp, "\n");
497#ifdef DOMAIN
498 fprintf(fp, "DOMAIN=\"%s\"\n", DOMAIN);
499#endif
500#ifdef ISPELL
501 fprintf(fp,
"ISPELL=\"%s\"\n",
ISPELL);
502#endif
503 fprintf(fp, "MAILPATH=\"%s\"\n", MAILPATH);
504#ifdef MIXMASTER
505 fprintf(fp, "MIXMASTER=\"%s\"\n", MIXMASTER);
506#endif
507 fprintf(fp, "PKGDATADIR=\"%s\"\n", PKGDATADIR);
508 fprintf(fp, "SENDMAIL=\"%s\"\n", SENDMAIL);
509 fprintf(fp, "SYSCONFDIR=\"%s\"\n", SYSCONFDIR);
510
511 fprintf(fp, "\n");
513
514 fflush(fp);
515 return !ferror(fp);
516}
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.