2 Print features specific for this build
4 Copyright (C) 2000-2016
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"
37 #include "src/textconf.h"
39 /*** global variables ****************************************************************************/
41 /*** file scope macro definitions ****************************************************************/
43 /*** file scope type declarations ****************************************************************/
45 /*** file scope variables ************************************************************************/
48 static const char *const vfs_supported
[] = {
49 #ifdef ENABLE_VFS_CPIO
58 #ifdef ENABLE_VFS_EXTFS
61 #ifdef ENABLE_VFS_UNDELFS
67 #ifdef ENABLE_VFS_SFTP
70 #ifdef ENABLE_VFS_FISH
75 #endif /* ENABLE_VFS_SMB */
78 #endif /* ENABLE_VFS */
80 static const char *const features
[] = {
82 N_("Using the S-Lang library with terminfo database\n"),
83 #elif defined(USE_NCURSES)
84 N_("Using the ncurses library\n"),
85 #elif defined(USE_NCURSESW)
86 N_("Using the ncursesw library\n"),
88 #error "Cannot compile mc without S-Lang or ncurses"
89 #endif /* !HAVE_SLANG && !USE_NCURSES */
91 #ifdef USE_INTERNAL_EDIT
92 N_("With builtin Editor\n"),
95 #ifdef ENABLE_SUBSHELL
96 #ifdef SUBSHELL_OPTIONAL
97 N_("With optional subshell support\n"),
99 N_("With subshell support as default\n"),
101 #endif /* !ENABLE_SUBSHELL */
103 #ifdef ENABLE_BACKGROUND
104 N_("With support for background operations\n"),
108 N_("With mouse support on xterm and Linux console\n"),
110 N_("With mouse support on xterm\n"),
113 #ifdef HAVE_TEXTMODE_X11_SUPPORT
114 N_("With support for X11 events\n"),
118 N_("With internationalization support\n"),
122 N_("With multiple codepages support\n"),
128 /*** file scope functions ************************************************************************/
129 /* --------------------------------------------------------------------------------------------- */
131 /* --------------------------------------------------------------------------------------------- */
132 /*** public functions ****************************************************************************/
133 /* --------------------------------------------------------------------------------------------- */
140 printf (_("GNU Midnight Commander %s\n"), VERSION
);
142 printf (_("Built with GLib %d.%d.%d\n"),
143 GLIB_MAJOR_VERSION
, GLIB_MINOR_VERSION
, GLIB_MICRO_VERSION
);
145 for (i
= 0; features
[i
] != NULL
; i
++)
146 printf ("%s", _(features
[i
]));
149 printf (_("Virtual File Systems:"));
150 for (i
= 0; vfs_supported
[i
] != NULL
; i
++)
151 printf ("%s %s", i
== 0 ? "" : ",", _(vfs_supported
[i
]));
153 #endif /* ENABLE_VFS */
155 (void) printf (_("Data types:"));
156 #define TYPE_INFO(T) \
157 (void)printf(" %s: %d;", #T, (int) (CHAR_BIT * sizeof(T)))
165 (void) printf ("\n");
168 /* --------------------------------------------------------------------------------------------- */
169 #define PRINTF_GROUP(a) \
170 (void) printf ("[%s]\n", a)
171 #define PRINTF_SECTION(a,b) \
172 (void) printf (" %-17s %s\n", a, b)
173 #define PRINTF_SECTION2(a,b) \
174 (void) printf (" %-17s %s/\n", a, b)
175 #define PRINTF(a, b, c) \
176 (void) printf ("\t%-15s %s/%s\n", a, b, c)
177 #define PRINTF2(a, b, c) \
178 (void) printf ("\t%-15s %s%s\n", a, b, c)
181 show_datadirs_extended (void)
183 (void) printf ("%s %s\n", _("Root directory:"), mc_config_get_home_dir ());
186 PRINTF_GROUP (_("System data"));
188 PRINTF_SECTION (_("Config directory:"), mc_global
.sysconfig_dir
);
189 PRINTF_SECTION (_("Data directory:"), mc_global
.share_data_dir
);
191 PRINTF_SECTION (_("File extension handlers:"), EXTHELPERSDIR
);
193 #if defined ENABLE_VFS_EXTFS || defined ENABLE_VFS_FISH
194 PRINTF_SECTION (_("VFS plugins and scripts:"), LIBEXECDIR
);
195 #ifdef ENABLE_VFS_EXTFS
196 PRINTF2 ("extfs.d:", LIBEXECDIR
, MC_EXTFS_DIR PATH_SEP_STR
);
198 #ifdef ENABLE_VFS_FISH
199 PRINTF2 ("fish:", LIBEXECDIR
, FISH_PREFIX PATH_SEP_STR
);
201 #endif /* ENABLE_VFS_EXTFS || defiined ENABLE_VFS_FISH */
204 PRINTF_GROUP (_("User data"));
206 PRINTF_SECTION2 (_("Config directory:"), mc_config_get_path ());
207 PRINTF_SECTION2 (_("Data directory:"), mc_config_get_data_path ());
208 PRINTF ("skins:", mc_config_get_data_path (), MC_SKINS_SUBDIR PATH_SEP_STR
);
209 #ifdef ENABLE_VFS_EXTFS
210 PRINTF ("extfs.d:", mc_config_get_data_path (), MC_EXTFS_DIR PATH_SEP_STR
);
212 #ifdef ENABLE_VFS_FISH
213 PRINTF ("fish:", mc_config_get_data_path (), FISH_PREFIX PATH_SEP_STR
);
215 #ifdef USE_INTERNAL_EDIT
216 PRINTF ("mcedit macros:", mc_config_get_data_path (), MC_MACRO_FILE
);
217 PRINTF ("mcedit external macros:", mc_config_get_data_path (), MC_EXTMACRO_FILE
".*");
219 PRINTF_SECTION2 (_("Cache directory:"), mc_config_get_cache_path ());
224 #undef PRINTF_SECTION
227 /* --------------------------------------------------------------------------------------------- */
230 show_configure_options (void)
232 (void) printf ("%s\n", MC_CONFIGURE_ARGS
);
235 /* --------------------------------------------------------------------------------------------- */