summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--jffsX-utils/Makemodule.am5
-rw-r--r--jffsX-utils/compr_lzo.c15
3 files changed, 5 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index fdd9c3c..0751b3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -198,7 +198,7 @@ AS_IF([test -z "$LZO_LIBS" -a "x$with_lzo" != "xno"], [
)
], [])
-AS_IF([test -z "$LZO_LIBS"], [AS_IF([test "x$with_lzo" != "xcheck"],
+AS_IF([test -z "$LZO_LIBS"], [AS_IF([test "x$with_lzo" = "xyes"],
[AC_MSG_ERROR([cannot find liblzo])],
[with_lzo="no"])],
[with_lzo="yes"])
diff --git a/jffsX-utils/Makemodule.am b/jffsX-utils/Makemodule.am
index 7112d6e..ee8d040 100644
--- a/jffsX-utils/Makemodule.am
+++ b/jffsX-utils/Makemodule.am
@@ -4,7 +4,6 @@ mkfs_jffs2_SOURCES = \
jffsX-utils/compr_zlib.c \
jffsX-utils/compr.h \
jffsX-utils/rbtree.c \
- jffsX-utils/compr_lzo.c \
jffsX-utils/compr.c \
jffsX-utils/compr_rtime.c \
jffsX-utils/compr.h \
@@ -27,6 +26,10 @@ jffs2dump_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS) $(LZO_CFLAGS)
sumtool_SOURCES = jffsX-utils/sumtool.c jffsX-utils/summary.h
sumtool_LDADD = libmtd.a
+if WITH_LZO
+mkfs_jffs2_SOURCES += jffsX-utils/compr_lzo.c
+endif
+
EXTRA_DIST += jffsX-utils/device_table.txt jffsX-utils/mkfs.jffs2.1
dist_man1_MANS += jffsX-utils/mkfs.jffs2.1
diff --git a/jffsX-utils/compr_lzo.c b/jffsX-utils/compr_lzo.c
index 337ebe9..ddd8d55 100644
--- a/jffsX-utils/compr_lzo.c
+++ b/jffsX-utils/compr_lzo.c
@@ -24,8 +24,6 @@
#include <stdint.h>
#include <stdio.h>
#include <string.h>
-
-#ifdef WITH_LZO
#include <asm/types.h>
#include <linux/jffs2.h>
#include <lzo/lzo1x.h>
@@ -121,16 +119,3 @@ void jffs2_lzo_exit(void)
free(lzo_compress_buf);
free(lzo_mem);
}
-
-#else
-
-int jffs2_lzo_init(void)
-{
- return 0;
-}
-
-void jffs2_lzo_exit(void)
-{
-}
-
-#endif