From: Michael Adam Date: Thu, 14 Aug 2008 22:36:49 +0000 (+0200) Subject: configure: Add --with-modulesdir to accompany --with-libdir. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b17d1ff646e22c3e979224d119b283fc3af780a8;p=thirdparty%2Fsamba.git 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 --- diff --git a/source/Makefile.in b/source/Makefile.in index 3ac09f325f0..d92ececbbf0 100644 --- a/source/Makefile.in +++ b/source/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/source/m4/check_path.m4 b/source/m4/check_path.m4 index 0537b7a896b..c39efc66f51 100644 --- a/source/m4/check_path.m4 +++ b/source/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]) @@ -190,6 +192,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, @@ -236,6 +254,7 @@ AC_SUBST(statedir) AC_SUBST(cachedir) AC_SUBST(rootsbindir) AC_SUBST(pammodulesdir) +AC_SUBST(modulesdir) ################################################# # set prefix for 'make test'