summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-02-03 11:49:38 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-02-03 12:36:38 -0200
commit8dc853f2300ea70a9116325db773da22c6343c3c (patch)
tree841bdd4af4acac518732cd0c189de991fa4ffd73 /src/lib/ecore_evas
parent75dc1b3fd711afa26f69f8244b64d2df9628fae4 (diff)
ifdef RUN_IN_TREE logic.
This logic is only needed for autotools, cmake will replicate the installation file structure and thus eina_prefix works out of box.
Diffstat (limited to 'src/lib/ecore_evas')
-rw-r--r--src/lib/ecore_evas/ecore_evas_module.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/ecore_evas/ecore_evas_module.c b/src/lib/ecore_evas/ecore_evas_module.c
index a587ee93aa..71ca38a0f5 100644
--- a/src/lib/ecore_evas/ecore_evas_module.c
+++ b/src/lib/ecore_evas/ecore_evas_module.c
@@ -57,6 +57,7 @@ _ecore_evas_vnc_server_module_load(void)
57 if (_ecore_evas_vnc) 57 if (_ecore_evas_vnc)
58 return _ecore_evas_vnc; 58 return _ecore_evas_vnc;
59 59
60#ifdef NEED_RUN_IN_TREE
60#if defined(HAVE_GETUID) && defined(HAVE_GETEUID) 61#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
61 if (getuid() == geteuid()) 62 if (getuid() == geteuid())
62#endif 63#endif
@@ -71,6 +72,7 @@ _ecore_evas_vnc_server_module_load(void)
71 return _ecore_evas_vnc; 72 return _ecore_evas_vnc;
72 } 73 }
73 } 74 }
75#endif
74 76
75 prefix = eina_module_symbol_path_get(_ecore_evas_vnc_server_module_load, 77 prefix = eina_module_symbol_path_get(_ecore_evas_vnc_server_module_load,
76 "/ecore_evas"); 78 "/ecore_evas");
@@ -93,19 +95,24 @@ _ecore_evas_engine_load(const char *engine)
93 const char *path; 95 const char *path;
94 Eina_List *l; 96 Eina_List *l;
95 Eina_Module *em = NULL; 97 Eina_Module *em = NULL;
98#ifdef NEED_RUN_IN_TREE
96 Eina_Bool run_in_tree; 99 Eina_Bool run_in_tree;
100#endif
97 101
98 EINA_SAFETY_ON_NULL_RETURN_VAL(engine, NULL); 102 EINA_SAFETY_ON_NULL_RETURN_VAL(engine, NULL);
99 103
100 em = (Eina_Module *)eina_hash_find(_registered_engines, engine); 104 em = (Eina_Module *)eina_hash_find(_registered_engines, engine);
101 if (em) return em; 105 if (em) return em;
102 106
107#ifdef NEED_RUN_IN_TREE
103 run_in_tree = !!getenv("EFL_RUN_IN_TREE"); 108 run_in_tree = !!getenv("EFL_RUN_IN_TREE");
109#endif
104 110
105 EINA_LIST_FOREACH(_engines_paths, l, path) 111 EINA_LIST_FOREACH(_engines_paths, l, path)
106 { 112 {
107 char tmp[PATH_MAX] = ""; 113 char tmp[PATH_MAX] = "";
108 114
115#ifdef NEED_RUN_IN_TREE
109#if defined(HAVE_GETUID) && defined(HAVE_GETEUID) 116#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
110 if (getuid() == geteuid()) 117 if (getuid() == geteuid())
111#endif 118#endif
@@ -119,6 +126,7 @@ _ecore_evas_engine_load(const char *engine)
119 tmp[0] = '\0'; 126 tmp[0] = '\0';
120 } 127 }
121 } 128 }
129#endif
122 130
123 if (tmp[0] == '\0') 131 if (tmp[0] == '\0')
124 snprintf(tmp, sizeof(tmp), "%s/%s/%s/%s", 132 snprintf(tmp, sizeof(tmp), "%s/%s/%s/%s",
@@ -150,6 +158,7 @@ _ecore_evas_engine_init(void)
150// _registered_engines = eina_hash_string_small_new(EINA_FREE_CB(eina_module_free)); 158// _registered_engines = eina_hash_string_small_new(EINA_FREE_CB(eina_module_free));
151 _registered_engines = eina_hash_string_small_new(NULL); 159 _registered_engines = eina_hash_string_small_new(NULL);
152 160
161#ifdef NEED_RUN_IN_TREE
153#if defined(HAVE_GETUID) && defined(HAVE_GETEUID) 162#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
154 if (getuid() == geteuid()) 163 if (getuid() == geteuid())
155#endif 164#endif
@@ -165,6 +174,7 @@ _ecore_evas_engine_init(void)
165 } 174 }
166 } 175 }
167 } 176 }
177#endif
168 178
169 /* 1. libecore_evas.so/../ecore_evas/engines/ */ 179 /* 1. libecore_evas.so/../ecore_evas/engines/ */
170 paths[0] = eina_module_symbol_path_get(_ecore_evas_engine_init, "/ecore_evas/engines"); 180 paths[0] = eina_module_symbol_path_get(_ecore_evas_engine_init, "/ecore_evas/engines");