* configure.ac: Add --enable-isis-topology to enable isisd topology
	  generator code.
	* isisd/Makefile.am: Variables to handle conditonal compiling of
	  topology generator code.
	* isisd/isis_lsp.c: lsppdu_realloc() is used by topology generator.
	* isisd/isisd.c: Rename show_isis_topology_cmd to not conflict the one
	  in the isis_spf.c.
	* isisd/isisd.h: Remove TOPOLOGY_GENERATE define, it will be defined in
	  toplevel config.h if topology generator is enabled.
	* isisd/topology/Makefile.am: Handle the libtoolized Quagga libraries.
diff --git a/isisd/ChangeLog b/isisd/ChangeLog
index 6f4f395..f333901 100644
--- a/isisd/ChangeLog
+++ b/isisd/ChangeLog
@@ -1,3 +1,14 @@
+2005-04-02 Hasso Tepper <hasso at quagga.net>
+
+	* Makefile.am: Variables to handle conditonal compiling of topology
+	  generator code.
+	* isis_lsp.c: lsppdu_realloc() is used by topology generator.
+	* isisd.c: Rename show_isis_topology_cmd to not conflict the one in
+	  the isis_spf.c.
+	* isisd.h: Remove TOPOLOGY_GENERATE define, it will be defined in
+	  toplevel config.h if topology generator is enabled.
+	* topology/Makefile.am: Handle the libtoolized Quagga libraries.
+
 2005-04-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
 
 	* isis_zebra.c: (isis_zebra_if_del) Call if_delete_retain instead
diff --git a/isisd/Makefile.am b/isisd/Makefile.am
index 7993643..ceb948c 100644
--- a/isisd/Makefile.am
+++ b/isisd/Makefile.am
@@ -1,12 +1,13 @@
 ## Process this file with automake to produce Makefile.in.
 
-# INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -Itopology
-INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib
+INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib \
+	   @ISIS_TOPOLOGY_INCLUDES@
 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
 INSTALL_SDATA=@INSTALL@ -m 600
 LIBS = @LIBS@ 
 noinst_LIBRARIES = libisis.a
 sbin_PROGRAMS = isisd 
+SUBDIRS = @ISIS_TOPOLOGY_DIR@
 
 libisis_a_SOURCES = \
 	isis_adjacency.c isis_lsp.c dict.c isis_circuit.c isis_pdu.c \
@@ -25,7 +26,7 @@
 isisd_SOURCES = \
 	isis_main.c $(libisis_a_SOURCES)
 
-isisd_LDADD = ../lib/libzebra.la @LIBCAP@
+isisd_LDADD = @ISIS_TOPOLOGY_LIB@ ../lib/libzebra.la @LIBCAP@
 
 examplesdir = $(exampledir)
 dist_examples_DATA = isisd.conf.sample
diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c
index 52d8884..987a9b3 100644
--- a/isisd/isis_lsp.c
+++ b/isisd/isis_lsp.c
@@ -913,7 +913,6 @@
   return lsp_count;
 }
 
-#if 0 /* Seems to be old code */
 /* this function reallocate memory to an lsp pdu, with an additional
  * size of memory, it scans the lsp and moves all pointers the
  * way they should */
@@ -940,7 +939,6 @@
   return STREAM_DATA (lsp->pdu) + (lsp->lsp_header->pdu_len - size);
 #endif /* LSP_MEMORY_PREASSIGN */
 }
-#endif /* 0 */
 
 #if 0				/* Saving the old one just in case :) */
 /*
diff --git a/isisd/isisd.c b/isisd/isisd.c
index e4d73c3..229f135 100644
--- a/isisd/isisd.c
+++ b/isisd/isisd.c
@@ -1595,9 +1595,9 @@
   return CMD_SUCCESS;
 }
 
-DEFUN (show_isis_topology,
-       show_isis_topology_cmd,
-       "show isis topology",
+DEFUN (show_isis_generated_topology,
+       show_isis_generated_topology_cmd,
+       "show isis generated-topology",
        SHOW_STR
        "clns network information\n"
        "CLNS neighbor adjacencies\n")
@@ -2138,8 +2138,8 @@
   install_element (ISIS_NODE, &topology_generate_grid_cmd);
   install_element (ISIS_NODE, &topology_baseis_cmd);
   install_element (ISIS_NODE, &no_topology_baseis_cmd);
-  install_element (VIEW_NODE, &show_isis_topology_cmd);
-  install_element (ENABLE_NODE, &show_isis_topology_cmd);
+  install_element (VIEW_NODE, &show_isis_generated_topology_cmd);
+  install_element (ENABLE_NODE, &show_isis_generated_topology_cmd);
 #endif /* TOPOLOGY_GENERATE */
 
   isis_new (0);
diff --git a/isisd/isisd.h b/isisd/isisd.h
index c347bf0..77de12e 100644
--- a/isisd/isisd.h
+++ b/isisd/isisd.h
@@ -29,9 +29,6 @@
 /* #define EXTREME_DEBUG  */
 /* #define EXTREME_TLV_DEBUG */
 
-/* If you want topology stuff compiled in */
-/* #define TOPOLOGY_GENERATE */
-
 struct rmap
 {
   char *name;
diff --git a/isisd/topology/Makefile.am b/isisd/topology/Makefile.am
index 045c15c..ae6fa82 100644
--- a/isisd/topology/Makefile.am
+++ b/isisd/topology/Makefile.am
@@ -10,7 +10,7 @@
 
 libtopology_a_DEPENDENCIES = @LIB_REGEX@
 
-libtopology_a_LIBADD = @LIB_REGEX@ ../../lib/libzebra.a
+libtopology_a_LIBADD = @LIB_REGEX@ ../../lib/libzebra.la
 
 noinst_HEADERS = \
 	spgrid.h