v0_8: disable lxt support if libbzip2 is not found.

Configure was checking for libbzip2, but it was not doing anything with
the result. This patch disables lxt support if libbzip2 is not found.
This commit is contained in:
Cary R 2007-10-24 19:03:42 -07:00 committed by Stephen Williams
parent 468e3bb702
commit 95254aa27e
4 changed files with 14 additions and 1 deletions

View File

@ -59,9 +59,12 @@ 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)
AC_CHECK_LIB(bz2, main, HAVE_LIBBZ2=yes, HAVE_LIBBZ2=no)
else
AC_CHECK_LIB(bz2, BZ2_bzdopen)
AC_CHECK_LIB(bz2, BZ2_bzdopen, HAVE_LIBBZ2=yes, HAVE_LIBBZ2=no)
fi
AC_SUBST(HAVE_LIBBZ2)
AC_MSG_CHECKING(for sys/times)
AC_TRY_LINK(

View File

@ -69,7 +69,10 @@ sys_readmem.o sys_readmem_lex.o \
sys_time.o sys_vcd.o sys_vcdoff.o vcd_priv.o mt19937int.o priv.o stringheap.o
ifeq (@HAVE_LIBZ@,yes)
O += sys_lxt.o lxt_write.o sys_lxt2.o lxt2_write.o
ifeq (@HAVE_LIBBZ2@,yes)
O += sys_lxt.o lxt_write.o
endif
O += sys_lxt2.o lxt2_write.o
endif
LIBS = @LIBS@

View File

@ -35,9 +35,12 @@ 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)
AC_CHECK_LIB(bz2, main, HAVE_LIBBZ2=yes, HAVE_LIBBZ2=no)
else
AC_CHECK_LIB(bz2, BZ2_bzdopen)
AC_CHECK_LIB(bz2, BZ2_bzdopen, HAVE_LIBBZ2=yes, HAVE_LIBBZ2=no)
fi
AC_SUBST(HAVE_LIBBZ2)
# --
# Look for a dl library to use. First look for the standard dlopen

View File

@ -40,7 +40,11 @@ extern void sys_vcd_register();
extern void sys_vcdoff_register();
#ifdef HAVE_LIBZ
#ifdef HAVE_LIBBZ2
extern void sys_lxt_register();
#else
static void sys_lxt_register() { fputs("LXT support disabled since libbzip2 not available\n",stderr); exit(1); }
#endif
extern void sys_lxt2_register();
#else
static void sys_lxt_register() { fputs("LXT support disabled since zlib not available\n",stderr); exit(1); }