--- a/mcabber/configure.ac Mon Jan 18 16:36:55 2010 +0200
+++ b/mcabber/configure.ac Sat Jan 16 12:12:45 2010 +0200
@@ -227,6 +227,9 @@
AC_DEFINE_DIR(DATA_DIR, datadir, [Data files directory])
fi
+# Export $libexecdir to the source tree
+AC_DEFINE_DIR(PKGLIB_DIR, "${libdir}/${PACKAGE}", [Modules directory])
+
AC_ARG_ENABLE(debug,
[AC_HELP_STRING(--enable-debug, add development compilation options)],
debug=$enableval, debug="")
--- a/mcabber/mcabber/commands.c Mon Jan 18 16:36:55 2010 +0200
+++ b/mcabber/mcabber/commands.c Sat Jan 16 12:12:45 2010 +0200
@@ -27,6 +27,7 @@
#include <errno.h>
#include <glob.h>
+#include "config.h"
#include "commands.h"
#include "help.h"
#include "roster.h"
@@ -2995,7 +2996,7 @@
return;
}
mdir = expand_filename(settings_opt_get("modules_dir"));
- path = g_module_build_path(mdir, arg);
+ path = g_module_build_path(mdir ? mdir : PKGLIB_DIR, arg);
mod = g_module_open(path, G_MODULE_BIND_LAZY);
if (!mod)
scr_LogPrint(LPRINT_LOGNORM, "Module loading failed: %s",