From patchwork Fri Oct 28 03:17:23 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: 17719 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 0BCD3C3286 for ; Fri, 28 Oct 2022 03:17:44 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A0A9862FD3; Fri, 28 Oct 2022 05:17:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1666927063; 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=GJLiHkNKDYDwAnUtInU9Wnf+AzAcKiEFDEtEWYOzYOloqa7W9RZDR8dPVy26C9FpZ Bd/5Ct7JDBsnL778Cts/6plT/+yE+jCmqSsy1lNEO9mXuTuU6Ek27HBeUVejH4Q75f +BLXVMQIIvilNFrXtqFsboWiz/+rKYJmSGxPAfaJooJATYwGdEyxxf51LdLE+bR8n6 n6AzffBdghY6d7wICyti1lDwYdEfT5EulfonLtpJHaGLKVwYSKDyRWF5uXnhJdZlAq 4cgPQcwBfFYITfEPyfUjGoP5M33Rq50nCQkuYbBPzGVB73i6DARXW8OvVgot4qITuD +q6+q7QJDhv8g== Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4964462FA6 for ; Fri, 28 Oct 2022 05:17:36 +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="2L9GeHNW"; dkim-atps=neutral Received: by mail-oi1-x22d.google.com with SMTP id s125so4430956oib.6 for ; Thu, 27 Oct 2022 20:17:36 -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=2L9GeHNWaiXwoVHke/WHjBiSvTVLmvtpDNHFlECU/hK982l0J7yJq6RPKNh2kmTcf6 fi1Hpt5ifw6g2HuqdLEBzRlnYVMfq5NCjTjP+lmxw+XJz5Grmsd2TZInfRWFNx+5bMjV hNyijwwhXvc76PErsian/bggAvsbMOXKdZhj+enUE6Q3hDky4lBCcWfGw3HQGN4Wt4Aw 5iNs+y54i6JD21rYTM2Dxc7uvSjcAl06pL7PO8w9+BcY0ZHrp3hKL//h4QX3q8BfG/3L W8UpAE3xaK2y2DDXoV8+/xzJ1dF+ytKnlKZJ7LjCI8QwuLAuNIR/JxRLo8A1lerg9XoK g2VQ== 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=zBDi3nrWVsHJcyIydpKh+nuHEAPkUOMJGKgLz1/Nx0G+08XVudmo7ybEYK2pCAnRdl zKzVcFagFADCWKvdqhondLmA4Q6zB4RPFu9342Zg8+/wXYaRXTjKWUbPHtSkjAcxrTWf BfEwUvke9kb7POntjAK4PlTPUuQ6HH7Tam3KGmPEOLNfpFoo9hl40bitzryrk00tkcv3 1Fw7JPHmRjOd8bDRBdh4+PkWlZGHricm8BFr8l8KedPuDa0CUWKk4ZfT4jlFvkkT7JaZ OCCC1F+xwappq+22uP+cHi48gv+wSPgq+hfNIh4/7pgMUHYKrGITJ4POjVsoMf+Eodc9 Mc8w== X-Gm-Message-State: ACrzQf2I8Vu8yhkuS90TQjRzxEFEIyZUelTAwTm6AbaA/e5ObIsvTOQo B7cE0q7RulgPZez+dGf489RyPx5Ws4ZYxNxuUbw= X-Google-Smtp-Source: AMsMyM5sL5j5fycTQW+6i46MhQ3txIljRJf7h8iIm6eBSlbPiVzC/ytn2VlA6Addc5Ea8z7rvwg0Aw== X-Received: by 2002:a05:6808:1186:b0:353:b77a:a481 with SMTP id j6-20020a056808118600b00353b77aa481mr6804390oil.199.1666927054513; Thu, 27 Oct 2022 20:17:34 -0700 (PDT) Received: from nroth-pc.attlocal.net ([2600:1700:20:20c0:293a:90ce:6463:244d]) by smtp.gmail.com with ESMTPSA id fp19-20020a056870659300b0013626c1a5f6sm1527738oab.10.2022.10.27.20.17.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Oct 2022 20:17:34 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Thu, 27 Oct 2022 22:17:23 -0500 Message-Id: <20221028031726.4849-8-nicholas@rothemail.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221028031726.4849-1-nicholas@rothemail.net> References: <20221027224135.348115-1-nicholas@rothemail.net> <20221028031726.4849-1-nicholas@rothemail.net> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 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: Kieran Bingham 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)