Browse Source

Add libtool support.

libzebra and libospfapiclient are now built shared, and linked shared
with the daemons.  This reduces the memory needed when running
multiple daemons; each daemon is at least 150k smaller.  Static
libraries are still built, and libtool should use them on platforms
which don't have shared libaries.  As with autoconf, the user of a
distribution does not need libtool; one just needs that to build from
CVS.

libospf.a is still a non-shared library, and still installed, not
because that makese sense, but because I don't understand why it is
the way it is now.

Note that the tree was tagged 'libtool-before' just before this commit.
gdt 16 years ago
parent
commit
87efd646ff
17 changed files with 51 additions and 2670 deletions
  1. 7 0
      ChangeLog
  2. 1 1
      bgpd/Makefile.am
  3. 0 1321
      config.guess
  4. 0 1333
      config.sub
  5. 6 1
      configure.ac
  6. 1 1
      guile/Makefile.am
  7. 1 1
      isisd/Makefile.am
  8. 4 0
      lib/ChangeLog
  9. 4 4
      lib/Makefile.am
  10. 4 0
      ospfclient/ChangeLog
  11. 5 4
      ospfclient/Makefile.am
  12. 4 0
      ospfd/ChangeLog
  13. 1 0
      update-autotools
  14. 1 1
      vtysh/Makefile.am
  15. 6 0
      zebra/ChangeLog
  16. 3 3
      zebra/Makefile.am
  17. 3 0
      zebra/main.c

+ 7 - 0
ChangeLog

@@ -1,5 +1,12 @@
 2004-06-30  Greg Troxel  <gdt@poblano.ir.bbn.com>
 
+	* */Makefile.am: use -L../lib -lzebra, so we pick up the shlib
+	version of libzebra when available.
+
+	* configure.ac, update-autotools: Add libtool.
+
+2004-06-30  Greg Troxel  <gdt@poblano.ir.bbn.com>
+
 	* Makefile.am: add files to EXTRA_DIST rather than copying, and
 	omit the kludgy cleaning steps, which were failing when the list
 	to clean was empty.

+ 1 - 1
bgpd/Makefile.am

@@ -24,7 +24,7 @@ noinst_HEADERS = \
 bgpd_SOURCES = \
 	bgp_main.c $(libbgp_a_SOURCES)
 
-bgpd_LDADD = ../lib/libzebra.a @LIBCAP@
+bgpd_LDADD = -L../lib -lzebra @LIBCAP@
 
 examplesdir = $(exampledir)
 dist_examples_DATA = bgpd.conf.sample bgpd.conf.sample2

File diff suppressed because it is too large
+ 0 - 1321
config.guess


File diff suppressed because it is too large
+ 0 - 1333
config.sub


