From patchwork Fri Apr 12 14:07:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2435961 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 62E8F3FD1A for ; Fri, 12 Apr 2013 14:09:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4B4AEE60F3 for ; Fri, 12 Apr 2013 07:09:20 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [95.142.166.194]) by gabe.freedesktop.org (Postfix) with ESMTP id 09DA1E5F1C for ; Fri, 12 Apr 2013 07:07:44 -0700 (PDT) Received: from avalon.ideasonboard.com (unknown [91.178.242.31]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4DB5A35A4D; Fri, 12 Apr 2013 16:07:24 +0200 (CEST) From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Subject: [PATCH] kms: Allow compiling libkms without Intel support Date: Fri, 12 Apr 2013 16:07:41 +0200 Message-Id: <1365775661-4880-1-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.8.1.5 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Signed-off-by: Laurent Pinchart --- libkms/Makefile.am | 5 ++++- libkms/linux.c | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/libkms/Makefile.am b/libkms/Makefile.am index 215450a..518021f 100644 --- a/libkms/Makefile.am +++ b/libkms/Makefile.am @@ -15,10 +15,13 @@ libkms_la_LIBADD = ../libdrm.la libkms_la_SOURCES = \ internal.h \ linux.c \ - intel.c \ dumb.c \ api.c +if HAVE_INTEL +libkms_la_SOURCES += intel.c +endif + if HAVE_VMWGFX libkms_la_SOURCES += vmwgfx.c endif diff --git a/libkms/linux.c b/libkms/linux.c index eec0162..d160bc8 100644 --- a/libkms/linux.c +++ b/libkms/linux.c @@ -101,8 +101,12 @@ linux_from_sysfs(int fd, struct kms_driver **out) if (ret) return ret; - if (!strcmp(name, "intel")) + if (0) + {} +#ifdef HAVE_INTEL + else if (!strcmp(name, "intel")) ret = intel_create(fd, out); +#endif #ifdef HAVE_VMWGFX else if (!strcmp(name, "vmwgfx")) ret = vmwgfx_create(fd, out);