diff --git a/lib/vfs/mc-vfs/Makefile.am b/lib/vfs/mc-vfs/Makefile.am
index 1315a66..f890b0d 100644
a
|
b
|
|
1 | 1 | if ENABLE_VFS_SMB |
2 | | SAMBA_CFLAGS = -DCONFIGDIR=\""@configdir@"\" |
| 2 | SAMBA_CFLAGS = -DCONFIGDIR=\""@smbconfigdir@"\" |
3 | 3 | SAMBA_SUBDIRS = samba |
4 | 4 | endif |
5 | 5 | |
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, |
524 | 524 | AC_MSG_RESULT(no) |
525 | 525 | ) |
526 | 526 | |
527 | | |
528 | | ################################################# |
| 527 | #################################################### |
| 528 | # get variables from parent process (main configure) |
529 | 529 | # 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 | | ################################################# |
| 530 | if test -n "$SMBCONFIGDIR"; then |
| 531 | configdir="$SMBCONFIGDIR" |
| 532 | else |
| 533 | configdir="\$(LIBDIR)" |
| 534 | fi |
548 | 535 | # 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]) |
| 536 | if test -n "$SMBCODEPAGEDIR"; then |
| 537 | codepagedir="$SMBCODEPAGEDIR" |
| 538 | elif test -n "$SMBCONFIGDIR"; then |
| 539 | codepagedir="$SMBCONFIGDIR/codepages" |
| 540 | else |
| 541 | codepagedir="\$(LIBDIR)/codepages" |
| 542 | fi |
| 543 | #################################################### |
563 | 544 | |
564 | 545 | AC_MSG_CHECKING([configure summary]) |
565 | 546 | AC_TRY_RUN([ |
diff --git a/m4.include/vfs/mc-vfs-samba.m4 b/m4.include/vfs/mc-vfs-samba.m4
index d69b11c..ae3d619 100644
a
|
b
|
AC_DEFUN([AC_MC_VFS_SMB], |
20 | 20 | |
21 | 21 | if test "$enable_vfs_smb" = "yes"; then |
22 | 22 | AC_CONFIG_SUBDIRS([lib/vfs/mc-vfs/samba]) |
23 | | fi |
24 | 23 | |
25 | | AM_CONDITIONAL([ENABLE_VFS_SMB], [test "$enable_vfs" = "yes" -a 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 |
26 | 61 | ]) |