Patch (was: RE: Please, PLEASE, remove the BASEDIR from Makefile)
Andrej Borsenkow
borsenkow.msk at sni.de
Mon Nov 30 17:58:36 GMT 1998
>
> anyone want to do it?
>
I'll take the turn ...
The patch below
- changes VARDIR to @localstatedir@ in Makefile.in
- adds PRIVATEDIR to Makefile.in
- adds @privatedir@ and @swatdir@ to Makefile.in
- adds --with-privatedir and --with-swatdir to configure.in
Both defaults to current value ($(prefix)/private and $(prefix)/swat) I
compiled and installed samba with these changes - so far it runs (even with
swat :)
/andrej
--- Makefile.in Tue Dec 1 01:38:00 1998
+++ Makefile.in Mon Nov 30 19:42:01 1998
@@ -27,7 +27,7 @@
# the previous releases of Samba
SBINDIR = @bindir@
LIBDIR = @libdir@
-VARDIR = $(BASEDIR)/var
+VARDIR = @localstatedir@
MANDIR = @mandir@
# The permissions to give the executables
@@ -42,14 +42,18 @@
LMHOSTSFILE = $(LIBDIR)/lmhosts
DRIVERFILE = $(LIBDIR)/printers.def
PASSWD_PROGRAM = /bin/passwd
-SMB_PASSWD_FILE = $(BASEDIR)/private/smbpasswd
-SMB_PASSGRP_FILE = $(BASEDIR)/private/smbpassgrp
-SMB_GROUP_FILE = $(BASEDIR)/private/smbgroup
-SMB_ALIAS_FILE = $(BASEDIR)/private/smbalias
SMB_PASSWD_PROGRAM = $(BINDIR)/smbpasswd
+# This is where smbpasswd et al go
+PRIVATEDIR = @privatedir@
+
+SMB_PASSWD_FILE = $(PRIVATEDIR)/smbpasswd
+SMB_PASSGRP_FILE = $(PRIVATEDIR)/smbpassgrp
+SMB_GROUP_FILE = $(PRIVATEDIR)/smbgroup
+SMB_ALIAS_FILE = $(PRIVATEDIR)/smbalias
+
# This is where SWAT images and help files go
-SWATDIR = $(BASEDIR)/swat
+SWATDIR = @swatdir@
# the directory where lock files go
LOCKDIR = $(VARDIR)/locks
--- configure.in Thu Nov 26 07:40:00 1998
+++ configure.in Mon Nov 30 19:36:54 1998
@@ -913,6 +913,48 @@
AC_SUBST(QUOTAOBJS)
#################################################
+# set private directory location
+AC_ARG_WITH(privatedir,
+[ --with-privatedir=DIR Where to put smbpasswd ($(prefix)/private)],
+[ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody calls it without argument
+ #
+ AC_MSG_WARN([--with-privatedir called without argument - will use
default])
+ privatedir='${prefix}/private'
+ ;;
+ * )
+ privatedir="$withval"
+ ;;
+ esac
+ AC_SUBST(privatedir)],
+ [privatedir='${prefix}/private'
+ AC_SUBST(privatedir)]
+)
+
+#################################################
+# set SWAT directory location
+AC_ARG_WITH(swatdir,
+[ --with-swatdir=DIR Where to put SWAT files ($(prefix)/swat)],
+[ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody does it
+ #
+ AC_MSG_WARN([--with-swatdir called without argument - will use
default])
+ swatdir='${prefix}/swat'
+ ;;
+ * )
+ swatdir="$withval"
+ ;;
+ esac
+ AC_SUBST(swatdir)],
+ [swatdir='${prefix}/swat'
+ AC_SUBST(swatdir)]
+)
+
+#################################################
# these tests are taken from the GNU fileutils package
AC_CHECKING(how to get filesystem space usage)
space=no
More information about the samba-technical
mailing list