summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwanglim Lee <gl77.lee@samsung.com>2014-08-28 13:36:59 -0400
committerChris Michael <cp.michael@samsung.com>2014-08-28 13:37:28 -0400
commit00382bb6a6e73c021ecfda3c90598777d7f7b084 (patch)
treec496b5c23091d336a4ae9e3b4f08a2a313935077
parent80c0a33267264b23e2d2e0e0c8fa8771dbb496a2 (diff)
gl-drm: Fix missing link to gbm for ecore_evas_drm and clean up build script
@fix Summary: This fixes following build script problems for ecore_evas_drm engine module. 1. Missing link to gbm for ecore_evas_drm if '--enable-gl-drm' option is given. ecore_evas_drm engine is using gbm function if it builds with that config option. To be more exact, ecore_evas_gl_drm_new_internal function needs gbm. Thus we need to add gbm library linking '-lgbm' to ecore_evas_drm engine module if '--enable-gl-drm' option is given. I've added this build script to m4/ecore_check_module.m4 file. 2. Wrong gbm dependency check code in configure.ac EFL_OPTIONAL_INTERNAL_DEPEND_PKG m4 macro function is designed for checking dependency of efl internal libraries. Thus we should remove gbm pkg name when configuring ecore_evas_drm engine module. It would be better to move dependency check for gbm to m4/ecore_check_module.m4 file. And one more thing want_drm value has to be changed to want_gl_drm in ECORE_EVAS_MODULE([gl-drm]...). 3. BUILD_ECORE_EVAS_OPENGL_DRM macro is always defined in configure.ac. This kind of macro, BUILD_EFL_MODULE_NAME, has to be defined only if given module is enabled. But this macro value was just defined with no test. And it is even useless, we can use BUILD_ECORE_EVAS_GL_DRM macro which is defined by ECORE_EVAS_MODULE([gl-drm], [${want_gl_drm}],...) function. So I've removed that from configure.ac. Test Plan: 1. Configure with --enable-gl-drm: $ ./autogen.sh --enable-drm --enable-gl-drm 2. Build: $ make && make install 3. Check module.so of ecore_evas_drm engine whether it has a library dependency with gbm: $ readelf -a $EFL_GIT/src/modules/ecore_evas/engines/drm/.libs/module.so | grep NEEDED Reviewers: raster, stefan_schmidt, devilhorns Reviewed By: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1379
-rw-r--r--configure.ac6
-rw-r--r--m4/ecore_check_module.m413
-rw-r--r--src/Makefile_Ecore_Evas.am6
-rw-r--r--src/modules/ecore_evas/engines/drm/ecore_evas_drm.c6
4 files changed, 22 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index efbefc2..55e403c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3693,9 +3693,9 @@ ECORE_EVAS_MODULE([extn], [${want_ecore_evas_extn}])
3693ECORE_EVAS_MODULE([ews], [yes]) 3693ECORE_EVAS_MODULE([ews], [yes])
3694ECORE_EVAS_MODULE([fb], [${want_fb}]) 3694ECORE_EVAS_MODULE([fb], [${want_fb}])
3695ECORE_EVAS_MODULE([drm], [${want_drm}], 3695ECORE_EVAS_MODULE([drm], [${want_drm}],
3696 [EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [${want_drm}], [ecore-drm],[gbm])]) 3696 [EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [${want_drm}], [ecore-drm])])
3697ECORE_EVAS_MODULE([gl-drm], [${want_gl_drm}], 3697ECORE_EVAS_MODULE([gl-drm], [${want_gl_drm}],
3698 [EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [${want_drm}], [ecore-drm],[gbm])]) 3698 [EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [${want_gl_drm}], [ecore-drm])])
3699ECORE_EVAS_MODULE([psl1ght], [${have_ps3}]) 3699ECORE_EVAS_MODULE([psl1ght], [${have_ps3}])
3700 3700
3701ECORE_EVAS_MODULE([opengl-cocoa], [${want_ecore_evas_gl_cocoa}]) 3701ECORE_EVAS_MODULE([opengl-cocoa], [${want_ecore_evas_gl_cocoa}])
@@ -3802,8 +3802,6 @@ if test "x$have_ecore_evas_software_x11" = "xyes" || \
3802fi 3802fi
3803AM_CONDITIONAL([BUILD_ECORE_EVAS_X11], [test "${build_ecore_evas_x11}" = "yes"]) 3803AM_CONDITIONAL([BUILD_ECORE_EVAS_X11], [test "${build_ecore_evas_x11}" = "yes"])
3804 3804
3805AC_DEFINE([BUILD_ECORE_EVAS_OPENGL_DRM], [1], [Build support for DRM based OpenGL])
3806
3807EFL_EVAL_PKGS([ECORE_EVAS]) 3805EFL_EVAL_PKGS([ECORE_EVAS])
3808 3806
3809### Checks for header files 3807### Checks for header files
diff --git a/m4/ecore_check_module.m4 b/m4/ecore_check_module.m4
index 5981fd7..c34a342 100644
--- a/m4/ecore_check_module.m4
+++ b/m4/ecore_check_module.m4
@@ -7,12 +7,25 @@ m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl
7have_ecore_evas_[]m4_defn([DOWN])="no" 7have_ecore_evas_[]m4_defn([DOWN])="no"
8want_module="$2" 8want_module="$2"
9 9
10ecore_evas_engines_[]m4_defn([DOWN])[]_cflags=""
11ecore_evas_engines_[]m4_defn([DOWN])[]_libs=""
12
10if test "x$want_module" = "xyes" || test "x$want_module" = "xstatic"; then 13if test "x$want_module" = "xyes" || test "x$want_module" = "xstatic"; then
11 $3 14 $3
12 15
13 AC_DEFINE([BUILD_ECORE_EVAS_]m4_defn([UP]), [1], [Support for $1 Engine in Ecore_Evas]) 16 AC_DEFINE([BUILD_ECORE_EVAS_]m4_defn([UP]), [1], [Support for $1 Engine in Ecore_Evas])
14 have_ecore_evas_[]m4_defn([DOWN])="yes" 17 have_ecore_evas_[]m4_defn([DOWN])="yes"
18
19 if test "x$1" = "xgl-drm"; then
20 PKG_CHECK_MODULES([GBM], [gbm])
21 ecore_evas_engines_[]m4_defn([DOWN])[]_cflags="${GBM_CFLAGS}"
22 ecore_evas_engines_[]m4_defn([DOWN])[]_libs="${GBM_LIBS}"
23 fi
15fi 24fi
25
26AC_SUBST([ecore_evas_engines_]m4_defn([DOWN])[_cflags])
27AC_SUBST([ecore_evas_engines_]m4_defn([DOWN])[_libs])
28
16EFL_ADD_FEATURE([ECORE_EVAS], [$1], [${want_module}])dnl 29EFL_ADD_FEATURE([ECORE_EVAS], [$1], [${want_module}])dnl
17AM_CONDITIONAL([BUILD_ECORE_EVAS_]UP, [test "x$have_ecore_evas_]m4_defn([DOWN])[" = "xyes"])dnl 30AM_CONDITIONAL([BUILD_ECORE_EVAS_]UP, [test "x$have_ecore_evas_]m4_defn([DOWN])[" = "xyes"])dnl
18m4_popdef([UP])dnl 31m4_popdef([UP])dnl
diff --git a/src/Makefile_Ecore_Evas.am b/src/Makefile_Ecore_Evas.am
index b1c8cd0..a6cf704 100644
--- a/src/Makefile_Ecore_Evas.am
+++ b/src/Makefile_Ecore_Evas.am
@@ -215,8 +215,10 @@ modules_ecore_evas_engines_drm_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/ef
215@ECORE_EVAS_CFLAGS@ \ 215@ECORE_EVAS_CFLAGS@ \
216@ECORE_DRM_CFLAGS@ \ 216@ECORE_DRM_CFLAGS@ \
217-I$(top_srcdir)/src/modules/evas/engines/drm \ 217-I$(top_srcdir)/src/modules/evas/engines/drm \
218-I$(top_srcdir)/src/modules/evas/engines/gl_drm 218-I$(top_srcdir)/src/modules/evas/engines/gl_drm \
219modules_ecore_evas_engines_drm_module_la_LIBADD = @USE_ECORE_EVAS_LIBS@ 219@ecore_evas_engines_gl_drm_cflags@
220modules_ecore_evas_engines_drm_module_la_LIBADD = @USE_ECORE_EVAS_LIBS@ \
221@ecore_evas_engines_gl_drm_libs@
220modules_ecore_evas_engines_drm_module_la_DEPENDENCIES = @USE_ECORE_EVAS_INTERNAL_LIBS@ 222modules_ecore_evas_engines_drm_module_la_DEPENDENCIES = @USE_ECORE_EVAS_INTERNAL_LIBS@
221modules_ecore_evas_engines_drm_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@ 223modules_ecore_evas_engines_drm_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
222modules_ecore_evas_engines_drm_module_la_LIBTOOLFLAGS = --tag=disable-static 224modules_ecore_evas_engines_drm_module_la_LIBTOOLFLAGS = --tag=disable-static
diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
index cb7fb61..13e4069 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -15,7 +15,7 @@
15#include <Ecore_Drm.h> 15#include <Ecore_Drm.h>
16#include <Evas_Engine_Drm.h> 16#include <Evas_Engine_Drm.h>
17 17
18#ifdef BUILD_ECORE_EVAS_OPENGL_DRM 18#ifdef BUILD_ECORE_EVAS_GL_DRM
19# include <Evas_Engine_GL_Drm.h> 19# include <Evas_Engine_GL_Drm.h>
20# include <gbm.h> 20# include <gbm.h>
21# include <dlfcn.h> 21# include <dlfcn.h>
@@ -276,7 +276,7 @@ ee_err:
276 return NULL; 276 return NULL;
277} 277}
278 278
279#ifdef BUILD_ECORE_EVAS_OPENGL_DRM 279#ifdef BUILD_ECORE_EVAS_GL_DRM
280EAPI Ecore_Evas * 280EAPI Ecore_Evas *
281ecore_evas_gl_drm_new_internal(const char *device, unsigned int parent EINA_UNUSED, int x, int y, int w, int h) 281ecore_evas_gl_drm_new_internal(const char *device, unsigned int parent EINA_UNUSED, int x, int y, int w, int h)
282{ 282{
@@ -531,7 +531,7 @@ _ecore_evas_drm_shutdown(void)
531 return _ecore_evas_init_count; 531 return _ecore_evas_init_count;
532} 532}
533 533
534#ifdef BUILD_ECORE_EVAS_OPENGL_DRM 534#ifdef BUILD_ECORE_EVAS_GL_DRM
535static Ecore_Evas_Interface_Drm * 535static Ecore_Evas_Interface_Drm *
536_ecore_evas_drm_interface_new(void) 536_ecore_evas_drm_interface_new(void)
537{ 537{