mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 04:22:34 +03:00
Added --configure-options for easy update & reconfigure existing mc.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
ed70459b4d
commit
56c83d03d4
@ -25,6 +25,8 @@ AC_CANONICAL_HOST
|
||||
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
AC_DEFINE_UNQUOTED([MC_CONFIGURE_ARGS],["$ac_configure_args"],[MC configure arguments])
|
||||
|
||||
AC_PROG_LIBTOOL
|
||||
PKG_PROG_PKG_CONFIG
|
||||
AC_PATH_PROG([PERL], [perl], [/usr/bin/perl])
|
||||
|
15
src/args.c
15
src/args.c
@ -93,6 +93,7 @@ static GOptionContext *context;
|
||||
static gboolean mc_args__nouse_subshell = FALSE;
|
||||
static gboolean mc_args__show_datadirs = FALSE;
|
||||
static gboolean mc_args__show_datadirs_extended = FALSE;
|
||||
static gboolean mc_args__show_configure_opts = FALSE;
|
||||
|
||||
static GOptionGroup *main_group;
|
||||
|
||||
@ -122,6 +123,14 @@ static const GOptionEntry argument_main_table[] = {
|
||||
NULL
|
||||
},
|
||||
|
||||
/* show configure options */
|
||||
{
|
||||
"configure-options", '\0', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE,
|
||||
&mc_args__show_configure_opts,
|
||||
N_("Print configure options"),
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
"printwd", 'P', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING,
|
||||
&mc_args__last_wd_file,
|
||||
@ -585,6 +594,12 @@ mc_args_process (int argc, char *argv[])
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (mc_args__show_configure_opts)
|
||||
{
|
||||
show_configure_options ();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (mc_args__force_colors)
|
||||
mc_global.args.disable_colors = FALSE;
|
||||
|
||||
|
@ -207,3 +207,11 @@ show_datadirs_extended (void)
|
||||
#undef PRINTF_GROUP
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
show_configure_options (void)
|
||||
{
|
||||
(void) printf ("%s\n", MC_CONFIGURE_ARGS);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
extern void show_version (void);
|
||||
extern void show_datadirs_extended (void);
|
||||
extern void show_configure_options (void);
|
||||
|
||||
/*** inline functions ****************************************************************************/
|
||||
#endif /* MC__TEXTCONF_H */
|
||||
|
Loading…
Reference in New Issue
Block a user