+ 6 - 1
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.54 2004/06/30 14:25:12 gdt Exp $
+## $Id: configure.ac,v 1.55 2004/06/30 17:36:11 gdt Exp $
 AC_PREREQ(2.53)
 
 AC_INIT(quagga, 0.96.5, [http://bugzilla.quagga.net])
@@ -64,6 +64,11 @@ dnl AIX check
 dnl ---------
 AC_AIX
 
+dnl -------
+dnl libtool
+dnl -------
+AM_PROG_LIBTOOL
+
 dnl ----------------------
 dnl Packages configuration
 dnl ----------------------

+ 1 - 1
guile/Makefile.am

@@ -6,4 +6,4 @@ DEFS = @DEFS@ -I. -I$(srcdir)
 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 ../lib/libzebra.a
+zebra_guile_LDADD = @GUILE_LDFLAGS@ ../bgpd/libbgp.a -L../lib -lzebra

+ 1 - 1
isisd/Makefile.am

@@ -25,7 +25,7 @@ noinst_HEADERS = \
 isisd_SOURCES = \
 	isis_main.c $(libisis_a_SOURCES)
 
-isisd_LDADD = ../lib/libzebra.a @LIBCAP@
+isisd_LDADD = -L../lib -lzebra @LIBCAP@
 
 examplesdir = $(exampledir)
 dist_examples_DATA = isisd.conf.sample

+ 4 - 0
lib/ChangeLog

@@ -1,3 +1,7 @@
+2004-06-30  Greg Troxel  <gdt@poblano.ir.bbn.com>
+
+	* Makefile.am: Make libzebra shared.
+
 2004-06-21 Paul Jakma <paul@dishone.st>
 
 	* ChangeLog: fix my last update config.h -> zebra.h ;)

+ 4 - 4
lib/Makefile.am

@@ -3,9 +3,9 @@
 INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib
 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
 
-lib_LIBRARIES = libzebra.a
+lib_LTLIBRARIES = libzebra.la
 
-libzebra_a_SOURCES = \
+libzebra_la_SOURCES = \
 	version.c network.c pid_output.c getopt.c getopt1.c daemon.c \
 	print_version.c checksum.c vector.c linklist.c vty.c command.c \
 	sockunion.c prefix.c thread.c if.c memory.c buffer.c table.c hash.c \
@@ -13,9 +13,9 @@ libzebra_a_SOURCES = \
 	zclient.c sockopt.c smux.c md5.c if_rmap.c keychain.c privs.c \
 	debug.c sigevent.c pqueue.c
 
-libzebra_a_DEPENDENCIES = @LIB_REGEX@
+libzebra_la_DEPENDENCIES = @LIB_REGEX@
 
-libzebra_a_LIBADD = @LIB_REGEX@
+libzebra_la_LIBADD = @LIB_REGEX@
 
 pkginclude_HEADERS = \
 	buffer.h command.h filter.h getopt.h hash.h if.h linklist.h log.h \

+ 4 - 0
ospfclient/ChangeLog

@@ -1,3 +1,7 @@
+2004-06-30  Greg Troxel  <gdt@poblano.ir.bbn.com>
+
+	* Makefile.am: Add libtool/shlib support.
+
 2003-01-10  Ralph Keller <keller@tik.ee.ethz.ch>
 	* New ChangeLog
 	

+ 5 - 4
ospfclient/Makefile.am

@@ -2,10 +2,10 @@
 
 INCLUDES = -I../lib -I../
 
-lib_LIBRARIES = libospfapiclient.a
+lib_LTLIBRARIES = libospfapiclient.la
 sbin_PROGRAMS = ospfclient
 
-libospfapiclient_a_SOURCES = \
+libospfapiclient_la_SOURCES = \
 	ospf_apiclient.c
 
 ospfapiheaderdir = $(pkgincludedir)/ospfapi
@@ -14,8 +14,9 @@ ospfapiheader_HEADERS = \
 	ospf_apiclient.h
 
 ospfclient_SOURCES = \
-	ospfclient.c $(libospfapiclient_a_SOURCES)
+	ospfclient.c
 
-ospfclient_LDADD = ../ospfd/libospf.a ../lib/libzebra.a @LIBCAP@
+ospfclient_LDADD = libospfapiclient.la \
+	-L../ospfd -lospf -L../lib -lzebra @LIBCAP@
 
 

+ 4 - 0
ospfd/ChangeLog

@@ -1,3 +1,7 @@
+2004-06-30  Greg Troxel  <gdt@poblano.ir.bbn.com>
+
+	* Makefile.am: Add shlib support.
+
 2004-06-10 Hasso Tepper <hasso@estpak.ee>
 
 	* *: Removed ifdefs HAVE_NSSA.

+ 1 - 0
update-autotools

@@ -8,4 +8,5 @@ rm -rf autom4te.cache
 aclocal
 autoheader
 autoconf
+libtoolize
 automake --foreign

+ 1 - 1
vtysh/Makefile.am

@@ -11,7 +11,7 @@ vtysh_SOURCES = vtysh_main.c vtysh.c vtysh_user.c vtysh_config.c
 nodist_vtysh_SOURCES = vtysh_cmd.c
 CLEANFILES = vtysh_cmd.c
 noinst_HEADERS = vtysh.h vtysh_user.h
-vtysh_LDADD = ../lib/libzebra.a @LIBCAP@
+vtysh_LDADD = -L../lib -lzebra @LIBCAP@
 
 examplesdir = $(exampledir)
 dist_examples_DATA = vtysh.conf.sample

+ 6 - 0
zebra/ChangeLog

@@ -1,3 +1,9 @@
+2004-06-30  Greg Troxel  <gdt@poblano.ir.bbn.com>
+
+	* main.c: define thread_master variable so that linking with
+	libzebra.so doesn't fail.  Arguably zclient.o should be in a
+	separate library, but this is far less disruptive.
+
 2004-06-12 Robert Olsson <Robert.Olsson at data.slu.se>
 
         * Added IRDP support.

+ 3 - 3
zebra/Makefile.am

@@ -30,7 +30,7 @@ noinst_HEADERS = \
 	connected.h ioctl.h rib.h rt.h zserv.h redistribute.h debug.h rtadv.h \
 	interface.h ipforward.h irdp.h
 
-zebra_LDADD = ../lib/libzebra.a $(otherobj) $(LIBCAP) $(LIB_IPV6)
+zebra_LDADD = $(otherobj) $(LIBCAP) $(LIB_IPV6) -L../lib -lzebra
 
 zebra_DEPENDENCIES = $(otherobj)
 
@@ -42,8 +42,8 @@ EXTRA_DIST = if_ioctl.c if_ioctl_solaris.c if_netlink.c if_proc.c \
 	ioctl.c ioctl_solaris.c \
 	GNOME-SMI GNOME-PRODUCT-ZEBRA-MIB
 
-#client : client_main.o ../lib/libzebra.a
-#	$(CC) -g -o client client_main.o ../lib/libzebra.a $(LIBS) $(LIB_IPV6)
+#client : client_main.o -L../lib -lzebra
+#	$(CC) -g -o client client_main.o -L../lib -lzebra $(LIBS) $(LIB_IPV6)
 
 quaggaconfdir = $(sysconfdir)
 

+ 3 - 0
zebra/main.c

@@ -48,6 +48,9 @@ struct zebra_t zebrad =
 pid_t old_pid;
 pid_t pid;
 
+/* Pacify zclient.o in libzebra, which expects this variable. */
+struct thread_master *master;
+
 /* Route retain mode flag. */
 int retain_mode = 0;