From: Robert Foss <robert.foss@collabora.com>
To: Emil Velikov <emil.velikov@collabora.co.uk>,
Chris Wilson <chris@chris-wilson.co.uk>
Cc: daniel.stone@collabora.com, tomeu.vizoso@collabora.com,
daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org,
emil.velikov@collabora.com
Subject: Re: [RFC i-g-t 1/9] configure.ac: Test for libdrm_intel and build for it if present.
Date: Tue, 24 May 2016 10:58:45 -0400 [thread overview]
Message-ID: <57446C25.2050001@collabora.com> (raw)
In-Reply-To: <5039-57431c00-7-29f4da80@4509867>
On 2016-05-23 11:03 AM, Emil Velikov wrote:
> On Saturday, May 21, 2016 08:55 BST, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>> On Fri, May 20, 2016 at 06:59:25PM -0400, robert.foss@collabora.com wrote:
>>> From: Robert Foss <robert.foss@collabora.com>
>>>
>>> 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 <robert.foss@collabora.com>
>>> ---
>>> configure.ac | 14 +++++++++++++-
>>> 1 file changed, 13 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/configure.ac b/configure.ac
>>> index 0589782..b6fc168 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_INTEL, 1, [Have intel support])
>>> +fi
>>> +AM_CONDITIONAL(HAVE_INTEL, [test "x$INTEL" = xyes])
>>
>> HAVE_INTEL caused quite a bit of confusion when reading the later build
>> patches.
>>
>> Please use HAVE_LIBDRM_INTEL instead
> As a counter argument, one could, should really, use --enable-intel to replace the 'x86' parts in commit bccc0ec6a3fdae880e14770c2ff5770fb86ea6fc. Perhaps HAVE_INTEL isn't that bad when we take that into consideration ?
>
The purpose of HAVE_INTEL isn't really to avoid building x86 code on
non-x86 platforms, but rather to avoid a build dependency where it can
be avoided.
That being said using a BUILD_X86 or something like it to avoid building
irrelevant binaries would be very useful.
Either way, HAVE_LIBDRM_INTEL more clearly defines what the flag is about.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-05-24 14:58 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-20 22:59 [RFC i-g-t 0/9] Remove compile time depencencies on libdrm_intel robert.foss
2016-05-20 22:59 ` [RFC i-g-t 1/9] configure.ac: Test for libdrm_intel and build for it if present robert.foss
2016-05-21 7:55 ` Chris Wilson
2016-05-21 13:15 ` Robert Foss
2016-05-23 15:03 ` ?==?utf-8?q? ?==?utf-8?q? [RFC i-g-t 1/9]?==?utf-8?q? " Emil Velikov
2016-05-24 14:58 ` Robert Foss [this message]
2016-05-20 22:59 ` [RFC i-g-t 2/9] benchmarks/Makefile: Don't build benchmarks that depend on libdrm_intel robert.foss
2016-05-23 14:04 ` ?==?utf-8?q? " Emil Velikov
2016-05-24 8:01 ` Daniel Vetter
2016-05-25 17:47 ` Robert Foss
2016-05-20 22:59 ` [RFC i-g-t 3/9] tools/Makefile: Don't build tools " robert.foss
2016-05-23 14:09 ` ?==?utf-8?q? " Emil Velikov
2016-05-20 22:59 ` [RFC i-g-t 4/9] demos/Makefile: " robert.foss
2016-05-20 22:59 ` [RFC i-g-t 5/9] tests/gem_ppgtt: Switched to new aliases of intel specific functions robert.foss
2016-05-23 14:14 ` ?==?utf-8?q? " Emil Velikov
2016-05-23 14:15 ` Emil Velikov
2016-05-24 8:03 ` Daniel Vetter
2016-05-20 22:59 ` [RFC i-g-t 6/9] tests/gem_render_tiled_blits: " robert.foss
2016-05-23 14:39 ` ?==?utf-8?q? " Emil Velikov
2016-05-24 8:04 ` Daniel Vetter
2016-05-20 22:59 ` [RFC i-g-t 7/9] lib/intel_drm_stubs: Add stubs for functionality from libdrm_intel robert.foss
2016-05-23 14:53 ` ?==?utf-8?q? " Emil Velikov
2016-05-24 8:05 ` Daniel Vetter
2016-05-25 17:48 ` Robert Foss
2016-05-20 22:59 ` [RFC i-g-t 8/9] lib: Replace intel specific header includes with intel_drm_stubs.h robert.foss
2016-05-23 14:57 ` ?==?utf-8?q? " Emil Velikov
2016-05-24 8:07 ` Daniel Vetter
2016-05-25 18:00 ` Robert Foss
2016-05-20 22:59 ` [RFC i-g-t 9/9] tests: " robert.foss
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57446C25.2050001@collabora.com \
--to=robert.foss@collabora.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.stone@collabora.com \
--cc=daniel.vetter@ffwll.ch \
--cc=emil.velikov@collabora.co.uk \
--cc=emil.velikov@collabora.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=tomeu.vizoso@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox