AC_PROG_CC
AC_PROG_LIBTOOL
-PKG_CHECK_MODULES([TBM], [libtbm wayland-tbm-server], [have_tbm=yes], [have_tbm=no])
+AC_ARG_ENABLE(tbm, AS_HELP_STRING([--disable-tbm],
+ [use tbm or not (default: enabled)]),
+ [have_tbm=$enableval], [have_tbm=yes])
+
if test x$have_tbm = xyes; then
+ PKG_CHECK_MODULES([TBM], [libtbm wayland-tbm-server])
AC_DEFINE([HAVE_TBM], [1], [Build the tbm backend])
AC_ARG_ENABLE(tbm-queue, [--enable-tbm-queue],,
enable_tbm_queue=no)
- AM_CONDITIONAL(USE_TBM_QUEUE, test x$enable_tbm_queue = xyes)
if test x$enable_tbm_queue = xyes; then
AC_DEFINE([USE_TBM_QUEUE], [1], [Build gbm_tbm with TBM surface queue])
fi
fi
AM_CONDITIONAL(HAVE_TBM, test "x$have_tbm" = "xyes")
+AM_CONDITIONAL(USE_TBM_QUEUE, test x$enable_tbm_queue = xyes)
+
AC_CONFIG_FILES([
Makefile
gbm.pc
%setup -q -n %{name}
%build
-%reconfigure --disable-static --enable-tbm-queue
+%if "%_repository" == "emulator32-wayland" || "%_repository" == "emulator64-wayland"
+%reconfigure --disable-static --disable-tbm
+%else
+%reconfigure --disable-static --enable-tbm --enable-tbm-queue
+%endif
make libdir=%{_libdir} major_ver=%{MAJOR_VER} minor_ver=%{MINOR_VER}
%install