btrfs-progs: fsck-tests: add test case with keyed data backref with reloc tree blocks
[btrfs-progs-unstable/devel.git] / m4 / btrfs_detect_cstd.m4
blobf0c45d97db69342ca137c5be0a0aaed86a354261
1 dnl We prefer -std=gnu90 but gcc versions prior to 4.5.0 don't support
2 dnl it.  AX_CHECK_COMPILE_FLAG is the right way to determine whether a
3 dnl particular version of gcc supports a flag, but it requires autoconf
4 dnl 2.64.  Since (for now) we still want to support older releases
5 dnl that ship with autoconf 2.63, we the also-deprecated AX_GCC_VERSION
6 dnl macro there.
7 AC_DEFUN([BTRFS_DETECT_CSTD],
9  m4_version_prereq([2.64], [
10      AX_CHECK_COMPILE_FLAG([-std=gnu90],
11        [BTRFS_CSTD_FLAGS=-std=gnu90],
12        [BTRFS_CSTD_FLAGS=-std=gnu89])
13    ], [
14      AX_GCC_VERSION([4], [5], [0],
15        [BTRFS_CSTD_FLAGS=-std=gnu90],
16        [BTRFS_CSTD_FLAGS=-std=gnu89])
17    ])
18    AC_SUBST([BTRFS_CSTD_FLAGS])
19 ]) dnl BTRFS_DETECT_CSTD