[Mesa-dev] [PATCH 01/11] configure.ac: Add HAVE_OPENCL AM_CONDITIONAL
Tom Stellard
thomas.stellard at amd.com
Fri May 18 07:07:44 PDT 2012
On Fri, May 18, 2012 at 12:36:56PM +0200, Francisco Jerez wrote:
> Tom Stellard <tstellar at gmail.com> writes:
>
> > ---
> > configs/autoconf.in | 1 +
> > configure.ac | 3 +++
> > 2 files changed, 4 insertions(+), 0 deletions(-)
> >
> > diff --git a/configs/autoconf.in b/configs/autoconf.in
> > index 3c8f4c1..28f3cb4 100644
> > --- a/configs/autoconf.in
> > +++ b/configs/autoconf.in
> > @@ -222,3 +222,4 @@ HAVE_XF86VIDMODE = @HAVE_XF86VIDMODE@
> >
> > GALLIUM_PIPE_LOADER_DEFINES = @GALLIUM_PIPE_LOADER_DEFINES@
> > GALLIUM_PIPE_LOADER_LIBS = @GALLIUM_PIPE_LOADER_LIBS@
> > +HAVE_OPENCL = @HAVE_OPENCL@
> > diff --git a/configure.ac b/configure.ac
> > index 2d1265a..793585c 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -880,6 +880,7 @@ AC_SUBST([GALLIUM_WINSYS_DIRS])
> > AC_SUBST([GALLIUM_DRIVERS_DIRS])
> > AC_SUBST([GALLIUM_STATE_TRACKERS_DIRS])
> > AC_SUBST([MESA_LLVM])
> > +AC_SUBST([HAVE_OPENCL])
> >
> > # Check for libdrm
> > PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED],
> > @@ -1613,6 +1614,7 @@ dnl OpenCL configuration
> > dnl
> >
> > if test "x$enable_opencl" = xyes; then
> > + HAVE_OPENCL=1
> > if test "x$with_gallium_drivers" = x; then
> > AC_MSG_ERROR([cannot enable OpenCL without Gallium])
> > fi
>
> Do you really need the last three hunks for the automake conditional?
> They don't seem to be used by anything else in this patch series.
>
I just added that in case non-automake drivers wanted to know about
clover being enabled. You're right it isn't used at all, I have no
problem dropping it.
> > @@ -2070,6 +2072,7 @@ AM_CONDITIONAL(NEED_RADEON_GALLIUM, test x$NEED_RADEON_GALLIUM = xyes)
> > AM_CONDITIONAL(USE_R600_LLVM_COMPILER, test x$USE_R600_LLVM_COMPILER = xyes)
> > AM_CONDITIONAL(HAVE_LOADER_GALLIUM, test x$enable_gallium_loader = xyes)
> > AM_CONDITIONAL(HAVE_DRM_LOADER_GALLIUM, test x$enable_gallium_drm_loader = xyes)
> > +AM_CONDITIONAL(HAVE_OPENCL, test x$enable_opencl = xyes)
> > AC_SUBST([GALLIUM_MAKE_DIRS])
> >
> > dnl prepend CORE_DIRS to SRC_DIRS
>
>
> IIUC, you use this to compile the r600g compute code conditionally,
> depending on whether the user wants to build the OpenCL front-end or
> not. I foresee other state trackers making use of the same compute code
> in the future, so maybe a different name would be more appropriate?
> HAVE_GALLIUM_COMPUTE, HAVE_R600_COMPUTE?
Ok, I'll go with HAVE_GALLIUM_COMPUTE.
-Tom
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list