File: mc-vfs-samba.m4

package info (click to toggle)
mc 3%3A4.8.26-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 23,416 kB
  • sloc: ansic: 115,748; sh: 7,993; perl: 3,058; makefile: 1,633; python: 410; lisp: 44; cs: 44; sed: 16
file content (61 lines) | stat: -rw-r--r-- 1,607 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
dnl Samba support
AC_DEFUN([mc_VFS_SMB],
[
    AC_ARG_ENABLE([vfs-smb],
		AS_HELP_STRING([--enable-vfs-smb], [Support for SMB filesystem @<:@no@:>@]),
		[
		    if test "x$enableval" = "xno"; then
			enable_vfs_smb=no
		    else
			enable_vfs_smb=yes
		    fi
		],
		[enable_vfs_smb=no])

    if test "$enable_vfs" = "yes" -a x"$enable_vfs_smb" != x"no"; then
	enable_vfs_smb="yes"
	mc_VFS_ADDNAME([smb])
	AC_DEFINE([ENABLE_VFS_SMB], [1], [Define to enable VFS over SMB])
    fi

    if test "$enable_vfs_smb" = "yes"; then
	AC_CONFIG_SUBDIRS([src/vfs/smbfs/helpers])

	AM_CONDITIONAL([ENABLE_VFS_SMB], [test "1" = "1"])

	# set configuration directory location
	smbconfigdir="/etc"
	AC_ARG_WITH(smb-configdir,
		    [  --with-smb-configdir=DIR    Where to put configuration files],
		    [ case "$withval" in
			    yes|no)
				# Just in case anybody does it
				AC_MSG_WARN([--with-smb-configdir called without argument - will use default])
				;;
			    *)
				smbconfigdir="$withval"
				;;
		    esac])

	AC_SUBST(smbconfigdir)

	# set codepage directory location
	AC_ARG_WITH(smb-codepagedir,
		    [  --with-smb-codepagedir=DIR  Where to put codepage files],
		    [ case "$withval" in
			yes|no)
			    # Just in case anybody does it
			    AC_MSG_WARN([--with-smb-codepagedir called without argument - will use default])
			    ;;
			*)
			    smbcodepagedir="$withval"
			    ;;
		 esac])

	# export variable for child process (configure of samba)
	export SMBCONFIGDIR="$smbconfigdir"
	export SMBCODEPAGEDIR="$smbcodepagedir"
    else
	AM_CONDITIONAL([ENABLE_VFS_SMB], [test "1" = "2"])
    fi
])