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
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])
14 AX_GCC_VERSION([4], [5], [0],
15 [BTRFS_CSTD_FLAGS=-std=gnu90],
16 [BTRFS_CSTD_FLAGS=-std=gnu89])
18 AC_SUBST([BTRFS_CSTD_FLAGS])
19 ]) dnl BTRFS_DETECT_CSTD