PKG_CHECK_MODULES(LIBDRM, libdrm)
PKG_CHECK_MODULES(LIBDRI2, libdri2)
PKG_CHECK_MODULES(X11, x11)
-PKG_CHECK_MODULES(CAPI, capi-base-common)
-# PKG_CHECK_MODULES(CAPI, capi-base-common >= 0.1.1)
+PKG_CHECK_MODULES(CAPI, [capi-base-common >= 0.1.1], [capi_0.1.1=yes], [capi_0.1.1=no])
+if test x"$capi_0.1.1" = xyes; then
+ AC_DEFINE(HAVE_CAPI_0_1_1,1,[The version of capi-base-common is over 0.1.1])
+fi
LIBTBM_CFLAGS="$PTHREADSTUBS_CFLAGS $LIBDRM_CFLAGS $LIBDRI2_CFLAGS $X11_CFLAGS $CAPI_CFLAGS"
LIBTBM_LIBS="$PTHREADSTUBS_LIBS $LIBDRM_LIBS $LIBDRI2_LIBS $X11_LIBS $CAPI_LIBS"
{
if (!(width > 0) || !(height > 0))
{
- //set_last_result (TBM_SURFACE_ERROR_INVALID_PARAMETER);
+#ifdef HAVE_CAPI_0_1_1
+ set_last_result (TBM_SURFACE_ERROR_INVALID_PARAMETER);
+#endif
return NULL;
}
surf = tbm_surface_internal_create_with_flags (gBufMgr, width, height, format, TBM_BO_DEFAULT);
if (!surf)
{
- //set_last_result (TBM_SURFACE_ERROR_INVALID_OPERATION);
+#ifdef HAVE_CAPI_0_1_1
+ set_last_result (TBM_SURFACE_ERROR_INVALID_OPERATION);
+#endif
return NULL;
}
- //set_last_result (TBM_SURFACE_ERROR_NONE);
+#ifdef HAVE_CAPI_0_1_1
+ set_last_result (TBM_SURFACE_ERROR_NONE);
+#endif
return surf;
}
{
if (surface)
{
- //set_last_result (TBM_SURFACE_ERROR_INVALID_PARAMETER);
+#ifdef HAVE_CAPI_0_1_1
+ set_last_result (TBM_SURFACE_ERROR_INVALID_PARAMETER);
+#endif
return 0;
}
struct _tbm_surface *surf = (struct _tbm_surface *)surface;
- //set_last_result (TBM_SURFACE_ERROR_NONE);
+#ifdef HAVE_CAPI_0_1_1
+ set_last_result (TBM_SURFACE_ERROR_NONE);
+#endif
return surf->info.format;
}