diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2005-12-18 15:28:52 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2005-12-18 15:28:52 +0100 |
commit | 00f434f7854d593b8a204724281ec4c794d0098c (patch) | |
tree | 4ea741066e1e3feb77db10082dce97c0f28efeb6 | |
parent | 578d627c65491cba8ac6a0bb0f2d05147bf87535 (diff) | |
parent | 32c632fb46e58043a2d437c44cad783a59b7aea9 (diff) |
Stuff from Jelmer.
-rw-r--r-- | conf.c | 1 | ||||
-rw-r--r-- | conf.h | 1 | ||||
-rwxr-xr-x | configure | 16 | ||||
-rw-r--r-- | protocols/nogaim.c | 4 |
4 files changed, 14 insertions, 8 deletions
@@ -54,6 +54,7 @@ conf_t *conf_load( int argc, char *argv[] ) conf->authmode = AUTHMODE_OPEN; conf->password = NULL; conf->configdir = g_strdup( CONFIG ); + conf->plugindir = g_strdup( PLUGINDIR ); conf->motdfile = g_strdup( ETCDIR "/motd.txt" ); conf->ping_interval = 180; conf->ping_timeout = 300; @@ -40,6 +40,7 @@ typedef struct conf char *password; char *hostname; char *configdir; + char *plugindir; char *motdfile; char *primary_storage; char **migrate_storage; @@ -144,10 +144,14 @@ else exit 1; fi -if type pkg-config > /dev/null 2>/dev/null && pkg-config glib-2.0; then +if [ -z "$PKG_CONFIG" ]; then + PKG_CONFIG=pkg-config +fi + +if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG glib-2.0; then cat<<EOF>>Makefile.settings -EFLAGS+=`pkg-config --libs glib-2.0 gmodule-2.0` -CFLAGS+=`pkg-config --cflags glib-2.0 gmodule-2.0` +EFLAGS+=`$PKG_CONFIG --libs glib-2.0 gmodule-2.0` +CFLAGS+=`$PKG_CONFIG --cflags glib-2.0 gmodule-2.0` EOF echo '#define GLIB2' >> config.h elif type glib-config > /dev/null 2> /dev/null; then @@ -189,10 +193,10 @@ EOF detect_nss() { - if type pkg-config > /dev/null 2>/dev/null && pkg-config mozilla-nss; then + if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG mozilla-nss; then cat<<EOF>>Makefile.settings -EFLAGS+=`pkg-config --libs mozilla-nss` -CFLAGS+=`pkg-config --cflags mozilla-nss` +EFLAGS+=`$PKG_CONFIG --libs mozilla-nss` +CFLAGS+=`$PKG_CONFIG --cflags mozilla-nss` EOF ssl=nss diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 4966a76f..29ae860a 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -81,14 +81,14 @@ void load_plugins(void) GDir *dir; GError *error = NULL; - dir = g_dir_open(PLUGINDIR, 0, &error); + dir = g_dir_open(global.conf->plugindir, 0, &error); if (dir) { const gchar *entry; char *path; while ((entry = g_dir_read_name(dir))) { - path = g_build_filename(PLUGINDIR, entry, NULL); + path = g_build_filename(global.conf->plugindir, entry, NULL); if(!path) { log_message(LOGLVL_WARNING, "Can't build path for %s\n", entry); continue; |