-I$(top_srcdir)/src/lib/evas/include \
-I$(top_srcdir)/src/lib/evas/cserve2 \
-I$(top_srcdir)/src/lib/eet \
+-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
+-DPACKAGE_DATA_DIR=\"$(datadir)/evas\" \
@EVAS_CFLAGS@
bin_evas_evas_cserve2_LDADD = \
-I$(top_srcdir)/src/lib/evas \
-I$(top_srcdir)/src/lib/evas/include \
-I$(top_srcdir)/src/lib/evas/cserve2 \
+-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
+-DPACKAGE_DATA_DIR=\"$(datadir)/evas\" \
@EVAS_CFLAGS@
bin_evas_evas_cserve2_slave_LDADD = \
extern int _evas_cserve2_bin_log_dom;
+extern Eina_Prefix *_evas_cserve2_pfx;
+
typedef struct _Slave Slave;
typedef struct _Slave_Thread_Data Slave_Thread_Data;
typedef struct _Shm_Handle Shm_Handle;
#endif
#define CSERVE2_BIN_DEFAULT_COLOR EINA_COLOR_BLUE
+Eina_Prefix *_evas_cserve2_pfx = NULL;
int _evas_cserve2_bin_log_dom = -1;
static unsigned int _client_id = 0;
static Eina_Hash *client_list = NULL;
}
int
-main(int argc EINA_UNUSED, const char *argv[] EINA_UNUSED)
+main(int argc EINA_UNUSED, const char *argv[])
{
eina_init();
+ _evas_cserve2_pfx = eina_prefix_new(argv[0], main,
+ "EVAS", "evas", "checkme",
+ PACKAGE_BIN_DIR,
+ PACKAGE_LIB_DIR,
+ PACKAGE_DATA_DIR,
+ PACKAGE_DATA_DIR);
+
_evas_cserve2_bin_log_dom = eina_log_domain_register
("evas_cserve2_bin", CSERVE2_BIN_DEFAULT_COLOR);
if (_evas_cserve2_bin_log_dom < 0)
{
EINA_LOG_ERR("impossible to create a log domain.");
+ eina_prefix_free(_evas_cserve2_pfx);
eina_shutdown();
exit(1);
}
cserve2_main_loop_finish();
+ eina_prefix_free(_evas_cserve2_pfx);
+
eina_log_domain_unregister(_evas_cserve2_bin_log_dom);
eina_shutdown();
return 0;
error:
+ eina_prefix_free(_evas_cserve2_pfx);
eina_log_domain_unregister(_evas_cserve2_bin_log_dom);
eina_shutdown();
exit(1);
static Eina_Hash *loaders = NULL;
static Eina_List *modules = NULL;
+static Eina_Prefix *pfx = NULL;
struct ext_loader_s
{
if (l) return l;
/* FIXME: Look in every possible path, but what will those be? */
- snprintf(buf, sizeof(buf), PACKAGE_LIB_DIR "/evas/cserve2/loaders/%s/%s/%s",
+ snprintf(buf, sizeof(buf), "%s/evas/cserve2/loaders/%s/%s/%s",
+ eina_prefix_lib_get(pfx),
type, MODULE_ARCH, EVAS_MODULE_NAME_IMAGE_LOADER);
em = eina_module_new(buf);
return 1;
eina_init();
+ pfx = eina_prefix_new(v[0], main,
+ "EVAS", "evas", "checkme",
+ PACKAGE_BIN_DIR,
+ PACKAGE_LIB_DIR,
+ PACKAGE_DATA_DIR,
+ PACKAGE_DATA_DIR);
loaders = eina_hash_string_superfast_new(NULL);
EINA_LIST_FREE(modules, m)
eina_module_free(m);
+ eina_prefix_free(pfx);
eina_shutdown();
return 0;
if (!access(buf, X_OK))
return eina_stringshare_add(buf);
- snprintf(buf, sizeof(buf), PACKAGE_LIB_DIR"/evas/cserve2/bin/%s", name);
+ snprintf(buf, sizeof(buf), "%s/evas/cserve2/bin/%s",
+ eina_prefix_lib_get(_evas_cserve2_pfx), name);
if (!access(buf, X_OK))
return eina_stringshare_add(buf);