[patch] Smbfs: New options --with-configdir and --with-codepagedir
Andrew V. Samoilov
kai at cmail.ru
Fri Jan 11 08:47:25 UTC 2002
Hi!
I added two new options for smbfs:
--with-configdir=DIR Where the Samba configuration files are (/etc)
--with-codepagedir=DIR Where the Samba codepage files are
So smb.conf and samba codepages files locations can be defined
with configure.
Regards,
Andrew.
Patch applied, any comments are welcome.
Index: mc/ChangeLog
diff -u mc/ChangeLog:1.401 mc/ChangeLog:1.402
--- mc/ChangeLog:1.401 Fri Jan 11 00:51:32 2002
+++ mc/ChangeLog Fri Jan 11 02:45:11 2002
@@ -1,3 +1,9 @@
+2002-01-11 Andrew V. Samoilov <kai at cmail.ru>
+
+ * acinclude.m4: New options for smbfs:
+ --with-configdir=DIR Where the Samba configuration files are (/etc)
+ --with-codepagedir=DIR Where the Samba codepage files are
+
2002-01-11 Pavel Roskin <proski at gnu.org>
* syntax/xml.syntax: New file - hightlighting for XML.
Index: mc/acinclude.m4
diff -u mc/acinclude.m4:1.22 mc/acinclude.m4:1.23
--- mc/acinclude.m4:1.22 Wed Jan 2 12:12:46 2002
+++ mc/acinclude.m4 Fri Jan 11 02:45:11 2002
@@ -113,7 +113,40 @@
])
AC_SUBST(smbfs)
AC_SUBST(SAMBAFILES)
-
+
+ if test "x$smbfs" != x ; then
+ #################################################
+ # set Samba configuration directory location
+ configdir="/etc"
+ AC_ARG_WITH(configdir,
+ [ --with-configdir=DIR Where the Samba configuration files are (/etc)],
+ [ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody does it
+ #
+ AC_MSG_WARN([--with-configdir called without argument - will use default])
+ ;;
+ * )
+ configdir="$withval"
+ ;;
+ esac]
+ )
+ AC_SUBST(configdir)
+
+ AC_ARG_WITH(codepagedir,
+ [ --with-codepagedir=DIR Where the Samba codepage files are],
+ [ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody does it
+ #
+ AC_MSG_WARN([--with-codepagedir called without argument - will use default])
+ ;;
+ esac]
+ )
+ fi
+
dnl
dnl The termnet support
dnl
Index: mc/vfs/ChangeLog
diff -u mc/vfs/ChangeLog:1.364 mc/vfs/ChangeLog:1.365
--- mc/vfs/ChangeLog:1.364 Wed Jan 2 20:26:24 2002
+++ mc/vfs/ChangeLog Fri Jan 11 03:24:17 2002
@@ -1,4 +1,11 @@
-2001-01-02 Pavel Roskin <proski at gnu.org>
+2002-01-11 Andrew V. Samoilov <kai at cmail.ru>
+
+ * Makefile.am (AM_CFLAGS): Add -DCONFIGDIR=\""@configdir@"\"
+ if smbfs support is enabled.
+
+ * smbfs.c (smbfs_init): Use CONFIGDIR for smb.conf.
+
+2002-01-02 Pavel Roskin <proski at gnu.org>
* Makefile.am: Add *clean-local targets to take care of the
samba directory.
Index: mc/vfs/Makefile.am
diff -u mc/vfs/Makefile.am:1.17 mc/vfs/Makefile.am:1.18
--- mc/vfs/Makefile.am:1.17 Wed Jan 2 20:26:24 2002
+++ mc/vfs/Makefile.am Fri Jan 11 03:24:17 2002
@@ -1,6 +1,10 @@
SUBDIRS = extfs
+if USE_SAMBA_FS
+AM_CFLAGS = $(GLIB_CFLAGS) -DCONFIGDIR=\""@configdir@"\"
+else
AM_CFLAGS = $(GLIB_CFLAGS)
+endif
BASICFILES = \
cpio.c \
Index: mc/vfs/smbfs.c
diff -u mc/vfs/smbfs.c:1.31 mc/vfs/smbfs.c:1.32
--- mc/vfs/smbfs.c:1.31 Mon Nov 5 08:16:17 2001
+++ mc/vfs/smbfs.c Fri Jan 11 03:24:17 2002
@@ -4,7 +4,7 @@
Written by Wayne Roberts <wroberts1 at home.com>
- $Id: smbfs.c,v 1.31 2001/11/05 13:16:17 andrew Exp $
+ $Id: smbfs.c,v 1.32 2002/01/11 08:24:17 andrew Exp $
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License
@@ -250,7 +250,7 @@
static int
smbfs_init(vfs *me)
{
- char *servicesf = "/etc/smb.conf";
+ char *servicesf = CONFIGDIR "/smb.conf";
/* DEBUGLEVEL = 4; */
More information about the mc-devel
mailing list