diff mcabber/configure.ac @ 1607:14690e624e9d

Add modules
author Myhailo Danylenko <isbear@ukrpost.net>
date Sun, 11 Oct 2009 16:01:52 +0200
parents d7f26538c24c
children af5bdd167b04
line wrap: on
line diff
--- a/mcabber/configure.ac	Sun Oct 11 16:01:31 2009 +0200
+++ b/mcabber/configure.ac	Sun Oct 11 16:01:52 2009 +0200
@@ -130,13 +130,22 @@
               [Define if ncurses has ESCDELAY variable])
 fi
 
+AC_ARG_ENABLE(modules, [  --enable-modules         enable dynamic modules loading],
+              enable_modules=$enableval)
+if test "x$enable_modules" = "xyes"; then
+  AC_DEFINE(MODULES_ENABLE, 1, [Define if you want dynamic modules loading])
+  gmodule_module=gmodule
+else
+  gmodule_module=''
+fi
+
 # Check for glib
 AM_PATH_GLIB_2_0(2.14.0,
                  [AC_DEFINE([HAVE_GLIB_REGEX], 1,
                             [Define if GLib has regex support])],
                  [AM_PATH_GLIB_2_0(2.0.0, , AC_MSG_ERROR([glib is required]),
-                                  [g_list_append])],
-                 [g_regex_new])
+                                  [g_list_append], ["$gmodule_module"])],
+                 [g_regex_new "$gmodule_module"])
 
 # Check for loudmouth
 PKG_CHECK_MODULES(LOUDMOUTH, loudmouth-1.0 >= 1.4.3)