From 12e0eb626ed28ad9a6a5fabd9c06236b2de7cd30 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Sun, 25 Oct 2009 12:46:49 +0000 Subject: [PATCH] find the extension of the shared libraries at configure time SVN revision: 43267 --- configure.ac | 9 +++++---- src/lib/elm_module.c | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index fa55245..793d027 100644 --- a/configure.ac +++ b/configure.ac @@ -45,6 +45,11 @@ case "$host_os" in ;; esac AC_SUBST(release_info) +AC_SUBST(MODULE_ARCH) +AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture") + +EFL_SHARED_EXTENSION="${shrext_cmds}" +AC_DEFINE_UNQUOTED(EFL_SHARED_EXTENSION, "${EFL_SHARED_EXTENSION}", "Shared extension") requirement_elm="" @@ -242,10 +247,6 @@ AC_SUBST(requirement_elm) EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"]) -MODULE_ARCH="$host_os-$host_cpu-$release" -AC_SUBST(MODULE_ARCH) -AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture") - AC_OUTPUT([ Makefile elementary.pc diff --git a/src/lib/elm_module.c b/src/lib/elm_module.c index a8dc4b8..c5abbe0 100644 --- a/src/lib/elm_module.c +++ b/src/lib/elm_module.c @@ -48,7 +48,7 @@ _elm_module_add(const char *name) if (home) { - snprintf(buf, sizeof(buf), "%s/.elementary/modules/%s/%s/module.so", home, name, MODULE_ARCH); + snprintf(buf, sizeof(buf), "%s/.elementary/modules/%s/%s/module" EFL_SHARED_EXTENSION, home, name, MODULE_ARCH); m->handle = dlopen(buf, RTLD_NOW | RTLD_GLOBAL); if (m->handle) { @@ -73,7 +73,7 @@ _elm_module_add(const char *name) } if (!m->handle) { - snprintf(buf, sizeof(buf), "%s/elementary/modules/%s/%s/module.so", _elm_lib_dir, name, MODULE_ARCH); + snprintf(buf, sizeof(buf), "%s/elementary/modules/%s/%s/module" EFL_SHARED_EXTENSION, _elm_lib_dir, name, MODULE_ARCH); m->handle = dlopen(buf, RTLD_NOW | RTLD_GLOBAL); if (m->handle) { -- 2.7.4