From patchwork Thu Oct 27 05:55:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dufresne via libcamera-devel X-Patchwork-Id: 17696 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id F0138C3287 for ; Thu, 27 Oct 2022 05:55:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7AA0562F7F; Thu, 27 Oct 2022 07:55:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1666850132; bh=DdOeO4Y73eQfxf8oqth1QoKEXEDG56YIYNMB+7UXQco=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=p4K5bkJ3qOPZdfKov3d34VDQOGLeryi96islWnbt6tV3XCDirhWzqUFX+ZL4VIMgu czQD80/wLaapqUAce1XlL0wY5g7nVDz1F+zPLOVDQ0RZcpgPrhCD7+/nhg9hCGhHrg UQi41FQzEdZqGb1YymQz82cnIcdc4m4NUEIndKOg9ds3qrPtIPuKW/qYfc3yf8u0On V4NGvAeE4iKJHaS7ZyIup45CDvDDXUlS+qNVZj/0sApKUUn0YLmqwzz0TjvZz7ocSb PlTpc8CBgNbPrpJBTRlhvjTB1PRsR3Kih7yu17r/onAVJAEZEVhda+0+zlQkgCqWmC YnxFuPDVHXJjw== Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 58EAB62F7A for ; Thu, 27 Oct 2022 07:55:26 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=rothemail-net.20210112.gappssmtp.com header.i=@rothemail-net.20210112.gappssmtp.com header.b="U5F6oHtf"; dkim-atps=neutral Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-13c569e5ff5so290885fac.6 for ; Wed, 26 Oct 2022 22:55:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rothemail-net.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=53GjDLX02zSG1mRkq78FTX8/GBMkyCcDPMdpbL8fvGw=; b=U5F6oHtfHHXReLZdD4TsWJHW5qbyHVLnmgnNHNPGrPBDddyX/wbbiSssU1X+E5Z6jz 534OAGsaI/O/iQ/ZouR/rY+CLdOk65NfjjOzZLLreoxZ0F+/PNCV1md8AOslARZxbcv8 wv1E+woo0gH/RIPCC6PZ5Rac4DIXxOaUGJkVbEZaAnZ0/A4cBcIvHNtl/MjefcAPg8SS OnnDLThDXtaMXIp8GrSj9lbTHL5rM+Uf8/EWzFXyr90pubc9zcDl4bF6UnHcDm0bEvqD Y2Aepx7BcX8qBCGOs2LGT573gL500mLbhWVZrE4Pa2yXT/KAs5SFMbqTJKDibaidceOf p9eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=53GjDLX02zSG1mRkq78FTX8/GBMkyCcDPMdpbL8fvGw=; b=WqDblqgKM5WUJHgqgkj/P1AM6bt/BpX+m1SKmnaJuVtIg6TUCvW8oGlH9VBKHvVZOk 8i29zSRgAubNHZSAcPefr3sZNEwqSblnBSMlL++PAj9qmvsqwrsXfqDwvoMqdlW+wTXh HuwV0lFb4BSWYmT5LveTuy9dl9diowIMYbsQb7LhQWw1d3/YibyhX3A1pgdk1o1NGuyq J7Wnz34GM3sW1O+JmT+fcJlFrczdcvp4fF2bM9ShfPFlz1SnFBCmne+VPdNmomqg9RxY 07xTl3hhExyuTnF3IXJtHDRgAQ+ndcJ/fHHsC8BvO/DBditXEQ6ikfrkS+to0TS+3aY1 Br7Q== X-Gm-Message-State: ACrzQf2dacf2jzhftnnBT/1EYit7bfbPWm0S1hp1Z7LqcbiZnXkYjo/J lnMjB8q8hAamQ362Jv+FWHbpFKqysXbxAXBR X-Google-Smtp-Source: AMsMyM4kgUGh/dhSChYgqlKX0nIrhVuzlS0ESvw0Y4h3qaq4kzWZwl5pQaUukg9sT3TENigKdjGSLg== X-Received: by 2002:a05:6870:248a:b0:131:8e5d:1bb4 with SMTP id s10-20020a056870248a00b001318e5d1bb4mr4342459oaq.261.1666850125636; Wed, 26 Oct 2022 22:55:25 -0700 (PDT) Received: from nroth-pc.attlocal.net ([2600:1700:20:20c0:6406:fc7a:e46d:1666]) by smtp.gmail.com with ESMTPSA id 9-20020a9d0c09000000b00661a05691fasm140021otr.79.2022.10.26.22.55.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 22:55:25 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Thu, 27 Oct 2022 00:55:12 -0500 Message-Id: <20221027055515.321791-8-nicholas@rothemail.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221027055515.321791-1-nicholas@rothemail.net> References: <20221027055515.321791-1-nicholas@rothemail.net> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 07/10] libcamera: make libdl optional when provided X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Nicholas Roth via libcamera-devel From: Nicolas Dufresne via libcamera-devel Reply-To: libcamera-devel@lists.libcamera.org Cc: nicholas@rothemail.net Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Nicholas Roth Currently, libdl is always required. Sometimes, the C++ runtime includes a dynamic loader, which is the case for Android. Additionally, Android 11 does not have libdl. This fix allows libcamera to build on Android. Signed-off-by: Nicholas Roth Reviewed-by: Jacopo Mondi --- src/libcamera/meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index 5f39d2e2..0494e808 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -65,7 +65,12 @@ subdir('ipa') subdir('pipeline') subdir('proxy') -libdl = cc.find_library('dl') +null_dep = dependency('', required : false) + +libdl = null_dep +if not cc.has_function('dlopen') + libdl = cc.find_library('dl') +endif libudev = dependency('libudev', required : false) libyaml = dependency('yaml-0.1', required : false)