diff --git a/configure.ac b/configure.ac index 97c8002..668b68c 100644 --- a/configure.ac +++ b/configure.ac @@ -75,6 +75,8 @@ AC_ARG_ENABLE(tests, [build_tests="$enableval"], [build_tests="auto"]) +AC_ARG_ENABLE([egl], AS_HELP_STRING([--disable-egl], [Disable EGL])) + PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], [HAVE_CHECK="yes"], [HAVE_CHECK="no"]) if test "x$build_tests" = "xauto" && test "x$os_win32" = "xno"; then @@ -95,19 +97,30 @@ AM_CONDITIONAL(BUILD_TESTS, [test "x$build_tests" = "xyes"]) LIBDRM_REQUIRED=2.4.50 -if test "x$os_win32" = xno; then - PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED]) - PKG_CHECK_MODULES([GBM], [gbm]) +if test "x$os_win32" = xno && test "x$enable_egl" != "xno"; then + PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED]) + PKG_CHECK_MODULES([GBM], [gbm]) fi PKG_CHECK_MODULES([EPOXY], [epoxy]) PKG_CHECK_VAR(epoxy_has_egl, [epoxy], [epoxy_has_egl]) -AS_IF([test "x$epoxy_has_egl" = "x1"], [ +AS_IF([test "x$epoxy_has_egl" = "x1" && test "x$enable_egl" != "xno"], [ epoxy_has_egl=yes AC_DEFINE([HAVE_EPOXY_EGL_H], [1], [Libepoxy has EGL support.]) ],[ epoxy_has_egl=no ]) +AM_CONDITIONAL([HAVE_EPOXY_EGL], [test "x$epoxy_has_egl" = "xyes"]) + +if test "x$os_win32" = xno; then + AS_IF([test "x$epoxy_has_egl" = "x1"], [ + PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED]) + PKG_CHECK_MODULES([GBM], [gbm]) + ]) +fi + + +AM_CONDITIONAL([HAVE_EPOXY_EGL], [test "x$epoxy_has_egl" = "xyes"]) AC_ARG_WITH([glx], AS_HELP_STRING([--with-glx], [Build with the x11/glx backend])) AS_IF([test "x$with_glx" = "xyes"], [ diff --git a/src/Makefile.am b/src/Makefile.am index 3ec8358..76f4162 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,7 +33,7 @@ libvrend_la_SOURCES = \ vrend_blitter.h \ iov.c -if !OS_WIN32 +if HAVE_EPOXY_EGL libvrend_la_SOURCES += \ virgl_egl.h \ virgl_egl_context.c