From patchwork Fri Jan 26 16:45:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Engestrom X-Patchwork-Id: 10186607 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 184DE60383 for ; Fri, 26 Jan 2018 16:46:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0963729E9F for ; Fri, 26 Jan 2018 16:46:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F24292A1A4; Fri, 26 Jan 2018 16:46:49 +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 9ADA329E9F for ; Fri, 26 Jan 2018 16:46:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BA97F6E417; Fri, 26 Jan 2018 16:46:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailapp01.imgtec.com (mailapp01.imgtec.com [195.59.15.196]) by gabe.freedesktop.org (Postfix) with ESMTP id 924016E32F for ; Fri, 26 Jan 2018 16:46:18 +0000 (UTC) Received: from HHMAIL01.hh.imgtec.org (unknown [10.100.10.19]) by Forcepoint Email with ESMTPS id 0D579EB7ACF16 for ; Fri, 26 Jan 2018 16:46:13 +0000 (GMT) Received: from localhost.localdomain (10.60.4.28) by HHMAIL01.hh.imgtec.org (10.100.10.21) with Microsoft SMTP Server (TLS) id 14.3.361.1; Fri, 26 Jan 2018 16:46:16 +0000 From: Eric Engestrom To: Subject: [PATCH libdrm 08/13] meson, configure: always define HAVE_{INTE, VMWGFX, NOUVEAU, EXYNOS, VC4, RADEON} Date: Fri, 26 Jan 2018 16:45:47 +0000 Message-ID: <20180126164552.5473-8-eric.engestrom@imgtec.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180126164552.5473-1-eric.engestrom@imgtec.com> References: <20180126164552.5473-1-eric.engestrom@imgtec.com> MIME-Version: 1.0 X-Originating-IP: [10.60.4.28] X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Eric Engestrom --- configure.ac | 14 ++++++++++++++ libkms/linux.c | 10 +++++----- meson.build | 4 +--- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index a0449404eaddfd347d60..e09eded5884da7891862 100644 --- a/configure.ac +++ b/configure.ac @@ -362,16 +362,22 @@ AM_CONDITIONAL(HAVE_LIBKMS, [test "x$LIBKMS" = xyes]) AM_CONDITIONAL(HAVE_INTEL, [test "x$INTEL" = xyes]) if test "x$INTEL" = xyes; then AC_DEFINE(HAVE_INTEL, 1, [Have intel support]) +else + AC_DEFINE(HAVE_INTEL, 0) fi AM_CONDITIONAL(HAVE_VMWGFX, [test "x$VMWGFX" = xyes]) if test "x$VMWGFX" = xyes; then AC_DEFINE(HAVE_VMWGFX, 1, [Have vmwgfx kernel headers]) +else + AC_DEFINE(HAVE_VMWGFX, 0) fi AM_CONDITIONAL(HAVE_NOUVEAU, [test "x$NOUVEAU" = xyes]) if test "x$NOUVEAU" = xyes; then AC_DEFINE(HAVE_NOUVEAU, 1, [Have nouveau (nvidia) support]) +else + AC_DEFINE(HAVE_NOUVEAU, 0) fi AM_CONDITIONAL(HAVE_OMAP, [test "x$OMAP" = xyes]) @@ -379,6 +385,8 @@ AM_CONDITIONAL(HAVE_OMAP, [test "x$OMAP" = xyes]) AM_CONDITIONAL(HAVE_EXYNOS, [test "x$EXYNOS" = xyes]) if test "x$EXYNOS" = xyes; then AC_DEFINE(HAVE_EXYNOS, 1, [Have EXYNOS support]) +else + AC_DEFINE(HAVE_EXYNOS, 0) fi AM_CONDITIONAL(HAVE_FREEDRENO, [test "x$FREEDRENO" = xyes]) @@ -396,6 +404,8 @@ fi AM_CONDITIONAL(HAVE_RADEON, [test "x$RADEON" = xyes]) if test "x$RADEON" = xyes; then AC_DEFINE(HAVE_RADEON, 1, [Have radeon support]) +else + AC_DEFINE(HAVE_RADEON, 0) fi if test "x$AMDGPU" != xno; then @@ -425,6 +435,8 @@ if test "x$AMDGPU" = xyes; then if test "x$have_cunit" = "xno"; then AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests]) fi +else + AC_DEFINE(HAVE_AMDGPU, 0) fi AM_CONDITIONAL(HAVE_TEGRA, [test "x$TEGRA" = xyes]) @@ -432,6 +444,8 @@ AM_CONDITIONAL(HAVE_TEGRA, [test "x$TEGRA" = xyes]) AM_CONDITIONAL(HAVE_VC4, [test "x$VC4" = xyes]) if test "x$VC4" = xyes; then AC_DEFINE(HAVE_VC4, 1, [Have VC4 support]) +else + AC_DEFINE(HAVE_VC4, 0) fi AM_CONDITIONAL(HAVE_ETNAVIV, [test "x$ETNAVIV" = xyes]) diff --git a/libkms/linux.c b/libkms/linux.c index 0b50777efbc8ae3ba66d..1431eb1078307ecebe54 100644 --- a/libkms/linux.c +++ b/libkms/linux.c @@ -110,27 +110,27 @@ linux_from_sysfs(int fd, struct kms_driver **out) if (ret) return ret; -#ifdef HAVE_INTEL +#if HAVE_INTEL if (!strcmp(name, "intel")) ret = intel_create(fd, out); else #endif -#ifdef HAVE_VMWGFX +#if HAVE_VMWGFX if (!strcmp(name, "vmwgfx")) ret = vmwgfx_create(fd, out); else #endif -#ifdef HAVE_NOUVEAU +#if HAVE_NOUVEAU if (!strcmp(name, "nouveau")) ret = nouveau_create(fd, out); else #endif -#ifdef HAVE_RADEON +#if HAVE_RADEON if (!strcmp(name, "radeon")) ret = radeon_create(fd, out); else #endif -#ifdef HAVE_EXYNOS +#if HAVE_EXYNOS if (!strcmp(name, "exynos")) ret = exynos_create(fd, out); else diff --git a/meson.build b/meson.build index 15a9f523a498c137e369..6ed080ece9c3dff1a1e1 100644 --- a/meson.build +++ b/meson.build @@ -256,9 +256,7 @@ foreach t : [[with_intel, 'INTEL'], [with_vmwgfx, 'VMWGFX'], [with_exynos, 'EXYNOS'], [with_vc4, 'VC4'], [with_radeon, 'RADEON']] - if t[0] - config.set10('HAVE_@0@'.format(t[1]), true) - endif + config.set10('HAVE_@0@'.format(t[1]), t[0]) endforeach if with_freedreno_kgsl if not with_freedreno