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>
diff --git a/configure.ac b/configure.ac
index 7f05489..784191c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,8 @@
 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