From: Pierre Labastie <[email protected]> Autoheader uses the AC_DEFINE macros (and a few others) to populate the config.h.in file. The autotools documentation does not tell what happens if AC_DEFINE is used twice for the same identifier.
This patch prevents using AC_DEFINE twice for HAVE_OWN_FIEMAP_EXTENT_DEFINE, preserving the logic (using the fact that an undefined identifier in a preprocessor directive is taken as zero). Signed-off-by: Pierre Labastie <[email protected]> --- configure.ac | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index aa3f7824..6ea29e0a 100644 --- a/configure.ac +++ b/configure.ac @@ -240,17 +240,11 @@ fi AC_SUBST([CRYPTOPROVIDER_BUILTIN]) AC_DEFINE_UNQUOTED([CRYPTOPROVIDER],["$cryptoprovider"],[Crypto implementation source name]) -HAVE_OWN_FIEMAP_EXTENT_SHARED_DEFINE=0 AX_CHECK_DEFINE([linux/fiemap.h], [FIEMAP_EXTENT_SHARED], [], - [HAVE_OWN_FIEMAP_EXTENT_SHARED_DEFINE=1 + [AC_DEFINE([HAVE_OWN_FIEMAP_EXTENT_SHARED_DEFINE], [1], + [Define to 1 if kernel headers do not define FIEMAP_EXTENT_SHARED]) AC_MSG_WARN([no definition of FIEMAP_EXTENT_SHARED found, probably old kernel, will use own definition, 'btrfs fi du' might report wrong numbers])]) -if test "x$HAVE_OWN_FIEMAP_EXTENT_SHARED_DEFINE" == "x1"; then -AC_DEFINE([HAVE_OWN_FIEMAP_EXTENT_SHARED_DEFINE], [1], [We defined FIEMAP_EXTENT_SHARED]) -else -AC_DEFINE([HAVE_OWN_FIEMAP_EXTENT_SHARED_DEFINE], [0], [We did not define FIEMAP_EXTENT_SHARED]) -fi - AX_CHECK_DEFINE([ext2fs/ext2_fs.h], [EXT4_EPOCH_MASK], [AC_DEFINE([HAVE_EXT4_EPOCH_MASK_DEFINE], [1], [Define to 1 if e2fsprogs defines EXT4_EPOCH_MASK])], -- 2.30.2
