@@ -8095,8 +8095,8 @@ CC_save=${CC}
80958095CFLAGS_save=${CFLAGS}
80968096CC_SUB=`echo "${CC}" | sed 's/-std=[^ ]*//'`
80978097CFLAGS_SUB=`echo "${CFLAGS}" | sed -e 's/-std=[^ ]*//'`
8098- : ${CC23="${CC_SUB} -std=gnu23"}
80998098: ${C23FLAGS="${CFLAGS_SUB}"}
8099+ : ${CC23="${CC_SUB}"}
81008100CC=${CC23}
81018101CFLAGS=${C23FLAGS}
81028102unset r_cv_C23
@@ -8149,10 +8149,64 @@ fi
81498149printf "%s\n" "$r_cv_C23" >&6; }
81508150
81518151if test x${r_cv_C23} = xno; then
8152- unset r_cv_C23
8153- CC23="${CC_SUB} -std=gnu2x"
8154- CC=${CC23}
8155- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${CC} is a C23 compiler" >&5
8152+ ${CC23="${CC_SUB} -std=gnu23"}
8153+ CC=${CC23}
8154+ CFLAGS=${C23FLAGS}
8155+ unset r_cv_C23
8156+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${CC} is a C23 compiler" >&5
8157+ printf %s "checking whether ${CC} is a C23 compiler... " >&6; }
8158+ if test ${r_cv_C23+y}
8159+ then :
8160+ printf %s "(cached) " >&6
8161+ else case e in #(
8162+ e) if test "$cross_compiling" = yes
8163+ then :
8164+ r_cv_C23=no
8165+ else case e in #(
8166+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8167+ /* end confdefs.h. */
8168+
8169+ #ifdef __STDC_VERSION__
8170+ # if __STDC_VERSION__ < 202000L
8171+ # error "Compiler does not claim C23 conformance"
8172+ # endif
8173+ #else
8174+ # error "Compiler does not advertise ISO C conformance"
8175+ #endif
8176+
8177+ // Most new features have feature tests. but bool type is fundamental.
8178+
8179+ int main(void) {
8180+ bool x = true;
8181+
8182+ return 0;
8183+ }
8184+
8185+
8186+ _ACEOF
8187+ if ac_fn_c_try_run "$LINENO"
8188+ then :
8189+ r_cv_C23=yes
8190+ else case e in #(
8191+ e) r_cv_C23=no ;;
8192+ esac
8193+ fi
8194+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8195+ conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
8196+ esac
8197+ fi
8198+ ;;
8199+ esac
8200+ fi
8201+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $r_cv_C23" >&5
8202+ printf "%s\n" "$r_cv_C23" >&6; }
8203+
8204+ fi
8205+ if test x${r_cv_C23} = xno; then
8206+ unset r_cv_C23
8207+ CC23="${CC_SUB} -std=gnu2x"
8208+ CC=${CC23}
8209+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${CC} is a C23 compiler" >&5
81568210printf %s "checking whether ${CC} is a C23 compiler... " >&6; }
81578211if test ${r_cv_C23+y}
81588212then :
@@ -27529,7 +27583,7 @@ _ACEOF
2752927583# flags.
2753027584r_save_CFLAGS=$CFLAGS
2753127585CFLAGS="$CFLAGS $r_verb"
27532- (eval echo $as_me:27532 : \"$ac_link\") >&5
27586+ (eval echo $as_me:27586 : \"$ac_link\") >&5
2753327587r_c_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
2753427588echo "$r_c_v_output" >&5
2753527589CFLAGS=$r_save_CFLAGS
@@ -27607,7 +27661,7 @@ _ACEOF
2760727661# flags.
2760827662r_save_CFLAGS=$CFLAGS
2760927663CFLAGS="$CFLAGS $r_cv_prog_c_v"
27610- (eval echo $as_me:27610 : \"$ac_link\") >&5
27664+ (eval echo $as_me:27664 : \"$ac_link\") >&5
2761127665r_c_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
2761227666echo "$r_c_v_output" >&5
2761327667CFLAGS=$r_save_CFLAGS
0 commit comments