aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2017-05-14 14:11:07 +0200
committerMarius Halden <marius.h@lden.org>2017-05-14 14:11:07 +0200
commit52b77bf257ac24a69f596748c5c56af1f0cdac86 (patch)
tree318d739b54968f15197a2bdd1aaca96179b1862a
parent64f4d843217aed18605284f8c4ebba93724e5a63 (diff)
parent54b2a367f6986a74fd6b4e50a0ae2c5cdb3a40cb (diff)
Merge branch 'master' into patched-master
-rw-r--r--Makefile7
-rwxr-xr-xconfigure14
-rw-r--r--protocols/nogaim.c6
-rw-r--r--storage_xml.c4
4 files changed, 25 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index be554e02..25c04b2b 100644
--- a/Makefile
+++ b/Makefile
@@ -99,9 +99,16 @@ endif
install-bin:
mkdir -p $(DESTDIR)$(SBINDIR)
$(INSTALL) -m 0755 $(OUTFILE) $(DESTDIR)$(SBINDIR)/$(OUTFILE)
+ifdef IMPLIB
+ # import library for cygwin
+ $(INSTALL) -m 0644 $(IMPLIB) $(DESTDIR)$(LIBDIR)/$(IMPLIB)
+endif
uninstall-bin:
rm -f $(DESTDIR)$(SBINDIR)/$(OUTFILE)
+ifdef IMPLIB
+ rm -f $(DESTDIR)$(LIBDIR)/$(IMPLIB)
+endif
install-dev:
mkdir -p $(DESTDIR)$(INCLUDEDIR)
diff --git a/configure b/configure
index ee50e4ab..fcbedc90 100755
--- a/configure
+++ b/configure
@@ -14,6 +14,7 @@ etcdir='$prefix/etc/bitlbee/'
mandir='$prefix/share/man/'
datadir='$prefix/share/bitlbee/'
config='/var/lib/bitlbee/'
+libdir='$prefix/lib/'
plugindir='$prefix/lib/bitlbee/'
includedir='$prefix/include/bitlbee/'
systemdsystemunitdir=''
@@ -174,6 +175,7 @@ etcdir=$(eval echo "$etcdir/" | sed 's/\/\{1,\}/\//g')
mandir=$(eval echo "$mandir/" | sed 's/\/\{1,\}/\//g')
datadir=$(eval echo "$datadir/" | sed 's/\/\{1,\}/\//g')
config=$(eval echo "$config/" | sed 's/\/\{1,\}/\//g')
+libdir=$(eval echo "$libdir/" | sed 's/\/\{1,\}/\//g')
plugindir=$(eval echo "$plugindir/" | sed 's/\/\{1,\}/\//g')
includedir=$(eval echo "$includedir"/ | sed 's/\/\{1,\}/\//g')
libevent=$(eval echo "$libevent"/ | sed 's/\/\{1,\}/\//g')
@@ -197,6 +199,7 @@ MANDIR=$mandir
DATADIR=$datadir
PLUGINDIR=$plugindir
CONFIG=$config
+LIBDIR=$libdir
INCLUDEDIR=$includedir
PCDIR=$pcdir
@@ -809,16 +812,23 @@ if ! make helloworld > /dev/null 2>&1; then
fi
fi
+pkgconfiglibs=''
+case "$arch" in
+CYGWIN* )
+ pkgconfiglibs='-L${libdir} -lbitlbee'
+esac
+
cat <<EOF >bitlbee.pc
prefix=$prefix
includedir=$includedir
plugindir=$plugindir
+libdir=$libdir
Name: bitlbee
Description: IRC to IM gateway
Requires: glib-2.0
Version: $BITLBEE_VERSION
-Libs:
+Libs: $pkgconfiglibs
Cflags: -I\${includedir}
EOF
@@ -930,6 +940,8 @@ AIX )
echo 'EFLAGS+=-Wl,-brtl' >> Makefile.settings
;;
CYGWIN* )
+ echo 'EFLAGS+=-Wl,--export-all,--out-implib,libbitlbee.dll.a' >> Makefile.settings
+ echo 'IMPLIB=libbitlbee.dll.a' >> Makefile.settings
;;
Windows )
echo 'Native windows compilation is not supported anymore, use cygwin instead.'
diff --git a/protocols/nogaim.c b/protocols/nogaim.c
index fad6976f..2937bdcc 100644
--- a/protocols/nogaim.c
+++ b/protocols/nogaim.c
@@ -771,7 +771,7 @@ int imc_away_send_update(struct im_connection *ic)
}
msg = ic->acc->flags & ACC_FLAG_AWAY_MESSAGE ? away : NULL;
away = imc_away_state_find(m, away, &msg) ? :
- (imc_away_state_find(m, "away", &msg) ? : m->data);
+ (imc_away_state_find(m, "away", NULL) ? : m->data);
} else if (ic->acc->flags & ACC_FLAG_STATUS_MESSAGE) {
away = NULL;
msg = set_getstr(&ic->acc->set, "status") ?
@@ -805,7 +805,7 @@ static char *imc_away_state_find(GList *gcm, char *away, char **message)
/* At least the Yahoo! module works better if message
contains no data unless it adds something to what
we have in state already. */
- if (strlen(m->data) == strlen(away)) {
+ if (message && strlen(m->data) == strlen(away)) {
*message = NULL;
}
@@ -831,7 +831,7 @@ static char *imc_away_state_find(GList *gcm, char *away, char **message)
for (j = 0; imc_away_alias_list[i][j]; j++) {
for (m = gcm; m; m = m->next) {
if (g_strcasecmp(imc_away_alias_list[i][j], m->data) == 0) {
- if (!keep_message) {
+ if (!keep_message && message) {
*message = NULL;
}
diff --git a/storage_xml.c b/storage_xml.c
index a921524f..cf4d35d7 100644
--- a/storage_xml.c
+++ b/storage_xml.c
@@ -293,12 +293,12 @@ static storage_status_t xml_load_real(irc_t *irc, const char *my_nick, const cha
goto error;
}
+ handle_settings(node, &xd->irc->b->set);
+
if (xt_handle(xp, NULL, 1) == XT_HANDLED) {
ret = STORAGE_OK;
}
- handle_settings(node, &xd->irc->b->set);
-
error:
xt_free(xp);
g_free(fn);