btrfs-progs: build: check if FIEMAP_EXTENT_SHARED is defined
authorDavid Sterba <dsterba@suse.com>
Fri, 24 Jun 2016 12:04:04 +0000 (14:04 +0200)
committerDavid Sterba <dsterba@suse.com>
Fri, 24 Jun 2016 12:05:44 +0000 (14:05 +0200)
Detect the macro at configure time rather than during compilation.

Signed-off-by: David Sterba <dsterba@suse.com>
configure.ac

index c79472c..901d434 100644 (file)
@@ -113,6 +113,8 @@ if test "x$enable_convert" = xyes; then
        PKG_CHECK_MODULES(COM_ERR, [com_err])
 fi
 
+AX_CHECK_DEFINE([linux/fiemap.h], [FIEMAP_EXTENT_SHARED], [],
+               [AC_MSG_ERROR([no definition of FIEMAP_EXTENT_SHARED found])])
 
 dnl Define <NAME>_LIBS= and <NAME>_CFLAGS= by pkg-config
 dnl