Attached is a patch for the 2_2 branch of samba that makes changes similar to
the ones I recently submitted to the head and 3_0 branches.
I have tested it locally on VOS and it works as expected. I have also tested it
on Solaris 2.8 and it looks ok there too. I ran configure and then make
everything; make wins. Now, for the first time in months, I can build the
stock Samba 2.2.x on VOS.
I tried to make absolutely the minimum changes to get this to work here. Most of
what I did was to back-port ideas from the 3_0 branch.
I had to make one change that will affect other platforms -- but only on the
build farm. Today, the samba_2_2 build farm hook (make everything)
unconditionally builds nsswitch/lib_wins.so. This screws us, because that's a
shared library and we don't do shared libraries. Oddly enough, make
everything on samba_3_0 does not try to unconditionally build shared libraries.
You have to say make wins in 3_0 to get this file built. So that is the way
I implemented it in 2_2. I'm willing to rework this if someone can explain a
better way to achieve the same goal. I'm hoping that since there are a lot of
shared libraries that aren't built by the build farm, adding one more to the
list isn't a big deal. Hmm. Perhaps the thing to do is to get the build farm
shell script to say make everything;make wins, and then I can comment the
make wins out in my copy of the script? Anybody?
I also noticed that 2_2 lets the install script pick where to install shared
libraries, but 3_0 is explicit (see the installlibsmbclient rule). I applied
Occam's razor and stuck with the 2_2 scheme.
Thanks
PG
--
Paul Green, Senior Technical Consultant, Stratus Technologies.
Voice: +1 978-461-7557; FAX: +1 978-461-3610
Speaking from Stratus not for Stratus
diff -urp old/samba_2_2/source/Makefile.in new/samba_2_2/source/Makefile.in
--- old/samba_2_2/source/Makefile.inThu Jan 30 12:29:50 2003
+++ new/samba_2_2/source/Makefile.inThu Jan 30 23:03:29 2003
@@ -24,6 +24,8 @@ TERMLIBS=@TERMLIBS@
LINK=$(CC) $(FLAGS) $(LDFLAGS)
INSTALLCMD=@INSTALL@
+INSTALLCLIENTCMD_SH=@INSTALLCLIENTCMD_SH@
+INSTALLCLIENTCMD_A=@INSTALLCLIENTCMD_A@
VPATH=@srcdir@
srcdir=@srcdir@
@@ -101,7 +103,7 @@ MPROGS = @MPROGS@
LPROGS = $(WINBIND_PAM_PROGS) $(WINBIND_LPROGS)
PROGS = $(PROGS1) $(PROGS2) $(MPROGS) bin/nmblookup
TORTURE_PROGS = bin/smbtorture bin/msgtest bin/masktest bin/locktest bin/locktest2
-SHLIBS = libsmbclient
+SHLIBS = @LIBSMBCLIENT@
SCRIPTS = $(srcdir)/script/smbtar $(srcdir)/script/findsmb
@@ -426,13 +428,13 @@ TDBDUMP_OBJ = tdb/tdbdump.o $(TDBBASE_O
all : CHECK $(SPROGS) $(PROGS) $(WINBIND_PROGS) $(WINBIND_SPROGS) $(LPROGS)
# The following everything is NOT needed except by Samba developers - so do not use
this!
-everything : CHECK $(SPROGS) $(PROGS) $(SHLIBS) nsswitch smbwrapper smbtorture
debug2html smbfilter nsswitch/libnss_wins.so
+everything : CHECK $(SPROGS) $(PROGS) $(SHLIBS) nsswitch smbwrapper smbtorture
+debug2html smbfilter
pam_smbpass : CHECK bin/pam_smbpass.@SHLIBEXT@
smbwrapper : CHECK @WRAPPROG@ @WRAP@ @WRAP32@
-libsmbclient : CHECK bin/libsmbclient.@SHLIBEXT@ bin/libsmbclient.a
+libsmbclient : CHECK bin/libsmbclient.a @LIBSMBCLIENT_SHARED@
torture : CHECK $(TORTURE_PROGS)
@@ -460,6 +462,8 @@ smbfilter : CHECK bin/smbfilter
nsswitch : CHECK $(WINBIND_PROGS) $(WINBIND_SPROGS) $(LPROGS)
+wins : CHECK nsswitch/libnss_wins.@SHLIBEXT@
+
.SUFFIXES:
.SUFFIXES: .c .o .po .po32 .lo
@@ -723,7 +727,8 @@ installswat: installdirs
@$(SHELL) $(srcdir)/script/installswat.sh $(SWATDIR) $(srcdir)
installclientlib:
- -$(INSTALLCMD) bin/libsmbclient.so
+ -$(INSTALLCLIENTCMD_SH) bin/libsmbclient.@SHLIBEXT@
+ -$(INSTALLCLIENTCMD_A) bin/libsmbclient.a
-$(INSTALLCMD) -d ${prefix}/include
-$(INSTALLCMD) include/libsmbclient.h ${prefix}/include
diff -urp old/samba_2_2/source/configure.in new/samba_2_2/source/configure.in
--- old/samba_2_2/source/configure.in Thu Jan 30 15:03:26 2003
+++ new/samba_2_2/source/configure.in Thu Jan 30 23:08:51 2003
@@ -164,6 +164,8 @@ AC_SUBST(PICFLAG)
AC_SUBST(PICSUFFIX)
AC_SUBST(SHLIBEXT)
AC_SUBST(BLDSHARED)
+AC_SUBST(INSTALLCLIENTCMD_SH)
+AC_SUBST(INSTALLCLIENTCMD_A)
AC_SUBST(LIBSMBCLIENT_SHARED)
AC_SUBST(LIBSMBCLIENT)
@@ -315,6 +317,26 @@ case $host_os in
esac
;;
#
+# VOS may need to have POSIX support and System V compatibility enabled.
+#
+*vos*)
+case $CPPFLAGS in
+ *-D_POSIX_C_SOURCE*)
+ ;;
+ *)
+ CPPFLAGS=$CPPFLAGS -D_POSIX_C_SOURCE=199506L
+ AC_DEFINE(_POSIX_C_SOURCE, 199506L, [Whether to enable POSIX support])
+ ;;
+esac
+case $CPPFLAGS in
+ *-D_SYSV*|*-D_SVID_SOURCE*)
+ ;;
+ *)
+ CPPFLAGS=$CPPFLAGS -D_SYSV
+ AC_DEFINE(_SYSV, 1, [Whether to enable System V compatibility])
+esac