diff --git a/m4/c17.m4 b/m4/c17.m4 index 1df3131f..b9bf884f 100644 --- a/m4/c17.m4 +++ b/m4/c17.m4 @@ -3,9 +3,15 @@ AC_DEFUN([AX_CHECK_C17], [AX_APPEND_FLAG([-std=gnu17])], [AX_CHECK_COMPILE_FLAG([-std=c17], [AX_APPEND_FLAG([-std=c17])], - [AX_CHECK_COMPILE_FLAG([-std=c99], - [AX_APPEND_FLAG([-std=c99])], - [AC_MSG_ERROR([C compiled does not support at least C99!])]) + [AX_CHECK_COMPILE_FLAG([-std=gnu11], + [AX_APPEND_FLAG([-std=gnu11])], + [AX_CHECK_COMPILE_FLAG([-std=c11], + [AX_APPEND_FLAG([-std=c11])], + [AX_CHECK_COMPILE_FLAG([-std=c99], + [AX_APPEND_FLAG([-std=c99])], + [AC_MSG_ERROR([C compiled does not support at least C99!])]) + ]) + ]) ]) ]) ])