From b8116a874ba58e00919f4000e51865f2c91dd2f5 Mon Sep 17 00:00:00 2001 From: Dan Ehrenberg Date: Tue, 14 Apr 2015 15:58:17 -0700 Subject: [PATCH] mtd: Add CONFIG_MTD to ./configure script The CONFIG_MTD option will allow the mtd ioengine to be built. It only works when the Linux MTD header is present. Signed-off-by: Dan Ehrenberg Signed-off-by: Jens Axboe --- configure | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/configure b/configure index c1a4915d..ff97200c 100755 --- a/configure +++ b/configure @@ -1369,6 +1369,23 @@ if test "$libhdfs" = "yes" ; then fi echo "HDFS engine $libhdfs" +########################################## +# Check whether we have MTD +mtd="no" +cat > $TMPC << EOF +#include +#include +int main(int argc, char **argv) +{ + struct mtd_info_user info; + return ioctl(0, MEMGETINFO, &info); +} +EOF +if compile_prog "" "" "mtd"; then + mtd="yes" +fi +echo "MTD $mtd" + # Check if we have lex/yacc available yacc="no" yacc_is_bison="no" @@ -1572,6 +1589,9 @@ if test "$libhdfs" = "yes" ; then echo "FIO_LIBHDFS_INCLUDE=$FIO_LIBHDFS_INCLUDE" >> $config_host_mak echo "FIO_LIBHDFS_LIB=$FIO_LIBHDFS_LIB" >> $config_host_mak fi +if test "$mtd" = "yes" ; then + output_sym "CONFIG_MTD" +fi if test "$arith" = "yes" ; then output_sym "CONFIG_ARITHMETIC" if test "$yacc_is_bison" = "yes" ; then -- 2.25.1