[Mesa-dev] [PATCH] autoconf: Make header install distinct for various APIs

Emil Velikov emil.l.velikov at gmail.com
Mon Oct 3 17:06:20 UTC 2016


On 30 September 2016 at 19:37, Chuck Atkins <chuck.atkins at kitware.com> wrote:
> This fixes a problem where GL headers would only get installed if
> glx was enabled.  So if osmesa was enabled but not glx, then the
> GL headers required by osmesa would be missing from the install.
>
> Signed-off-by: Chuck Atkins <chuck.atkins at kitware.com>
> ---
>  configure.ac            |  2 ++
>  src/Makefile.am         | 30 ++++++++++++++++++++++++++++++
>  src/gallium/Makefile.am |  2 ++
>  src/mesa/Makefile.am    | 12 ++----------
>  4 files changed, 36 insertions(+), 10 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 1bfac3b..c7be735 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2641,6 +2641,8 @@ fi
>  AM_CONDITIONAL(HAVE_LIBDRM, test "x$have_libdrm" = xyes)
>  AM_CONDITIONAL(HAVE_OSMESA, test "x$enable_osmesa" = xyes)
>  AM_CONDITIONAL(HAVE_GALLIUM_OSMESA, test "x$enable_gallium_osmesa" = xyes)
> +AM_CONDITIONAL(HAVE_COMMON_OSMESA, test "x$enable_osmesa" = xyes -o \
> +                                        "x$enable_gallium_osmesa" = xyes)
>
Maybe we won't need this hunk, see below.

>  AM_CONDITIONAL(HAVE_X86_ASM, test "x$asm_arch" = xx86 -o "x$asm_arch" = xx86_64)
>  AM_CONDITIONAL(HAVE_X86_64_ASM, test "x$asm_arch" = xx86_64)
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 551f431..c04ee1b 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -47,6 +47,36 @@ CLEANFILES = $(BUILT_SOURCES)
>
>  SUBDIRS = . gtest util mapi/glapi/gen mapi
>
> +if HAVE_OPENGL
> +gldir = $(includedir)/GL
> +gl_HEADERS = \
> +  $(top_srcdir)/include/GL/gl.h \
> +  $(top_srcdir)/include/GL/glext.h \
> +  $(top_srcdir)/include/GL/glcorearb.h \
> +  $(top_srcdir)/include/GL/gl_mangle.h
> +endif
> +
> +if HAVE_GLX
> +glxdir = $(includedir)/GL
> +glx_HEADERS = \
> +  $(top_srcdir)/include/GL/glx.h \
> +  $(top_srcdir)/include/GL/glxext.h \
> +  $(top_srcdir)/include/GL/glx_mangle.h \
> +  $(top_srcdir)/include/GL/mesa_glinterop.h
> +pkgconfigdir = $(libdir)/pkgconfig
> +pkgconfig_DATA = mesa/gl.pc
> +else
> +if HAVE_EGL
> +eglinteropdir = $(includedir)/GL
> +eglinterop_HEADERS = $(top_srcdir)/include/GL/mesa_glinterop.h
IIRC Marek was pretty clear that this header should not be installed.
Then again looking at our current wildcard installing ... seems like
it was.

Please drop this file from the install stage ?

> +endif
> +endif
> +
> +if HAVE_COMMON_OSMESA
> +osmesadir = $(includedir)/GL
> +osmesa_HEADERS = $(top_srcdir)/include/GL/osmesa.h
> +endif
> +
Why do we have this hunk, considering each target is handled explicitly ?

IMHO we should drop either this or the similar ones in
src/{mesa,gallium}/Makefile.am. The latter might be better ?

Regards,
Emil
P.S. Thank for the poke.


More information about the mesa-dev mailing list