Ticket #3836: 3836-0001-maint-set-default-with-homedir-value-v2.patch

File 3836-0001-maint-set-default-with-homedir-value-v2.patch, 1.4 KB (added by zaytsev, 7 years ago)
  • configure.ac

    From 6ac95b0f227d806a8e98948f79cb039739a497de Mon Sep 17 00:00:00 2001
    From: "Yury V. Zaytsev" <yury@shurup.com>
    Date: Sat, 8 Jul 2017 12:54:57 +0200
    Subject: [PATCH] Ticket #3836: maint - set default `--with-homedir` value to
     `.mc` instead of `yes`
    
    Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
    Reviewed-by: Andrew Borodin <aborodin@vmail.ru>
    ---
     configure.ac |   12 ++++++++++++
     1 file changed, 12 insertions(+)
    
    diff --git a/configure.ac b/configure.ac
    index 387110d..5541393 100644
    a b AC_ARG_WITH([homedir], 
    367367    AS_HELP_STRING([--with-homedir], 
    368368                   [Choose any place of user settings relative to home dir, or XDG for respect XDG standards @<:@XDG@:>@]), 
    369369    [ 
     370        dnl Unfortunately, there is no way to tell AC_ARG_WITH that the 
     371        dnl argument value is required, so we can't differentiate 
     372        dnl between `--with-homedir` and `--with-homedir=yes`, because 
     373        dnl `with_homedir` is set to `yes` in both cases. 
     374        dnl 
     375        dnl We opt to set `with_homedir` to `.mc` if the value is `yes` 
     376        dnl in order to avoid the surprise for users using 
     377        dnl `--with-homedir` w/o any value and then getting mc to store 
     378        dnl settings in the `yes` directory. 
     379 
    370380        if test "x$withval" = "xXDG"; then 
    371381            with_homedir=XDG 
     382        elif test "x$withval" = "xyes"; then 
     383            with_homedir=.mc 
    372384        else 
    373385            with_homedir=$withval 
    374386        fi