From patchwork Thu Oct 27 22:41:32 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: 17708 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 94B91C3285 for ; Thu, 27 Oct 2022 22:41:54 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4105962FC7; Fri, 28 Oct 2022 00:41:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1666910514; 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=sxwqL9OL4tVILrBD5ev3B1bpLnpGuti20LInaPeCTerU5X3FVeqfdFqbU53oaRIEr moLL8ki+ZMZoJDpaFPJ4DuEl+B/TcANJh6cz+4IWvoXFLojCfQMXgZpBfzUq9cv67W UmBwtk3D11rgsXyu3c/W7jg6k+FXxONVAS2Jb+Pea9QbVTQdU3iDwjtkofe9Nl5VNV gu8rnqbgotlHbor+82AQr8psswywqRDTdGSovdXRV6hgQTfhk6KOVDyOnrhklc/Hdp UmGjKKjWhY7BObwsxedQkYqH93ejj5wtgE7QyXG/3NH8USFJ1GLy2pV4t/7qaEu8B4 lnTVTa6icdecQ== Received: from mail-oa1-x32.google.com (mail-oa1-x32.google.com [IPv6:2001:4860:4864:20::32]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A6DE962FA3 for ; Fri, 28 Oct 2022 00:41:46 +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="moDM8UQo"; dkim-atps=neutral Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-13c569e5ff5so3924659fac.6 for ; Thu, 27 Oct 2022 15:41:46 -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=moDM8UQooQl5RToLF+Kk+v6jlK4on+MCD28ZFa/OJ5CC2uSKgBzfSuAcPtHnZPESKF +crceF2AVQbedBgiFRWiqt6MAYJhtcYh+lbX/D1fD2sDnGdMffc8WNVR+9uDLStvDOGK WtKT5CXZu+aaj4shMvRWJCHbpXg+WokAFlgkxZIdYn09oUiTJ9jWC4TkDK5XTBP6C/wt TOvpRlOi2n/jEQTWwHBDsubUhHq+N6RVQvHoXjvTKguu5kgVek7nXyPNhqjisV6aLNN2 RtZxQJUy9xf6pgWzDMqAvOsKA9jVL8+V4YCcUt8eI6pHo/a2qx1DDUd2NiSQw0cDAufZ Px1g== 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=2kJm/9tYmT5Km+mzR9/XnqHHtOjPLxykdbFEZSdJT5Wei40p3CQhE+FTRvJXmlWvw+ gE5mvYQ38ZdZYjrRwmEQ6HHL5oVhuL86IVVWA7H0zkw1cL0hOC93eIXfz79ljqNqRQ/x ppmEjxb7ratJcYaJMB5+1C2qEJfrDNz7xmw2Wj5uEH/BOCxo4/y/8vfZ1Dso4Q1TAAu1 jrGkYkI/kU2Q66Hs7F9/PUqVhnJInaiM0h42eAKzqUbGXrB6r8a0FEZHszBXckelca26 d89Nv2At7vj9OW20kfJUEqHod1yDZp4yAKKJVaSt2BWA0Ctpgg4KsUZmEbsKFI4T2G7U 1yZw== X-Gm-Message-State: ACrzQf2xzjUXEA4/zo1iAkWOrBN0384rXV9Wyna9q0tLWKx07u2mMxSE HNiAQU+nzg4GhlPXfkcjrmeCvKYdaQl6xkKC X-Google-Smtp-Source: AMsMyM67RqVI+1tYEIQrW9p3xTW62YizYxx9blcCPc04vSHy4cKyotoursw1Rqp6+MR+ikk3aFynHw== X-Received: by 2002:a05:6870:c105:b0:12c:8f0c:e23c with SMTP id f5-20020a056870c10500b0012c8f0ce23cmr6808412oad.42.1666910504871; Thu, 27 Oct 2022 15:41:44 -0700 (PDT) Received: from nroth-pc.attlocal.net ([2600:1700:20:20c0:6a4b:7aa7:dda2:75cb]) by smtp.gmail.com with ESMTPSA id r20-20020a056830419400b006619533d1ddsm976825otu.76.2022.10.27.15.41.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Oct 2022 15:41:44 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Thu, 27 Oct 2022 17:41:32 -0500 Message-Id: <20221027224135.348115-8-nicholas@rothemail.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221027224135.348115-1-nicholas@rothemail.net> References: <20221027224135.348115-1-nicholas@rothemail.net> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 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 --- 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)