summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-08-15 00:36:49 +0200
committerMichael Adam <obnox@samba.org>2008-08-15 23:19:56 +0200
commite9739694b62c623f56fd4051ee0921abf9f09d5a (patch)
treedfd534cd13d0c1a0410ea1cff9a8156bd1d05aad /source3
parentb39040cfe2fd89388962299bd4b2b7fd492a9f2e (diff)
downloadsamba-e9739694b62c623f56fd4051ee0921abf9f09d5a.tar.gz
samba-e9739694b62c623f56fd4051ee0921abf9f09d5a.tar.bz2
samba-e9739694b62c623f56fd4051ee0921abf9f09d5a.zip
configure: Add --with-modulesdir to accompany --with-libdir.
This starts the seplitting of libdir in to libdir and modulesdir. Our shared libs should go into libdir, the internal shared modules, codepages, and other stuff that was originally in libdir, should go into modulesdir. The idea behind this is, that in a typical installation, the shared (and static) libraries (as libtalloc, libsmbclient, libwbclient and others) should be put into /usr/lib, while the e.g. the vfs modules should reside in /usr/lib/samba. This is meant to ease the work of packagers and reduce the needs for manual interaction and workarounds. Michael (This used to be commit b17d1ff646e22c3e979224d119b283fc3af780a8)
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in21
-rw-r--r--source3/m4/check_path.m423
2 files changed, 33 insertions, 11 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 3ac09f325f..d92ececbbf 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -99,17 +99,18 @@ BINDIR = @bindir@
SBINDIR = @sbindir@
ROOTSBINDIR = @rootsbindir@
LIBDIR = @libdir@
+MODULESDIR = @modulesdir@
INCLUDEDIR=@includedir@
PAMMODULESDIR = @pammodulesdir@
-VFSLIBDIR = $(LIBDIR)/vfs
-PDBLIBDIR = $(LIBDIR)/pdb
-RPCLIBDIR = $(LIBDIR)/rpc
-IDMAPLIBDIR = $(LIBDIR)/idmap
-NSSINFOLIBDIR = $(LIBDIR)/nss_info
-CHARSETLIBDIR = $(LIBDIR)/charset
-AUTHLIBDIR = $(LIBDIR)/auth
-CONFIGLIBDIR = $(LIBDIR)/config
-GPEXTLIBDIR = $(LIBDIR)/gpext
+VFSLIBDIR = $(MODULESDIR)/vfs
+PDBLIBDIR = $(MODULESDIR)/pdb
+RPCLIBDIR = $(MODULESDIR)/rpc
+IDMAPLIBDIR = $(MODULESDIR)/idmap
+NSSINFOLIBDIR = $(MODULESDIR)/nss_info
+CHARSETLIBDIR = $(MODULESDIR)/charset
+AUTHLIBDIR = $(MODULESDIR)/auth
+CONFIGLIBDIR = $(MODULESDIR)/config
+GPEXTLIBDIR = $(MODULESDIR)/gpext
CONFIGDIR = @configdir@
VARDIR = @localstatedir@
MANDIR = @mandir@
@@ -166,6 +167,7 @@ PATH_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" \
-DLOCKDIR=\"$(LOCKDIR)\" \
-DPIDDIR=\"$(PIDDIR)\" \
-DLIBDIR=\"$(LIBDIR)\" \
+ -DMODULESDIR=\"$(MODULESDIR)\" \
-DLOGFILEBASE=\"$(LOGFILEBASE)\" \
-DSHLIBEXT=\"@SHLIBEXT@\" \
-DCTDBDIR=\"$(CTDBDIR)\" \
@@ -2541,6 +2543,7 @@ showlayout::
@echo " bindir: $(BINDIR)"
@echo " sbindir: $(SBINDIR)"
@echo " libdir: $(LIBDIR)"
+ @echo " modulesdir: $(MODULESDIR)"
@echo " vardir: $(VARDIR)"
@echo " mandir: $(MANDIR)"
@echo " privatedir: $(PRIVATE_DIR)"
diff --git a/source3/m4/check_path.m4 b/source3/m4/check_path.m4
index 0537b7a896..c39efc66f5 100644
--- a/source3/m4/check_path.m4
+++ b/source3/m4/check_path.m4
@@ -22,10 +22,11 @@ test "${mandir}" || mandir="\${prefix}/man"
logfilebase="\${VARDIR}"
privatedir="\${prefix}/private"
test "${libdir}" || libdir="\${prefix}/lib"
+modulesdir="\${LIBDIR}"
pammodulesdir="\${LIBDIR}/security"
configdir="\${LIBDIR}"
swatdir="\${prefix}/swat"
-codepagedir="\${LIBDIR}"
+codepagedir="\${MODULESDIR}"
statedir="\${LOCKDIR}"
cachedir="\${LOCKDIR}"
@@ -39,9 +40,10 @@ AC_ARG_WITH(fhs,
logfilebase="\${VARDIR}/log/samba"
privatedir="\${CONFIGDIR}/private"
test "${libdir}" || libdir="\${prefix}/lib/samba"
+ modulesdir="\${LIBDIR}"
configdir="\${sysconfdir}/samba"
swatdir="\${DATADIR}/samba/swat"
- codepagedir="\${LIBDIR}"
+ codepagedir="\${MODULESDIR}"
statedir="\${VARDIR}/lib/samba"
cachedir="\${VARDIR}/lib/samba"
AC_DEFINE(FHS_COMPATIBLE, 1, [Whether to use fully FHS-compatible paths])
@@ -191,6 +193,22 @@ AC_ARG_WITH(libdir,
esac])
#################################################
+# set shared modules (internal lib) directory location
+AC_ARG_WITH(modulesdir,
+[AS_HELP_STRING([--with-modulesdir=DIR], [Where to put shared modules ($libdir)])],
+[ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody does it
+ #
+ AC_MSG_WARN([--with-modulesdir without argument - will use default])
+ ;;
+ * )
+ modulesdir="$withval"
+ ;;
+ esac])
+
+#################################################
# set PAM modules directory location
AC_ARG_WITH(pammodulesdir,
[AS_HELP_STRING([--with-pammodulesdir=DIR], [Which directory to use for PAM modules ($ac_default_prefix/$libdir/security)])],
@@ -236,6 +254,7 @@ AC_SUBST(statedir)
AC_SUBST(cachedir)
AC_SUBST(rootsbindir)
AC_SUBST(pammodulesdir)
+AC_SUBST(modulesdir)
#################################################
# set prefix for 'make test'