On 8/6/2016 9:20 AM, Anton Khirnov wrote: > Quoting James Almer (2016-08-01 06:12:08) >> On 7/29/2016 8:52 AM, Anton Khirnov wrote: >>> Since this is a C11 feature, it requires -std=c11. >>> >>> Not actually used for anything yet, that will be added in the following >>> commits. >>> --- >>> configure | 30 +++++++++++++++++++++++++++++- >>> 1 file changed, 29 insertions(+), 1 deletion(-) >>> >>> diff --git a/configure b/configure >>> index f12fa6f..e09d366 100755 >>> --- a/configure >>> +++ b/configure >>> @@ -985,6 +985,19 @@ check_cpp_condition(){ >>> EOF >>> } >>> >>> +test_cflags_cpp(){ >>> + log test_cflags_cpp "$@" >>> + flags=$1 >>> + condition=$2 >>> + shift 2 >>> + set -- $($cflags_filter "$flags") >>> + check_cpp "$@" <<EOF >>> +#if !($condition) >>> +#error "unsatisfied condition: $condition" >>> +#endif >>> +EOF >>> +} >>> + >>> check_lib(){ >>> log check_lib "$@" >>> header="$1" >>> @@ -1504,6 +1517,7 @@ HEADERS_LIST=" >>> poll_h >>> sndio_h >>> soundcard_h >>> + stdatomic_h >>> sys_mman_h >>> sys_param_h >>> sys_resource_h >>> @@ -3669,7 +3683,15 @@ if test "$?" != 0; then >>> fi >>> >>> add_cppflags -D_ISOC99_SOURCE >>> -check_cflags -std=c99 >>> + >>> +# some compilers silently accept -std=c11, so we also need to check that >>> the >>> +# version macro is defined properly >>> +if test_cflags_cpp -std=c11 "__STDC_VERSION__ >= 201112L"; then >>> + add_cflags -std=c11 >> >> The proper thing to do would be to also define _ISOC11_SOURCE here, >> i think. > > How is that proper? AFAIK that macro is a non-standard gcc-specific > thing (and in gcc it does exactly the same thing as -std=c11).
It's libc, not gcc. and you're right that -std=c11 has the same effect. I assumed it didn't, so it's not really important then. _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel