dnl Compiler macros
DEFINES="-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS"
AC_SUBST([DEFINES])
+android=no
case "$host_os" in
+*-android)
+ android=yes
+ ;;
linux*|*-gnu*|gnu*)
DEFINES="$DEFINES -D_GNU_SOURCE"
;;
;;
esac
+AM_CONDITIONAL(HAVE_ANDROID, test "x$android" = xyes)
+
dnl Add flags for gcc and g++
if test "x$GCC" = xyes; then
CFLAGS="$CFLAGS -Wall"
AC_MSG_ERROR([EGL platform surfaceless requires libdrm >= $LIBDRM_REQUIRED])
;;
+ android)
+ ;;
+
*)
AC_MSG_ERROR([EGL platform '$plat' does not exist])
;;
AM_CONDITIONAL(HAVE_PLATFORM_WAYLAND, echo "$egl_platforms" | grep -q 'wayland')
AM_CONDITIONAL(HAVE_EGL_PLATFORM_DRM, echo "$egl_platforms" | grep -q 'drm')
AM_CONDITIONAL(HAVE_EGL_PLATFORM_SURFACELESS, echo "$egl_platforms" | grep -q 'surfaceless')
+AM_CONDITIONAL(HAVE_EGL_PLATFORM_ANDROID, echo "$egl_platforms" | grep -q 'android')
AM_CONDITIONAL(HAVE_EGL_DRIVER_DRI2, test "x$HAVE_EGL_DRIVER_DRI2" != "x")
dri2_backend_FILES += drivers/dri2/platform_surfaceless.c
endif
+if HAVE_EGL_PLATFORM_ANDROID
+AM_CFLAGS += -DHAVE_ANDROID_PLATFORM
+dri2_backend_FILES += drivers/dri2/platform_android.c
+endif
+
if HAVE_EGL_DRIVER_DRI2
AM_CFLAGS += \
-I$(top_srcdir)/src/loader \