--- samba-2.2.2.cvs20020120.orig/source/Makefile.in
+++ samba-2.2.2.cvs20020120/source/Makefile.in
@@ -91,7 +91,7 @@
 
 SPROGS = bin/smbd bin/nmbd bin/swat
 PROGS1 = bin/smbclient bin/smbspool bin/testparm bin/testprns bin/smbstatus bin/smbcontrol bin/make_printerdef @RUNPROG@ 
-PROGS2 = bin/smbpasswd bin/make_smbcodepage bin/rpcclient bin/make_unicodemap bin/smbcacls @WRAP@ @WRAP32@ @PAM_MOD@ @PDBEDIT@ @LIBSMBCLIENT@
+PROGS2 = bin/smbpasswd bin/make_smbcodepage bin/rpcclient bin/make_unicodemap bin/smbcacls @WRAP@ @WRAP32@ @PAM_MOD@ @PDBEDIT@ @LIBSMBCLIENT_STATIC@ @LIBSMBCLIENT_SHARED@
 MPROGS = @MPROGS@
 LPROGS = $(WINBIND_PAM_PROGS) $(WINBIND_LPROGS)
 PROGS = $(PROGS1) $(PROGS2) $(MPROGS) bin/nmblookup
@@ -614,13 +614,15 @@
 	@echo Linking shared library $@
 	@$(SHLD) -32 @LDSHFLAGS@ -o $@ $(PICOBJS32) $(LIBS)
 
-libsmbclient: $(LIBSMBCLIENT_PICOBJS)
-	@echo Linking libsmbclient shared library bin/$@.@SHLIBEXT@
-	@$(SHLD) @LDSHFLAGS@ -o  bin/$@.@SHLIBEXT@ \
+bin/libsmbclient.so: $(LIBSMBCLIENT_PICOBJS)
+	@echo Linking libsmbclient shared library $@
+	@$(SHLD) @LDSHFLAGS@ -o  $@ \
 		$(LIBSMBCLIENT_PICOBJS) $(LIBS) \
 		@SONAMEFLAG@libsmbclient.so.$(LIBSMBCLIENT_MAJOR)
-	@echo Linking libsmbclient non-shared library bin/$@.a
-	@-$(AR) -rc bin/$@.a $(LIBSMBCLIENT_PICOBJS)
+
+bin/libsmbclient.a: $(LIBSMBCLIENT_PICOBJS)
+	@echo Linking libsmbclient non-shared library $@
+	@-$(AR) -rc $@ $(LIBSMBCLIENT_PICOBJS)
 
 bin/smbsh: $(SMBSH_OBJ) bin/.dummy
 	@echo Linking $@
@@ -673,10 +675,12 @@
 installswat: installdirs
 	@$(SHELL) $(srcdir)/script/installswat.sh $(SWATDIR) $(srcdir)
 
-installclientlib:
-	-$(INSTALLCMD) bin/libsmbclient.so
-	-$(INSTALLCMD) -d ${prefix}/include
-	-$(INSTALLCMD) include/libsmbclient.h ${prefix}/include
+installclientlib: bin/libsmbclient.so bin/libsmbclient.a
+	# Installed (in the wrong location, BTW) by installbin above (peloy@debian.org)
+	# -$(INSTALLCMD) bin/libsmbclient.so $(BASEDIR)/lib
+	# -$(INSTALLCMD) bin/libsmbclient.a $(BASEDIR)/lib
+	-$(INSTALLCMD) -d $(INCLUDEDIR)
+	-$(INSTALLCMD) include/libsmbclient.h $(INCLUDEDIR)
 
 # revert to the previously installed version
 revert:
