[Mesa-dev] [PATCH 01/11] configure.ac: Add HAVE_OPENCL AM_CONDITIONAL

Francisco Jerez currojerez at riseup.net
Fri May 18 03:36:56 PDT 2012


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.

> @@ -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?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 229 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120518/5b469a39/attachment-0001.pgp>


More information about the mesa-dev mailing list