From patchwork Wed Oct 26 16:18:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 9397597 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 A7FC360234 for ; Wed, 26 Oct 2016 16:19:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9486529C3E for ; Wed, 26 Oct 2016 16:19:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8788529C43; Wed, 26 Oct 2016 16:19:00 +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.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID 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 44AAE29C45 for ; Wed, 26 Oct 2016 16:18:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BE8F16E8CF; Wed, 26 Oct 2016 16:18:57 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5C8E96E8D0 for ; Wed, 26 Oct 2016 16:18:56 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id c17so1306715wmc.3 for ; Wed, 26 Oct 2016 09:18:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MU7elwGwnI7mI0Hzb0J+fCncpzwf8Pbpy3zOkN/MmtY=; b=ugWTS/kvieLXtdl0OSmo8ywxbNmNtR702wwOtTEWwDxie2EfamVnGD/RZAUKBY0qJl Ls/151dVmO7vAA0Ge/oyZEBm4SvUV6ABrVVkJgjzzsvGaGPomsy3MNygw292CHK1gA39 qMg1O83uD4jM3b4LpBH2kl9PoGi8ZGrDscJnGub3S2qmXH6O+Q6uhQVfAN176RDw0fJD fQ9yCNhmvcC1Sl42gbTltMpdB+paFrTqNeWQZGobcu+N7CAxLTSKUWZXPBlBMXUcK/0D pLc9/0rhLS1zHg9IeKYGiGae2gTmrzdK5IACNEooOczf0sJUgp/b3DCwE0hAai4Hw2+d K6Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MU7elwGwnI7mI0Hzb0J+fCncpzwf8Pbpy3zOkN/MmtY=; b=eoAssIAy061QvkZRIf8gi/EnuL1BCwkZDjsTofVfoH5jeY8LSXLN2vaE1HUF6BYL5Z VaHNq1JtcesgP15xOvo5sTCm2150jUqbmOIBjzRjC73mvAtvID3Q1aR+lwrqQevLzY8Y xzP19TOQhbBoFw7wtl5zbVNFR9JrqgZBJJpQhsYiwC0nrucP2M19Mx1LaGi0FFCXW8NW sLb1i89z/1w/nr9lom8r+WpnkzyL/P1oeTcnV2iLTarBPi5vWnbiZqjF8jfNVsLT+kbV R5Mll7tGaZueFwPkGUCC1zzQqfyi1MWsHnZFSgaKZ2bK9qU87L+wV+qqLB/45meNvpP6 v27A== X-Gm-Message-State: ABUngvdLyjtdMUNC3pU/2SHgMkh7qWIV4i5cdskVQ21qR0T/IVQSuayS1/7pWQsNGxLPxQ== X-Received: by 10.28.170.204 with SMTP id t195mr3401693wme.113.1477498734648; Wed, 26 Oct 2016 09:18:54 -0700 (PDT) Received: from arch-x220.cbg.collabora.co.uk ([2a00:1098:5:0:120b:a9ff:fe8d:c914]) by smtp.gmail.com with ESMTPSA id 135sm3939543wmq.8.2016.10.26.09.18.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Oct 2016 09:18:53 -0700 (PDT) From: Emil Velikov To: intel-gfx@lists.freedesktop.org Date: Wed, 26 Oct 2016 17:18:47 +0100 Message-Id: <20161026161847.22352-1-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161026153536.5946-1-emil.l.velikov@gmail.com> References: <20161026153536.5946-1-emil.l.velikov@gmail.com> Subject: [Intel-gfx] [PATCH i-g-t v2] configure.ac: correctly manage DRM_INTEL_{CFLAGS, LIBS} 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: Emil Velikov Currently the latter is only set when using --enable-intel. Whereas for the CFLAGS: if we "enable" PKG_CHECK_MODULES sets the variable, while for "disable" we do it locally. In either case the CFLAGS is not propagated through, this one can get build issues regardless of the actual state of the toggle. v2: Add -I for the include directive and correctly propagate $(top_srcdir). Cc: Brian Starkey Cc: Robert Foss Reported-by: Brian Starkey Signed-off-by: Emil Velikov Signed-off-by: Robert Foss Tested-by: Brian Starkey Reviewed-by: Robert Foss --- This time fully tested: - enable/disable/auto with and w/o libdrm_intel :-) Did not see much point in splitting the v2 only changes to 1/2 and keep this as 2/2. I don't mind either way though :-) --- configure.ac | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 735cfd5..e181c83 100644 --- a/configure.ac +++ b/configure.ac @@ -178,12 +178,15 @@ 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]) - DRM_LIBS="$DRM_LIBS $DRM_INTEL_LIBS" - AC_SUBST([DRM_LIBS]) else - DRM_INTEL_CFLAGS=$(top_srcdir)/lib/stubs/drm/ - AC_SUBST([DRM_INTEL_CFLAGS]) + DRM_INTEL_CFLAGS=-I$\(top_srcdir\)/lib/stubs/drm/ + DRM_INTEL_LIBS= fi +DRM_CFLAGS="$DRM_CFLAGS $DRM_INTEL_CFLAGS" +DRM_LIBS="$DRM_LIBS $DRM_INTEL_LIBS" +AC_SUBST([DRM_CFLAGS]) +AC_SUBST([DRM_LIBS]) + AM_CONDITIONAL(HAVE_LIBDRM_INTEL, [test "x$INTEL" = xyes]) # for dma-buf tests