diff --git a/configure.ac b/configure.ac index 34b227401..d39e684e1 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) diff --git a/src/args.c b/src/args.c index 332538731..f6ad04eb1 100644 --- a/src/args.c +++ b/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; diff --git a/src/textconf.c b/src/textconf.c index 7a230d96b..fc8d2e35c 100644 --- a/src/textconf.c +++ b/src/textconf.c @@ -207,3 +207,11 @@ show_datadirs_extended (void) #undef PRINTF_GROUP /* --------------------------------------------------------------------------------------------- */ + +void +show_configure_options (void) +{ + (void) printf ("%s\n", MC_CONFIGURE_ARGS); +} + +/* --------------------------------------------------------------------------------------------- */ diff --git a/src/textconf.h b/src/textconf.h index 616dc12e2..9e039ae14 100644 --- a/src/textconf.h +++ b/src/textconf.h @@ -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 */