ecore_evas: fix to build tbm configurable. 42/76842/2
authorBowon Ryu <bowon.ryu@samsung.com>
Mon, 27 Jun 2016 11:45:30 +0000 (20:45 +0900)
committerHermet Park <chuneon.park@samsung.com>
Tue, 28 Jun 2016 06:51:25 +0000 (23:51 -0700)
Hosting efl for sdk doesn't require tbm.

ecore_evas_tbm breaks the build on hosting environment
because it necessarily includes tbm source files.

so make it configurable to avoid build those files
on hosting environment.

Change-Id: I9ef923ef22dbef37bbaa90fd455ec047be2ee9ff

configure.ac
src/Makefile_Ecore_Evas.am

index db45c51..ce42ec9 100755 (executable)
@@ -3994,6 +3994,8 @@ if test "x${have_ecore_ipc}" = "xno" || \
    want_ecore_evas_extn="no"
 fi
 
+build_ecore_evas_tbm="no"
+
 ### Checks for programs
 
 ## Compatibility layers
@@ -4034,6 +4036,16 @@ fi
 AM_CONDITIONAL([BUILD_ECORE_EVAS_SDL],
    [test "${build_ecore_evas_sdl}" = "yes"])
 
+PKG_CHECK_MODULES([TBM], [libtbm >= "1.1.0"],
+                  [have_tbm="yes"],
+                  [have_tbm="no"])
+
+if test "x${have_tbm}" = "xyes" ; then
+   build_ecore_evas_tbm="yes"
+   AC_DEFINE(BUILD_ECORE_EVAS_TBM, 1, [Support for TBM Backend in Ecore_Evas])
+fi
+EFL_ADD_FEATURE([ECORE_EVAS], [tbm], [${build_ecore_evas_tbm}])
+
 ECORE_EVAS_MODULE([wayland-shm], [${want_wayland}])
 ECORE_EVAS_MODULE([wayland-egl], [${want_ecore_evas_wayland_egl}])
 ECORE_EVAS_MODULE([gl-tbm], [${want_ecore_evas_tbm}])
@@ -4125,6 +4137,7 @@ if test "x$have_ecore_evas_software_x11" = "xyes" || \
    build_ecore_evas_x11="yes"
 fi
 AM_CONDITIONAL([BUILD_ECORE_EVAS_X11], [test "${build_ecore_evas_x11}" = "yes"])
+AM_CONDITIONAL([BUILD_ECORE_EVAS_TBM], [test "${build_ecore_evas_tbm}" = "yes"])
 
 EFL_EVAL_PKGS([ECORE_EVAS])
 
index 3d13bea..4164e04 100755 (executable)
@@ -12,8 +12,6 @@ lib_ecore_evas_libecore_evas_la_SOURCES = \
 lib/ecore_evas/ecore_evas.c \
 lib/ecore_evas/ecore_evas_buffer.c \
 lib/ecore_evas/ecore_evas_buffer.h \
-lib/ecore_evas/ecore_evas_tbm.c \
-lib/ecore_evas/ecore_evas_tbm.h \
 lib/ecore_evas/ecore_evas_deprecated.c \
 lib/ecore_evas/ecore_evas_drm.h \
 lib/ecore_evas/ecore_evas_ews.c \
@@ -26,15 +24,26 @@ lib/ecore_evas/ecore_evas_win32.h \
 lib/ecore_evas/ecore_evas_x11.h \
 lib/ecore_evas/ecore_evas_util.c
 
+if BUILD_ECORE_EVAS_TBM
+lib_ecore_evas_libecore_evas_la_SOURCES += \
+lib/ecore_evas/ecore_evas_tbm.c \
+lib/ecore_evas/ecore_evas_tbm.h
+endif
+
 lib_ecore_evas_libecore_evas_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
 -I$(top_srcdir)/src/modules/evas/engines/buffer \
--I$(top_srcdir)/src/modules/evas/engines/gl_tbm \
--I$(top_srcdir)/src/modules/evas/engines/software_tbm \
 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
 -DPACKAGE_DATA_DIR=\"$(datadir)/ecore_evas\" \
 -DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)\" \
 @ECORE_EVAS_CFLAGS@
+
+if BUILD_ECORE_EVAS_TBM
+lib_ecore_evas_libecore_evas_la_CPPFLAGS += \
+-I$(top_srcdir)/src/modules/evas/engines/gl_tbm \
+-I$(top_srcdir)/src/modules/evas/engines/software_tbm
+endif
+
 lib_ecore_evas_libecore_evas_la_LIBADD = @ECORE_EVAS_LIBS@ @TTRACE_LIBS@
 lib_ecore_evas_libecore_evas_la_DEPENDENCIES = @ECORE_EVAS_INTERNAL_LIBS@
 lib_ecore_evas_libecore_evas_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
@@ -191,8 +200,13 @@ modules_ecore_evas_engines_wayland_module_la_CPPFLAGS = -I$(top_builddir)/src/li
 @ECORE_EVAS_CFLAGS@ \
 @ECORE_WAYLAND_CFLAGS@ \
 -I$(top_srcdir)/src/modules/evas/engines/wayland_shm \
--I$(top_srcdir)/src/modules/evas/engines/wayland_egl \
--I$(top_srcdir)/src/modules/evas/engines/gl_tbm \
+-I$(top_srcdir)/src/modules/evas/engines/wayland_egl
+
+if BUILD_ECORE_EVAS_TBM
+modules_ecore_evas_engines_wayland_module_la_CPPFLAGS += \
+-I$(top_srcdir)/src/modules/evas/engines/gl_tbm
+endif
+
 @ECORE_WAYLAND_CFLAGS@
 modules_ecore_evas_engines_wayland_module_la_LIBADD = \
 @USE_ECORE_EVAS_LIBS@ \