diff options
author | Tim Potter <tpot@samba.org> | 2002-11-29 01:17:00 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-11-29 01:17:00 +0000 |
commit | c0a542fcadb0da30eed53940b305dc49f40bc2fa (patch) | |
tree | 60636e55f2d90da207eeef1fe8b6fe86ad09b715 /source3 | |
parent | 583652aa1a7a44671cd5a72eb47429649cd37a44 (diff) | |
download | samba-c0a542fcadb0da30eed53940b305dc49f40bc2fa.tar.gz samba-c0a542fcadb0da30eed53940b305dc49f40bc2fa.tar.bz2 samba-c0a542fcadb0da30eed53940b305dc49f40bc2fa.zip |
Merge from HEAD:
- Target selection cleanup
- Some formatting merges
- Merged some Pythong bits&pieces that were missed previously
Original commit message for target selection cleanup:
>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 6000caf5daf3da30bf69b865c5f4301a53609b2c)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/Makefile.in | 62 | ||||
-rw-r--r-- | source3/configure.in | 83 |
2 files changed, 79 insertions, 66 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in index d8a7110126..d7aaa3122e 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -99,21 +99,18 @@ PATH_FLAGS5 = $(PATH_FLAGS4) -DLIBDIR=\"$(LIBDIR)\" -DLOGFILEBASE=\"$(LOGFILEBAS PATH_FLAGS6 = $(PATH_FLAGS5) -DCONFIGDIR=\"$(CONFIGFIR)\" PATH_FLAGS = $(PATH_FLAGS6) $(PASSWD_FLAGS) -WINBIND_PROGS = @WINBIND_TARGETS@ -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@ -PROGS1 = bin/smbclient bin/net bin/smbspool bin/testparm bin/testprns bin/smbstatus bin/smbcontrol bin/smbtree bin/tdbbackup @RUNPROG@ @WINBIND_TARGETS@ -PROGS2 = bin/smbpasswd bin/rpcclient bin/smbcacls @WRAPPROG@ @WRAP@ @WRAP32@ @PAM_MOD@ -MPROGS = @MPROGS@ -LPROGS = $(WINBIND_PAM_PROGS) $(WINBIND_LPROGS) - -PROGS = $(PROGS1) $(PROGS2) $(MPROGS) bin/nmblookup bin/pdbedit bin/smbgroupedit +SBIN_PROGS = bin/smbd bin/nmbd bin/swat bin/wrepld @EXTRA_SBIN_PROGS@ + +BIN_PROGS1 = bin/smbclient bin/net bin/smbspool bin/testparm bin/testprns bin/smbstatus +BIN_PROGS2 = bin/smbcontrol bin/smbtree bin/tdbbackup bin/nmblookup bin/pdbedit +BIN_PROGS3 = bin/smbpasswd bin/rpcclient bin/smbcacls bin/smbgroupedit + TORTURE_PROGS = bin/smbtorture bin/msgtest bin/masktest bin/locktest \ 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 \ $(builddir)/script/findsmb @@ -152,7 +149,7 @@ LIB_SMBD_OBJ = lib/system_smbd.o lib/util_smbd.o READLINE_OBJ = lib/readline.o -POPT_LIB_OBJ = lib/popt_common.o +POPT_LIB_OBJ = lib/popt_common.o UBIQX_OBJ = ubiqx/ubi_BinTree.o ubiqx/ubi_Cache.o ubiqx/ubi_SplayTree.o \ ubiqx/ubi_dLinkList.o ubiqx/ubi_sLinkList.o ubiqx/debugparse.o @@ -382,6 +379,18 @@ LIBSMBCLIENT_OBJ = libsmb/libsmbclient.o libsmb/libsmb_compat.o \ libsmb/libsmb_cache.o $(LIB_OBJ) \ $(LIBSMB_OBJ) $(PARAM_OBJ) $(UBIQX_OBJ) +# This shared library is intended for linking with unit test programs +# to test Samba internals. It's called libbigballofmud.so to +# discourage casual usage. + +LIBBIGBALLOFMUD_MAJOR = 0 + +LIBBIGBALLOFMUD_OBJ = $(LIB_OBJ) $(UBIQX_OBJ) $(PARAM_OBJ) $(SECRETS_OBJ) \ + $(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_OBJ) \ + $(GROUPDB_OBJ) + +LIBBIGBALLOFMUD_PICOBJS = $(LIBBIGBALLOFMUD_OBJ:.o=.po) + CLIENT_OBJ1 = client/client.o client/clitar.o CLIENT_OBJ = $(CLIENT_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_OBJ) \ @@ -524,11 +533,12 @@ TDBBACKUP_OBJ = tdb/tdbbackup.o $(TDBBASE_OBJ) ###################################################################### # 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@ -smbwrapper : SHOWFLAGS @WRAPPROG@ @WRAP@ @WRAP32@ +smbwrapper : SHOWFLAGS @SMBWRAPPER@ torture : SHOWFLAGS $(TORTURE_PROGS) @@ -552,7 +562,7 @@ smbfilter : SHOWFLAGS bin/smbfilter 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@ @@ -776,7 +786,7 @@ bin/smbwrapper.32.@SHLIBEXT@: $(PICOBJS32) @SONAMEFLAG@`basename $@` bin/libsmbclient.@SHLIBEXT@: $(LIBSMBCLIENT_PICOBJS) - echo Linking libsmbclient shared library $@ + @echo Linking libsmbclient shared library $@ $(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBCLIENT_PICOBJS) $(LIBS) \ @SONAMEFLAG@`basename $@`.$(LIBSMBCLIENT_MAJOR) @@ -784,8 +794,12 @@ bin/libsmbclient.a: $(LIBSMBCLIENT_PICOBJS) @echo Linking libsmbclient non-shared library $@ -$(AR) -rc $@ $(LIBSMBCLIENT_PICOBJS) -libsmbclient: bin/libsmbclient.a bin/libsmbclient.@SHLIBEXT@ +bin/libbigballofmud.@SHLIBEXT@: $(LIBBIGBALLOFMUD_PICOBJS) + @echo Linking bigballofmud shared library $@ + $(SHLD) $(LDSHFLAGS) -o $@ $(LIBBIGBALLOFMUD_PICOBJS) $(LIBS) \ + @SONAMEFLAG@`basename $@`.$(LIBBIGBALLOFMUD_MAJOR) +libsmbclient: bin/libsmbclient.a bin/libsmbclient.@SHLIBEXT@ nsswitch/libnss_wins.@SHLIBEXT@: $(NSS_OBJ) @echo "Linking $@" @@ -927,11 +941,17 @@ python_common_proto: $(PY_COMMON_PROTO_OBJ) python_ext: $(PYTHON_OBJS) + @if test -z "$(PYTHON)"; then \ + echo Use the option --with-python to configure python; \ + exit 1; fi PYTHON_OBJS="$(PYTHON_OBJS)" PYTHON_CFLAGS="$(CFLAGS) $(CPPFLAGS) $(FLAGS)" \ LIBS="$(LIBS)" \ $(PYTHON) python/setup.py build python_install: $(PYTHON_OBJS) + @if test -z "$(PYTHON)"; then \ + echo Use the option --with-python to configure python; \ + exit 1; fi PYTHON_OBJS="$(PYTHON_OBJS)" PYTHON_CFLAGS="$(CFLAGS) $(CPPFLAGS)" \ LIBS="$(LIBS)" \ $(PYTHON) python/setup.py install @@ -979,7 +999,7 @@ TOPFILES=dynconfig.o dynconfig.po clean: delheaders python_clean -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 # exist, not necessarily that they are up to date. Since they're @@ -1056,7 +1076,7 @@ ctags: ctags `find $(srcdir) -name "*.[ch]" | grep -v /CVS/` 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 -rm -f include/stamp-h diff --git a/source3/configure.in b/source3/configure.in index 4b9a8048b4..e3902f509c 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -132,16 +132,10 @@ AC_SUBST(sbindir) dnl Unique-to-Samba variables we'll be playing with. AC_SUBST(SHELL) -AC_SUBST(RUNPROG) -AC_SUBST(MPROGS) AC_SUBST(LDSHFLAGS) AC_SUBST(SONAMEFLAG) AC_SUBST(SHLD) AC_SUBST(HOST_OS) -AC_SUBST(PAM_MOD) -AC_SUBST(WRAP) -AC_SUBST(WRAP32) -AC_SUBST(WRAPPROG) AC_SUBST(PICFLAG) AC_SUBST(PICSUFFIX) AC_SUBST(POBAD_CC) @@ -150,6 +144,11 @@ AC_SUBST(LIBSMBCLIENT_SHARED) AC_SUBST(LIBSMBCLIENT) AC_SUBST(PRINTLIBS) AC_SUBST(AUTHLIBS) +AC_SUBST(SHLIB_PROGS) +AC_SUBST(SMBWRAPPER) +AC_SUBST(EXTRA_BIN_PROGS) +AC_SUBST(EXTRA_SBIN_PROGS) +AC_SUBST(EXTRA_ALL_TARGETS) # compile with optimization and without debugging by default CFLAGS="-O ${CFLAGS}" @@ -737,9 +736,7 @@ fi # Check if we have execl, if not we need to compile smbrun. AC_CHECK_FUNCS(execl) if test x"$ac_cv_func_execl" = x"no"; then - RUNPROG="bin/smbrun" -else - RUNPROG="" + EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/smbrun" fi AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64) @@ -1908,6 +1905,8 @@ AC_ARG_WITH(smbwrapper, WRAP="" WRAP32="" fi + EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS $WRAPPROG $WRAP $WRAP32" + SMBWRAPPER="$WRAPPROG $WRAP $WRAP32" ;; *) AC_MSG_RESULT(no) @@ -1958,7 +1957,7 @@ with_ads_support=yes AC_MSG_CHECKING([whether to use Active Directory]) AC_ARG_WITH(ads, -[ --with-ads Active Directory support (default yes)], +[ --with-ads Active Directory support (default yes)], [ case "$withval" in no) with_ads_support=no @@ -2058,7 +2057,7 @@ with_ldap_support=yes AC_MSG_CHECKING([whether to use LDAP]) AC_ARG_WITH(ldap, -[ --with-ldap LDAP support (default yes)], +[ --with-ldap LDAP support (default yes)], [ case "$withval" in no) with_ldap_support=no @@ -2106,9 +2105,9 @@ AC_SUBST(MODULE_XML) ################################################# # check for automount support -AC_MSG_CHECKING(whether to use AUTOMOUNT) +AC_MSG_CHECKING(whether to use automount) AC_ARG_WITH(automount, -[ --with-automount Include AUTOMOUNT support (default=no)], +[ --with-automount Include automount support (default=no)], [ case "$withval" in yes) AC_MSG_RESULT(yes) @@ -2123,16 +2122,16 @@ AC_ARG_WITH(automount, ################################################# # check for smbmount support -AC_MSG_CHECKING(whether to use SMBMOUNT) +AC_MSG_CHECKING(whether to use 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 yes) case "$host_os" in *linux*) AC_MSG_RESULT(yes) 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!) @@ -2141,11 +2140,9 @@ AC_ARG_WITH(smbmount, ;; *) AC_MSG_RESULT(no) - MPROGS= ;; esac ], AC_MSG_RESULT(no) - MPROGS= ) @@ -2185,12 +2182,10 @@ AC_ARG_WITH(pam_smbpass, if test x$PICFLAG = x; then 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 AC_MSG_RESULT([No libpam found -- disabling pam_smbpass]) - PAM_MOD="" else - PAM_MOD="bin/pam_smbpass.so" + SHLIB_PROGS="$SHLIB_PROGS bin/pam_smbpass.so" fi ;; *) @@ -2240,7 +2235,7 @@ fi # check for a LDAP password database configuration backwards compatibility AC_MSG_CHECKING(whether to use LDAP SAM 2.2 compatible configuration) AC_ARG_WITH(ldapsam, -[ --with-ldapsam Include LDAP SAM 2.2 compatible configuration (default=no)], +[ --with-ldapsam Include LDAP SAM 2.2 compatible configuration (default=no)], [ case "$withval" in yes) AC_MSG_RESULT(yes) @@ -2757,7 +2752,7 @@ samba_cv_HAVE_ACL_GET_PERM_NP=yes,samba_cv_HAVE_ACL_GET_PERM_NP=no)]) with_sendfile_support=yes AC_MSG_CHECKING(whether to check to support sendfile) AC_ARG_WITH(sendfile-support, -[ --with-sendfile-support Check for sendfile support (default=yes)], +[ --with-sendfile-support Check for sendfile support (default=yes)], [ case "$withval" in yes) @@ -2981,8 +2976,7 @@ samba_cv_HAVE_SENDFILEV=yes,samba_cv_HAVE_SENDFILEV=no)]) ################################################# # Check whether winbind is supported on this platform. If so we need to -# build and install client programs (WINBIND_TARGETS), sbin programs -# (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). +# build and install client programs, sbin programs and shared libraries AC_MSG_CHECKING(whether to build winbind) @@ -3007,6 +3001,9 @@ case "$host_os" in ;; esac +AC_SUBST(WINBIND_NSS_EXTRA_OBJS) +AC_SUBST(WINBIND_NSS_EXTRA_LIBS) + # Check the setting of --with-winbindd AC_ARG_WITH(winbind, @@ -3034,37 +3031,22 @@ fi # Display test results -WINBIND_TARGETS="" -WINBIND_STARGETS="" -WINBIND_LTARGETS="" -WINBIND_PAM_PROGS="" - if test x"$HAVE_WINBIND" = x"yes"; then AC_MSG_RESULT(yes) AC_DEFINE(WITH_WINBIND,1,[Whether to build winbind]) - WINBIND_TARGETS="bin/wbinfo" - WINBIND_STARGETS="bin/winbindd" + EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo" + EXTRA_SBIN_PROGS="$EXTRA_SBIN_PROGS bin/winbindd" 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 - WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so" + SHLIB_PROGS="$SHLIB_PROGS nsswitch/pam_winbind.so" fi fi else AC_MSG_RESULT(no$winbind_no_reason) 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 # initialised otherwise nscd crashes. Unfortunately autoconf < 2.50 # doesn't have the AC_CHECK_MEMBER macro which would be handy for checking @@ -3132,11 +3114,22 @@ AC_SUBST(FLAGS1) # though they can coexist in different directories.) In the future # this might make the Python stuff be built by default. +# If you don't specify --with-python, we assume "python" anyhow, +# because the extensions are not built until you specifically "make +# python_ext". --without-python turns them off. Perhaps in the +# future --with-python should make them automatically built by make +# all. + +PYTHON=python + AC_ARG_WITH(python, [ --with-python=PYTHONNAME build Python libraries], [ case "${withval-python}" in yes) - PYTHON=python + EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS python_ext" + ;; + no) + PYTHON= ;; *) PYTHON=${withval-python} |