1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-05 21:57:51 +03:00

Here's a bit of a cleanup of the {configure,Makefile}.in files. I've

now combined all the ad-hoc AC_SUBST variables into three generalised
ones:

  EXTRA_BIN_PROGS 	Additional programs to install in ${prefix}/sbin
  EXTRA_SBIN_PROGS 	Additional programs to install in ${prefix}/bin
  EXTRA_ALL_TARGETS     Additional targets to build by default
  SHLIB_PROGS           Shared library objects (pam, winbind) to build

We also build some extra stuff by default: the python extensions (if
--with-python specified), smbmount related binaries (if
--with-smbmount specified), and the samba torture suite.

The idea behind this is to have everything that is configured built by
default to detect breakage as soon as possible when people make low
level changes.
(This used to be commit d6dfe3ea69d4672339559389c6fb16e78a9152b0)
This commit is contained in:
Tim Potter 2002-11-22 06:54:12 +00:00
parent 9e745ada4c
commit 4c3f069028
2 changed files with 41 additions and 62 deletions

View File

@ -95,21 +95,18 @@ PATH_FLAGS4 = $(PATH_FLAGS3) -DSWATDIR=\"$(SWATDIR)\" -DLOCKDIR=\"$(LOCKDIR)\"
PATH_FLAGS5 = $(PATH_FLAGS4) -DLIBDIR=\"$(LIBDIR)\" -DLOGFILEBASE=\"$(LOGFILEBASE)\" PATH_FLAGS5 = $(PATH_FLAGS4) -DLIBDIR=\"$(LIBDIR)\" -DLOGFILEBASE=\"$(LOGFILEBASE)\"
PATH_FLAGS = $(PATH_FLAGS5) $(PASSWD_FLAGS) PATH_FLAGS = $(PATH_FLAGS5) $(PASSWD_FLAGS)
WINBIND_PROGS = @WINBIND_TARGETS@ SBIN_PROGS = bin/smbd bin/nmbd bin/swat bin/wrepld @EXTRA_SBIN_PROGS@
WINBIND_SPROGS = @WINBIND_STARGETS@
WINBIND_PAM_PROGS = @WINBIND_PAM_TARGETS@
WINBIND_LPROGS = @WINBIND_LTARGETS@
SPROGS = bin/smbd bin/nmbd bin/swat bin/wrepld @WINBIND_STARGETS@ BIN_PROGS1 = bin/smbclient bin/net bin/smbspool bin/testparm bin/testprns bin/smbstatus
PROGS1 = bin/smbclient bin/net bin/smbspool bin/testparm bin/testprns bin/smbstatus bin/smbcontrol bin/smbtree bin/tdbbackup @RUNPROG@ @WINBIND_TARGETS@ BIN_PROGS2 = bin/smbcontrol bin/smbtree bin/tdbbackup bin/nmblookup bin/pdbedit
PROGS2 = bin/smbpasswd bin/rpcclient bin/smbcacls bin/profiles @WRAPPROG@ @WRAP@ @WRAP32@ @PAM_MOD@ BIN_PROGS3 = bin/smbpasswd bin/rpcclient bin/smbcacls bin/profiles bin/smbgroupedit
MPROGS = @MPROGS@
LPROGS = $(WINBIND_PAM_PROGS) $(WINBIND_LPROGS)
PROGS = $(PROGS1) $(PROGS2) $(MPROGS) bin/nmblookup bin/pdbedit bin/smbgroupedit
TORTURE_PROGS = bin/smbtorture bin/msgtest bin/masktest bin/locktest \ TORTURE_PROGS = bin/smbtorture bin/msgtest bin/masktest bin/locktest \
bin/locktest2 bin/nsstest bin/vfstest bin/locktest2 bin/nsstest bin/vfstest
SHLIBS = @LIBSMBCLIENT@
BIN_PROGS = $(BIN_PROGS1) $(BIN_PROGS2) $(BIN_PROGS3) @EXTRA_BIN_PROGS@
SHLIBS = @SHLIB_PROGS@ @LIBSMBCLIENT@
SCRIPTS = $(srcdir)/script/smbtar $(srcdir)/script/addtosmbpass $(srcdir)/script/convert_smbpasswd \ SCRIPTS = $(srcdir)/script/smbtar $(srcdir)/script/addtosmbpass $(srcdir)/script/convert_smbpasswd \
$(builddir)/script/findsmb $(builddir)/script/findsmb
@ -539,7 +536,8 @@ TDBBACKUP_OBJ = tdb/tdbbackup.o $(TDBBASE_OBJ)
###################################################################### ######################################################################
# now the rules... # now the rules...
###################################################################### ######################################################################
all : SHOWFLAGS proto_exists $(SPROGS) $(PROGS) $(WINBIND_PROGS) $(WINBIND_SPROGS) $(LPROGS) $(SHLIBS) all : SHOWFLAGS proto_exists $(SBIN_PROGS) $(BIN_PROGS) $(SHLIBS) $(TORTURE_PROGS) \
@EXTRA_ALL_TARGETS@
pam_smbpass : SHOWFLAGS bin/pam_smbpass.@SHLIBEXT@ pam_smbpass : SHOWFLAGS bin/pam_smbpass.@SHLIBEXT@
@ -567,7 +565,7 @@ smbfilter : SHOWFLAGS bin/smbfilter
talloctort : SHOWFLAGS bin/talloctort talloctort : SHOWFLAGS bin/talloctort
nsswitch : SHOWFLAGS $(WINBIND_PROGS) $(WINBIND_SPROGS) $(LPROGS) nsswitch : SHOWFLAGS bin/winbindd bin/wbinfo nsswitch/libnss_winbind.so nsswitch/pam_winbind.so
wins : SHOWFLAGS nsswitch/libnss_wins.@SHLIBEXT@ wins : SHOWFLAGS nsswitch/libnss_wins.@SHLIBEXT@
@ -891,11 +889,11 @@ installdirs:
@$(SHELL) $(srcdir)/script/installdirs.sh $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(PRIVATEDIR) @$(SHELL) $(srcdir)/script/installdirs.sh $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(PRIVATEDIR)
installservers: all installdirs installservers: all installdirs
@$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(SPROGS) @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(SBIN_PROGS)
installbin: all installdirs installbin: all installdirs
@$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(SPROGS) @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(SBIN_PROGS)
@$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(PROGS) @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(BIN_PROGS)
installmodules: all installdirs installmodules: all installdirs
@$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(LIBDIR) $(MODULES) @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(LIBDIR) $(MODULES)
@ -969,8 +967,8 @@ python_clean:
# revert to the previously installed version # revert to the previously installed version
revert: revert:
@$(SHELL) $(srcdir)/script/revert.sh $(SBINDIR) $(SPROGS) @$(SHELL) $(srcdir)/script/revert.sh $(SBINDIR) $(SBIN_PROGS)
@$(SHELL) $(srcdir)/script/revert.sh $(BINDIR) $(PROGS) $(SCRIPTS) @$(SHELL) $(srcdir)/script/revert.sh $(BINDIR) $(BIN_PROGS) $(SCRIPTS)
installman: installman:
@$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(MANDIR) $(srcdir) $(man_langs) "@ROFF@" @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(MANDIR) $(srcdir) $(man_langs) "@ROFF@"
@ -993,8 +991,8 @@ uninstallman:
@$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(MANDIR) $(srcdir) $(man_langs) @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(MANDIR) $(srcdir) $(man_langs)
uninstallbin: uninstallbin:
@$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(SPROGS) @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(SBIN_PROGS)
@$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(PROGS) @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(BIN_PROGS)
uninstallmodules: uninstallmodules:
@$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(MODULES) @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(MODULES)
@ -1007,7 +1005,7 @@ TOPFILES=dynconfig.o dynconfig.po
clean: delheaders python_clean clean: delheaders python_clean
-rm -f core */*~ *~ */*.o */*.po */*.po32 */*.@SHLIBEXT@ \ -rm -f core */*~ *~ */*.o */*.po */*.po32 */*.@SHLIBEXT@ \
$(TOPFILES) $(PROGS) $(SPROGS) $(MODULES) .headers.stamp $(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) $(MODULES) .headers.stamp
# Making this target will just make sure that the prototype files # Making this target will just make sure that the prototype files
# exist, not necessarily that they are up to date. Since they're # exist, not necessarily that they are up to date. Since they're
@ -1084,7 +1082,7 @@ ctags:
ctags `find $(srcdir) -name "*.[ch]" | grep -v /CVS/` ctags `find $(srcdir) -name "*.[ch]" | grep -v /CVS/`
realclean: clean delheaders realclean: clean delheaders
-rm -f config.log $(PROGS) $(MODULES) $(SPROGS) bin/.dummy script/findsmb -rm -f config.log $(BIN_PROGS) $(MODULES) $(SBIN_PROGS) bin/.dummy script/findsmb
distclean: realclean distclean: realclean
-rm -f include/stamp-h -rm -f include/stamp-h

