From patchwork Tue Jun 25 09:06:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Zhili X-Patchwork-Id: 50145 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:ae71:0:b0:482:c625:d099 with SMTP id w17csp2505443vqz; Tue, 25 Jun 2024 02:07:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUG5RdZ/3RXFritUoN20IPHJdfb5mVZ/RaDmWe9G9OuQswudNkrlWRwOy2hcjYeEyYf6eZQFYDJTrCt7naGPPTQNhKRpAc4Xgxgug== X-Google-Smtp-Source: AGHT+IFxBer6eayaQ+4ovdkPqbZvusJpdlNnr+iX+51rPhIyNwfnoYj+Xe5WaedLRs8Q1CzMr1lW X-Received: by 2002:a05:6512:358b:b0:52c:dea7:f22c with SMTP id 2adb3069b0e04-52ce1832b4cmr3497445e87.2.1719306433075; Tue, 25 Jun 2024 02:07:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719306433; cv=none; d=google.com; s=arc-20160816; b=zyzh3MIf9SF3/4Hc4p0S/runpbwDJnv+qBTD24Nz7rp1XERnt+Q4Oe+6/QfUyazZAJ IbeeEJPRKxcJ2axuRSmr3nnHZUfNShfbZ4S2o6NdHwC6pylJWPCv4ouYHXhPi82og01M PH7cZQ2TiIE9r3SpX7VKmmzEFqAcpe8r8zxhVastMYXEEq51QYap4fP8CYLX86YsCfKh Tj+PIlUdBVuprObjNE/AqLmL4i3dJwr+PpuBl1MFUFid7W13y608IOGE9pNhFQV3C2g3 3KzJnAoi5GYVXiSd02x8xtK02kVFKdrgOxbjK2kk4WWl7jJtm54JcMILRpbPlqzpqRTM mwZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:date:to:from:message-id :dkim-signature:delivered-to; bh=G+EhllmS7u/mjtKJVsgG+UBNl7fGtWjcSGkwVtXAml8=; fh=HnHYuZ9XgUo86ZRXTLWWmQxhslYEI9B9taZ5X1DLFfc=; b=KbTRLqf9vZOJSWb7PP0mbaFfnwSYolNbyn2nOqZX5jYdGXNwGgAjxd8MqDzKImt4tM qcJF5baUsZSWv0etIpc0mBUAzD8sWHlg4mTRhoX3vz6a3LztGk9suJro7Sk5OSz5UYl5 skwmcJcwfmExmqjaU4FvU/giDshTofFspssunXj4jfuXSSQ7PkFFlJh8wnCPtUmXsjts 7qWy61t+2IocQdZB8qAfl+ivxGGm+/65/kSSsvt6MynW/xuF7R1nSiSMsg/hoEnvc3UK 5UyZdrwlE2zfbsTAVKdjzP3xqHiJrv3kRIn0CMsKnqj/ZfqRGc/ETrr46qFFAZLwWQHj utSg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@foxmail.com header.s=s201512 header.b=uzL0D7FO; 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=foxmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-52cd63bca66si2783803e87.157.2024.06.25.02.07.12; Tue, 25 Jun 2024 02:07:13 -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=@foxmail.com header.s=s201512 header.b=uzL0D7FO; 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=foxmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3167568D58B; Tue, 25 Jun 2024 12:07:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out203-205-221-205.mail.qq.com (out203-205-221-205.mail.qq.com [203.205.221.205]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 17F8F68C4B3 for ; Tue, 25 Jun 2024 12:06:59 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1719306408; bh=fM5PBzSttWIrQCQQfLvCJxutr/XOIGsCmkKJD6YN/xk=; h=From:To:Cc:Subject:Date; b=uzL0D7FOdXX6H/u2auo2ADqI/9CUX0JrmBIHRxD5xgRk32sUpa7XTpNpfDtgWU2Ug 4heR6AuIM3Y6T6x8h0IkrpjME9LmeRdzR5xitMgJxts9U3hjqanPYHzyzz9K86WvjN Yl4BAbzwAlcC9Cl81GXxfEjS2a181Mfo6w2ghuik= Received: from ZHILIZHAO-MB1.tencent.com ([119.147.10.192]) by newxmesmtplogicsvrszb16-1.qq.com (NewEsmtp) with SMTP id 1AF3BEFD; Tue, 25 Jun 2024 17:06:47 +0800 X-QQ-mid: xmsmtpt1719306407tlyno8djn Message-ID: X-QQ-XMAILINFO: OZsapEVPoiO692zZB5ypniSPZdAelIe+mpZTF+0MdOX8AElrf4w59GWYvpnTOU V9OPR4JAcWH3KROh7ulEIXcdxyAiO9E86AGzV891BXC6Co/JVwWFI+h6VyjEljNOCPmsa+7TcaVk uD3dGszvP1uixxXRF4D8V2QqR6I4BZ9tuEJMqtvz+z1anRNRPMP/WUpk/sLbrqTYx9V8a7/L6d4d rCKclsR9kfeCu1nPHUyfJ2jiYyIQJ7dLQeonbI9TyIOruTgMotlKgaMgsNixIObobm9dq2TfY/pu zbelKeksPZogZxYyN9U4xJ3DU33pD/BRIqIonTd9Lq1VTOvnF1zDyRiTFFgkypdwp4Wnr1vyXBS0 w9z5G6ZZkK235KyQeWScRhe5jYexdt7o/RtB0oqeMCN+1rZ80FAr7cfo8hK9LSSefpLnschYDZk6 r/hpHJisitsnsEHiNcrkkUPIBLysTXZZI/K3lMxDgoz+Aq8qaqS5xk2Cfd60t8YT1ciS0AbefxRg PdO8xhPyGSpinc/wq6tP3zFBip2OoRe197beUXsP76ND8mUsQDCy79yBhHo04cklqhwZKNuL38wi o4cNi6dbORBfEnRrSnRNSZ4meLQRUpk+jipDPbgs9yzf/QX6FWgT4n/ukZ9W9oekRixt3P3wUcGN kjC2SJcTjInYq+nk6Ath1ie5vwF8CTR0bpda7mERwQSH5I8TQ0XqopYAqlbIlWCosnVnmMnA+AVl 7zM9jrYHXbboFdOR2Ys/gaNb0d9WdecjJqh7/lunEhxoEbNa1MtF9h7NfC0BvItanSbFo0zy7GAW mEkPkjr/LmInxYU5s+ygoYcA5RDzyAq6ilT1hzQdCW2ZDgFaRZjirU9UbtsgIwsc7OoMwn/cvCoh bqFlta+EclacIZU5VyYoVPwgj2c2kDwl7obWWH53EVH8Opy5xUGFQoRlE7AAA/PMa1aBMpMZRne3 mUlOs5gkNNXHFe24KGjDFnioMQRp12nJyFDzzcUbKK6c0V4UlZYz0uTnHQlW7A X-QQ-XMRINFO: OD9hHCdaPRBwq3WW+NvGbIU= From: Zhao Zhili To: ffmpeg-devel@ffmpeg.org Date: Tue, 25 Jun 2024 17:06:46 +0800 X-OQ-MSGID: <20240625090646.5787-1-quinkblack@foxmail.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] configure: Fix Apple framework dependencies in .pc file X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: Zhao Zhili Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: lUNS5HSTIUfO From: Zhao Zhili configure use "-Wl,-framework,foo" and "-framework foo" to specify dependencies on Apple frameworks. These two styles essentially do the same thing when build ffmpeg. However, they do make difference when generate pkg-config files. Some tools interact with pkg-config cannot handle "-Wl,-framework,foo" in Libs field, e.g., cmake with pkg_check_modules. Signed-off-by: Zhao Zhili --- configure | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 3bca638459..a09c92cfb2 100755 --- a/configure +++ b/configure @@ -7033,7 +7033,7 @@ enabled openal && { check_pkg_config openal "openal >= 1.1" "AL/al.h" { test_cpp_condition "AL/al.h" "defined(AL_VERSION_1_1)" || die "ERROR: openal must be installed and version must be 1.1 or compatible"; } enabled opencl && { check_pkg_config opencl OpenCL CL/cl.h clEnqueueNDRangeKernel || - check_lib opencl OpenCL/cl.h clEnqueueNDRangeKernel -Wl,-framework,OpenCL || + check_lib opencl OpenCL/cl.h clEnqueueNDRangeKernel "-framework OpenCL" || check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL || die "ERROR: opencl not found"; } && { test_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" || @@ -7041,8 +7041,8 @@ enabled opencl && { check_pkg_config opencl OpenCL CL/cl.h clEnqueueN die "ERROR: opencl must be installed and version must be 1.2 or compatible"; } enabled opengl && { check_lib opengl GL/glx.h glXGetProcAddress "-lGL" || check_lib opengl windows.h wglGetProcAddress "-lopengl32 -lgdi32" || - check_lib opengl OpenGL/gl3.h glGetError "-Wl,-framework,OpenGL" || - check_lib opengl ES2/gl.h glGetError "-isysroot=${sysroot} -Wl,-framework,OpenGLES" || + check_lib opengl OpenGL/gl3.h glGetError "-framework OpenGL" || + check_lib opengl ES2/gl.h glGetError "-isysroot=${sysroot} -framework OpenGLES" || die "ERROR: opengl not found." } enabled omx_rpi && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoRequestIFrame || @@ -7110,12 +7110,12 @@ if enabled decklink; then fi enabled securetransport && - check_func SecIdentityCreate "-Wl,-framework,CoreFoundation -Wl,-framework,Security" && - check_lib securetransport "Security/SecureTransport.h Security/Security.h" "SSLCreateContext" "-Wl,-framework,CoreFoundation -Wl,-framework,Security" || + check_func SecIdentityCreate "-framework CoreFoundation -framework Security" && + check_lib securetransport "Security/SecureTransport.h Security/Security.h" "SSLCreateContext" "-framework CoreFoundation -framework Security" || disable securetransport enabled securetransport && - check_func SecItemImport "-Wl,-framework,CoreFoundation -Wl,-framework,Security" + check_func SecItemImport "-framework CoreFoundation -framework Security" enabled schannel && check_func_headers "windows.h security.h" InitializeSecurityContext -DSECURITY_WIN32 -lsecur32 &&