mc-vfs-samba.m4 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. dnl Samba support
  2. AC_DEFUN([AC_MC_VFS_SMB],
  3. [
  4. AC_ARG_ENABLE([vfs-smb],
  5. AS_HELP_STRING([--enable-vfs-smb], [Support for SMB filesystem @<:@no@:>@]),
  6. [
  7. if test "x$enableval" = "xno"; then
  8. enable_vfs_smb=no
  9. else
  10. enable_vfs_smb=yes
  11. fi
  12. ],
  13. [enable_vfs_smb=no])
  14. if test "$enable_vfs" = "yes" -a x"$enable_vfs_smb" != x"no"; then
  15. enable_vfs_smb="yes"
  16. AC_MC_VFS_ADDNAME([smb])
  17. AC_DEFINE([ENABLE_VFS_SMB], [1], [Define to enable VFS over SMB])
  18. fi
  19. if test "$enable_vfs_smb" = "yes"; then
  20. AC_CONFIG_SUBDIRS([src/vfs/smbfs/helpers])
  21. AM_CONDITIONAL([ENABLE_VFS_SMB], [test "1" = "1"])
  22. # set configuration directory location
  23. smbconfigdir="/etc"
  24. AC_ARG_WITH(smb-configdir,
  25. [ --with-smb-configdir=DIR Where to put configuration files],
  26. [ case "$withval" in
  27. yes|no)
  28. # Just in case anybody does it
  29. AC_MSG_WARN([--with-smb-configdir called without argument - will use default])
  30. ;;
  31. *)
  32. smbconfigdir="$withval"
  33. ;;
  34. esac])
  35. AC_SUBST(smbconfigdir)
  36. # set codepage directory location
  37. AC_ARG_WITH(smb-codepagedir,
  38. [ --with-smb-codepagedir=DIR Where to put codepage files],
  39. [ case "$withval" in
  40. yes|no)
  41. # Just in case anybody does it
  42. AC_MSG_WARN([--with-smb-codepagedir called without argument - will use default])
  43. ;;
  44. *)
  45. smbcodepagedir="$withval"
  46. ;;
  47. esac])
  48. # export variable for child process (configure of samba)
  49. export SMBCONFIGDIR="$smbconfigdir"
  50. export SMBCODEPAGEDIR="$smbcodepagedir"
  51. else
  52. AM_CONDITIONAL([ENABLE_VFS_SMB], [test "1" = "2"])
  53. fi
  54. ])