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
This commit is contained in:
Timo Sirainen 2001-01-16 00:14:14 +00:00 committed by cras
commit e66e10af19
5 changed files with 77 additions and 33 deletions

View file

@ -5,7 +5,7 @@
#define IRSSI_WEBSITE "http://irssi.org"
#ifdef HAVE_CONFIG_H
#include <config.h>
#include "../config.h"
#endif
#include <stdio.h>
@ -39,7 +39,9 @@
#endif
#include <glib.h>
#include <gmodule.h>
#ifdef HAVE_GMODULE
# include <gmodule.h>
#endif
#include "core/memdebug.h"
#include "nls.h"

View file

@ -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)

View file

@ -21,7 +21,9 @@ enum {
typedef struct {
char *name;
#ifdef HAVE_GMODULE
GModule *gmodule;
#endif
} MODULE_REC;
extern GSList *modules;