Ticket #2419: 2419_smbconfigdir_4.7.4.patch

File 2419_smbconfigdir_4.7.4.patch, 3.4 KB (added by andrew_b, 13 years ago)

Patch for 4.7.4 release

  • lib/vfs/mc-vfs/Makefile.am

    diff --git a/lib/vfs/mc-vfs/Makefile.am b/lib/vfs/mc-vfs/Makefile.am
    index d7f1541..0981b66 100644
    a b  
    11if ENABLE_VFS_SMB 
    2 SAMBA_CFLAGS  = -DCONFIGDIR=\""@configdir@"\" 
     2SAMBA_CFLAGS  = -DCONFIGDIR=\""@smbconfigdir@"\" 
    33SAMBA_SUBDIRS = samba 
    44endif 
    55 
  • lib/vfs/mc-vfs/samba/configure.ac

    diff --git a/lib/vfs/mc-vfs/samba/configure.ac b/lib/vfs/mc-vfs/samba/configure.ac
    index b2d44b5..a77af2f 100644
    a b AC_ARG_WITH(ssl, 
    524524  AC_MSG_RESULT(no) 
    525525) 
    526526 
    527  
    528 ################################################# 
     527#################################################### 
     528# get variables from parent process (main configure) 
    529529# set configuration directory location 
    530 configdir="\$(LIBDIR)" 
    531 AC_ARG_WITH(smb-configdir, 
    532 [  --with-smb-configdir=DIR    Where to put configuration files (\$libdir)], 
    533 [ case "$withval" in 
    534   yes|no) 
    535   # 
    536   # Just in case anybody does it 
    537   # 
    538     AC_MSG_WARN([--with-smb-configdir called without argument - will use default]) 
    539   ;; 
    540   * ) 
    541     configdir="$withval" 
    542     ;; 
    543   esac] 
    544 ) 
    545  
    546  
    547 ################################################# 
     530if test -n "$SMBCONFIGDIR"; then 
     531    configdir="$SMBCONFIGDIR" 
     532else 
     533    configdir="\$(LIBDIR)" 
     534fi 
    548535# set codepage directory location 
    549 codepagedir="\$(LIBDIR)/codepages" 
    550 AC_ARG_WITH(smb-codepagedir, 
    551 [  --with-smb-codepagedir=DIR  Where to put codepage files (\$libdir/codepages)], 
    552 [ case "$withval" in 
    553   yes|no) 
    554   # 
    555   # Just in case anybody does it 
    556   # 
    557     AC_MSG_WARN([--with-smb-codepagedir called without argument - will use default]) 
    558   ;; 
    559   * ) 
    560     codepagedir="$withval" 
    561     ;; 
    562   esac]) 
     536if test -n "$SMBCODEPAGEDIR"; then 
     537    codepagedir="$SMBCODEPAGEDIR" 
     538elif test -n "$SMBCONFIGDIR"; then 
     539    codepagedir="$SMBCONFIGDIR/codepages" 
     540else 
     541    codepagedir="\$(LIBDIR)/codepages" 
     542fi 
     543#################################################### 
    563544 
    564545AC_MSG_CHECKING([configure summary]) 
    565546AC_TRY_RUN([ 
  • m4.include/vfs/mc-vfs-samba.m4

    diff --git a/m4.include/vfs/mc-vfs-samba.m4 b/m4.include/vfs/mc-vfs-samba.m4
    index 9eeb127..701b41a 100644
    a b AC_DEFUN([AC_MC_VFS_SMB], 
    2020 
    2121    if test "$enable_vfs_smb" = "yes"; then 
    2222        AC_CONFIG_SUBDIRS([lib/vfs/mc-vfs/samba]) 
    23     fi 
    2423 
    25     AM_CONDITIONAL([ENABLE_VFS_SMB], [test x"$enable_vfs_smb" = x"yes"]) 
     24        AM_CONDITIONAL([ENABLE_VFS_SMB], [test "1" = "1"]) 
     25 
     26        # set configuration directory location 
     27        smbconfigdir="/etc" 
     28        AC_ARG_WITH(smb-configdir, 
     29                    [  --with-smb-configdir=DIR    Where to put configuration files], 
     30                    [ case "$withval" in 
     31                            yes|no) 
     32                                # Just in case anybody does it 
     33                                AC_MSG_WARN([--with-smb-configdir called without argument - will use default]) 
     34                                ;; 
     35                            *) 
     36                                smbconfigdir="$withval" 
     37                                ;; 
     38                    esac]) 
     39 
     40        AC_SUBST(smbconfigdir) 
     41 
     42        # set codepage directory location 
     43        AC_ARG_WITH(smb-codepagedir, 
     44                    [  --with-smb-codepagedir=DIR  Where to put codepage files], 
     45                    [ case "$withval" in 
     46                        yes|no) 
     47                            # Just in case anybody does it 
     48                            AC_MSG_WARN([--with-smb-codepagedir called without argument - will use default]) 
     49                            ;; 
     50                        *) 
     51                            smbcodepagedir="$withval" 
     52                            ;; 
     53                 esac]) 
     54 
     55        # export variable for child process (configure of samba) 
     56        export SMBCONFIGDIR="$smbconfigdir" 
     57        export SMBCODEPAGEDIR="$smbcodepagedir" 
     58    else 
     59        AM_CONDITIONAL([ENABLE_VFS_SMB], [test "1" = "2"]) 
     60    fi 
    2661])