From: Dan Ehrenberg Date: Tue, 14 Apr 2015 22:58:17 +0000 (-0700) Subject: mtd: Add CONFIG_MTD to ./configure script X-Git-Tag: fio-2.2.8~41 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=b8116a874ba58e00919f4000e51865f2c91dd2f5;ds=sidebyside 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 --- 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