From patchwork Sat Apr 22 11:09:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Oliver X-Patchwork-Id: 3472 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.3.129 with SMTP id 123csp684661vsd; Sat, 22 Apr 2017 04:17:28 -0700 (PDT) X-Received: by 10.223.163.68 with SMTP id d4mr1147002wrb.134.1492859848430; Sat, 22 Apr 2017 04:17:28 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id e124si6902810wmd.98.2017.04.22.04.17.28; Sat, 22 Apr 2017 04:17:28 -0700 (PDT) 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=@gmail.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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8ADCE689A21; Sat, 22 Apr 2017 14:17:25 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-io0-f176.google.com (mail-io0-f176.google.com [209.85.223.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 959EC68096F for ; Sat, 22 Apr 2017 14:17:18 +0300 (EEST) Received: by mail-io0-f176.google.com with SMTP id r16so138124798ioi.2 for ; Sat, 22 Apr 2017 04:17:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=m902STviiH9w6pkBy33YaRzAufZr3+sfaH2DdIz2NNM=; b=pde0zIoz3kHoOcM35wpQPPL+2SB7XWzKZZd+XPsP9xfP9H2THNHHghqrBA92VE59Cn 1LCZxPcl4q/ylK1arEaiDvu3FFNwbSF3F/adQT2dYAy5XqWIzGBDuCCGXy6Z50aEDvtt R/CH2fzasVOjRXrTXIc0zm9xpU0dij9GCSczGtZs5B+KVWKq21WgWtxi2L3y/zFzF7Aw q+zoupKwawZlu/WhCorVI2+8M/cHAV2crvpMkCM8odNFvYgmQIwHBC5mcSvhVBl9jSTS o3rScdVyF0IeKtjAFPhH589P/gtxlNaLqIEXw2BeDRaxXDWQQNH7CzJIHYu+HLwXekmC NL1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=m902STviiH9w6pkBy33YaRzAufZr3+sfaH2DdIz2NNM=; b=foMdNUwCMUuKYLu5caq0U/ftYLUQzB1Sx1OE8E3IXLkODs6KhVCINCQi6MmnhD8TXK Q5NsDw21wugkHbJ0rpv07cscx9Zowv8N7Msmrdlg63iAIQwKGhAMYvDDe5AiAvBgjdqb UJl/t0lfroZGLxX7tRQrfrc9QmxmmlRrr3O0ZiN5WKWe+bPq6Jhq39YnagUhjryD0+t+ DCVGVkKKPlve2lIby/ka7WDWy7bbgSpVXgzoHDDptPERYO/3w9vMcOHJTdTXMBndAEQ7 83GrauExw4ry3rzV+WYoOaTfgB5n534pIWZrZD3oObjovwxS1DqVF1lrsueJXtT1v1hg c13Q== X-Gm-Message-State: AN3rC/5nV4EeCa58qjl84Fe4SsIGGDo6MsgJ2FCDTLOu8/Sf4kukuZig TSZzudrZK7TKtd1okN5zo6E/ruXyxL9d+1U= X-Received: by 10.107.34.201 with SMTP id i192mr477516ioi.222.1492859351474; Sat, 22 Apr 2017 04:09:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.40.208 with HTTP; Sat, 22 Apr 2017 04:09:10 -0700 (PDT) From: Matt Oliver Date: Sat, 22 Apr 2017 21:09:10 +1000 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] [PATCH] configure: Correct detection of pre-processor defines for configure _LISTS. 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Currently the find_things configure function will scan a code file (e.g. allfilters.c) and then create a list of pre-processor values to be added to configure. Unfortunately the way it currently does it is incorrect with what the original c code expects. For example the following exists in allfilters.c: REGISTER_FILTER(FREI0R, frei0r_src, vsrc); where REGISTER_FILTER is defined as: #define REGISTER_FILTER(X, x, y) { extern AVFilter ff_##y##_##x; if (CONFIG_##X##_FILTER) avfilter_register(&ff_##y##_##x); } In c code this will check a configuration pre-processor define called CONFIG_FREI0R_FILTER and then register the filter if currently set. The issue arises in that configure currently looks for REGISTER_FILTER but when found it will use the second parameter in the macro to create the configuration option. So it will actually return that the pre-processor define is CONFIG_FREI0R_SRC_FILTER and not CONFIG_FREI0R_FILTER as the source code actually expects. This patch changes the behaviour to match what the c code expects by using the first parameter in the macro to create configure values. Since the first parameter is in upper case it needs to be converted to lower case to be usable within configure (this may be why currently the incorrect - although lower case 2nd parameter is currently used). --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ENCODER_LIST=$(find_things encoder ENC libavcodec/allcodecs.c) diff --git a/configure b/configure index e6fe05a6ee..346dbc660b 100755 --- a/configure +++ b/configure @@ -3366,7 +3366,7 @@ find_things(){ thing=$1 pattern=$2 file=$source_path/$3 - sed -n "s/^[^#]*$pattern.*([^,]*, *\([^,]*\)\(,.*\)*).*/\1_$thing/p" "$file" + sed -n "s/^[^#]*$pattern.*(\([^,]*\), *\([^,]*\)\(,.*\)*).*/\1_$thing/p" "$file" | tr '[:upper:]' '[:lower:]' }