mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
configure.ac: rework wayland-protocols handling
At dist/distcheck time we need to ensure that all the files and their respective dependencies are handled. At the moment we'll bail out as the linux-dmabuf rules are guarded in a conditional. Move them outside of it and drop the sources from BUILT_SOURCES. Thus the files will be generated only as needed, which will happen only after the wayland-protocols dependency is enforced in configure.ac. v2: add dependency tracking for the header Cc: Andres Gomez <agomez@igalia.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Andres Gomez <agomez@igalia.com>
This commit is contained in:
parent
feef47bb59
commit
166852ee95
2 changed files with 17 additions and 9 deletions
13
configure.ac
13
configure.ac
|
|
@ -1681,19 +1681,26 @@ if test "x$WAYLAND_SCANNER" = x; then
|
||||||
AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
|
AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PKG_CHECK_EXISTS([wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED], [have_wayland_protocols=yes], [have_wayland_protocols=no])
|
||||||
|
if test "x$have_wayland_protocols" = xyes; then
|
||||||
|
ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
|
||||||
|
fi
|
||||||
|
AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
|
||||||
|
|
||||||
# Do per platform setups and checks
|
# Do per platform setups and checks
|
||||||
platforms=`IFS=', '; echo $with_platforms`
|
platforms=`IFS=', '; echo $with_platforms`
|
||||||
for plat in $platforms; do
|
for plat in $platforms; do
|
||||||
case "$plat" in
|
case "$plat" in
|
||||||
wayland)
|
wayland)
|
||||||
|
|
||||||
PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQUIRED wayland-server >= $WAYLAND_REQUIRED wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED])
|
PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQUIRED wayland-server >= $WAYLAND_REQUIRED])
|
||||||
ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
|
|
||||||
AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
|
|
||||||
|
|
||||||
if test "x$WAYLAND_SCANNER" = "x:"; then
|
if test "x$WAYLAND_SCANNER" = "x:"; then
|
||||||
AC_MSG_ERROR([wayland-scanner is needed to compile the wayland platform])
|
AC_MSG_ERROR([wayland-scanner is needed to compile the wayland platform])
|
||||||
fi
|
fi
|
||||||
|
if test "x$have_wayland_protocols" = xno; then
|
||||||
|
AC_MSG_ERROR([wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED is needed to compile the wayland platform])
|
||||||
|
fi
|
||||||
DEFINES="$DEFINES -DHAVE_WAYLAND_PLATFORM"
|
DEFINES="$DEFINES -DHAVE_WAYLAND_PLATFORM"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,6 @@ libEGL_common_la_LIBADD += $(top_builddir)/src/loader/libloader_dri3_helper.la
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if HAVE_PLATFORM_WAYLAND
|
|
||||||
WL_DMABUF_XML = $(WAYLAND_PROTOCOLS_DATADIR)/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml
|
WL_DMABUF_XML = $(WAYLAND_PROTOCOLS_DATADIR)/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml
|
||||||
|
|
||||||
drivers/dri2/linux-dmabuf-unstable-v1-protocol.c: $(WL_DMABUF_XML)
|
drivers/dri2/linux-dmabuf-unstable-v1-protocol.c: $(WL_DMABUF_XML)
|
||||||
|
|
@ -75,17 +74,19 @@ drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h: $(WL_DMABUF_XML)
|
||||||
$(MKDIR_GEN)
|
$(MKDIR_GEN)
|
||||||
$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
|
$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
|
||||||
|
|
||||||
BUILT_SOURCES += \
|
drivers/dri2/linux-dmabuf-unstable-v1-protocol.lo: drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h
|
||||||
drivers/dri2/linux-dmabuf-unstable-v1-protocol.c \
|
drivers/dri2/egl_dri2.lo: drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h
|
||||||
drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h
|
|
||||||
|
|
||||||
|
if HAVE_PLATFORM_WAYLAND
|
||||||
AM_CFLAGS += $(WAYLAND_CFLAGS)
|
AM_CFLAGS += $(WAYLAND_CFLAGS)
|
||||||
libEGL_common_la_LIBADD += $(WAYLAND_LIBS)
|
libEGL_common_la_LIBADD += $(WAYLAND_LIBS)
|
||||||
libEGL_common_la_LIBADD += $(LIBDRM_LIBS)
|
libEGL_common_la_LIBADD += $(LIBDRM_LIBS)
|
||||||
libEGL_common_la_LIBADD += $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la
|
libEGL_common_la_LIBADD += $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la
|
||||||
libEGL_common_la_LIBADD += $(top_builddir)/src/util/libmesautil.la
|
libEGL_common_la_LIBADD += $(top_builddir)/src/util/libmesautil.la
|
||||||
dri2_backend_FILES += drivers/dri2/platform_wayland.c \
|
dri2_backend_FILES += \
|
||||||
drivers/dri2/linux-dmabuf-unstable-v1-protocol.c
|
drivers/dri2/platform_wayland.c \
|
||||||
|
drivers/dri2/linux-dmabuf-unstable-v1-protocol.c \
|
||||||
|
drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if HAVE_PLATFORM_DRM
|
if HAVE_PLATFORM_DRM
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue