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"
36 #include "lib/util.h" /* mc_get_profile_root() */
38 #include "src/textconf.h"
40 /*** global variables ****************************************************************************/
42 /*** file scope macro definitions ****************************************************************/
44 /*** file scope type declarations ****************************************************************/
46 /*** file scope variables ************************************************************************/
49 static const char *const vfs_supported
[] = {
50 #ifdef ENABLE_VFS_CPIO
59 #ifdef ENABLE_VFS_EXTFS
62 #ifdef ENABLE_VFS_UNDELFS
68 #ifdef ENABLE_VFS_SFTP
71 #ifdef ENABLE_VFS_FISH
76 #endif /* ENABLE_VFS_SMB */
79 #endif /* ENABLE_VFS */
81 static const char *const features
[] = {
83 N_("Using the S-Lang library with terminfo database\n"),
84 #elif defined(USE_NCURSES)
85 N_("Using the ncurses library\n"),
86 #elif defined(USE_NCURSESW)
87 N_("Using the ncursesw library\n"),
89 #error "Cannot compile mc without S-Lang or ncurses"
90 #endif /* !HAVE_SLANG && !USE_NCURSES */
92 #ifdef USE_INTERNAL_EDIT
93 N_("With builtin Editor\n"),
96 #ifdef ENABLE_SUBSHELL
97 #ifdef SUBSHELL_OPTIONAL
98 N_("With optional subshell support\n"),
100 N_("With subshell support as default\n"),
102 #endif /* !ENABLE_SUBSHELL */
104 #ifdef ENABLE_BACKGROUND
105 N_("With support for background operations\n"),
109 N_("With mouse support on xterm and Linux console\n"),
111 N_("With mouse support on xterm\n"),
114 #ifdef HAVE_TEXTMODE_X11_SUPPORT
115 N_("With support for X11 events\n"),
119 N_("With internationalization support\n"),
123 N_("With multiple codepages support\n"),
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
);
146 for (i
= 0; features
[i
] != NULL
; i
++)
147 printf ("%s", _(features
[i
]));
150 printf (_("Virtual File Systems:"));
151 for (i
= 0; vfs_supported
[i
] != NULL
; i
++)
152 printf ("%s %s", i
== 0 ? "" : ",", _(vfs_supported
[i
]));
154 #endif /* ENABLE_VFS */
156 (void) printf (_("Data types:"));
157 #define TYPE_INFO(T) \
158 (void)printf(" %s: %d;", #T, (int) (CHAR_BIT * sizeof(T)))
166 (void) printf ("\n");
169 /* --------------------------------------------------------------------------------------------- */
170 #define PRINTF_GROUP(a) \
171 (void) printf ("[%s]\n", a)
172 #define PRINTF_SECTION(a,b) \
173 (void) printf (" %-17s %s\n", a, b)
174 #define PRINTF_SECTION2(a,b) \
175 (void) printf (" %-17s %s/\n", a, b)
176 #define PRINTF(a, b, c) \
177 (void) printf ("\t%-15s %s/%s\n", a, b, c)
178 #define PRINTF2(a, b, c) \
179 (void) printf ("\t%-15s %s%s\n", a, b, c)
182 show_datadirs_extended (void)
184 (void) printf ("%s %s\n", _("Home directory:"), mc_config_get_home_dir ());
185 (void) printf ("%s %s\n", _("Profile root directory:"), mc_get_profile_root ());
188 PRINTF_GROUP (_("System data"));
190 PRINTF_SECTION (_("Config directory:"), mc_global
.sysconfig_dir
);
191 PRINTF_SECTION (_("Data directory:"), mc_global
.share_data_dir
);
193 PRINTF_SECTION (_("File extension handlers:"), EXTHELPERSDIR
);
195 #if defined ENABLE_VFS_EXTFS || defined ENABLE_VFS_FISH
196 PRINTF_SECTION (_("VFS plugins and scripts:"), LIBEXECDIR
);
197 #ifdef ENABLE_VFS_EXTFS
198 PRINTF2 ("extfs.d:", LIBEXECDIR
, MC_EXTFS_DIR PATH_SEP_STR
);
200 #ifdef ENABLE_VFS_FISH
201 PRINTF2 ("fish:", LIBEXECDIR
, FISH_PREFIX PATH_SEP_STR
);
203 #endif /* ENABLE_VFS_EXTFS || defiined ENABLE_VFS_FISH */
206 PRINTF_GROUP (_("User data"));
208 PRINTF_SECTION2 (_("Config directory:"), mc_config_get_path ());
209 PRINTF_SECTION2 (_("Data directory:"), mc_config_get_data_path ());
210 PRINTF ("skins:", mc_config_get_data_path (), MC_SKINS_SUBDIR PATH_SEP_STR
);
211 #ifdef ENABLE_VFS_EXTFS
212 PRINTF ("extfs.d:", mc_config_get_data_path (), MC_EXTFS_DIR PATH_SEP_STR
);
214 #ifdef ENABLE_VFS_FISH
215 PRINTF ("fish:", mc_config_get_data_path (), FISH_PREFIX PATH_SEP_STR
);
217 #ifdef USE_INTERNAL_EDIT
218 PRINTF ("mcedit macros:", mc_config_get_data_path (), MC_MACRO_FILE
);
219 PRINTF ("mcedit external macros:", mc_config_get_data_path (), MC_EXTMACRO_FILE
".*");
221 PRINTF_SECTION2 (_("Cache directory:"), mc_config_get_cache_path ());
226 #undef PRINTF_SECTION
229 /* --------------------------------------------------------------------------------------------- */
232 show_configure_options (void)
234 (void) printf ("%s\n", MC_CONFIGURE_ARGS
);
237 /* --------------------------------------------------------------------------------------------- */