diff --git a/compat/lib/Makefile.in b/compat/lib/Makefile.in index cc90969..59afee1 100644 --- a/compat/lib/Makefile.in +++ b/compat/lib/Makefile.in @@ -8,8 +8,8 @@ top_builddir= ../.. INC= -I$(top_srcdir)/compat/include ALL_CFLAGS= @CPPFLAGS@ @CFLAGS@ @CCOPTS@ -pipe $(OPT) $(GINC) $(INC) $(DEFS) -SRCS= compaterr.c compatglob.c bylabel.c system.c rmtflags.c minilzo.c -OBJS= compaterr.o compatglob.o bylabel.o system.o rmtflags.o minilzo.o +SRCS= compaterr.c compatglob.c bylabel.c system.c rmtflags.c +OBJS= compaterr.o compatglob.o bylabel.o system.o rmtflags.o LIB= libcompat.a .c.o: diff --git a/configure.in b/configure.in index e40e01b..f9d79c4 100644 --- a/configure.in +++ b/configure.in @@ -551,6 +551,23 @@ fi AC_SUBST(ZLIB) dnl +dnl Check for lzo headers and libraries +dnl +AC_CHECK_HEADER(lzo/minilzo.h, [minilzo_h=yes], [minilzo_h=no], [-]) +AC_CHECK_LIB(minilzo, lzo1x_1_compress, [minilzo_lib=yes], [minilzo_lib=no]) +if test "$minilzo_h" = yes -a "$minilzo_lib" = yes; then + if test "$STATICZ" = yes; then + LZOLIB="-Wl,-Bstatic -lminilzo -Wl,-Bdynamic" + else + LZOLIB="-lminilzo" + fi + AC_DEFINE([HAVE_LZO],1,[Define this if you have lzo library.]) +else + LZOLIB="" +fi +AC_SUBST(LZOLIB) + +dnl dnl Check for bzlib headers and libraries dnl AC_CHECK_HEADER(bzlib.h, [bzlib_h=yes], [bzlib_h=no], [-]) diff --git a/restore/tape.c b/restore/tape.c index 7debfd1..6376f63 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -98,7 +98,7 @@ static const char rcsid[] = #endif /* HAVE_BZLIB */ #ifdef HAVE_LZO -#include +#include #endif /* HAVE_LZO */ #include "restore.h" diff --git a/dump/Makefile.in b/dump/Makefile.in index f18c01e..1050ce5 100644 --- a/dump/Makefile.in +++ b/dump/Makefile.in @@ -9,7 +9,7 @@ top_builddir= .. INC= -I$(top_srcdir)/dump ALL_CFLAGS= @CPPFLAGS@ @CFLAGS@ @CCOPTS@ -pipe $(OPT) $(GINC) $(INC) $(DEFS) @DUMPDEBUG@ ALL_LDFLAGS= @LDFLAGS@ @LDOPTS@ @STATIC@ -LIBS= $(GLIBS) @ZLIB@ @BZLIB@ @BLKID@ +LIBS= $(GLIBS) @ZLIB@ @BZLIB@ @BLKID@ @LZOLIB@ DEPLIBS= ../compat/lib/libcompat.a PROG= dump diff --git a/dump/tape.c b/dump/tape.c index e46d626..c7d761a 100644 --- a/dump/tape.c +++ b/dump/tape.c @@ -101,7 +101,8 @@ int write(), read(); #endif /* HAVE_BZLIB */ #ifdef HAVE_LZO -#include +#include +#include #endif /* HAVE_LZO */ #include "dump.h" diff --git a/restore/tape.c b/restore/tape.c index 6376f63..7eb1c6c 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -99,6 +99,7 @@ static const char rcsid[] = #ifdef HAVE_LZO #include +#include #endif /* HAVE_LZO */ #include "restore.h" diff --git a/restore/Makefile.in b/restore/Makefile.in index 6257187..1b6e214 100644 --- a/restore/Makefile.in +++ b/restore/Makefile.in @@ -9,7 +9,7 @@ top_builddir= .. INC= -I$(top_srcdir)/restore ALL_CFLAGS= @CPPFLAGS@ @CFLAGS@ @CCOPTS@ @CCTRANSSELINUX@ -pipe $(OPT) $(GINC) $(INC) $(DEFS) @RESTOREDEBUG@ ALL_LDFLAGS= @LDFLAGS@ @LDOPTS@ @STATIC@ -LIBS= $(GLIBS) -le2p @READLINE@ @ZLIB@ @BZLIB@ @LTRANSSELINUX@ +LIBS= $(GLIBS) -le2p @READLINE@ @ZLIB@ @BZLIB@ @LZOLIB@ @LTRANSSELINUX@ DEPLIBS= ../compat/lib/libcompat.a PROG= restore