2 Print features specific for this build
4 Copyright (C) 2000, 2001, 2002, 2004, 2005, 2007, 2011
5 The 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_FISH
72 #endif /* ENABLE_VFS_SMB */
75 #endif /* ENABLE_VFS */
77 static const char *const features
[] = {
79 N_("Using the S-Lang library with terminfo database\n"),
80 #elif defined(USE_NCURSES)
81 N_("Using the ncurses library\n"),
82 #elif defined(USE_NCURSESW)
83 N_("Using the ncursesw library\n"),
85 #error "Cannot compile mc without S-Lang or ncurses"
86 #endif /* !HAVE_SLANG && !USE_NCURSES */
88 #ifdef USE_INTERNAL_EDIT
89 N_("With builtin Editor\n"),
92 #ifdef HAVE_SUBSHELL_SUPPORT
93 #ifdef SUBSHELL_OPTIONAL
94 N_("With optional subshell support\n"),
96 N_("With subshell support as default\n"),
98 #endif /* !HAVE_SUBSHELL_SUPPORT */
100 #ifdef ENABLE_BACKGROUND
101 N_("With support for background operations\n"),
105 N_("With mouse support on xterm and Linux console\n"),
107 N_("With mouse support on xterm\n"),
110 #ifdef HAVE_TEXTMODE_X11_SUPPORT
111 N_("With support for X11 events\n"),
115 N_("With internationalization support\n"),
119 N_("With multiple codepages support\n"),
125 /*** file scope functions ************************************************************************/
126 /* --------------------------------------------------------------------------------------------- */
128 /* --------------------------------------------------------------------------------------------- */
129 /*** public functions ****************************************************************************/
130 /* --------------------------------------------------------------------------------------------- */
137 printf (_("GNU Midnight Commander %s\n"), VERSION
);
139 printf (_("Built with GLib %d.%d.%d\n"),
140 GLIB_MAJOR_VERSION
, GLIB_MINOR_VERSION
, GLIB_MICRO_VERSION
);
142 for (i
= 0; features
[i
] != NULL
; i
++)
143 printf ("%s", _(features
[i
]));
146 printf (_("Virtual File Systems:"));
147 for (i
= 0; vfs_supported
[i
] != NULL
; i
++)
148 printf ("%s %s", i
== 0 ? "" : ",", _(vfs_supported
[i
]));
150 #endif /* ENABLE_VFS */
152 (void) printf (_("Data types:"));
153 #define TYPE_INFO(T) \
154 (void)printf(" %s: %d;", #T, (int) (CHAR_BIT * sizeof(T)))
162 (void) printf ("\n");
165 /* --------------------------------------------------------------------------------------------- */
166 #define PRINTF_GROUP(a) \
167 (void) printf ("[%s]\n", a)
168 #define PRINTF_SECTION(a,b) \
169 (void) printf (" %-17s %s\n", a, b)
170 #define PRINTF_SECTION2(a,b) \
171 (void) printf (" %-17s %s/\n", a, b)
172 #define PRINTF(a, b, c) \
173 (void) printf ("\t%-15s %s/%s\n", a, b, c)
174 #define PRINTF2(a, b, c) \
175 (void) printf ("\t%-15s %s%s\n", a, b, c)
178 show_datadirs_extended (void)
180 (void) printf ("%s %s\n", _("Home directory:"), mc_config_get_home_dir ());
183 PRINTF_GROUP (_("System data"));
185 PRINTF_SECTION (_("Config directory:"), mc_global
.sysconfig_dir
);
186 PRINTF_SECTION (_("Data directory:"), mc_global
.share_data_dir
);
188 #if defined ENABLE_VFS_EXTFS || defined ENABLE_VFS_FISH
189 PRINTF_SECTION (_("VFS plugins and scripts:"), LIBEXECDIR
);
190 #ifdef ENABLE_VFS_EXTFS
191 PRINTF2 ("extfs.d:", LIBEXECDIR
, MC_EXTFS_DIR
"/");
193 #ifdef ENABLE_VFS_FISH
194 PRINTF2 ("fish:", LIBEXECDIR
, FISH_PREFIX
"/");
196 #endif /* ENABLE_VFS_EXTFS || defiined ENABLE_VFS_FISH */
199 PRINTF_GROUP (_("User data"));
201 PRINTF_SECTION2 (_("Config directory:"), mc_config_get_path ());
202 PRINTF_SECTION2 (_("Data directory:"), mc_config_get_data_path ());
203 PRINTF ("skins:", mc_config_get_data_path (), MC_SKINS_SUBDIR
"/");
204 #ifdef ENABLE_VFS_EXTFS
205 PRINTF ("extfs.d:", mc_config_get_data_path (), MC_EXTFS_DIR
"/");
207 #ifdef ENABLE_VFS_FISH
208 PRINTF ("fish:", mc_config_get_data_path (), FISH_PREFIX
"/");
211 PRINTF_SECTION2 (_("Cache directory:"), mc_config_get_cache_path ());
216 #undef PRINTF_SECTION
219 /* --------------------------------------------------------------------------------------------- */
222 show_configure_options (void)
224 (void) printf ("%s\n", MC_CONFIGURE_ARGS
);
227 /* --------------------------------------------------------------------------------------------- */