summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac10
-rw-r--r--misc-utils/Makemodule.am18
2 files changed, 21 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index c05d362..c596eda 100644
--- a/configure.ac
+++ b/configure.ac
@@ -106,6 +106,16 @@ AM_COND_IF([INSTALL_TESTS],
[AC_SUBST(testbindir, ["\".\""])])
+AC_ARG_ENABLE([lsmtd],
+ [AS_HELP_STRING([--disable-lsmtd], [Do not build the lsmtd program])],
+ [case "${enableval}" in
+ yes) AM_CONDITIONAL([BUILD_LSMTD], [true]) ;;
+ no) AM_CONDITIONAL([BUILD_LSMTD], [false]) ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --disable-lsmtd]) ;;
+ esac],
+ [AM_CONDITIONAL([BUILD_LSMTD], [true])])
+
+
AC_ARG_WITH([jffs],
[AS_HELP_STRING([--without-jffs], [Disable jffsX utilities])],
[case "${withval}" in
diff --git a/misc-utils/Makemodule.am b/misc-utils/Makemodule.am
index 5e70f7c..2289252 100644
--- a/misc-utils/Makemodule.am
+++ b/misc-utils/Makemodule.am
@@ -33,15 +33,11 @@ flashcp_SOURCES = misc-utils/flashcp.c
flash_erase_SOURCES = misc-utils/flash_erase.c
flash_erase_LDADD = libmtd.a
-lsmtd_SOURCES = misc-utils/lsmtd.c misc-utils/lsmtd_scan.c
-lsmtd_LDADD = libmtd.a libubi.a
-lsmtd_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/misc-utils
-
MISC_BINS = \
ftl_format doc_loadbios ftl_check mtd_debug docfdisk \
serve_image recv_image flash_erase flash_lock \
flash_unlock flash_otp_info flash_otp_dump flash_otp_lock \
- flash_otp_write flashcp mtdpart lsmtd
+ flash_otp_write flashcp mtdpart
MISC_SH = \
misc-utils/flash_eraseall
@@ -53,8 +49,16 @@ MISC_HEADER = \
misc-utils/mcast_image.h \
misc-utils/lsmtd.h
-MISC_MAN = \
- misc-utils/lsmtd.8
+MISC_MAN =
+
+if BUILD_LSMTD
+lsmtd_SOURCES = misc-utils/lsmtd.c misc-utils/lsmtd_scan.c
+lsmtd_LDADD = libmtd.a libubi.a
+lsmtd_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/misc-utils
+
+MISC_BINS += lsmtd
+MISC_MAN += misc-utils/lsmtd.8
+endif
EXTRA_DIST += $(MISC_HEADER) $(MISC_EXTRA) $(MISC_SH)