(somewhat unrelated cleanups, but all are very minor)

2004-07-23  Greg Troxel  <gdt@poblano.ir.bbn.com>

	* */Makefile.am: Use ../dir/libfoo.la, rather than "-L../dir
	-lfoo", to avoid linking against installed libraries from a
	previous version.

	* {lib,ospfd,ospfclient}/Makefile.am: explicitly define the shared
	library version number to be 0.0

	* configure.ac: remove spurious , so extract.pl is chmod'd +x.

	* HACKING: explain shared library versioning rules
diff --git a/ChangeLog b/ChangeLog
index fde19bc..6c47a15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2004-07-23  Greg Troxel  <gdt@poblano.ir.bbn.com>
+
+	* */Makefile.am: Use ../dir/libfoo.la, rather than "-L../dir
+	-lfoo", to avoid linking against installed libraries from a
+	previous version.
+
+	* {lib,ospfd,ospfclient}/Makefile.am: explicitly define the shared
+	library version number to be 0.0
+
+	* configure.ac: remove spurious , so extract.pl is chmod'd +x.
+	
+	* HACKING: explain shared library versioning rules
+	
 2004-07-22 Paul Jakma <paul@dishone.st>
 
 	* configure.ac: modify default CFLAGS to be compiler agnostic
diff --git a/HACKING b/HACKING
index 1ffdab8..a70b15e 100644
--- a/HACKING
+++ b/HACKING
@@ -1,6 +1,6 @@
 -*- mode: text; -*-
 
-$Id: HACKING,v 1.6 2004/05/13 13:38:06 paul Exp $
+$Id: HACKING,v 1.7 2004/07/23 16:23:56 gdt Exp $
 
 GUIDELINES FOR HACKING ON QUAGGA
 
@@ -29,6 +29,28 @@
 [TBD: resolve per-dir vs top-level, perhaps by reading GNU coding
 standards]
 
