Bug 1774 - configure does not properly substitute parameters in Makefile
configure does not properly substitute parameters in Makefile
Status: RESOLVED WONTFIX
Product: Samba 3.0
Classification: Unclassified
Component: Build environment
3.0.7
All Solaris
: P3 normal
: none
Assigned To: Tim Potter
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-15 13:47 UTC by M. D. Parker
Modified: 2004-10-29 07:45 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description M. D. Parker 2004-09-15 13:47:20 UTC
This is possibly a problem with on all the OSen being used.

Using GNU Make 3.80 

After getting some weird locations using the default prefixes (supposedly 
defaulting to /usr/local).  I got things requiring that stuff be placed as 
in /usr/local/samba/etc/samba/smb.conf.  Thus something was not right.  

I did a more extensive substitution, and used the following configure line:

./configure \
        --prefix=/usr/local/samba \
        --exec-prefix=/usr/local/samba \
        --bindir=/usr/local/samba/bin \
        --sbindir=/usr/local/samba/sbin \
        --libexecdir=/usr/local/samba/libexec \
        --datadir=/usr/local/samba/share \
        --sysconfdir=/usr/local/samba/etc \
        --localstatedir=/usr/local/samba/var \
        --libdir=/usr/local/samba/lib \
        --mandir=/usr/local/samba/man \
        --with-fhs \
        --without-quotas \
        --with-utmp \
        --with-included-popt \
        --without-readline \
        --with-syslog

The top level Makefile was generated as follows ( left off a bit near the 
end)....Notice that the substitutions requested in the configure statement are 
not in some cases being passed down...

Manual editing of the resulting top level Makefile put things in more or less 
their proper places.

#########################################################################
# Makefile.in for Samba - rewritten for autoconf support
# Copyright Andrew Tridgell 1992-1998
# Copyright (C) 2001 by Martin Pool <mbp@samba.org>
# Copyright Andrew Bartlett 2002
# Copyright (C) 2003 Jim McDonough <jmcd@us.ibm.com>
# Copyright (C) 2002-2003 Jelmer Vernooij <jelmer@samba.org>
###########################################################################

prefix=/usr/local/samba
exec_prefix=/usr/local/samba

LIBS= -lsendfile -lsec -lgen -lresolv -lsocket -lnsl
CC=gcc
SHLD=${CC} ${CFLAGS}
CFLAGS= -O
CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
EXEEXT=
LDFLAGS=
AR=ar
LDSHFLAGS=-G
WINBIND_NSS_LDSHFLAGS=-G
AWK=gawk
DYNEXP=-Wl,-E
PYTHON=
PERL=/usr/local/bin/perl

TERMLDFLAGS=
TERMLIBS=
PRINT_LIBS=
AUTH_LIBS=
ACL_LIBS=
PASSDB_LIBS=
IDMAP_LIBS=
KRB5LIBS=
LDAP_LIBS=

LINK=$(CC) $(FLAGS) $(LDFLAGS)

INSTALLCMD=/usr/local/bin/install -c
INSTALLCLIENTCMD_SH=$(INSTALLCMD)
INSTALLCLIENTCMD_A=:


srcdir=/usr/local/home/parkerm/proj/samba-3.0.7/source
builddir=/usr/local/home/parkerm/proj/samba-3.0.7/source
SHELL=/bin/sh
DESTDIR=/
# XXX: Perhaps this should be /bin/bash instead -- apparently autoconf
# will search for a POSIX-compliant shell, and that might not be
# /bin/sh on some platforms.  I guess it's not a big problem -- mbp

# See the autoconf manual "Installation Directory Variables" for a
# discussion of the subtle use of these variables.

BASEDIR= /usr/local/samba
BINDIR = /usr/local/samba/bin
# sbindir is mapped to bindir when compiling SAMBA in 2.0.x compatibility mode.
SBINDIR = /usr/local/samba/sbin
LIBDIR = ${prefix}/lib/samba
VFSLIBDIR = $(LIBDIR)/vfs
PDBLIBDIR = $(LIBDIR)/pdb
RPCLIBDIR = $(LIBDIR)/rpc
IDMAPLIBDIR = $(LIBDIR)/idmap
CHARSETLIBDIR = $(LIBDIR)/charset
AUTHLIBDIR = $(LIBDIR)/auth
CONFIGDIR = /usr/local/samba/etc/samba
VARDIR = /usr/local/samba/var
MANDIR = ${prefix}/share/man
DATADIR = /usr/local/samba/share

# The permissions to give the executables
INSTALLPERMS = 0755

# set these to where to find various files
# These can be overridden by command line switches (see smbd(8))
# or in smb.conf (see smb.conf(5))
LOGFILEBASE = ${VARDIR}/log/samba
CONFIGFILE = $(CONFIGDIR)/smb.conf
LMHOSTSFILE = $(CONFIGDIR)/lmhosts

# This is where smbpasswd et al go
PRIVATEDIR = ${CONFIGDIR}/private

SMB_PASSWD_FILE = $(PRIVATEDIR)/smbpasswd
PRIVATE_DIR = $(PRIVATEDIR)

# This is where SWAT images and help files go
SWATDIR = ${DATADIR}/samba/swat

# the directory where lock files go
LOCKDIR = ${VARDIR}/lib/samba

# the directory where pid files go
PIDDIR = ${VARDIR}/run
# man pages language(s)
man_langs = "en"

LIBSMBCLIENT=bin/libsmbclient.a bin/libsmbclient.so
LIBSMBCLIENT_MAJOR=0
LIBSMBCLIENT_MINOR=1


FLAGS1 = $(CFLAGS) -I./popt -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -
I$(srcdir)/smbwrapper  -I. $(CPPFLAGS) -I$(srcdir)
FLAGS2 =
FLAGS3 =
FLAGS4 =
FLAGS5 = $(FLAGS1) $(FLAGS2) $(FLAGS3) $(FLAGS4)
FLAGS  = $(ISA) $(FLAGS5)

PASSWD_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" -
DPRIVATE_DIR=\"$(PRIVATE_DIR)\"
PATH_FLAGS1 = -DCONFIGFILE=\"$(CONFIGFILE)\"  -DSBINDIR=\"$(SBINDIR)\"
PATH_FLAGS2 = $(PATH_FLAGS1) -DBINDIR=\"$(BINDIR)\" -DDRIVERFILE=\"$(DRIVERFILE)
\"
PATH_FLAGS3 = $(PATH_FLAGS2) -DLMHOSTSFILE=\"$(LMHOSTSFILE)\"
PATH_FLAGS4 = $(PATH_FLAGS3) -DSWATDIR=\"$(SWATDIR)\"  -DLOCKDIR=\"$(LOCKDIR)
\" -DPIDDIR=\"$(PIDDIR)\"
PATH_FLAGS5 = $(PATH_FLAGS4) -DLIBDIR=\"$(LIBDIR)\" \
              -DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"so\"
PATH_FLAGS6 = $(PATH_FLAGS5) -DCONFIGDIR=\"$(CONFIGDIR)\"
PATH_FLAGS = $(PATH_FLAGS6) $(PASSWD_FLAGS)
.
.
.
Comment 1 M. D. Parker 2004-09-15 13:50:16 UTC
hint/help:

LIBDIR, MANDIR, and CONFIGDIR are not being set properly in the Makefile 
eventhough present in the configure command line directives as indicated in the 
configure --help,
Comment 2 Gerald (Jerry) Carter 2004-10-29 07:45:58 UTC
--with-fhs overrides several of the settings.
Granted things could be cleaner but they do currently work.