From patchwork Tue Oct 17 12:13:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arkadiusz Hiler X-Patchwork-Id: 10011787 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B31CE600CC for ; Tue, 17 Oct 2017 12:13:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5CE228883 for ; Tue, 17 Oct 2017 12:13:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9AB7D28885; Tue, 17 Oct 2017 12:13:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3767D28883 for ; Tue, 17 Oct 2017 12:13:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D436F6E657; Tue, 17 Oct 2017 12:13:51 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 842B06E657 for ; Tue, 17 Oct 2017 12:13:50 +0000 (UTC) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP; 17 Oct 2017 05:13:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.43,390,1503385200"; d="scan'208"; a="1231705340" Received: from ahiler-desk1.fi.intel.com ([10.237.68.151]) by fmsmga002.fm.intel.com with ESMTP; 17 Oct 2017 05:13:43 -0700 From: Arkadiusz Hiler To: intel-gfx@lists.freedesktop.org Date: Tue, 17 Oct 2017 15:13:31 +0300 Message-Id: <20171017121331.15720-1-arkadiusz.hiler@intel.com> X-Mailer: git-send-email 2.13.6 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Subject: [Intel-gfx] [PATCH i-g-t] meson: Add fallback for xmlrpc discovery X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Since Debian-likes (including Ubuntu) ship xmlrpc packages predating the pkg-config era, we need to use xmlrpc-c-config to do the discovery. Also this patch adds HAVE_CHAMELIUM flag to config.h to get rid of "implicit declaration of function" warnings in case of meson build. Reviewed-by: Petri Latvala Signed-off-by: Arkadiusz Hiler --- meson.build | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/meson.build b/meson.build index 310174a5..ac991c2f 100644 --- a/meson.build +++ b/meson.build @@ -69,9 +69,22 @@ xmlrpc = dependency('xmlrpc', required : false) xmlrpc_util = dependency('xmlrpc_util', required : false) xmlrpc_client = dependency('xmlrpc_client', required : false) +if not xmlrpc.found() + libs_cmd = run_command('xmlrpc-c-config', 'client', '--libs') + cflags_cmd = run_command('xmlrpc-c-config', 'client', '--cflags') + + if libs_cmd.returncode() == 0 and cflags_cmd.returncode() == 0 + xmlrpc = declare_dependency(compile_args: cflags_cmd.stdout().strip().split(), + link_args : libs_cmd.stdout().strip().split()) + xmlrpc_util = declare_dependency() + xmlrpc_client = declare_dependency() + endif +endif + if pixman.found() and xmlrpc.found() and xmlrpc_util.found() and xmlrpc_client.found() chamelium = declare_dependency(dependencies : [ pixman, xmlrpc, xmlrpc_util, xmlrpc_client]) + config.set('HAVE_CHAMELIUM', 1) else chamelium = dependency('', required: false) endif