diff options
author | Timo Sirainen <cras@irssi.org> | 2001-01-16 00:14:14 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-01-16 00:14:14 +0000 |
commit | e66e10af19f3975ce28727be05016a319b488bd0 (patch) | |
tree | 0f1ba0c1684e82b48eec4ecaa290f331219a96b0 /src/core | |
parent | 0d62878d6ec1a3f07f31c2212bd3608bfc602cab (diff) | |
download | irssi-e66e10af19f3975ce28727be05016a319b488bd0.zip |
Check if libtool creates libraries in .libs dir. Check if -lgmodule
doesn't work. #include "../config.h" instead of <config.h>, this should
fix problems when config.h is found in some -I dir.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1125 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/modules.c | 10 | ||||
-rw-r--r-- | src/core/modules.h | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/core/modules.c b/src/core/modules.c index 8696b973..614fbf0a 100644 --- a/src/core/modules.c +++ b/src/core/modules.c @@ -239,7 +239,8 @@ char *module_get_name(const char *path) return module_name; } -GModule *module_open(const char *name) +#ifdef HAVE_GMODULE +static GModule *module_open(const char *name) { struct stat statbuf; GModule *module; @@ -310,9 +311,11 @@ static int module_load_name(const char *path, const char *name) signal_emit("module loaded", 1, rec); return TRUE; } +#endif int module_load(const char *path) { +#ifdef HAVE_GMODULE char *name; int ret; @@ -326,10 +329,14 @@ int module_load(const char *path) g_free(name); return ret; +#else + return FALSE; +#endif } void module_unload(MODULE_REC *module) { +#ifdef HAVE_GMODULE void (*module_deinit) (void); char *deinitfunc; @@ -353,6 +360,7 @@ void module_unload(MODULE_REC *module) g_module_close(module->gmodule); g_free(module->name); g_free(module); +#endif } static void uniq_get_modules(char *key, void *value, GSList **list) diff --git a/src/core/modules.h b/src/core/modules.h index 61e4f319..12730c53 100644 --- a/src/core/modules.h +++ b/src/core/modules.h @@ -21,7 +21,9 @@ enum { typedef struct { char *name; +#ifdef HAVE_GMODULE GModule *gmodule; +#endif } MODULE_REC; extern GSList *modules; |