[PATCH] samba-devel
Stefan Metzmacher
metze at metzemix.de
Tue Nov 11 19:09:32 GMT 2003
Hi Alexander,
here's my samba-devel patch
1) It adds a sambabuild util which gives modules some usefull info:
metze at routox:/home/Projects/samba/3_0-ioctl/source> sambabuild --help
Usage: [OPTION...]
--cflags Print flags to pass to c compiler
--cppflags Print flags to pass to the c pre
compiler
--picflags Print flags for PIC
--ldflags Print flags to pass to linker
--ldshflags Print flags to pass to linker for
shared libraries
-S, --subsystem-path=SUBSYSTEM Print installation directory for
subsystem
-M, --makefile-var=MAKEFILE-VAR Print Makefile var
-H, --header-file=SYSTEM Print Headerfile location for system
-v, --version-string=VERSION-STRING Print Makefile var
-b, --build-options Print build options
Help options
-?, --help Show this help message
--usage Display brief usage message
Common samba options:
-V, --version Print version
Some examples:
metze at routox:/home/Projects/samba/3_0-devel/source> sambabuild --cflags
-g -gstabs -Wall -O2 -march=i386 -mcpu=i686
metze at routox:/home/Projects/samba/3_0-devel/source> sambabuild --cppflags
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
metze at routox:/home/Projects/samba/3_0-devel/source> sambabuild --picflags
-fPIC
metze at routox:/home/Projects/samba/3_0-devel/source> sambabuild --ldflags
-Wl,-rpath,/usr/lib
metze at routox:/home/Projects/samba/3_0-devel/source> sambabuild --ldshflags
-shared
metze at routox:/home/Projects/samba/3_0-devel/source> sambabuild -S vfs
/usr/lib/samba/vfs
metze at routox:/home/Projects/samba/3_0-devel/source> sambabuild -M ?
usage: sambabuild -M <makefile-var>
possible makefile-vars:
prefix
exec_prefix
mandir
bindir
sbindir
CC
SHLD
CFLAGS
CPPFLAGS
LDFLAGS
LDSHFLAGS
PICFLAGS
DYNEXP
EXEEXT
OBJEXT
PICSUFFIX
SHLIBEXT
CONFIGFILE
CONFIGDIR
PRIVATEDIR
LOCKDIR
metze at routox:/home/Projects/samba/3_0-devel/source> sambabuild -M PICSUFFIX
po
metze at routox:/home/Projects/samba/3_0-devel/source> sambabuild -M CONFIGFILE
/etc/samba/smb.conf
metze at routox:/home/Projects/samba/3_0-devel/source> sambabuild -H ?
usage: sambabuild -H <subsystem-header-file>
possible subsystem-header-files:
samba_module
winbind_client
metze at routox:/home/Projects/samba/3_0-devel/source> sambabuild -H samba_module
<samba/samba_module.h>
metze at routox:/home/Projects/samba/3_0-devel/source> sambabuild -H winbind_client
<samba/winbind_client.h>
metze at routox:/home/Projects/samba/3_0-devel/source> sambabuild -v ?
usage: sambabuild -v <version-string>
possible version-strings:
MAJOR
MINOR
RELEASE
REVISION
PRE_RELEASE
RC_RELEASE
BETA_RELEASE
ALPHA_RELEASE
TEST_RELEASE
IS_CVS_SNAPSHOT
STRING
OFFICIAL_STRING
VENDOR_SUFFIX
metze at routox:/home/Projects/samba/3_0-devel/source> sambabuild -v STRING
CVS 3.0.1pre2-MX-build[Nov 1 2003 18:24:36]
metze at routox:/home/Projects/samba/3_0-devel/source> sambabuild -v MAJOR
3
metze at routox:/home/Projects/samba/3_0-devel/source> sambabuild -v BETA_RELEASE
metze at routox:/home/Projects/samba/3_0-devel/source> sambabuild -v MINOR
0
metze at routox:/home/Projects/samba/3_0-devel/source> sambabuild -v OFFICIAL_STRING
CVS 3.0.1pre2
metze at routox:/home/Projects/samba/3_0-devel/source> sambabuild -v VENDOR_SUFFIX
MX-build[Nov 1 2003 18:24:36]
2) it adds a configure option
--with-devel-subdir=DIR Where to put the devel headers (default=samba)
3.1) it adds a make devel
prepare the headers for /usr/include/samba
#include "vfs.h"
=>
#include <samba/include/vfs.h>
if you use --with-devel-subdir=samba3-3.0.0
prepare the headers for /usr/include/samba3-3.0.0
#include "vfs.h"
=>
#include <samba3-3.0.0/include/vfs.h>
3.2)
and it creates /usr/include/samba/samba_module.h
which includes <samba/include/includes.h>
and /usr/include/samba/winbind_client.h
which includes <samba/nsswitch/winbind_client.h>
4) make installdevel
installs the headers and sambabuild
Comments are welcome!
Some notes of mine:
I didn't use pathsubst and wildcard hack for finding the headers because
I'm not shure if this is portable
--
metze
-------------------------------------------
Stefan (metze) Metzmacher <metze at metzemix.de>
-------------- next part --------------
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/Makefile.in 3_0-devel/source/Makefile.in
--- 3_0/source/Makefile.in Sun Nov 9 12:48:30 2003
+++ 3_0-devel/source/Makefile.in Tue Nov 11 18:04:10 2003
@@ -60,6 +60,7 @@ BINDIR = @bindir@
# sbindir is mapped to bindir when compiling SAMBA in 2.0.x compatibility mode.
SBINDIR = @sbindir@
LIBDIR = @libdir@
+INCLUDEDIR = @includedir@
VFSLIBDIR = $(LIBDIR)/vfs
PDBLIBDIR = $(LIBDIR)/pdb
RPCLIBDIR = $(LIBDIR)/rpc
@@ -102,7 +103,7 @@ LIBSMBCLIENT_MAJOR=0
LIBSMBCLIENT_MINOR=1
-FLAGS1 = $(CFLAGS) @FLAGS1@ -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper -I. $(CPPFLAGS) -I$(srcdir)
+FLAGS1 = $(CFLAGS) @FLAGS1@ -I$(builddir)/include -I$(srcdir)/include $(CPPFLAGS)
FLAGS2 =
FLAGS3 =
FLAGS4 =
@@ -116,8 +117,9 @@ PATH_FLAGS3 = $(PATH_FLAGS2) -DLMHOSTSFI
PATH_FLAGS4 = $(PATH_FLAGS3) -DSWATDIR=\"$(SWATDIR)\" -DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\"
PATH_FLAGS5 = $(PATH_FLAGS4) -DLIBDIR=\"$(LIBDIR)\" \
-DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"@SHLIBEXT@\"
-PATH_FLAGS6 = $(PATH_FLAGS5) -DCONFIGDIR=\"$(CONFIGDIR)\"
-PATH_FLAGS = $(PATH_FLAGS6) $(PASSWD_FLAGS)
+PATH_FLAGS6 = $(PATH_FLAGS5) -DCONFIGDIR=\"$(CONFIGDIR)\" -DPREFIX=\"$(prefix)\"
+PATH_FLAGS7 = $(PATH_FLAGS6) -DEXEC_PREFIX=\"$(exec_prefix)\" -DMANDIR=\"$(MANDIR)\"
+PATH_FLAGS = $(PATH_FLAGS7) $(PASSWD_FLAGS)
# Note that all executable programs now provide for an optional executable suffix.
@@ -509,7 +511,7 @@ CUPS_OBJ = client/smbspool.o $(PARAM_OBJ
MOUNT_OBJ = client/smbmount.o \
$(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(UBIQX_OBJ) $(LIB_OBJ)
-MNT_OBJ = client/smbmnt.o lib/version.o lib/snprintf.o
+MNT_OBJ = client/smbmnt.o dynconfig.o lib/version.o lib/snprintf.o
UMOUNT_OBJ = client/smbumount.o
@@ -553,6 +555,9 @@ SMBCQUOTAS_OBJ = utils/smbcquotas.o $(LO
$(UBIQX_OBJ) $(LIB_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_GET_SET_OBJ) \
$(LIBMSRPC_OBJ) $(SECRETS_OBJ) $(POPT_LIB_OBJ)
+SAMBABUILD_OBJ = utils/sambabuild.o $(BUILDOPT_OBJ) $(PARAM_OBJ) $(LIB_OBJ) $(UBIQX_OBJ) \
+ $(LIBSAMBA_OBJ) $(SECRETS_OBJ) $(POPT_LIB_OBJ)
+
TALLOCTORT_OBJ = lib/talloctort.o $(PARAM_OBJ) $(LIB_OBJ) $(UBIQX_OBJ)
RPCTORTURE_OBJ = torture/rpctorture.o \
@@ -669,6 +674,8 @@ smbcacls : SHOWFLAGS bin/smbcacls at EXEEXT
smbcquotas : SHOWFLAGS bin/smbcquotas at EXEEXT@
+sambabuild : SHOWFLAGS bin/sambabuild at EXEEXT@
+
locktest2 : SHOWFLAGS bin/locktest2 at EXEEXT@
rpctorture : SHOWFLAGS bin/rpctorture at EXEEXT@
@@ -734,13 +741,13 @@ dynconfig. at PICSUFFIX@: dynconfig.c Makef
lib/version.o: lib/version.c include/version.h
@echo Compiling $*.c
- @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) -c $< -o $@
+ @$(CC) -I. -I$(srcdir) $(FLAGS) -c $< -o $@
lib/version. at PICSUFFIX@: lib/version.c include/version.h
@if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
@echo Compiling $*.c with @PICFLAGS@
- @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) @PICFLAGS@ -c $< -o $*. at PICSUFFIX@
+ @$(CC) -I. -I$(srcdir) $(FLAGS) @PICFLAGS@ -c $< -o $*. at PICSUFFIX@
@BROKEN_CC@ -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\. at PICSUFFIX@$$%.o%'` $@
@POBAD_CC@ @mv $*. at PICSUFFIX@.o $@
@@ -886,6 +893,10 @@ bin/smbcquotas at EXEEXT@: $(SMBCQUOTAS_OBJ
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(SMBCQUOTAS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS)
+bin/sambabuild at EXEEXT@: $(SAMBABUILD_OBJ) @BUILD_POPT@ bin/.dummy
+ @echo Linking $@
+ @$(CC) $(FLAGS) -o $@ $(SAMBABUILD_OBJ) $(LDFLAGS) $(LIBS) @POPTLIBS@
+
bin/locktest at EXEEXT@: $(LOCKTEST_OBJ) bin/.dummy
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(LOCKTEST_OBJ) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
@@ -1309,8 +1320,9 @@ uninstallscripts:
# Toplevel clean files
TOPFILES=dynconfig.o dynconfig. at PICSUFFIX@
-clean: delheaders python_clean
- -rm -f core */*~ *~ */*.o */*. at PICSUFFIX@ */*. at SHLIBEXT@ \
+clean: delheaders python_clean devel_clean
+ @echo "Removing object and binary files"
+ @rm -f core */*~ *~ */*.o */*. at PICSUFFIX@ */*. at SHLIBEXT@ \
$(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) $(MODULES) $(TORTURE_PROGS) \
$(LIBSMBCLIENT) $(EVERYTHING_PROGS) .headers.stamp
@@ -1386,6 +1398,97 @@ proto: headers
.PHONY: headers proto
+DEVEL_INCLUDE_HEADERS = include/MacExtensions.h include/ads.h include/asn_1.h \
+ include/byteorder.h include/charset.h include/client.h include/clitar.h \
+ include/debug.h include/dlinklist.h include/doserr.h include/dynconfig.h \
+ include/hash.h include/hmacmd5.h include/interfaces.h include/intl.h \
+ include/libsmbclient.h include/local.h include/mangle.h include/mapping.h \
+ include/md5.h include/messages.h include/msdfs.h include/nameserv.h \
+ include/nt_printing.h include/ntdomain.h include/printing.h include/pstring.h \
+ include/rap.h include/rpc_brs.h include/rpc_client.h include/rpc_creds.h \
+ include/rpc_dce.h include/rpc_dfs.h include/rpc_lsa.h include/rpc_netlogon.h \
+ include/rpc_parse.h include/rpc_reg.h include/rpc_samr.h include/rpc_secdes.h include/rpc_shutdown.h \
+ include/rpc_spoolss.h include/rpc_srvsvc.h include/rpc_wkssvc.h include/safe_string.h \
+ include/secrets.h include/session.h include/smb_acls.h include/talloc.h \
+ include/trans2.h include/util_getent.h include/xfile.h include/adt_tree.h \
+ include/nt_status.h include/rpc_ds.h include/libsmb_internal.h include/ntlmssp.h \
+ include/srvstr.h include/popt_common.h include/rpc_echo.h include/authdata.h \
+ include/smb_macros.h include/smbldap.h include/build_env.h include/vfs.h \
+ include/smb.h include/idmap.h include/sysquotas.h include/proto.h include/auth.h \
+ include/spnego.h include/privileges.h include/passdb.h include/includes.h \
+ include/nterr.h include/module.h include/version.h include/ntioctl.h \
+ include/fake_file.h include/ntquotas.h include/vfs_macros.h include/rpc_misc.h \
+ include/smbprofile.h
+
+DEVEL_NSSWITCH_HEADERS = nsswitch/winbind_nss.h nsswitch/pam_winbind.h \
+ nsswitch/winbind_nss_config.h nsswitch/winbindd.h \
+ nsswitch/winbindd_nss.h nsswitch/winbind_client.h \
+ nsswitch/winbind_nss_hpux.h nsswitch/winbind_nss_irix.h \
+ nsswitch/winbind_nss_linux.h nsswitch/winbind_nss_solaris.h \
+ nsswitch/winbindd_proto.h
+DEVEL_UBIQX_HEADERS = ubiqx/debugparse.h ubiqx/sys_include.h \
+ ubiqx/ubi_BinTree.h ubiqx/ubi_Cache.h ubiqx/ubi_SplayTree.h \
+ ubiqx/ubi_dLinkList.h ubiqx/ubi_sLinkList.h
+
+DEVEL_POPT_HEADERS = popt/popt.h
+
+DEVEL_TDB_HEADERS = tdb/spinlock.h tdb/tdb.h tdb/tdbutil.h tdb/tdbback.h
+
+DEVEL_SMBWRAPPER_HEADERS = smbwrapper/realcalls.h smbwrapper/smbw.h
+
+DEVEL_SOURCE_HEADERS = $(DEVEL_INCLUDE_HEADERS) $(DEVEL_NSSWITCH_HEADERS) \
+ $(DEVEL_UBIQX_HEADERS) $(DEVEL_POPT_HEADERS) \
+ $(DEVEL_TDB_HEADERS) $(DEVEL_SMBWRAPPER_HEADERS)
+
+DEVEL_BUILD_HEADERS = include/proto.h include/build_env.h \
+ include/wrepld_proto.h nsswitch/winbindd_proto.h \
+ web/swat_proto.h client/client_proto.h \
+ utils/net_proto.h include/config.h
+
+#allways use this param quartet for one file!
+DEVEL_HEADER_FILES_LONG = \
+ samba_module.h include/includes.h "Samba Module" _SAMBA_SAMBA_MODULE_H \
+ winbind_client.h nsswitch/winbind_client.h "Winbind Client" _SAMBA_WINBIND_CLIENT_H
+
+DEVEL_HEADER_FILES_SHORT = \
+ samba_module.h \
+ winbind_client.h
+
+DEVEL_SUBDIR=@devel_subdir@
+DEVEL_INCLUDEDIR=@devel_includedir@
+
+mkdevelheaders="$(srcdir)/script/mkdevelheaders.sh"
+mkdevelincludes="$(srcdir)/script/mkdevelincludes.sh"
+
+devel: include/version.h Makefile proto_exists bin/sambabuild at EXEEXT@
+ @echo "Create DEVEL HEADER files"
+ @cd $(srcdir) && \
+ $(mkdevelheaders) "$(srcdir)" "$(builddir)/bin/include/" $(DEVEL_SUBDIR) \
+ $(DEVEL_SOURCE_HEADERS)
+ @cd $(buildir) && \
+ $(mkdevelheaders) "$(builddir)" "$(builddir)/bin/include/" $(DEVEL_SUBDIR) \
+ $(DEVEL_BUILD_HEADERS)
+ @cd $(srcdir) && \
+ $(mkdevelincludes) "$(srcdir)" "$(builddir)/bin/include/" $(DEVEL_SUBDIR) \
+ $(DEVEL_HEADER_FILES_LONG)
+
+installdevelheaders="$(srcdir)/script/installdevelheaders.sh"
+
+DEVEL_INSTALL_HEADERS= $(DEVEL_SOURCE_HEADERS) $(DEVEL_BUILD_HEADERS) \
+ $(DEVEL_HEADER_FILES_SHORT)
+
+installdevel: devel
+ @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) bin/sambabuild at EXEEXT@
+ @echo "Install DEVEL HEADER files"
+ @$(installdevelheaders) 644 $(builddir)/bin/include/ $(DESTDIR)$(DEVEL_INCLUDEDIR) $(DEVEL_SUBDIR) \
+ $(DEVEL_INSTALL_HEADERS)
+
+devel_clean:
+ @echo "Removing DEVEL HEADER files"
+ @rm -rf bin/include/
+ @echo "Removing sambabuild at EXEEXT@"
+ @rm -f bin/sambabuild
+
etags:
etags `find $(srcdir) -name "*.[ch]" | grep -v /CVS/`
@@ -1393,11 +1496,13 @@ ctags:
ctags `find $(srcdir) -name "*.[ch]" | grep -v /CVS/`
realclean: clean delheaders
- -rm -f config.log bin/.dummy script/findsmb
+ -rm -f config.log bin/.dummy
distclean: realclean
-rm -f include/stamp-h
-rm -f include/config.h Makefile
+ -rm -f script/findsmb smbadduser
+ -rm -f script/gen-8bit-gap.sh utils/sambabuild.c
-rm -f config.status config.cache so_locations
-rm -rf .deps TAGS
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/autogen.sh 3_0-devel/source/autogen.sh
--- 3_0/source/autogen.sh Fri Aug 22 17:44:43 2003
+++ 3_0-devel/source/autogen.sh Tue Nov 11 15:57:54 2003
@@ -47,16 +47,14 @@ if [ "$AUTOCONFFOUND" = "0" -o "$AUTOHEA
exit 1
fi
-
+echo "$0: running script/mkversion.sh"
+./script/mkversion.sh || exit 1
echo "$0: running $AUTOHEADER"
$AUTOHEADER || exit 1
echo "$0: running $AUTOCONF"
$AUTOCONF || exit 1
-
-echo "$0: running script/mkversion.sh"
-./script/mkversion.sh || exit 1
rm -rf autom4te.cache autom4te-2.53.cache
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/configure.in 3_0-devel/source/configure.in
--- 3_0/source/configure.in Tue Nov 11 17:57:18 2003
+++ 3_0-devel/source/configure.in Tue Nov 11 15:54:33 2003
@@ -126,6 +126,38 @@ AC_ARG_WITH(logfilebase,
;;
esac])
+#################################################
+# set devel include subdirectory location
+devel_subdir="samba"
+AC_ARG_WITH(devel-subdir,
+[ --with-devel-subdir=DIR Where to put the devel headers (default=samba)],
+[ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody does it
+ #
+ AC_MSG_WARN([--with-devel-subdir called without argument - will use default])
+ ;;
+ * )
+ devel_subdir="$withval"
+ ;;
+ esac])
+
+samba_cv_TMP=`echo $devel_subdir | cut -b 0-1`
+if test x"$samba_cv_TMP" = x"/";then
+ devel_includedir=""
+else
+ devel_includedir=${includedir}
+fi
+
+#devel_includedir should be a absolute path
+samba_cv_TMP="devel_includedir=$devel_includedir"
+eval $samba_cv_TMP
+
+#devel_subdir should be a absolute path
+samba_cv_TMP="devel_subdir=$devel_subdir"
+eval $samba_cv_TMP
+
AC_SUBST(configdir)
AC_SUBST(lockdir)
AC_SUBST(piddir)
@@ -134,7 +166,8 @@ AC_SUBST(privatedir)
AC_SUBST(swatdir)
AC_SUBST(bindir)
AC_SUBST(sbindir)
-
+AC_SUBST(devel_subdir)
+AC_SUBST(devel_includedir)
dnl Unique-to-Samba variables we'll be playing with.
AC_SUBST(SHELL)
AC_SUBST(LDSHFLAGS)
@@ -4229,7 +4262,7 @@ dnl Remove -I/usr/include/? from CFLAGS
CFLAGS_REMOVE_USR_INCLUDE(CFLAGS)
CFLAGS_REMOVE_USR_INCLUDE(CPPFLAGS)
-AC_OUTPUT(include/stamp-h Makefile script/findsmb smbadduser script/gen-8bit-gap.sh)
+AC_OUTPUT(include/stamp-h Makefile script/findsmb smbadduser script/gen-8bit-gap.sh utils/sambabuild.c)
#################################################
# Print very concise instructions on building/use
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/dynconfig.c 3_0-devel/source/dynconfig.c
--- 3_0/source/dynconfig.c Mon Aug 4 06:57:27 2003
+++ 3_0-devel/source/dynconfig.c Tue Nov 11 15:43:28 2003
@@ -70,3 +70,11 @@ const pstring dyn_PIDDIR = PIDDIR;
const pstring dyn_SMB_PASSWD_FILE = SMB_PASSWD_FILE;
const pstring dyn_PRIVATE_DIR = PRIVATE_DIR;
+
+const char *dyn_PREFIX = PREFIX;
+const char *dyn_EXEC_PREFIX = EXEC_PREFIX;
+const char *dyn_MANDIR = MANDIR;
+const char *dyn_CONFIGDIR = CONFIGDIR;
+
+const char *dyn_DATE = __DATE__;
+const char *dyn_TIME = __TIME__;
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/include/dynconfig.h 3_0-devel/source/include/dynconfig.h
--- 3_0/source/include/dynconfig.h Mon Aug 4 06:57:28 2003
+++ 3_0-devel/source/include/dynconfig.h Tue Nov 11 15:43:35 2003
@@ -36,3 +36,10 @@ extern const pstring dyn_LOCKDIR;
extern const pstring dyn_PIDDIR;
extern const pstring dyn_SMB_PASSWD_FILE;
extern const pstring dyn_PRIVATE_DIR;
+extern const char *dyn_PREFIX;
+extern const char *dyn_EXEC_PREFIX;
+extern const char *dyn_MANDIR;
+extern const char *dyn_CONFIGDIR;
+
+extern const char *dyn_DATE;
+extern const char *dyn_TIME;
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/include/includes.h 3_0-devel/source/include/includes.h
--- 3_0/source/include/includes.h Sun Nov 9 12:48:31 2003
+++ 3_0-devel/source/include/includes.h Tue Nov 11 15:44:06 2003
@@ -751,8 +751,8 @@ extern int errno;
/* Lists, trees, caching, database... */
#include "xfile.h"
#include "intl.h"
-#include "ubi_sLinkList.h"
-#include "ubi_dLinkList.h"
+#include "../ubiqx/ubi_sLinkList.h"
+#include "../ubiqx/ubi_dLinkList.h"
#include "dlinklist.h"
#include "../tdb/tdb.h"
#include "../tdb/spinlock.h"
@@ -773,10 +773,10 @@ extern int errno;
#include "util_getent.h"
#ifndef UBI_BINTREE_H
-#include "ubi_Cache.h"
+#include "../ubiqx/ubi_Cache.h"
#endif /* UBI_BINTREE_H */
-#include "debugparse.h"
+#include "../ubiqx/debugparse.h"
#include "version.h"
@@ -821,19 +821,23 @@ extern int errno;
#include "client.h"
-#include "smbw.h"
+#include "../smbwrapper/smbw.h"
#include "session.h"
#include "asn_1.h"
-#include "popt.h"
+#ifdef HAVE_POPT_H
+#include <popt.h>
+#else
+#include "../popt/popt.h"
+#endif
#include "mangle.h"
#include "module.h"
-#include "nsswitch/winbind_client.h"
+#include "../nsswitch/winbind_client.h"
#include "spnego.h"
@@ -874,7 +878,7 @@ struct functable {
#define UNI_XDIGIT 0x8
#define UNI_SPACE 0x10
-#include "nsswitch/winbind_nss.h"
+#include "../nsswitch/winbind_nss.h"
/* forward declaration from printing.h to get around
header file dependencies */
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/nsswitch/pam_winbind.h 3_0-devel/source/nsswitch/pam_winbind.h
--- 3_0/source/nsswitch/pam_winbind.h Thu Sep 4 08:26:13 2003
+++ 3_0-devel/source/nsswitch/pam_winbind.h Tue Nov 11 15:50:46 2003
@@ -93,4 +93,4 @@ do { \
#define on(x, y) (x & y)
#define off(x, y) (!(x & y))
-#include "winbind_client.h"
+#include "../nsswitch/winbind_client.h"
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/nsswitch/winbind_client.h 3_0-devel/source/nsswitch/winbind_client.h
--- 3_0/source/nsswitch/winbind_client.h Wed Sep 25 17:18:53 2002
+++ 3_0-devel/source/nsswitch/winbind_client.h Tue Nov 11 15:50:53 2003
@@ -1,5 +1,5 @@
-#include "winbind_nss_config.h"
-#include "winbindd_nss.h"
+#include "../nsswitch/winbind_nss_config.h"
+#include "../nsswitch/winbindd_nss.h"
void init_request(struct winbindd_request *req,int rq_type);
NSS_STATUS winbindd_send_request(int req_type,
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/nsswitch/winbind_nss.h 3_0-devel/source/nsswitch/winbind_nss.h
--- 3_0/source/nsswitch/winbind_nss.h Wed Apr 2 08:16:15 2003
+++ 3_0-devel/source/nsswitch/winbind_nss.h Tue Nov 11 15:51:02 2003
@@ -31,7 +31,7 @@
* Sun Solaris
*/
-#include "nsswitch/winbind_nss_solaris.h"
+#include "../nsswitch/winbind_nss_solaris.h"
#elif HAVE_NSS_H
@@ -48,13 +48,13 @@ typedef enum nss_status NSS_STATUS;
* SGI IRIX
*/
-#include "nsswitch/winbind_nss_irix.h"
+#include "../nsswitch/winbind_nss_irix.h"
#elif defined(HPUX) && defined(HAVE_NSSWITCH_H)
/* HP-UX 11 */
-#include "nsswitch/winbind_nss_hpux.h"
+#include "../nsswitch/winbind_nss_hpux.h"
#else /* Nothing's defined. Neither gnu nor sun nor hp */
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/nsswitch/winbind_nss_config.h 3_0-devel/source/nsswitch/winbind_nss_config.h
--- 3_0/source/nsswitch/winbind_nss_config.h Mon Apr 7 07:58:02 2003
+++ 3_0-devel/source/nsswitch/winbind_nss_config.h Tue Nov 11 16:18:07 2003
@@ -27,7 +27,7 @@
/* Include header files from data in config.h file */
#ifndef NO_CONFIG_H
-#include <config.h>
+#include "config.h"
#endif
#include <stdio.h>
@@ -76,7 +76,7 @@
#include <sys/stat.h>
#include <errno.h>
#include <pwd.h>
-#include "nsswitch/winbind_nss.h"
+#include "../nsswitch/winbind_nss.h"
/* I'm trying really hard not to include anything from smb.h with the
result of some silly looking redeclaration of structures. */
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/nsswitch/winbindd.h 3_0-devel/source/nsswitch/winbindd.h
--- 3_0/source/nsswitch/winbindd.h Mon Aug 4 06:57:29 2003
+++ 3_0-devel/source/nsswitch/winbindd.h Tue Nov 11 15:51:21 2003
@@ -28,7 +28,7 @@
#include "includes.h"
#include "nterr.h"
-#include "winbindd_nss.h"
+#include "../nsswitch/winbindd_nss.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/script/installdevelheaders.sh 3_0-devel/source/script/installdevelheaders.sh
--- 3_0/source/script/installdevelheaders.sh Thu Jan 1 01:00:00 1970
+++ 3_0-devel/source/script/installdevelheaders.sh Tue Oct 21 03:55:21 2003
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+INSTALLPERMS=$1
+BUILDDIR=`echo $2 | sed 's/\/\//\//g'`
+INCLUDEDIR=`echo $3 | sed 's/\/\//\//g'`
+DEVEL_SUBDIR=`echo $4 | sed 's/\/\//\//g'`
+DEVEL_SUBDIR_SED=`echo $DEVEL_SUBDIR | sed 's#\/#\\\/#g'`
+shift
+shift
+shift
+shift
+
+for p in $*; do
+ pd=`dirname $p`
+ pf=`basename $p`
+ if [ ! -f $BUILDDIR/$DEVEL_SUBDIR/$p ];then
+ echo "File $BUILDDIR/$DEVEL_SUBDIR/$p not found"
+ exit 1
+ fi
+
+ mkdir -p $INCLUDEDIR/$DEVEL_SUBDIR/$pd
+ if [ ! -d $INCLUDEDIR/$DEVEL_SUBDIR/$pd ];then
+ echo "Failed to create directory $INCLUDEDIR/$DEVEL_SUBDIR/$pd"
+ exit 1
+ fi
+
+ echo Installing $p as $INCLUDEDIR/$DEVEL_SUBDIR/$p
+ cp -f $BUILDDIR/$DEVEL_SUBDIR/$p $INCLUDEDIR/$DEVEL_SUBDIR/$p
+ if [ ! -f $INCLUDEDIR/$DEVEL_SUBDIR/$p ];then
+ echo "Failed to create File $INCLUDEDIR/$DEVEL_SUBDIR/$p"
+ exit 1
+ fi
+ chmod $INSTALLPERMS $INCLUDEDIR/$DEVEL_SUBDIR/$p || exit 1
+done
+
+exit 0
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/script/mkbuildoptions.awk 3_0-devel/source/script/mkbuildoptions.awk
--- 3_0/source/script/mkbuildoptions.awk Sun Nov 9 12:48:32 2003
+++ 3_0-devel/source/script/mkbuildoptions.awk Tue Nov 11 16:19:54 2003
@@ -242,15 +242,15 @@ END {
# add code to display the various type sizes
print " /* Output the sizes of the various types */";
print " output(screen, \"\\nType sizes:\\n\");";
- print " output(screen, \" sizeof(char): %lu\\n\",(unsigned long)sizeof(char));";
- print " output(screen, \" sizeof(int): %lu\\n\",(unsigned long)sizeof(int));";
- print " output(screen, \" sizeof(long): %lu\\n\",(unsigned long)sizeof(long));";
- print " output(screen, \" sizeof(uint8): %lu\\n\",(unsigned long)sizeof(uint8));";
- print " output(screen, \" sizeof(uint16): %lu\\n\",(unsigned long)sizeof(uint16));";
- print " output(screen, \" sizeof(uint32): %lu\\n\",(unsigned long)sizeof(uint32));";
- print " output(screen, \" sizeof(short): %lu\\n\",(unsigned long)sizeof(short));";
- print " output(screen, \" sizeof(void*): %lu\\n\",(unsigned long)sizeof(void*));";
-
+ print " output(screen, \" sizeof(char): %lu\\n\",(unsigned long)sizeof(char));";
+ print " output(screen, \" sizeof(int): %lu\\n\",(unsigned long)sizeof(int));";
+ print " output(screen, \" sizeof(long): %lu\\n\",(unsigned long)sizeof(long));";
+ print " output(screen, \" sizeof(uint8): %lu\\n\",(unsigned long)sizeof(uint8));";
+ print " output(screen, \" sizeof(uint16): %lu\\n\",(unsigned long)sizeof(uint16));";
+ print " output(screen, \" sizeof(uint32): %lu\\n\",(unsigned long)sizeof(uint32));";
+ print " output(screen, \" sizeof(short): %lu\\n\",(unsigned long)sizeof(short));";
+ print " output(screen, \" sizeof(void*): %lu\\n\",(unsigned long)sizeof(void*));";
+ print " output(screen, \" sizeof(SMB_BIG_UINT): %lu\\n\",(unsigned long)sizeof(SMB_BIG_UINT));";
##################################################
# add code to give information about modules
print " output(screen, \"\\nBuiltin modules:\\n\");";
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/script/mkdevelheaders.sh 3_0-devel/source/script/mkdevelheaders.sh
--- 3_0/source/script/mkdevelheaders.sh Thu Jan 1 01:00:00 1970
+++ 3_0-devel/source/script/mkdevelheaders.sh Thu Oct 23 10:53:48 2003
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+
+SRCDIR=`echo $1 | sed 's/\/\//\//g'`
+BUILDDIR=`echo $2 | sed 's/\/\//\//g'`
+DEVEL_SUBDIR=`echo $3 | sed 's/\/\//\//g'`
+DEVEL_SUBDIR_SED=`echo $DEVEL_SUBDIR | sed 's#\/#\\\/#g'`
+shift
+shift
+shift
+
+for FILE in $*;do
+ DIRN=$(dirname $FILE)
+ INPUTFILE="$SRCDIR/$FILE"
+ OUTPUTFILE="$BUILDDIR/$DEVEL_SUBDIR/$FILE"
+
+ if [ ! -d $BUILDDIR/$DEVEL_SUBDIR/$DIRN ];then
+ mkdir -p $BUILDDIR/$DEVEL_SUBDIR/$DIRN
+ if [ ! -d $BUILDDIR/$DEVEL_SUBDIR/$DIRN ];then
+ echo "Failed to create directory $BUILDDIR/$DEVEL_SUBDIR/$DIRN"
+ exit 1
+ fi
+ fi
+
+ if [ ! -f $OUTPUTFILE -o $INPUTFILE -nt $OUTPUTFILE ];then
+ echo "Building: $FILE"
+ SED1="sed -e 's/^#include *\"\\.\\.\\/\\([a-zA-Z0-9_-]*\\)\\/\\([a-zA-Z0-9_-]*\\)\\.h\"/#include <${DEVEL_SUBDIR_SED}\\/\\1\\/\\2.h>/'"
+ SED2="sed -e 's/^#include *\"\\([a-zA-Z0-9_-]*\\)\\.h\"/#include <${DEVEL_SUBDIR_SED}\\/include\\/\\1.h>/'"
+ cat $INPUTFILE |\
+ eval $SED1 |\
+ eval $SED2 > $OUTPUTFILE
+ if [ ! -f $OUTPUTFILE ];then
+ echo "Failed to create File $OUTPUTFILE"
+ exit 1
+ fi
+ fi
+done
+
+exit 0
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/script/mkdevelincludes.sh 3_0-devel/source/script/mkdevelincludes.sh
--- 3_0/source/script/mkdevelincludes.sh Thu Jan 1 01:00:00 1970
+++ 3_0-devel/source/script/mkdevelincludes.sh Tue Oct 21 02:13:49 2003
@@ -0,0 +1,70 @@
+#!/bin/sh
+#
+
+SRCDIR=`echo $1 | sed 's/\/\//\//g'`
+BUILDDIR=`echo $2 | sed 's/\/\//\//g'`
+DEVEL_SUBDIR=`echo $3 | sed 's/\/\//\//g'`
+shift
+shift
+shift
+
+if [ ! -d $BUILDDIR/$DEVEL_SUBDIR ];then
+ mkdir -p $BUILDDIR/$DEVEL_SUBDIR
+ if [ ! -d $BUILDDIR/$DEVEL_SUBDIR ];then
+ echo "Failed to create directory $BUILDDIR/$DEVEL_SUBDIR"
+ exit 1
+ fi
+fi
+
+while ( test -n "$1" ); do
+ HEADER_FILE=$1
+ HEADER_DESTFILE=$2
+ HEADER_DESCRIPTION=$3
+ HEADER_DEFINE=$4
+ shift;shift;shift;shift;
+
+ if [ ! -f $BUILDDIR/$DEVEL_SUBDIR/$HEADER_FILE ];then
+ echo "Building: $HEADER_FILE"
+ cat > $BUILDDIR/$DEVEL_SUBDIR/$HEADER_FILE << _ACEOF
+/*
+ Unix SMB/CIFS mplementation.
+ $HEADER_DESCRIPTION Header Files
+ Copyright (C) Stefan Metzmacher 2003
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+/*
+ * This is the only file which should be included
+ * for building a $HEADER_DESCRIPTION!
+ *
+ * All needed stuff will be automaticly included!
+ */
+
+#ifndef $HEADER_DEFINE
+#define $HEADER_DEFINE
+#include <${DEVEL_SUBDIR}/$HEADER_DESTFILE>
+#endif /* $HEADER_DEFINE */
+
+_ACEOF
+
+ if [ ! -f $BUILDDIR/$DEVEL_SUBDIR/$HEADER_FILE ];then
+ echo "Failed to create File $BUILDDIR/$DEVEL_SUBDIR/$HEADER_FILE"
+ exit 1
+ fi
+ fi
+done
+
+exit 0
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/script/mkversion.sh 3_0-devel/source/script/mkversion.sh
--- 3_0/source/script/mkversion.sh Wed Aug 20 19:13:38 2003
+++ 3_0-devel/source/script/mkversion.sh Tue Nov 11 15:57:24 2003
@@ -37,8 +37,11 @@ SAMBA_VERSION_VENDOR_SUFFIX=`sed -n 's/^
echo "/* Autogenerated by script/mkversion.sh */" > $OUTPUT_FILE
echo "#define SAMBA_VERSION_MAJOR ${SAMBA_VERSION_MAJOR}" >> $OUTPUT_FILE
+echo "#define SAMBA_VERSION_MAJOR_STRING \"${SAMBA_VERSION_MAJOR}\"" >> $OUTPUT_FILE
echo "#define SAMBA_VERSION_MINOR ${SAMBA_VERSION_MINOR}" >> $OUTPUT_FILE
+echo "#define SAMBA_VERSION_MINOR_STRING \"${SAMBA_VERSION_MINOR}\"" >> $OUTPUT_FILE
echo "#define SAMBA_VERSION_RELEASE ${SAMBA_VERSION_RELEASE}" >> $OUTPUT_FILE
+echo "#define SAMBA_VERSION_RELEASE_STRING \"${SAMBA_VERSION_RELEASE}\"" >> $OUTPUT_FILE
SAMBA_VERSION_STRING="${SAMBA_VERSION_MAJOR}.${SAMBA_VERSION_MINOR}.${SAMBA_VERSION_RELEASE}"
@@ -50,18 +53,23 @@ if test -n "${SAMBA_VERSION_REVISION}";t
elif test -n "${SAMBA_VERSION_PRE_RELEASE}";then
SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}pre${SAMBA_VERSION_PRE_RELEASE}"
echo "#define SAMBA_VERSION_PRE_RELEASE ${SAMBA_VERSION_PRE_RELEASE}" >> $OUTPUT_FILE
+ echo "#define SAMBA_VERSION_PRE_RELEASE_STRING \"${SAMBA_VERSION_PRE_RELEASE}\"" >> $OUTPUT_FILE
elif test -n "${SAMBA_VERSION_RC_RELEASE}";then
SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}rc${SAMBA_VERSION_RC_RELEASE}"
echo "#define SAMBA_VERSION_RC_RELEASE ${SAMBA_VERSION_RC_RELEASE}" >> $OUTPUT_FILE
+ echo "#define SAMBA_VERSION_RC_RELEASE_STRING \"${SAMBA_VERSION_RC_RELEASE}\"" >> $OUTPUT_FILE
elif test -n "${SAMBA_VERSION_BETA_RELEASE}";then
SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}beta${SAMBA_VERSION_BETA_RELEASE}"
echo "#define SAMBA_VERSION_BETA_RELEASE ${SAMBA_VERSION_BETA_RELEASE}" >> $OUTPUT_FILE
+ echo "#define SAMBA_VERSION_BETA_RELEASE_STRING \"${SAMBA_VERSION_BETA_RELEASE}\"" >> $OUTPUT_FILE
elif test -n "${SAMBA_VERSION_ALPHA_RELEASE}";then
SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}alpha${SAMBA_VERSION_ALPHA_RELEASE}"
echo "#define SAMBA_VERSION_ALPHA_RELEASE ${SAMBA_VERSION_ALPHA_RELEASE}" >> $OUTPUT_FILE
+ echo "#define SAMBA_VERSION_ALPHA_RELEASE_STRING \"${SAMBA_VERSION_ALPHA_RELEASE}\"" >> $OUTPUT_FILE
elif test -n "${SAMBA_VERSION_TEST_RELEASE}";then
SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}test${SAMBA_VERSION_TEST_RELEASE}"
echo "#define SAMBA_VERSION_TEST_RELEASE ${SAMBA_VERSION_TEST_RELEASE}" >> $OUTPUT_FILE
+ echo "#define SAMBA_VERSION_TEST_RELEASE_STRING \"${SAMBA_VERSION_TEST_RELEASE}\"" >> $OUTPUT_FILE
fi
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/tdb/spinlock.h 3_0-devel/source/tdb/spinlock.h
--- 3_0/source/tdb/spinlock.h Mon Oct 20 11:26:56 2003
+++ 3_0-devel/source/tdb/spinlock.h Tue Nov 11 15:52:43 2003
@@ -5,7 +5,7 @@
#include <config.h>
#endif
-#include "tdb.h"
+#include "../tdb/tdb.h"
#ifdef USE_SPINLOCKS
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/ubiqx/debugparse.h 3_0-devel/source/ubiqx/debugparse.h
--- 3_0/source/ubiqx/debugparse.h Sun Jan 5 12:21:01 2003
+++ 3_0-devel/source/ubiqx/debugparse.h Tue Nov 11 15:52:50 2003
@@ -31,7 +31,7 @@
* ========================================================================== **
*/
-#include "sys_include.h"
+#include "../ubiqx/sys_include.h"
/* This module compiles quite nicely outside of the Samba environment.
* You'll need the following headers:
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/ubiqx/ubi_BinTree.h 3_0-devel/source/ubiqx/ubi_BinTree.h
--- 3_0/source/ubiqx/ubi_BinTree.h Thu Jun 8 19:29:05 2000
+++ 3_0-devel/source/ubiqx/ubi_BinTree.h Tue Nov 11 15:52:57 2003
@@ -181,7 +181,7 @@
* ========================================================================== **
*/
-#include "sys_include.h" /* Global include file, used to adapt the ubiqx
+#include "../ubiqx/sys_include.h" /* Global include file, used to adapt the ubiqx
* modules to the host environment and the project
* with which the modules will be used. See
* sys_include.h for more info.
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/ubiqx/ubi_Cache.h 3_0-devel/source/ubiqx/ubi_Cache.h
--- 3_0/source/ubiqx/ubi_Cache.h Thu Jun 8 19:29:05 2000
+++ 3_0-devel/source/ubiqx/ubi_Cache.h Tue Nov 11 15:53:02 2003
@@ -113,7 +113,7 @@
* ========================================================================== **
*/
-#include "ubi_SplayTree.h"
+#include "../ubiqx/ubi_SplayTree.h"
/* -------------------------------------------------------------------------- **
* Typedefs...
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/ubiqx/ubi_SplayTree.h 3_0-devel/source/ubiqx/ubi_SplayTree.h
--- 3_0/source/ubiqx/ubi_SplayTree.h Thu Jun 8 19:29:05 2000
+++ 3_0-devel/source/ubiqx/ubi_SplayTree.h Tue Nov 11 15:53:21 2003
@@ -154,7 +154,7 @@
* ========================================================================== **
*/
-#include "ubi_BinTree.h" /* Base binary tree functions, types, etc. */
+#include "../ubiqx/ubi_BinTree.h" /* Base binary tree functions, types, etc. */
/* ========================================================================== **
* Function prototypes...
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/ubiqx/ubi_dLinkList.h 3_0-devel/source/ubiqx/ubi_dLinkList.h
--- 3_0/source/ubiqx/ubi_dLinkList.h Thu Jun 8 19:42:20 2000
+++ 3_0-devel/source/ubiqx/ubi_dLinkList.h Tue Nov 11 15:53:09 2003
@@ -78,7 +78,7 @@
* ========================================================================== **
*/
-#include "sys_include.h" /* System-specific includes. */
+#include "../ubiqx/sys_include.h" /* System-specific includes. */
/* ========================================================================== **
* Typedefs...
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/ubiqx/ubi_sLinkList.h 3_0-devel/source/ubiqx/ubi_sLinkList.h
--- 3_0/source/ubiqx/ubi_sLinkList.h Thu Jun 8 19:42:20 2000
+++ 3_0-devel/source/ubiqx/ubi_sLinkList.h Tue Nov 11 15:53:15 2003
@@ -103,7 +103,7 @@
* ========================================================================== **
*/
-#include "sys_include.h" /* System-specific includes. */
+#include "../ubiqx/sys_include.h" /* System-specific includes. */
/* ========================================================================== **
* Typedefs...
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/utils/debug2html.c 3_0-devel/source/utils/debug2html.c
--- 3_0/source/utils/debug2html.c Mon Dec 13 14:27:54 1999
+++ 3_0-devel/source/utils/debug2html.c Tue Nov 11 15:53:29 2003
@@ -57,7 +57,7 @@
* ========================================================================== **
*/
-#include "debugparse.h"
+#include "../ubiqx/debugparse.h"
/* -------------------------------------------------------------------------- **
* The size of the read buffer.
diff -Npur --exclude=CVS --exclude=*.bak --exclude=*.o --exclude=*.po --exclude=*.so --exclude=.#* --exclude=Makefile --exclude=stamp-h --exclude=configure --exclude=findsmb --exclude=*proto*.h --exclude=build_env.h --exclude=tdbsam2_parse_info.h --exclude=config.* --exclude=bin --exclude=*.configure --exclude=autom4te.cache --exclude=build_options.c* 3_0/source/utils/sambabuild.c.in 3_0-devel/source/utils/sambabuild.c.in
--- 3_0/source/utils/sambabuild.c.in Thu Jan 1 01:00:00 1970
+++ 3_0-devel/source/utils/sambabuild.c.in Tue Nov 11 16:47:32 2003
@@ -0,0 +1,300 @@
+/*
+ Unix SMB/CIFS implementation.
+ Copyright (C) Jelmer Vernooij 2003
+ Copyright (C) Stefan Metzmacher 2003
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "includes.h"
+
+#define MACRO_STR_FN(x) static const char *_##x(void){ return x;}
+#define MACRO_STR_FN_PTR(x) _##x
+
+void build_options(BOOL screen);
+
+MACRO_STR_FN(dyn_PREFIX);
+MACRO_STR_FN(dyn_EXEC_PREFIX);
+MACRO_STR_FN(dyn_MANDIR);
+MACRO_STR_FN(dyn_BINDIR);
+MACRO_STR_FN(dyn_SBINDIR);
+MACRO_STR_FN(dyn_CONFIGFILE);
+MACRO_STR_FN(dyn_CONFIGDIR);
+MACRO_STR_FN(dyn_PRIVATE_DIR);
+MACRO_STR_FN(dyn_LOCKDIR);
+
+#define DEFAULT_VAR ""
+static const struct {
+ const char *key;
+ const char *val;
+ const char *(*fn)(void);
+} makevars[] = {
+ {"prefix", NULL, MACRO_STR_FN_PTR(dyn_PREFIX)},
+ {"exec_prefix", NULL, MACRO_STR_FN_PTR(dyn_EXEC_PREFIX)},
+ {"mandir", NULL, MACRO_STR_FN_PTR(dyn_MANDIR)},
+ {"bindir", NULL, MACRO_STR_FN_PTR(dyn_BINDIR)},
+ {"sbindir", NULL, MACRO_STR_FN_PTR(dyn_SBINDIR)},
+ {"CC", "@CC@", NULL},
+ {"SHLD", "@SHLD@", NULL},
+ {"CFLAGS", "@CFLAGS@", NULL},
+ {"CPPFLAGS", "@CPPFLAGS@", NULL},
+ {"LDFLAGS", "@LDFLAGS@", NULL},
+ {"LDSHFLAGS", "@LDSHFLAGS@", NULL},
+ {"PICFLAGS", "@PICFLAGS@", NULL},
+ {"DYNEXP", "@DYNEXP@", NULL},
+ {"EXEEXT", "@EXEEXT@", NULL},
+ {"OBJEXT", "@OBJEXT@", NULL},
+ {"PICSUFFIX", "@PICSUFFIX@", NULL},
+ {"SHLIBEXT", "@SHLIBEXT@", NULL},
+ {"CONFIGFILE", NULL, MACRO_STR_FN_PTR(dyn_CONFIGFILE)},
+ {"CONFIGDIR", NULL, MACRO_STR_FN_PTR(dyn_CONFIGDIR)},
+ {"PRIVATEDIR", NULL, MACRO_STR_FN_PTR(dyn_PRIVATE_DIR)},
+ {"LOCKDIR", NULL, MACRO_STR_FN_PTR(dyn_LOCKDIR)},
+ {NULL, NULL}
+};
+
+#define DEFAULT_HEADER "<@devel_subdir@/samba_module.h>"
+static const struct {
+ const char *key;
+ const char *val;
+} headers[] = {
+ {"samba_module", "<@devel_subdir@/samba_module.h>"},
+ {"winbind_client", "<@devel_subdir@/winbind_client.h>"},
+ {NULL, NULL}
+};
+
+MACRO_STR_FN(SAMBA_VERSION_STRING);
+MACRO_STR_FN(SAMBA_VERSION_OFFICIAL_STRING);
+#ifdef SAMBA_VERSION_VENDOR_SUFFIX
+MACRO_STR_FN(SAMBA_VERSION_VENDOR_SUFFIX);
+#endif
+
+#define DEFAULT_VERSION SAMBA_VERSION_STRING
+static const struct {
+ const char *key;
+ const char *val;
+ const char *(*fn)(void);
+} version_strs[] = {
+ {"MAJOR", SAMBA_VERSION_MAJOR_STRING, NULL},
+ {"MINOR", SAMBA_VERSION_MINOR_STRING, NULL},
+ {"RELEASE", SAMBA_VERSION_RELEASE_STRING, NULL},
+#ifdef SAMBA_VERSION_REVISION
+ {"REVISION", SAMBA_VERSION_REVISION, NULL},
+#else
+ {"REVISION", "", NULL},
+#endif
+#ifdef SAMBA_VERSION_PRE_RELEASE
+ {"PRE_RELEASE", SAMBA_VERSION_PRE_RELEASE_STRING, NULL},
+#else
+ {"PRE_RELEASE", "", NULL},
+#endif
+#ifdef SAMBA_VERSION_RC_RELEASE
+ {"RC_RELEASE", SAMBA_VERSION_RC_RELEASE_STRING, NULL},
+#else
+ {"RC_RELEASE", "", NULL},
+#endif
+#ifdef SAMBA_VERSION_BETA_RELEASE
+ {"BETA_RELEASE", SAMBA_VERSION_BETA_RELEASE_STRING, NULL},
+#else
+ {"BETA_RELEASE", "", NULL},
+#endif
+#ifdef SAMBA_VERSION_ALPHA_RELEASE
+ {"ALPHA_RELEASE", SAMBA_VERSION_ALPHA_RELEASE_STRING, NULL},
+#else
+ {"ALPHA_RELEASE", "", NULL},
+#endif
+#ifdef SAMBA_VERSION_TEST_RELEASE
+ {"TEST_RELEASE", SAMBA_VERSION_TEST_RELEASE_STRING, NULL},
+#else
+ {"TEST_RELEASE", "", NULL},
+#endif
+#ifdef SAMBA_VERSION_IS_CVS_SNAPSHOT
+ {"IS_CVS_SNAPSHOT", "yes", NULL},
+#else
+ {"IS_CVS_SNAPSHOT", "", NULL},
+#endif
+ {"STRING", NULL, MACRO_STR_FN_PTR(SAMBA_VERSION_STRING)},
+ {"OFFICIAL_STRING", NULL, MACRO_STR_FN_PTR(SAMBA_VERSION_OFFICIAL_STRING)},
+#ifdef SAMBA_VERSION_VENDOR_SUFFIX
+ {"VENDOR_SUFFIX", NULL, MACRO_STR_FN_PTR(SAMBA_VERSION_VENDOR_SUFFIX)},
+#else
+ {"VENDOR_SUFFIX", "", NULL},
+#endif
+ {NULL, NULL}
+};
+
+
+static const char *makevar2str(const char *var)
+{
+ int i;
+
+ if (strequal("?",var)) {
+ printf("usage: sambabuild -M <makefile-var>\n");
+ printf("possible makefile-vars:\n");
+ for (i=0; makevars[i].key!=NULL; i++) {
+ printf(" %s\n", makevars[i].key);
+ }
+ return "";
+ }
+
+ for (i=0; makevars[i].key!=NULL; i++) {
+ if (strequal(makevars[i].key,var)) {
+ if (makevars[i].val) {
+ return makevars[i].val;
+ } else if (makevars[i].fn) {
+ return makevars[i].fn();
+ }
+ }
+ }
+
+ return DEFAULT_VAR;
+}
+
+static const char *header2str(const char *header)
+{
+ int i;
+
+ if (strequal("?",header)) {
+ printf("usage: sambabuild -H <subsystem-header-file>\n");
+ printf("possible subsystem-header-files:\n");
+ for (i=0; headers[i].key!=NULL; i++) {
+ printf(" %s\n", headers[i].key);
+ }
+ return "";
+ }
+
+ for (i=0; headers[i].key!=NULL; i++) {
+ if (strcmp(headers[i].key,header)==0) {
+ return headers[i].val;
+ }
+ }
+
+ return DEFAULT_HEADER;
+}
+
+static const char *version2str(const char *ver)
+{
+ int i;
+
+ if (strcmp("?",ver)==0) {
+ printf("usage: sambabuild -v <version-string>\n");
+ printf("possible version-strings:\n");
+ for (i=0; version_strs[i].key!=NULL; i++) {
+ printf(" %s\n", version_strs[i].key);
+ }
+ return "";
+ }
+
+ for (i=0;version_strs[i].key!=NULL; i++) {
+ if (strequal(version_strs[i].key,ver)) {
+ if (version_strs[i].val) {
+ return version_strs[i].val;
+ } else if (version_strs[i].fn) {
+ return version_strs[i].fn();
+ }
+ }
+ }
+
+ return DEFAULT_VERSION;
+}
+
+int main(int argc, char **argv)
+{
+ int opt;
+ BOOL def = False;
+ BOOL cflags = False;
+ BOOL cppflags = False;
+ BOOL picflags = False;
+ BOOL ldflags = False;
+ BOOL ldshflags = False;
+ struct poptOption long_options[] = {
+ POPT_AUTOHELP
+ { "cflags", 0, POPT_ARG_NONE, &cflags, True, "Print flags to pass to c compiler" },
+ { "cppflags", 0, POPT_ARG_NONE, &cppflags, True, "Print flags to pass to the c pre compiler" },
+ { "picflags", 0, POPT_ARG_NONE, &picflags, True, "Print flags for PIC" },
+ { "ldflags", 0, POPT_ARG_NONE, &ldflags, True, "Print flags to pass to linker" },
+ { "ldshflags", 0, POPT_ARG_NONE, &ldshflags, True, "Print flags to pass to linker for shared libraries" },
+ { "subsystem-path", 'S', POPT_ARG_STRING, NULL, 'S', "Print installation directory for subsystem", "SUBSYSTEM" },
+ { "makefile-var", 'M', POPT_ARG_STRING, NULL, 'M', "Print Makefile var", "MAKEFILE-VAR" },
+ { "header-file", 'H', POPT_ARG_STRING, NULL, 'H', "Print Headerfile location for system", "SYSTEM" },
+ { "version-string", 'v', POPT_ARG_STRING, NULL, 'v', "Print Makefile var", "VERSION-STRING" },
+ { "build-options", 'b', POPT_ARG_NONE, NULL, 'b', "Print build options" },
+ POPT_COMMON_VERSION
+
+ POPT_TABLEEND
+ };
+ poptContext pc;
+
+ pc = poptGetContext("sambabuild", argc, (const char **)argv, long_options,
+ POPT_CONTEXT_KEEP_FIRST);
+
+ if (argc < 2) {
+ poptPrintUsage(pc, stderr, 0);
+ return 1;
+ }
+
+ while((opt = poptGetNextOpt(pc)) != -1) {
+ switch(opt) {
+ case 'S':
+ printf("%s\n", lib_path(poptGetOptArg(pc)));
+ break;
+ case 'M':
+ printf("%s\n", makevar2str(poptGetOptArg(pc)));
+ break;
+ case 'H':
+ printf("%s\n", header2str(poptGetOptArg(pc)));
+ break;
+ case 'v':
+ printf("%s\n", version2str(poptGetOptArg(pc)));
+ break;
+ case 'b':
+ build_options(True);
+ break;
+ default:
+ def = True;
+ break;
+ }
+ }
+
+ if (def) {
+ if (cflags) {
+ printf("%s ","@CFLAGS@");
+ }
+ if (cppflags) {
+ const char *devel_incdir = "@devel_includedir@";
+ if (strlen(devel_incdir)==0) {
+ devel_incdir = "@devel_subdir@";
+ }
+ if (strcmp("/usr/include",devel_incdir)!=0 &&
+ strcmp("/usr/include/",devel_incdir)!=0) {
+ printf("-I%s ",devel_incdir);
+ }
+
+ printf("%s ","@CPPFLAGS@");
+ }
+ if (picflags) {
+ printf("%s ","@PICFLAGS@");
+ }
+ if (ldflags) {
+ printf("%s ","@LDFLAGS@");
+ }
+ if (ldshflags) {
+ printf("%s ","@LDSHFLAGS@");
+ }
+ printf("\n");
+ }
+
+ return 0;
+}
More information about the samba-technical
mailing list