1 /* Print features specific for this build
3 Copyright (C) 2000, 2001, 2002, 2004, 2005, 2007
4 Free Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 * \brief Source: prints features specific for this build
29 #include <sys/types.h>
31 #include "lib/global.h"
32 #include "lib/fileloc.h"
33 #include "lib/mcconfig.h"
35 #include "src/textconf.h"
37 /*** global variables ****************************************************************************/
39 /*** file scope macro definitions ****************************************************************/
41 /*** file scope type declarations ****************************************************************/
43 /*** file scope variables ************************************************************************/
46 static const char *const vfs_supported
[] = {
47 #ifdef ENABLE_VFS_CPIO
56 #ifdef ENABLE_VFS_EXTFS
59 #ifdef ENABLE_VFS_UNDELFS
65 #ifdef ENABLE_VFS_FISH
70 #endif /* ENABLE_VFS_SMB */
73 #endif /* ENABLE_VFS */
75 static const char *const features
[] = {
77 N_("Using the S-Lang library with terminfo database\n"),
78 #elif defined(USE_NCURSES)
79 N_("Using the ncurses library\n"),
80 #elif defined(USE_NCURSESW)
81 N_("Using the ncursesw library\n"),
83 #error "Cannot compile mc without S-Lang or ncurses"
84 #endif /* !HAVE_SLANG && !USE_NCURSES */
86 #ifdef USE_INTERNAL_EDIT
87 N_("With builtin Editor\n"),
90 #ifdef HAVE_SUBSHELL_SUPPORT
91 #ifdef SUBSHELL_OPTIONAL
92 N_("With optional subshell support\n"),
94 N_("With subshell support as default\n"),
96 #endif /* !HAVE_SUBSHELL_SUPPORT */
98 #ifdef WITH_BACKGROUND
99 N_("With support for background operations\n"),
103 N_("With mouse support on xterm and Linux console\n"),
105 N_("With mouse support on xterm\n"),
108 #ifdef HAVE_TEXTMODE_X11_SUPPORT
109 N_("With support for X11 events\n"),
113 N_("With internationalization support\n"),
117 N_("With multiple codepages support\n"),
123 /*** file scope functions ************************************************************************/
124 /* --------------------------------------------------------------------------------------------- */
126 /* --------------------------------------------------------------------------------------------- */
127 /*** public functions ****************************************************************************/
128 /* --------------------------------------------------------------------------------------------- */
135 printf (_("GNU Midnight Commander %s\n"), VERSION
);
137 printf (_("Built with GLib %d.%d.%d\n"),
138 GLIB_MAJOR_VERSION
, GLIB_MINOR_VERSION
, GLIB_MICRO_VERSION
);
140 for (i
= 0; features
[i
] != NULL
; i
++)
141 printf ("%s", _(features
[i
]));
144 printf (_("Virtual File Systems:"));
145 for (i
= 0; vfs_supported
[i
] != NULL
; i
++)
146 printf ("%s %s", i
== 0 ? "" : ",", _(vfs_supported
[i
]));
148 #endif /* ENABLE_VFS */
150 (void) printf (_("Data types:"));
151 #define TYPE_INFO(T) \
152 (void)printf(" %s: %d;", #T, (int) (CHAR_BIT * sizeof(T)))
160 (void) printf ("\n");
163 /* --------------------------------------------------------------------------------------------- */
164 #define PRINTF_GROUP(a) \
165 (void) printf ("[%s]\n", a)
166 #define PRINTF_SECTION(a,b) \
167 (void) printf (" %-17s %s\n", a, b)
168 #define PRINTF_SECTION2(a,b) \
169 (void) printf (" %-17s %s/\n", a, b)
170 #define PRINTF(a, b, c) \
171 (void) printf ("\t%-15s %s/%s\n", a, b, c)
172 #define PRINTF2(a, b, c) \
173 (void) printf ("\t%-15s %s%s\n", a, b, c)
176 show_datadirs_extended (void)
178 PRINTF_GROUP (_("System data"));
180 PRINTF_SECTION ( _("Config directory:"), mc_global
.sysconfig_dir
);
181 PRINTF_SECTION (_("Data directory:"), mc_global
.share_data_dir
);
182 #ifdef ENABLE_VFS_EXTFS
183 PRINTF2 ("extfs.d:", mc_global
.share_data_dir
, MC_EXTFS_DIR
"/");
185 #ifdef ENABLE_VFS_FISH
186 PRINTF2 ("fish:", mc_global
.share_data_dir
, FISH_PREFIX
"/");
190 PRINTF_GROUP (_("User data"));
192 PRINTF_SECTION2 ( _("Config directory:"), mc_config_get_path ());
193 PRINTF_SECTION2 (_("Data directory:"), mc_config_get_data_path ());
194 PRINTF ("skins:", mc_config_get_data_path (), MC_SKINS_SUBDIR
"/");
195 #ifdef ENABLE_VFS_EXTFS
196 PRINTF ("extfs.d:", mc_config_get_data_path (), MC_EXTFS_DIR
"/");
198 #ifdef ENABLE_VFS_FISH
199 PRINTF ("fish:", mc_config_get_data_path (), FISH_PREFIX
"/");
202 PRINTF_SECTION2 ( _("Cache directory:"), mc_config_get_cache_path ());
206 #undef PRINTF_SECTION
209 /* --------------------------------------------------------------------------------------------- */
212 show_configure_options (void)
214 (void) printf ("%s\n", MC_CONFIGURE_ARGS
);
217 /* --------------------------------------------------------------------------------------------- */