From patchwork Thu Nov 24 05:54:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wan-Teh Chang X-Patchwork-Id: 1544 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.90.1 with SMTP id o1csp12434vsb; Wed, 23 Nov 2016 21:56:42 -0800 (PST) X-Received: by 10.194.24.102 with SMTP id t6mr511597wjf.111.1479967002186; Wed, 23 Nov 2016 21:56:42 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id fh2si35127212wjb.52.2016.11.23.21.56.41; Wed, 23 Nov 2016 21:56:42 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5FC5368988E; Thu, 24 Nov 2016 07:56:34 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf0-f178.google.com (mail-pf0-f178.google.com [209.85.192.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 476E668921C for ; Thu, 24 Nov 2016 07:56:28 +0200 (EET) Received: by mail-pf0-f178.google.com with SMTP id i88so7835361pfk.2 for ; Wed, 23 Nov 2016 21:56:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=1MGToR2HdLqixM10IEgs5Go6N6WMozTPMoafWrypdsc=; b=Rp7HrfnR1uuUoK7voq6XFHsuePs0ce+WZjxmRojrPoxLEvebHQa/T/jsrsCIXw2icQ UjP5cFbDqfMewSwAjsYR2jlL3m7aDmbW/faGR6mZuZHgucUNvUKJcWfP61qxKkj+Hiuq 6zkhAeBO6NVKKv+XE6GacrICqJuU3NZ2mvnt2Na8SiusJuokr6Wp1go3Ovs2KDIrtvDo 1IwNj2tKabeISDsY+kkYyAHB16ZQcLz+nhk7mS6BUjyvtYVOxvCfGQ+3rz2R1zlCqD8Q U3aToTv/u47aPlTtztybyCJLyj+cmEaxG8CEyBp66uVWDVCOaJoPEWfGmazq1Qyt76dz 8e3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1MGToR2HdLqixM10IEgs5Go6N6WMozTPMoafWrypdsc=; b=XA/xi0J+buaxWFhK9ahSSGJ78mWcpsK5puvFu9WGOWuX0+4wEFDAAjpDQckY5RI8eU F6xhBM1Tqbh0cK6UekcdgM2xwCCEbYU4cIpVKQuyrO8+B8+oLB/jB6J9ABeomT1edaZW MXk/r/IFdraopL9q0pxc+ICGlUpnzo0Dk9AhbMRG0c2SpGHrwoaDIiVFuZ+yhQWJg/Gq HHhjKvx8pijHL2gprdUBJa1HMdm5yLkQmPkWRjf4GwJcENvI3861t57RB9dabos1sWZ8 ioawnx14N573o3/X92ldIwhcxRRY/C0UV5apOmVYF40nbI+/ldQZeQ6IqNPBckesI+/s ggvg== X-Gm-Message-State: AKaTC005u8xeunY04T3IAjBcLAJ8p44+wCFKFi7Z237dnRoxGiHY32BQx7sNjcjmt7vaUoaW X-Received: by 10.99.48.68 with SMTP id w65mr1312208pgw.68.1479966989934; Wed, 23 Nov 2016 21:56:29 -0800 (PST) Received: from wtc-desktop.mtv.corp.google.com ([100.98.5.56]) by smtp.googlemail.com with ESMTPSA id q2sm38833788pga.8.2016.11.23.21.56.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Nov 2016 21:56:29 -0800 (PST) From: Wan-Teh Chang To: ffmpeg-devel@ffmpeg.org Date: Wed, 23 Nov 2016 21:54:53 -0800 Message-Id: <1479966893-87403-1-git-send-email-wtc@google.com> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 Subject: [FFmpeg-devel] [PATCH] configure: check for stdatomic.h X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Anton Khirnov MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Anton Khirnov Since this is a C11 feature, it requires -std=c11. Not actually used for anything yet, that will be added in the following commits. This merges libav commit 13f5d2bf75b95a0bfdb9940a5e359a719e242bed. Signed-off-by: Wan-Teh Chang --- configure | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 875fbf3..0176f9c 100755 --- a/configure +++ b/configure @@ -1189,6 +1189,19 @@ check_cpp_condition(){ EOF } +test_cflags_cpp(){ + log test_cflags_cpp "$@" + flags=$1 + condition=$2 + shift 2 + set -- $($cflags_filter "$flags") + check_cpp "$@" <= 201112L"; then + add_cflags -std=c11 +else + check_cflags -std=c99 +fi + check_cc -D_FILE_OFFSET_BITS=64 < EOF @@ -5568,6 +5590,11 @@ check_header windows.h check_header X11/extensions/XvMClib.h check_header asm/types.h +# it seems there are versions of clang in some distros that try to use the +# gcc headers, which explodes for stdatomic +# so we also check that atomics actually work here +check_builtin stdatomic_h stdatomic.h "atomic_int foo; atomic_store(&foo, 0)" + check_lib2 "windows.h shellapi.h" CommandLineToArgvW -lshell32 check_lib2 "windows.h wincrypt.h" CryptGenRandom -ladvapi32 check_lib2 "windows.h psapi.h" GetProcessMemoryInfo -lpsapi