Whamcloud - gitweb
libext2fs: don't cache inodes that fail checksum verification
[tools/e2fsprogs.git] / configure.in
index 6592e70..3c0d64f 100644 (file)
@@ -124,6 +124,7 @@ then
 else
     AC_MSG_RESULT([[(none)]])
 fi
 else
     AC_MSG_RESULT([[(none)]])
 fi
+AC_USE_SYSTEM_EXTENSIONS
 dnl
 dnl Set default values for library extentions.  Will be dealt with after
 dnl parsing configuration opions, which may modify these
 dnl
 dnl Set default values for library extentions.  Will be dealt with after
 dnl parsing configuration opions, which may modify these
@@ -392,28 +393,7 @@ then
        AC_MSG_RESULT([Enabling gcov support])
 fi
 )
        AC_MSG_RESULT([Enabling gcov support])
 fi
 )
-dnl
-dnl handle --enable-checker
-dnl
-AC_ARG_ENABLE([checker],
-[  --enable-checker      build checker libraries],
-if test "$enableval" = "no"
-then
-       CHECKER_CMT=#
-       MAKEFILE_CHECKER=/dev/null
-       AC_MSG_RESULT([Disabling checker libraries])
-else
-       CHECKER_CMT=
-       MAKEFILE_CHECKER=$srcdir/lib/Makefile.checker
-       AC_MSG_RESULT([Building checker libraries])
-fi
-,
-CHECKER_CMT=#
-MAKEFILE_CHECKER=/dev/null
-AC_MSG_RESULT([Disabling checker libraries by default])
-)
-AC_SUBST(CHECKER_CMT)
-AC_SUBST_FILE(MAKEFILE_CHECKER)
+
 dnl
 dnl Substitute library extensions
 dnl
 dnl
 dnl Substitute library extensions
 dnl
@@ -498,8 +478,7 @@ then
        AC_CHECK_LIB(uuid, uuid_generate,
                [LIBUUID=`$PKG_CONFIG --libs uuid`;
                 STATIC_LIBUUID=`$PKG_CONFIG --static --libs uuid`],
        AC_CHECK_LIB(uuid, uuid_generate,
                [LIBUUID=`$PKG_CONFIG --libs uuid`;
                 STATIC_LIBUUID=`$PKG_CONFIG --static --libs uuid`],
-               [AC_MSG_ERROR([external uuid library not found])],
-               [$LIBUUID])
+               [AC_MSG_ERROR([external uuid library not found])])
        UUID_CMT=#
        AC_MSG_RESULT([Disabling private uuid library])
 else
        UUID_CMT=#
        AC_MSG_RESULT([Disabling private uuid library])
 else
@@ -550,8 +529,7 @@ then
        AC_CHECK_LIB(blkid, blkid_get_cache,
                [LIBBLKID=`$PKG_CONFIG --libs blkid`;
                 STATIC_LIBBLKID=`$PKG_CONFIG --static --libs blkid`],
        AC_CHECK_LIB(blkid, blkid_get_cache,
                [LIBBLKID=`$PKG_CONFIG --libs blkid`;
                 STATIC_LIBBLKID=`$PKG_CONFIG --static --libs blkid`],
-               [AC_MSG_ERROR([external blkid library not found])],
-               [$LIBBLKID])
+               [AC_MSG_ERROR([external blkid library not found])], -luuid)
        BLKID_CMT=#
        AC_MSG_RESULT([Disabling private blkid library])
 else
        BLKID_CMT=#
        AC_MSG_RESULT([Disabling private blkid library])
 else
@@ -810,6 +788,60 @@ AC_MSG_RESULT([Building uuidd by default])
 )
 AC_SUBST(UUIDD_CMT)
 dnl
 )
 AC_SUBST(UUIDD_CMT)
 dnl
+dnl handle --disable-mmp
+dnl
+AH_TEMPLATE([CONFIG_MMP], [Define to 1 to enable mmp support])
+AC_ARG_ENABLE([mmp],
+[  --disable-mmp           disable support mmp, Multi Mount Protection],
+if test "$enableval" = "no"
+then
+       AC_MSG_RESULT([Disabling mmp support])
+else
+       AC_MSG_RESULT([Enabling mmp support])
+       AC_DEFINE(CONFIG_MMP, 1)
+fi
+,
+AC_MSG_RESULT([Enabling mmp support by default])
+AC_DEFINE(CONFIG_MMP, 1)
+)
+dnl
+dnl handle --disable-bmap-stats
+dnl
+AH_TEMPLATE([ENABLE_BMAP_STATS], [Define to 1 to enable bitmap stats.])
+AC_ARG_ENABLE([bmap-stats],
+[  --disable-bmap-stats    disable collection of bitmap stats.],
+if test "$enableval" = "no"
+then
+       AC_MSG_RESULT([Disabling bitmap statistics support])
+else
+       AC_MSG_RESULT([Enabling bitmap statistics support])
+       AC_DEFINE(ENABLE_BMAP_STATS, 1)
+fi
+,
+AC_MSG_RESULT([Enabling bitmap statistics support by default])
+AC_DEFINE(ENABLE_BMAP_STATS, 1)
+)
+dnl
+dnl handle --enable-bmap-stats-ops
+dnl
+AH_TEMPLATE([ENABLE_BMAP_STATS_OPS], [Define to 1 to enable bitmap stats.])
+AC_ARG_ENABLE([bmap-stats-ops],
+[  --enable-bmap-stats-ops enable collection of additional bitmap stats],
+if test "$enableval" = "no"
+then
+       AC_MSG_RESULT([Disabling additional bitmap statistics])
+else
+       dnl There has to be a better way!
+       AS_IF([test "x${enable_bmap_stats}" = "xno"],
+        AC_MSG_FAILURE([Error --enable-bmap-stats-ops requires bmap-stats]))
+
+       AC_MSG_RESULT([Enabling additional bitmap statistics])
+       AC_DEFINE(ENABLE_BMAP_STATS_OPS, 1)
+fi
+,
+AC_MSG_RESULT([Disabling additional bitmap statistics by default])
+)
+dnl
 dnl
 dnl
 MAKEFILE_LIBRARY=$srcdir/lib/Makefile.library
 dnl
 dnl
 MAKEFILE_LIBRARY=$srcdir/lib/Makefile.library
@@ -888,6 +920,7 @@ AC_CHECK_HEADERS(m4_flatten([
        termio.h
        unistd.h
        utime.h
        termio.h
        unistd.h
        utime.h
+       attr/xattr.h
        linux/falloc.h
        linux/fd.h
        linux/major.h
        linux/falloc.h
        linux/fd.h
        linux/major.h
@@ -895,12 +928,13 @@ AC_CHECK_HEADERS(m4_flatten([
        net/if_dl.h
        netinet/in.h
        sys/disklabel.h
        net/if_dl.h
        netinet/in.h
        sys/disklabel.h
+       sys/disk.h
        sys/file.h
        sys/ioctl.h
        sys/mkdev.h
        sys/mman.h
        sys/file.h
        sys/ioctl.h
        sys/mkdev.h
        sys/mman.h
+       sys/mount.h
        sys/prctl.h
        sys/prctl.h
-       sys/queue.h
        sys/resource.h
        sys/select.h
        sys/socket.h
        sys/resource.h
        sys/select.h
        sys/socket.h
@@ -913,12 +947,6 @@ AC_CHECK_HEADERS(m4_flatten([
        sys/un.h
        sys/wait.h
 ]))
        sys/un.h
        sys/wait.h
 ]))
-AC_CHECK_HEADERS(sys/disk.h sys/mount.h,,,
-[[
-#if HAVE_SYS_QUEUE_H
-#include <sys/queue.h>
-#endif
-]])
 AC_CHECK_HEADERS(net/if.h,,,
 [[
 #if HAVE_SYS_TYPES_H
 AC_CHECK_HEADERS(net/if.h,,,
 [[
 #if HAVE_SYS_TYPES_H
@@ -1071,6 +1099,7 @@ AC_CHECK_FUNCS(m4_flatten([
        getrlimit
        getrusage
        jrand48
        getrlimit
        getrusage
        jrand48
+       llistxattr
        llseek
        lseek64
        mallinfo
        llseek
        lseek64
        mallinfo
@@ -1086,10 +1115,13 @@ AC_CHECK_FUNCS(m4_flatten([
        posix_fadvise64
        posix_memalign
        prctl
        posix_fadvise64
        posix_memalign
        prctl
+       pread
+       pwrite
        secure_getenv
        setmntent
        setresgid
        setresuid
        secure_getenv
        setmntent
        setresgid
        setresuid
+       snprintf
        srandom
        stpcpy
        strcasecmp
        srandom
        stpcpy
        strcasecmp
@@ -1321,6 +1353,7 @@ if test -n "$WITH_DIET_LIBC" ; then
        INCLUDES="$INCLUDES -D_REENTRANT"
 fi
 AC_SUBST(INCLUDES)
        INCLUDES="$INCLUDES -D_REENTRANT"
 fi
 AC_SUBST(INCLUDES)
+AM_MKINSTALLDIRS
 dnl
 dnl Build CFLAGS
 dnl
 dnl
 dnl Build CFLAGS
 dnl