+SHARED LIBRARY VERSIONING
+
+[this section is at the moment just gdt's opinion]
+
+Quagga builds several shared libaries (lib/libzebra, ospfd/libospf,
+ospfclient/libsopfapiclient).  These may be used by external programs,
+e.g. a new routing protocol that works with the zebra daemon, or
+ospfapi clients.  The libtool info pages (node Versioning) explain
+when major and minor version numbers should be changed.  These values
+are set in Makefile.am near the definition of the library.  If you
+make a change that requires changing the shared library version,
+please update Makefile.am.
+
+libospf exports far more than it should, and is needed by ospfapi
+clients.  Only bump libospf for changes to functions for which it is
+reasonable for a user of ospfapi to call, and please err on the side
+of not bumping.
+
+There is no support intended for installing part of zebra.  The core
+library libzebra and the included daemons should always be built and
+installed together.
+
 PATCH SUBMISSION
 
 * Send a clean diff against the head of CVS in unified diff format, eg by:
diff --git a/bgpd/Makefile.am b/bgpd/Makefile.am
index c243bfa..842b007 100644
--- a/bgpd/Makefile.am
+++ b/bgpd/Makefile.am
@@ -24,7 +24,7 @@
 bgpd_SOURCES = \
 	bgp_main.c $(libbgp_a_SOURCES)
 
-bgpd_LDADD = -L../lib -lzebra @LIBCAP@
+bgpd_LDADD = ../lib/libzebra.la @LIBCAP@
 
 examplesdir = $(exampledir)
 dist_examples_DATA = bgpd.conf.sample bgpd.conf.sample2
diff --git a/configure.ac b/configure.ac
index 8eacf47..d8dc03e 100755
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@
 ##  Copyright (c) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro <kunihiro@zebra.org>
 ##  Portions Copyright (c) 2003 Paul Jakma <paul@dishone.st>
 ##
-## $Id: configure.ac,v 1.56 2004/07/22 18:16:59 paul Exp $
+## $Id: configure.ac,v 1.57 2004/07/23 16:23:56 gdt Exp $
 AC_PREREQ(2.53)
 
 AC_INIT(quagga, 0.96.5, [http://bugzilla.quagga.net])
@@ -1124,8 +1124,9 @@
 	  ospfclient/Makefile
 	  vtysh/extract.pl
 	  redhat/Makefile redhat/quagga.spec
-	  lib/version.h,
-	  tests/Makefile,
+	  lib/version.h
+dnl	  tests/Makefile
+	  ,
 	  [chmod +x vtysh/extract.pl])
 
 echo "
diff --git a/guile/Makefile.am b/guile/Makefile.am
index b3eab41..ecdb8f3 100644
--- a/guile/Makefile.am
+++ b/guile/Makefile.am
@@ -6,4 +6,4 @@
 bin_PROGRAMS = zebra-guile
 zebra_guile_SOURCES = zebra-guile.c zebra-support.c guile-bgp.c
 noinst_HEADERS = zebra-guile.h
-zebra_guile_LDADD = @GUILE_LDFLAGS@ ../bgpd/libbgp.a -L../lib -lzebra
+zebra_guile_LDADD = @GUILE_LDFLAGS@ ../bgpd/libbgp.a ../lib/libzebra.la
diff --git a/isisd/Makefile.am b/isisd/Makefile.am
index a743449..a403321 100644
--- a/isisd/Makefile.am
+++ b/isisd/Makefile.am
@@ -25,7 +25,7 @@
 isisd_SOURCES = \
 	isis_main.c $(libisis_a_SOURCES)
 
-isisd_LDADD = -L../lib -lzebra @LIBCAP@
+isisd_LDADD = ../lib/libzebra.la @LIBCAP@
 
 examplesdir = $(exampledir)
 dist_examples_DATA = isisd.conf.sample
diff --git a/lib/Makefile.am b/lib/Makefile.am
index f49566d..3b3d546 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -4,6 +4,7 @@
 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
 
 lib_LTLIBRARIES = libzebra.la
+libzebra_la_LDFLAGS = -version 0:0:0
 
 libzebra_la_SOURCES = \
 	version.c network.c pid_output.c getopt.c getopt1.c daemon.c \
diff --git a/ospf6d/Makefile.am b/ospf6d/Makefile.am
index de18391..344bfb2 100644
--- a/ospf6d/Makefile.am
+++ b/ospf6d/Makefile.am
@@ -22,7 +22,7 @@
 ospf6d_SOURCES = \
 	ospf6_main.c $(libospf6_a_SOURCES)
 
-ospf6d_LDADD = -L../lib -lzebra @LIBCAP@
+ospf6d_LDADD = ../lib/libzebra.la @LIBCAP@
 
 examplesdir = $(exampledir)
 dist_examples_DATA = ospf6d.conf.sample
diff --git a/ospfclient/Makefile.am b/ospfclient/Makefile.am
index 6c5a8cd..c506846 100644
--- a/ospfclient/Makefile.am
+++ b/ospfclient/Makefile.am
@@ -3,6 +3,8 @@
 INCLUDES = -I../lib -I../
 
 lib_LTLIBRARIES = libospfapiclient.la
+libospfapiclient_la_LDFLAGS = -version 0:0:0
+
 sbin_PROGRAMS = ospfclient
 
 libospfapiclient_la_SOURCES = \
@@ -17,6 +19,6 @@
 	ospfclient.c
 
 ospfclient_LDADD = libospfapiclient.la \
-	-L../ospfd -lospf -L../lib -lzebra @LIBCAP@
+	../ospfd/libospf.la ../lib/libzebra.la @LIBCAP@
 
 
diff --git a/ospfd/Makefile.am b/ospfd/Makefile.am
index 68ce526..fd03334 100644
--- a/ospfd/Makefile.am
+++ b/ospfd/Makefile.am
@@ -5,6 +5,8 @@
 INSTALL_SDATA=@INSTALL@ -m 600
 
 lib_LTLIBRARIES = libospf.la
+libospf_la_LDFLAGS = -version 0:0:0
+
 sbin_PROGRAMS = ospfd
 
 libospf_la_SOURCES = \
@@ -27,7 +29,7 @@
 
 ospfd_SOURCES = ospf_main.c
 
-ospfd_LDADD = libospf.la -L../lib -lzebra @LIBCAP@
+ospfd_LDADD = libospf.la ../lib/libzebra.la @LIBCAP@
 
 EXTRA_DIST = OSPF-MIB.txt OSPF-TRAP-MIB.txt ChangeLog.opaque.txt
 
diff --git a/ripd/Makefile.am b/ripd/Makefile.am
index 505f7b7..49de7f5 100644
--- a/ripd/Makefile.am
+++ b/ripd/Makefile.am
@@ -17,7 +17,7 @@
 ripd_SOURCES = \
 	rip_main.c $(librip_a_SOURCES)
 
-ripd_LDADD = -L../lib -lzebra @LIBCAP@
+ripd_LDADD = ../lib/libzebra.la @LIBCAP@
 
 examplesdir = $(exampledir)
 dist_examples_DATA = ripd.conf.sample
diff --git a/ripngd/Makefile.am b/ripngd/Makefile.am
index ecd71f8..6362e4e 100644
--- a/ripngd/Makefile.am
+++ b/ripngd/Makefile.am
@@ -17,7 +17,7 @@
 ripngd_SOURCES = \
 	ripng_main.c $(libripng_a_SOURCES)
 
-ripngd_LDADD = -L../lib -lzebra @LIBCAP@
+ripngd_LDADD = ../lib/libzebra.la @LIBCAP@
 
 examplesdir = $(exampledir)
 dist_examples_DATA = ripngd.conf.sample
diff --git a/vtysh/Makefile.am b/vtysh/Makefile.am
index ebc5553..3467fad 100644
--- a/vtysh/Makefile.am
+++ b/vtysh/Makefile.am
@@ -11,7 +11,7 @@
 nodist_vtysh_SOURCES = vtysh_cmd.c
 CLEANFILES = vtysh_cmd.c
 noinst_HEADERS = vtysh.h vtysh_user.h
-vtysh_LDADD = -L../lib -lzebra @LIBCAP@
+vtysh_LDADD = ../lib/libzebra.la @LIBCAP@
 
 examplesdir = $(exampledir)
 dist_examples_DATA = vtysh.conf.sample
diff --git a/zebra/Makefile.am b/zebra/Makefile.am
index 0782894..87a994f 100644
--- a/zebra/Makefile.am
+++ b/zebra/Makefile.am
@@ -30,7 +30,7 @@
 	connected.h ioctl.h rib.h rt.h zserv.h redistribute.h debug.h rtadv.h \
 	interface.h ipforward.h irdp.h
 
-zebra_LDADD = $(otherobj) $(LIBCAP) $(LIB_IPV6) -L../lib -lzebra
+zebra_LDADD = $(otherobj) $(LIBCAP) $(LIB_IPV6) ../lib/libzebra.la
 
 zebra_DEPENDENCIES = $(otherobj)
 
@@ -42,8 +42,8 @@
 	ioctl.c ioctl_solaris.c \
 	GNOME-SMI GNOME-PRODUCT-ZEBRA-MIB
 
-#client : client_main.o -L../lib -lzebra
-#	$(CC) -g -o client client_main.o -L../lib -lzebra $(LIBS) $(LIB_IPV6)
+#client : client_main.o ../lib/libzebra.la
+#	$(CC) -g -o client client_main.o ../liblzebra.la $(LIBS) $(LIB_IPV6)
 
 quaggaconfdir = $(sysconfdir)