From patchwork Wed May 25 18:18:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foss X-Patchwork-Id: 9136031 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 C4A6E607D5 for ; Wed, 25 May 2016 18:19:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBEF627B33 for ; Wed, 25 May 2016 18:19:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0C60282BB; Wed, 25 May 2016 18:19:11 +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, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 789E027B33 for ; Wed, 25 May 2016 18:19:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 75DBD6E9EC; Wed, 25 May 2016 18:19:07 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9FE1F6E9EC for ; Wed, 25 May 2016 18:19:05 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: robertfoss) with ESMTPSA id 1DC1B260B53 From: robert.foss@collabora.com To: daniel.vetter@ffwll.ch, daniel.stone@collabora.com, marius.c.vlad@intel.com, tomeu.vizoso@collabora.com, emil.velikov@collabora.com, chris@chris-wilson.co.uk Date: Wed, 25 May 2016 14:18:50 -0400 Message-Id: <1464200336-15671-2-git-send-email-robert.foss@collabora.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1464200336-15671-1-git-send-email-robert.foss@collabora.com> References: <1464200336-15671-1-git-send-email-robert.foss@collabora.com> Cc: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [RFC i-g-t 1/7] configure.ac: Test for libdrm_intel and build for it if present. 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 From: Robert Foss Test for libdrm_intel and build for it if present. Also expose the HAVE_INTEL #define to allow code to be conditionally compiled. Signed-off-by: Robert Foss --- configure.ac | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 11b1d46..48d81c5 100644 --- a/configure.ac +++ b/configure.ac @@ -100,7 +100,7 @@ if test "x$GCC" = "xyes"; then fi AC_SUBST(ASSEMBLER_WARN_CFLAGS) -PKG_CHECK_MODULES(DRM, [libdrm_intel >= 2.4.64 libdrm]) +PKG_CHECK_MODULES(DRM, [libdrm]) PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10]) case "$target_cpu" in @@ -150,6 +150,18 @@ PKG_CHECK_MODULES(GLIB, glib-2.0) # ----------------------------------------------------------------------------- # Configuration options # ----------------------------------------------------------------------------- +AC_ARG_ENABLE(intel, AS_HELP_STRING([--disable-intel], + [Enable building of intel specific parts (default: auto)]), + [INTEL=$enableval], [INTEL=auto]) +if test "x$INTEL" = xauto; then + PKG_CHECK_EXISTS([libdrm_intel >= 2.4.64], [INTEL=yes], [INTEL=no]) +fi +if test "x$INTEL" = xyes; then + PKG_CHECK_MODULES(DRM_INTEL, [libdrm_intel >= 2.4.64]) + AC_DEFINE(HAVE_LIBDRM_INTEL, 1, [Have intel support]) +fi +AM_CONDITIONAL(HAVE_LIBDRM_INTEL, [test "x$INTEL" = xyes]) + # for dma-buf tests AC_ARG_ENABLE(nouveau, AS_HELP_STRING([--disable-nouveau], [Enable use of nouveau API for prime tests (default: auto)]),