Unverified Commit 13e12161 authored by Haelwenn (lanodan) Monnier's avatar Haelwenn (lanodan) Monnier
Browse files

EGL: Add -DEGL_NO_X11 to egl.pc Cflags when X11 is disabled

This replicates mesa's egl.pc behavior and fixes build issues on systems
without X11.

Bug: https://bugs.webkit.org/show_bug.cgi?id=163483
parent 2dbd9ff5
Pipeline #370873 passed with stages
in 1 minute and 52 seconds
......@@ -68,6 +68,11 @@ AC_ARG_ENABLE([x11],
)
AM_CONDITIONAL([ENABLE_X11], [test "x$enable_x11" = "xyes"])
dnl For Cflags in EGL/egl.pc.in
if test "x$enable_x11" != "xyes"; then
AC_SUBST(EGL_PKG_EXTRA_CFLAGS, [-DEGL_NO_X11])
fi
AC_ARG_ENABLE([glx],
[AS_HELP_STRING([--disable-glx],
[Disable GLX support @<:@default=enabled@:>@])],
......
......@@ -7,4 +7,4 @@ Name: egl
Description: EGL library and headers
Version: 1.5
Libs: -L${libdir} -lEGL
Cflags: -I${includedir}
Cflags: -I${includedir} @EGL_PKG_EXTRA_CFLAGS@
......@@ -58,11 +58,18 @@ libEGL = shared_library(
gnu_symbol_visibility : 'hidden',
)
if not dep_x11.found()
egl_pkg_extra_cflags = '-DEGL_NO_X11'
else
egl_pkg_extra_cflags = ''
endif
pkg.generate(
libEGL,
filebase : 'egl',
description : 'EGL library and headers',
version : '1.5',
extra_cflags: egl_pkg_extra_cflags
)
test(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment