diff options
author | Dimitri John Ledkov <xnox@ubuntu.com> | 2018-07-23 14:32:01 +0100 |
---|---|---|
committer | Dimitri John Ledkov <xnox@ubuntu.com> | 2018-07-23 14:32:01 +0100 |
commit | 3b9cf4c8cda0818e4d3f9892ece9f7d99de13b03 (patch) | |
tree | 59446f505b5bb3b31b1b3bb81af997dda68407c2 /m4/btrfs_detect_cstd.m4 | |
parent | f22f0302575d3a167ee550470c922de82e34342b (diff) |
New upstream release.debian/4.17-1archive/debian/4.17-1
Diffstat (limited to 'm4/btrfs_detect_cstd.m4')
-rw-r--r-- | m4/btrfs_detect_cstd.m4 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/m4/btrfs_detect_cstd.m4 b/m4/btrfs_detect_cstd.m4 new file mode 100644 index 00000000..f0c45d97 --- /dev/null +++ b/m4/btrfs_detect_cstd.m4 @@ -0,0 +1,20 @@ +dnl We prefer -std=gnu90 but gcc versions prior to 4.5.0 don't support +dnl it. AX_CHECK_COMPILE_FLAG is the right way to determine whether a +dnl particular version of gcc supports a flag, but it requires autoconf +dnl 2.64. Since (for now) we still want to support older releases +dnl that ship with autoconf 2.63, we the also-deprecated AX_GCC_VERSION +dnl macro there. +AC_DEFUN([BTRFS_DETECT_CSTD], +[ + m4_version_prereq([2.64], [ + AX_CHECK_COMPILE_FLAG([-std=gnu90], + [BTRFS_CSTD_FLAGS=-std=gnu90], + [BTRFS_CSTD_FLAGS=-std=gnu89]) + ], [ + AX_GCC_VERSION([4], [5], [0], + [BTRFS_CSTD_FLAGS=-std=gnu90], + [BTRFS_CSTD_FLAGS=-std=gnu89]) + ]) + AC_SUBST([BTRFS_CSTD_FLAGS]) +]) dnl BTRFS_DETECT_CSTD + |