View File

@ -131,16 +131,10 @@ AC_SUBST(sbindir)
dnl Unique-to-Samba variables we'll be playing with. dnl Unique-to-Samba variables we'll be playing with.
AC_SUBST(SHELL) AC_SUBST(SHELL)
AC_SUBST(RUNPROG)
AC_SUBST(MPROGS)
AC_SUBST(LDSHFLAGS) AC_SUBST(LDSHFLAGS)
AC_SUBST(SONAMEFLAG) AC_SUBST(SONAMEFLAG)
AC_SUBST(SHLD) AC_SUBST(SHLD)
AC_SUBST(HOST_OS) AC_SUBST(HOST_OS)
AC_SUBST(PAM_MOD)
AC_SUBST(WRAP)
AC_SUBST(WRAP32)
AC_SUBST(WRAPPROG)
AC_SUBST(PICFLAG) AC_SUBST(PICFLAG)
AC_SUBST(PICSUFFIX) AC_SUBST(PICSUFFIX)
AC_SUBST(POBAD_CC) AC_SUBST(POBAD_CC)
@ -149,6 +143,10 @@ AC_SUBST(LIBSMBCLIENT_SHARED)
AC_SUBST(LIBSMBCLIENT) AC_SUBST(LIBSMBCLIENT)
AC_SUBST(PRINTLIBS) AC_SUBST(PRINTLIBS)
AC_SUBST(AUTHLIBS) AC_SUBST(AUTHLIBS)
AC_SUBST(SHLIB_PROGS)
AC_SUBST(EXTRA_BIN_PROGS)
AC_SUBST(EXTRA_SBIN_PROGS)
AC_SUBST(EXTRA_ALL_TARGETS)
# compile with optimization and without debugging by default # compile with optimization and without debugging by default
CFLAGS="-O ${CFLAGS}" CFLAGS="-O ${CFLAGS}"
@ -736,9 +734,7 @@ fi
# Check if we have execl, if not we need to compile smbrun. # Check if we have execl, if not we need to compile smbrun.
AC_CHECK_FUNCS(execl) AC_CHECK_FUNCS(execl)
if test x"$ac_cv_func_execl" = x"no"; then if test x"$ac_cv_func_execl" = x"no"; then
RUNPROG="bin/smbrun" EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun"
else
RUNPROG=""
fi fi
AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64) AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64)
@ -1907,6 +1903,7 @@ AC_ARG_WITH(smbwrapper,
WRAP="" WRAP=""
WRAP32="" WRAP32=""
fi fi
EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS $WRAPPROG $WRAP $WRAP32"
;; ;;
*) *)
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
@ -2105,9 +2102,9 @@ AC_SUBST(MODULE_XML)
################################################# #################################################
# check for automount support # check for automount support
AC_MSG_CHECKING(whether to use AUTOMOUNT) AC_MSG_CHECKING(whether to use automount)
AC_ARG_WITH(automount, AC_ARG_WITH(automount,
[ --with-automount Include AUTOMOUNT support (default=no)], [ --with-automount Include automount support (default=no)],
[ case "$withval" in [ case "$withval" in
yes) yes)
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
@ -2122,16 +2119,16 @@ AC_ARG_WITH(automount,
################################################# #################################################
# check for smbmount support # check for smbmount support
AC_MSG_CHECKING(whether to use SMBMOUNT) AC_MSG_CHECKING(whether to use smbmount)
AC_ARG_WITH(smbmount, AC_ARG_WITH(smbmount,
[ --with-smbmount Include SMBMOUNT (Linux only) support (default=no)], [ --with-smbmount Include smbmount (Linux only) support (default=no)],
[ case "$withval" in [ case "$withval" in
yes) yes)
case "$host_os" in case "$host_os" in
*linux*) *linux*)
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
AC_DEFINE(WITH_SMBMOUNT,1,[Whether to build smbmount]) AC_DEFINE(WITH_SMBMOUNT,1,[Whether to build smbmount])
MPROGS="bin/smbmount bin/smbmnt bin/smbumount" EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbmount bin/smbmnt bin/smbumount"
;; ;;
*) *)
AC_MSG_ERROR(not on a linux system!) AC_MSG_ERROR(not on a linux system!)
@ -2140,11 +2137,9 @@ AC_ARG_WITH(smbmount,
;; ;;
*) *)
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
MPROGS=
;; ;;
esac ], esac ],
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
MPROGS=
) )
@ -2184,12 +2179,10 @@ AC_ARG_WITH(pam_smbpass,
if test x$PICFLAG = x; then if test x$PICFLAG = x; then
AC_MSG_RESULT([No support for PIC code - disabling pam_smbpass]) AC_MSG_RESULT([No support for PIC code - disabling pam_smbpass])
PAM_MOD=""
elif test x$ac_cv_lib_pam_pam_get_data = xno; then elif test x$ac_cv_lib_pam_pam_get_data = xno; then
AC_MSG_RESULT([No libpam found -- disabling pam_smbpass]) AC_MSG_RESULT([No libpam found -- disabling pam_smbpass])
PAM_MOD=""
else else
PAM_MOD="bin/pam_smbpass.so" SHLIB_PROGS="$SHLIB_PROGS bin/pam_smbpass.so"
fi fi
;; ;;
*) *)
@ -2998,8 +2991,7 @@ samba_cv_HAVE_SENDFILEV=yes,samba_cv_HAVE_SENDFILEV=no)])
################################################# #################################################
# Check whether winbind is supported on this platform. If so we need to # Check whether winbind is supported on this platform. If so we need to
# build and install client programs (WINBIND_TARGETS), sbin programs # build and install client programs, sbin programs and shared libraries
# (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
AC_MSG_CHECKING(whether to build winbind) AC_MSG_CHECKING(whether to build winbind)
@ -3024,6 +3016,9 @@ case "$host_os" in
;; ;;
esac esac
AC_SUBST(WINBIND_NSS_EXTRA_OBJS)
AC_SUBST(WINBIND_NSS_EXTRA_LIBS)
# Check the setting of --with-winbindd # Check the setting of --with-winbindd
AC_ARG_WITH(winbind, AC_ARG_WITH(winbind,
@ -3051,37 +3046,22 @@ fi
# Display test results # Display test results
WINBIND_TARGETS=""
WINBIND_STARGETS=""
WINBIND_LTARGETS=""
WINBIND_PAM_PROGS=""
if test x"$HAVE_WINBIND" = x"yes"; then if test x"$HAVE_WINBIND" = x"yes"; then
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
AC_DEFINE(WITH_WINBIND,1,[Whether to build winbind]) AC_DEFINE(WITH_WINBIND,1,[Whether to build winbind])
WINBIND_TARGETS="bin/wbinfo" EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo"
WINBIND_STARGETS="bin/winbindd" EXTRA_SBIN_PROGS="$EXTRA_SBIN_PROGS bin/winbindd"
if test x"$BLDSHARED" = x"true"; then if test x"$BLDSHARED" = x"true"; then
WINBIND_LTARGETS="nsswitch/libnss_winbind.so" SHLIB_PROGS="$SHLIB_PROGS nsswitch/libnss_winbind.so"
if test x"$with_pam" = x"yes"; then if test x"$with_pam" = x"yes"; then
WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so" SHLIB_PROGS="$SHLIB_PROGS nsswitch/pam_winbind.so"
fi fi
fi fi
else else
AC_MSG_RESULT(no$winbind_no_reason) AC_MSG_RESULT(no$winbind_no_reason)
fi fi
# Substitution time!
AC_SUBST(WINBIND_TARGETS)
AC_SUBST(WINBIND_STARGETS)
AC_SUBST(WINBIND_LTARGETS)
AC_SUBST(WINBIND_PAM_TARGETS)
AC_SUBST(WINBIND_NSS_EXTRA_OBJS)
AC_SUBST(WINBIND_NSS_EXTRA_LIBS)
# Solaris has some extra fields in struct passwd that need to be # Solaris has some extra fields in struct passwd that need to be
# initialised otherwise nscd crashes. Unfortunately autoconf < 2.50 # initialised otherwise nscd crashes. Unfortunately autoconf < 2.50
# doesn't have the AC_CHECK_MEMBER macro which would be handy for checking # doesn't have the AC_CHECK_MEMBER macro which would be handy for checking
@ -3161,6 +3141,7 @@ AC_ARG_WITH(python,
[ --with-python=PYTHONNAME build Python libraries], [ --with-python=PYTHONNAME build Python libraries],
[ case "${withval-python}" in [ case "${withval-python}" in
yes) yes)
EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS python_ext"
;; ;;
no) no)
PYTHON= PYTHON=