c53821
diff --git a/configure.in b/configure.in
c53821
index e40e01b..cd8c35b 100644
c53821
--- a/configure.in
c53821
+++ b/configure.in
c53821
@@ -551,6 +551,23 @@ fi
c53821
 AC_SUBST(ZLIB)
c53821
 
c53821
 dnl
c53821
+dnl Check for lzo headers and libraries
c53821
+dnl
c53821
+AC_CHECK_HEADER(lzo/minilzo.h, [minilzo_h=yes], [minilzo_h=no], [-])
c53821
+AC_CHECK_LIB(minilzo, lzo1x_1_compress, [minilzo_lib=yes], [minilzo_lib=no])
c53821
+if test "$minilzo_h" = yes -a "$minilzo_lib" = yes; then
c53821
+	if test "$STATICZ" = yes; then
c53821
+		LZOLIB="-Wl,-Bstatic -lminilzo -Wl,-Bdynamic"
c53821
+	else
c53821
+		LZOLIB="-lminilzo"
c53821
+	fi
c53821
+	AC_DEFINE([HAVE_LZO],1,[Define this if you have lzo library.])
c53821
+else
c53821
+	LZOLIB=""
c53821
+fi
c53821
+AC_SUBST(LZOLIB)
c53821
+
c53821
+dnl
c53821
 dnl Check for bzlib headers and libraries
c53821
 dnl
c53821
 AC_CHECK_HEADER(bzlib.h, [bzlib_h=yes], [bzlib_h=no], [-])