From cb49ca477cf0bda925563cdedbeda7ca8c853737 Mon Sep 17 00:00:00 2001 From: Slava Zanko Date: Mon, 7 Nov 2011 16:34:20 +0300 Subject: [PATCH] Ticket #2636: The various MC config placements. Added configure option --enable-homedir Signed-off-by: Slava Zanko --- configure.ac | 24 ++++++++++++++++++++++++ doc/INSTALL | 5 +++++ 2 files changed, 29 insertions(+) diff --git a/configure.ac b/configure.ac index 150e222c0..ebccd4a74 100644 --- a/configure.ac +++ b/configure.ac @@ -405,6 +405,30 @@ linux*) esac +dnl +dnl Where config files should be placed +dnl + +AC_ARG_WITH([homedir], + AS_HELP_STRING([--enable-homedir], [Choose any place of user settings relative to home dir, or XDG for respect XDG standards @<:@XDG@:>@]), + [ + if test "x$withval" = "xXDG"; then + with_homedir=XDG + else + with_homedir=$withval + fi + ], + [with_homedir=XDG]) + + +if test x$with_homedir = xXDG; then + AC_DEFINE(MC_HOMEDIR_XDG, 1, + [Define to enable XDG standard support]) +else + AC_DEFINE_UNQUOTED([MC_USERCONF_DIR], ["$with_homedir"], [Where configs will be placed relative to $HOME]) +fi + + dnl Support for background operations AC_ARG_ENABLE([background], [ --enable-background Support for background file operations [[yes]]]) diff --git a/doc/INSTALL b/doc/INSTALL index 34ac6f169..6c64e1959 100644 --- a/doc/INSTALL +++ b/doc/INSTALL @@ -138,6 +138,11 @@ incomplete, use `configure --help' to get the full list): default. Background code is known to be less stable than the rest of the code, so you may want to disable it at the compile time. +`--with-homedir' + This option allow users to place user config directories in any + place. By default value is 'XDG', this mean, mc will respect XDG + standards. If other value will specified, this will used as directory + name (relative to $HOME). VFS options: - - - - - -