From 1c51e1787cad7f3fbce6ac515f5907b4c29b55b0 Mon Sep 17 00:00:00 2001 From: steve Date: Sat, 13 Sep 2003 01:28:47 +0000 Subject: [PATCH] Disable lxt when zlib is missing. --- configure.in | 2 ++ vpi/Makefile.in | 9 ++++++--- vpi/sys_table.c | 13 +++++++++++-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/configure.in b/configure.in index 7ca8ac85d..10ca7b704 100644 --- a/configure.in +++ b/configure.in @@ -52,6 +52,8 @@ AC_LANG_CPLUSPLUS AC_CHECK_HEADERS(getopt.h malloc.h libiberty.h iosfwd sys/wait.h) AC_CHECK_LIB(z, gzwrite) +AC_CHECK_LIB(z, gzwrite, HAVE_LIBZ=yes, HAVE_LIBZ=no) +AC_SUBST(HAVE_LIBZ) if test "$WIN32" = "yes"; then AC_CHECK_LIB(bz2, main) else diff --git a/vpi/Makefile.in b/vpi/Makefile.in index 894b759d3..0771587b3 100644 --- a/vpi/Makefile.in +++ b/vpi/Makefile.in @@ -18,7 +18,7 @@ # 59 Temple Place - Suite 330 # Boston, MA 02111-1307, USA # -#ident "$Id: Makefile.in,v 1.42 2003/09/01 04:04:03 steve Exp $" +#ident "$Id: Makefile.in,v 1.43 2003/09/13 01:28:47 steve Exp $" # # SHELL = /bin/sh @@ -59,8 +59,11 @@ dep: O = sys_table.o sys_convert.o sys_deposit.o sys_display.o sys_finish.o \ sys_plusargs.o sys_random.o sys_readmem.o sys_readmem_lex.o sys_time.o \ -sys_vcd.o sys_vcdoff.o sys_lxt.o lxt_write.o sys_lxt2.o lxt2_write.o \ -vcd_priv.o mt19937int.o stringheap.o +sys_vcd.o sys_vcdoff.o vcd_priv.o mt19937int.o stringheap.o + +ifeq (@HAVE_LIBZ@,yes) +O += sys_lxt.o lxt_write.o sys_lxt2.o lxt2_write.o +endif LIBS = @LIBS@ SYSTEM_VPI_LDFLAGS = $(LIBS) diff --git a/vpi/sys_table.c b/vpi/sys_table.c index d45ca6c60..238e62565 100644 --- a/vpi/sys_table.c +++ b/vpi/sys_table.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: sys_table.c,v 1.21 2003/09/01 04:04:03 steve Exp $" +#ident "$Id: sys_table.c,v 1.22 2003/09/13 01:28:47 steve Exp $" #endif # include "config.h" @@ -35,9 +35,15 @@ extern void sys_random_register(); extern void sys_readmem_register(); extern void sys_time_register(); extern void sys_vcd_register(); +extern void sys_vcdoff_register(); + +#ifdef HAVE_LIBZ extern void sys_lxt_register(); extern void sys_lxt2_register(); -extern void sys_vcdoff_register(); +#else +static void sys_lxt_register() { fputs("LXT support disabled since zlib not available\n",stderr); exit(1); } +static void sys_lxt2_register() { fputs("LXT2 support disabled since zlib not available\n",stderr); exit(1); } +#endif static void sys_lxt_or_vcd_register() { @@ -148,6 +154,9 @@ void (*vlog_startup_routines[])() = { /* * $Log: sys_table.c,v $ + * Revision 1.22 2003/09/13 01:28:47 steve + * Disable lxt when zlib is missing. + * * Revision 1.21 2003/09/01 04:04:03 steve * Add lxt2 support. *