btrfs-progs: build: detect whether -std=gnu90 is supported
commiteb7b42003a7d3a1d4c0253c6d5a248c9078c6d19
authorJeff Mahoney <jeffm@suse.com>
Mon, 30 Apr 2018 14:37:08 +0000 (30 10:37 -0400)
committerDavid Sterba <dsterba@suse.com>
Thu, 7 Jun 2018 14:37:35 +0000 (7 16:37 +0200)
treef09fbe12c1bac6772668daa4fabc6f48e56bc835
parent1c73f56f5a41f44a6196d06675cfb0fcdd2bbd9d
btrfs-progs: build: detect whether -std=gnu90 is supported

GCC releases prior to 4.5.0 don't support -std=gnu90 so btrfs-progs won't
build at all on older distros.  We can detect whether the compiler
supports -std=gnu90 and fall back to -std=gnu89 if it doesn't.

AX_CHECK_COMPILE_FLAG is the right way to do this, but it depends on
autoconf 2.64.  AX_GCC_VERSION has been deprecated, so we'll use that
only for earlier autoconf versions so we can drop it when we drop
support for older autoconf releases.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Makefile
Makefile.inc.in
configure.ac
m4/ax_check_compile_flag.m4 [new file with mode: 0644]
m4/ax_gcc_version.m4 [new file with mode: 0644]
m4/btrfs_detect_cstd.m4 [new file with mode: 0644]