aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_evas/ecore_evas_module.c
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/ecore_evas_module.c
parentcmake: add ecore_input (diff)
downloadefl-8dc853f2300ea70a9116325db773da22c6343c3c.tar.gz
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/ecore_evas_module.c')
-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)
if (_ecore_evas_vnc)
return _ecore_evas_vnc;
+#ifdef NEED_RUN_IN_TREE
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
@@ -71,6 +72,7 @@ _ecore_evas_vnc_server_module_load(void)
return _ecore_evas_vnc;
}
}
+#endif
prefix = eina_module_symbol_path_get(_ecore_evas_vnc_server_module_load,
"/ecore_evas");
@@ -93,19 +95,24 @@ _ecore_evas_engine_load(const char *engine)
const char *path;
Eina_List *l;
Eina_Module *em = NULL;
+#ifdef NEED_RUN_IN_TREE
Eina_Bool run_in_tree;
+#endif
EINA_SAFETY_ON_NULL_RETURN_VAL(engine, NULL);
em = (Eina_Module *)eina_hash_find(_registered_engines, engine);
if (em) return em;
+#ifdef NEED_RUN_IN_TREE
run_in_tree = !!getenv("EFL_RUN_IN_TREE");
+#endif
EINA_LIST_FOREACH(_engines_paths, l, path)
{
char tmp[PATH_MAX] = "";
+#ifdef NEED_RUN_IN_TREE
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
@@ -119,6 +126,7 @@ _ecore_evas_engine_load(const char *engine)
tmp[0] = '\0';
}
}
+#endif
if (tmp[0] == '\0')
snprintf(tmp, sizeof(tmp), "%s/%s/%s/%s",
@@ -150,6 +158,7 @@ _ecore_evas_engine_init(void)
// _registered_engines = eina_hash_string_small_new(EINA_FREE_CB(eina_module_free));
_registered_engines = eina_hash_string_small_new(NULL);
+#ifdef NEED_RUN_IN_TREE
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
@@ -165,6 +174,7 @@ _ecore_evas_engine_init(void)
}
}
}
+#endif
/* 1. libecore_evas.so/../ecore_evas/engines/ */
paths[0] = eina_module_symbol_path_get(_ecore_evas_engine_init, "/ecore_evas/engines");