2 Print features specific for this build
4 Copyright (C) 2000-2020
5 Free Software Foundation, Inc.
7 This file is part of the Midnight Commander.
9 The Midnight Commander is free software: you can redistribute it
10 and/or modify it under the terms of the GNU General Public License as
11 published by the Free Software Foundation, either version 3 of the License,
12 or (at your option) any later version.
14 The Midnight Commander is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
24 * \brief Source: prints features specific for this build
31 #include <sys/types.h>
33 #include "lib/global.h"
34 #include "lib/fileloc.h"
35 #include "lib/mcconfig.h"
36 #include "lib/util.h" /* mc_get_profile_root() */
37 #include "lib/tty/tty.h" /* S-Lang or ncurses version */
39 #include "src/textconf.h"
41 /*** global variables ****************************************************************************/
43 /*** file scope macro definitions ****************************************************************/
45 /*** file scope type declarations ****************************************************************/
47 /*** file scope variables ************************************************************************/
50 static const char *const vfs_supported
[] = {
51 #ifdef ENABLE_VFS_CPIO
60 #ifdef ENABLE_VFS_EXTFS
63 #ifdef ENABLE_VFS_UNDELFS
69 #ifdef ENABLE_VFS_SFTP
72 #ifdef ENABLE_VFS_FISH
77 #endif /* ENABLE_VFS_SMB */
80 #endif /* ENABLE_VFS */
82 static const char *const features
[] = {
84 #ifdef USE_INTERNAL_EDIT
86 N_("With builtin Editor and Aspell support"),
88 N_("With builtin Editor"),
89 #endif /* HAVE_ASPELL */
90 #endif /* USE_INTERNAL_EDIT */
92 #ifdef ENABLE_SUBSHELL
93 #ifdef SUBSHELL_OPTIONAL
94 N_("With optional subshell support"),
96 N_("With subshell support as default"),
98 #endif /* !ENABLE_SUBSHELL */
100 #ifdef ENABLE_BACKGROUND
101 N_("With support for background operations"),
105 N_("With mouse support on xterm and Linux console"),
107 N_("With mouse support on xterm"),
110 #ifdef HAVE_TEXTMODE_X11_SUPPORT
111 N_("With support for X11 events"),
115 N_("With internationalization support"),
119 N_("With multiple codepages support"),
122 #ifdef ENABLE_EXT2FS_ATTR
123 N_("With ext2fs attributes support"),
129 /*** file scope functions ************************************************************************/
130 /* --------------------------------------------------------------------------------------------- */
132 /* --------------------------------------------------------------------------------------------- */
133 /*** public functions ****************************************************************************/
134 /* --------------------------------------------------------------------------------------------- */
141 printf (_("GNU Midnight Commander %s\n"), VERSION
);
143 printf (_("Built with GLib %d.%d.%d\n"),
144 GLIB_MAJOR_VERSION
, GLIB_MINOR_VERSION
, GLIB_MICRO_VERSION
);
147 printf (_("Built with S-Lang %s with terminfo database\n"), SLANG_VERSION_STRING
);
148 #elif defined(USE_NCURSES)
149 #ifdef NCURSES_VERSION
150 printf (_("Built with ncurses %s\n"), NCURSES_VERSION
);
152 puts (_("Built with ncurses (unknown version)"));
153 #endif /* !NCURSES_VERSION */
154 #elif defined(USE_NCURSESW)
155 #ifdef NCURSES_VERSION
156 printf (_("Built with ncursesw %s\n"), NCURSES_VERSION
);
158 puts (_("Built with ncursesw (unknown version)"));
159 #endif /* !NCURSES_VERSION */
161 #error "Cannot compile mc without S-Lang or ncurses"
162 #endif /* !HAVE_SLANG && !USE_NCURSES */
164 for (i
= 0; features
[i
] != NULL
; i
++)
165 puts (_(features
[i
]));
168 puts (_("Virtual File Systems:"));
169 for (i
= 0; vfs_supported
[i
] != NULL
; i
++)
170 printf ("%s %s", i
== 0 ? "" : ",", _(vfs_supported
[i
]));
172 #endif /* ENABLE_VFS */
174 (void) puts (_("Data types:"));
175 #define TYPE_INFO(T) \
176 (void)printf(" %s: %d;", #T, (int) (CHAR_BIT * sizeof(T)))
187 /* --------------------------------------------------------------------------------------------- */
188 #define PRINTF_GROUP(a) \
189 (void) printf ("[%s]\n", a)
190 #define PRINTF_SECTION(a,b) \
191 (void) printf (" %-17s %s\n", a, b)
192 #define PRINTF_SECTION2(a,b) \
193 (void) printf (" %-17s %s/\n", a, b)
194 #define PRINTF(a, b, c) \
195 (void) printf ("\t%-15s %s/%s\n", a, b, c)
196 #define PRINTF2(a, b, c) \
197 (void) printf ("\t%-15s %s%s\n", a, b, c)
200 show_datadirs_extended (void)
202 (void) printf ("%s %s\n", _("Home directory:"), mc_config_get_home_dir ());
203 (void) printf ("%s %s\n", _("Profile root directory:"), mc_get_profile_root ());
206 PRINTF_GROUP (_("System data"));
208 PRINTF_SECTION (_("Config directory:"), mc_global
.sysconfig_dir
);
209 PRINTF_SECTION (_("Data directory:"), mc_global
.share_data_dir
);
211 PRINTF_SECTION (_("File extension handlers:"), EXTHELPERSDIR
);
213 #if defined ENABLE_VFS_EXTFS || defined ENABLE_VFS_FISH
214 PRINTF_SECTION (_("VFS plugins and scripts:"), LIBEXECDIR
);
215 #ifdef ENABLE_VFS_EXTFS
216 PRINTF2 ("extfs.d:", LIBEXECDIR
, MC_EXTFS_DIR PATH_SEP_STR
);
218 #ifdef ENABLE_VFS_FISH
219 PRINTF2 ("fish:", LIBEXECDIR
, FISH_PREFIX PATH_SEP_STR
);
221 #endif /* ENABLE_VFS_EXTFS || defiined ENABLE_VFS_FISH */
224 PRINTF_GROUP (_("User data"));
226 PRINTF_SECTION2 (_("Config directory:"), mc_config_get_path ());
227 PRINTF_SECTION2 (_("Data directory:"), mc_config_get_data_path ());
228 PRINTF ("skins:", mc_config_get_data_path (), MC_SKINS_DIR PATH_SEP_STR
);
229 #ifdef ENABLE_VFS_EXTFS
230 PRINTF ("extfs.d:", mc_config_get_data_path (), MC_EXTFS_DIR PATH_SEP_STR
);
232 #ifdef ENABLE_VFS_FISH
233 PRINTF ("fish:", mc_config_get_data_path (), FISH_PREFIX PATH_SEP_STR
);
235 #ifdef USE_INTERNAL_EDIT
236 PRINTF ("mcedit macros:", mc_config_get_data_path (), MC_MACRO_FILE
);
237 PRINTF ("mcedit external macros:", mc_config_get_data_path (), EDIT_HOME_MACRO_FILE
".*");
239 PRINTF_SECTION2 (_("Cache directory:"), mc_config_get_cache_path ());
243 #undef PRINTF_SECTION
246 /* --------------------------------------------------------------------------------------------- */
248 #ifdef ENABLE_CONFIGURE_ARGS
250 show_configure_options (void)
252 (void) puts (MC_CONFIGURE_ARGS
);
256 /* --------------------------------------------------------------------------------------------- */