autoconf: use -std=c17 or -std=c11 if available

If the compiler supports it, use -std=c17 or -std=c11. Hopefully, this
will give us more predictable behavior in some cases.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin (Intel) 2020-07-09 19:26:27 -07:00
parent 89563d78b2
commit 5c90a7c237

View file

@ -28,7 +28,8 @@ AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AC_PROG_CC
AC_PROG_CC_STDC
PA_ADD_CFLAGS([-std=c11])
PA_ADD_CFLAGS([-std=c17], [], [],
[PA_ADD_CFLAGS([-std=c11])])
dnl If the user did not specify a CFLAGS default, change default
dnl to -O0 for debugging