diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2018-02-23 15:44:50 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2018-02-23 16:05:50 +0000 |
commit | ce8cbdbe064f5fd7f3e78b6349fa86604e6189d7 (patch) | |
tree | 8b497a038caebc24a74c64d0d8ebc596c9b081fe /configure.ac | |
parent | baa75c4a92bff37cb742a8c3ad42ab93e4f2a3d6 (diff) | |
download | libepoxy-ce8cbdbe064f5fd7f3e78b6349fa86604e6189d7.tar.gz |
Allow building Epoxy without X11
Epoxy can be compiled with GLX and X11 native resources on EGL. We can
disable the former, but the latter is always built in when enabling EGL
support.
Some platforms do not support X11 at all, so we need a way to disable
X11 when configuring Epoxy.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 045f920..2a4fed4 100644 --- a/configure.ac +++ b/configure.ac @@ -59,6 +59,11 @@ AC_CHECK_HEADER([KHR/khrplatform.h], # uintptr_t to a void *") by default. Kill that. XORG_TESTSET_CFLAG(CWARNFLAGS, [-Wno-int-conversion]) +AC_ARG_ENABLE([x11], + [AC_HELP_STRING([--enable-x11=@<:@yes,no@:>@], [Enable X11 support @<:@default=yes@:>@])], + [enable_x11=$enableval], + [enable_x11=yes]) + AC_ARG_ENABLE([glx], [AC_HELP_STRING([--enable-glx=@<:@auto,yes,no@:>@], [Enable GLX support @<:@default=auto@:>@])], [enable_glx=$enableval], @@ -148,6 +153,13 @@ AS_CASE([$host_os], AC_SUBST(EPOXY_LINK_LIBS) +if test x$enable_x11 = xno; then + if test x$enable_glx = xyes; then + AC_MSG_ERROR([GLX support is explicitly enabled, but X11 was disabled]) + fi + build_glx=no +fi + AM_CONDITIONAL(BUILD_EGL, test x$build_egl = xyes) if test x$build_egl = xyes; then PKG_CHECK_MODULES(EGL, [egl]) @@ -214,14 +226,17 @@ AS_CASE(["$host"], AC_SUBST([VISIBILITY_CFLAGS]) +if test x$enable_x11 = xyes; then + PKG_CHECK_MODULES(X11, [x11], [x11=yes], [x11=no]) + if test x$x11 = xno -a x$build_glx = xyes; then + AC_MSG_ERROR([libX11 headers (libx11-dev) are required to build with GLX support]) + fi +else + x11=no +fi + if test x$build_glx = xyes; then - PKG_CHECK_MODULES(X11, [x11], [x11=yes], [x11=no]) - if test x$x11 = xno -a x$build_glx = xyes; then - AC_MSG_ERROR([libX11 headers (libx11-dev) required to build with GLX support]) - fi AC_DEFINE(ENABLE_GLX, [1], [Whether GLX support is enabled]) -else - x11=no fi AM_CONDITIONAL(HAVE_X11, test x$x11 = xyes) |