Changes for configure and build with samba:
[midnight-commander.git] / m4.include / vfs / mc-vfs-samba.m4
blob4e3a05af260702f8cf62e5c14be2550f218b886b
1 dnl Samba support
2 AC_DEFUN([AC_MC_VFS_SMB],
4     AC_ARG_ENABLE([vfs-smb],
5                 AC_HELP_STRING([--enable-vfs-smb], [Support for SMB filesystem [[no]]]))
6     if test "$enable_vfs" != "no" -a x"$enable_vfs_smb" != x"no"; then
7         enable_vfs_smb="yes"
8         AC_MC_VFS_ADDNAME([smb])
9         AC_DEFINE([ENABLE_VFS_SMB], [1], [Define to enable VFS over SMB])
11         # set Samba configuration directory location
12         configdir="/etc"
13         AC_ARG_WITH([smb-configdir],
14                 AC_HELP_STRING([--with-smb-configdir=DIR], [Where the Samba configuration files are [[/etc]]]),
15                 [ case "$withval" in
16                     yes|no)
17                         # Just in case anybody does it
18                         AC_MSG_WARN([--with-smb-configdir called without argument - will use default])
19                         ;;
20                     *)
21                         configdir="$withval"
22                         ;;
23                 esac
24         ])
26         AC_ARG_WITH([smb-codepagedir],
27                 AC_HELP_STRING([--with-smb-codepagedir=DIR], [Where the Samba codepage files are]),
28                 [ case "$withval" in
29                     yes|no)
30                         # Just in case anybody does it
31                         AC_MSG_WARN([--with-smb-codepagedir called without argument - will use default])
32                         ;;
33                     *)
34                         codepagedir="$withval"
35                     ;;
36                 esac
37         ])
40         AC_SUBST(configdir)
41         AC_SUBST(codepagedir)
43     fi
44     AC_CONFIG_SUBDIRS([lib/vfs/mc-vfs/samba])
46     AM_CONDITIONAL([ENABLE_VFS_SMB], [test x"$enable_vfs_smb" = x"yes"])