Index: Makefile
===================================================================
--- Makefile	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ Makefile	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -11,5 +11,5 @@
 # Program variables
 objects = bitlbee.o dcc.o help.o ipc.o irc.o irc_im.o irc_channel.o irc_commands.o irc_send.o irc_user.o irc_util.o nick.o $(OTR_BI) query.o root_commands.o set.o storage.o $(STORAGE_OBJS) unix.o conf.o log.o
-headers = $(wildcard $(_SRCDIR_)*.h $(_SRCDIR_)lib/*.h $(_SRCDIR_)protocols/*.h)
+headers = $(foreach dir,./ ./lib/ ./protocols/,$(patsubst $(_SRCDIR_)%,%,$(wildcard $(_SRCDIR_)$(dir)*.h)))
 subdirs = lib protocols
 
@@ -92,13 +92,13 @@
 
 install-dev:
-	mkdir -p $(DESTDIR)$(INCLUDEDIR)
+	mkdir -p $(DESTDIR)$(INCLUDEDIR) $(DESTDIR)$(INCLUDEDIR)lib $(DESTDIR)$(INCLUDEDIR)protocols
 	$(INSTALL) -m 0644 config.h $(DESTDIR)$(INCLUDEDIR)
-	for i in $(headers); do $(INSTALL) -m 0644 $$i $(DESTDIR)$(INCLUDEDIR); done
+	for i in $(headers); do $(INSTALL) -m 0644 $(_SRCDIR_)$$i $(DESTDIR)$(INCLUDEDIR)$$i; done
 	mkdir -p $(DESTDIR)$(PCDIR)
 	$(INSTALL) -m 0644 bitlbee.pc $(DESTDIR)$(PCDIR)
 
 uninstall-dev:
-	rm -f $(foreach hdr,$(headers),$(DESTDIR)$(INCLUDEDIR)/$(hdr))
-	-rmdir $(DESTDIR)$(INCLUDEDIR)
+	rm -f $(foreach hdr,$(headers),$(DESTDIR)$(INCLUDEDIR)$(hdr))
+	-rmdir $(DESTDIR)$(INCLUDEDIR)lib $(DESTDIR)$(INCLUDEDIR)protocols $(DESTDIR)$(INCLUDEDIR)
 	rm -f $(DESTDIR)$(PCDIR)/bitlbee.pc
 
Index: bitlbee.h
===================================================================
--- bitlbee.h	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ bitlbee.h	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -44,5 +44,5 @@
 
 #if HAVE_CONFIG_H
-#include <config.h>
+#include "config.h"
 #endif
 
@@ -132,19 +132,19 @@
 #define PASSWORD_PENDING "\r\rchangeme\r\r"
 
-#include "bee.h"
+#include "protocols/bee.h"
 #include "irc.h"
 #include "storage.h"
 #include "set.h"
-#include "nogaim.h"
+#include "protocols/nogaim.h"
 #include "commands.h"
-#include "account.h"
+#include "protocols/account.h"
 #include "nick.h"
 #include "conf.h"
 #include "log.h"
-#include "ini.h"
+#include "lib/ini.h"
 #include "query.h"
 #include "sock.h"
-#include "misc.h"
-#include "proxy.h"
+#include "lib/misc.h"
+#include "lib/proxy.h"
 
 typedef struct global {
Index: conf.c
===================================================================
--- conf.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ conf.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -30,9 +30,9 @@
 #include <stdlib.h>
 #include "conf.h"
-#include "ini.h"
-#include "url.h"
+#include "lib/ini.h"
+#include "lib/url.h"
 #include "ipc.h"
 
-#include "proxy.h"
+#include "lib/proxy.h"
 
 static int conf_loadini(conf_t *conf, char *file);
Index: configure
===================================================================
--- configure	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ configure	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -231,5 +231,5 @@
 
 echo CFLAGS=$CFLAGS $CPPFLAGS >> Makefile.settings
-echo CFLAGS+=-I${srcdir} -I${srcdir}/lib -I${srcdir}/protocols -I. >> Makefile.settings
+echo CFLAGS+=-I${srcdir} >> Makefile.settings
 
 echo CFLAGS+=-DHAVE_CONFIG_H -D_GNU_SOURCE >> Makefile.settings
@@ -707,5 +707,5 @@
 Version: $BITLBEE_VERSION
 Libs:
-Cflags: -I\${includedir}
+Cflags:
 
 EOF
Index: dcc.c
===================================================================
--- dcc.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ dcc.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -24,5 +24,5 @@
 #define BITLBEE_CORE
 #include "bitlbee.h"
-#include "ft.h"
+#include "protocols/ft.h"
 #include "dcc.h"
 #include <netinet/tcp.h>
Index: lib/arc.c
===================================================================
--- lib/arc.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/arc.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -45,6 +45,6 @@
 #include <stdlib.h>
 #include <string.h>
-#include "misc.h"
-#include "arc.h"
+#include "lib/misc.h"
+#include "lib/arc.h"
 
 /* Add some seed to the password, to make sure we *never* use the same key.
Index: lib/base64.c
===================================================================
--- lib/base64.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/base64.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -25,5 +25,5 @@
 #include <glib.h>
 #include <string.h>
-#include "base64.h"
+#include "lib/base64.h"
 
 char *tobase64(const char *text)
Index: lib/events_glib.c
===================================================================
--- lib/events_glib.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/events_glib.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -38,5 +38,5 @@
 #include <fcntl.h>
 #include <errno.h>
-#include "proxy.h"
+#include "lib/proxy.h"
 
 typedef struct _GaimIOClosure {
Index: lib/events_libevent.c
===================================================================
--- lib/events_libevent.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/events_libevent.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -34,5 +34,5 @@
 #include <sys/time.h>
 #include <event.h>
-#include "proxy.h"
+#include "lib/proxy.h"
 
 static void b_main_restart();
Index: lib/http_client.c
===================================================================
--- lib/http_client.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/http_client.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -27,6 +27,6 @@
 #include <stdio.h>
 
-#include "http_client.h"
-#include "url.h"
+#include "lib/http_client.h"
+#include "lib/url.h"
 #include "sock.h"
 
Index: lib/http_client.h
===================================================================
--- lib/http_client.h	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/http_client.h	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -34,5 +34,5 @@
 
 #include <glib.h>
-#include "ssl_client.h"
+#include "lib/ssl_client.h"
 
 struct http_request;
Index: lib/json.c
===================================================================
--- lib/json.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/json.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -30,5 +30,5 @@
 #include <glib.h>
 
-#include "json.h"
+#include "lib/json.h"
 
 #ifdef _MSC_VER
Index: lib/json_util.c
===================================================================
--- lib/json_util.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/json_util.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -26,5 +26,5 @@
 #include <glib.h>
 
-#include "json_util.h"
+#include "lib/json_util.h"
 
 json_value *json_o_get(const json_value *obj, const json_char *name)
Index: lib/json_util.h
===================================================================
--- lib/json_util.h	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/json_util.h	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -22,5 +22,5 @@
 ****************************************************************************/
 
-#include "json.h"
+#include "lib/json.h"
 
 #define JSON_O_FOREACH(o, k, v) \
Index: lib/md5.c
===================================================================
--- lib/md5.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/md5.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -1,3 +1,3 @@
-#include "md5.h"
+#include "lib/md5.h"
 
 /* Creates a new GChecksum in ctx */
Index: lib/misc.c
===================================================================
--- lib/misc.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/misc.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -32,7 +32,7 @@
 
 #define BITLBEE_CORE
-#include "nogaim.h"
-#include "base64.h"
-#include "md5.h"
+#include "protocols/nogaim.h"
+#include "lib/base64.h"
+#include "lib/md5.h"
 #include <stdio.h>
 #include <stdlib.h>
@@ -47,6 +47,6 @@
 #endif
 
-#include "md5.h"
-#include "ssl_client.h"
+#include "lib/md5.h"
+#include "lib/ssl_client.h"
 
 void strip_linefeed(gchar *text)
Index: lib/oauth.c
===================================================================
--- lib/oauth.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/oauth.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -26,10 +26,10 @@
 #include <stdlib.h>
 #include <string.h>
-#include "http_client.h"
-#include "base64.h"
-#include "misc.h"
-#include "sha1.h"
-#include "url.h"
-#include "oauth.h"
+#include "lib/http_client.h"
+#include "lib/base64.h"
+#include "lib/misc.h"
+#include "lib/sha1.h"
+#include "lib/url.h"
+#include "lib/oauth.h"
 
 #define HMAC_BLOCK_SIZE 64
Index: lib/oauth2.c
===================================================================
--- lib/oauth2.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/oauth2.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -39,10 +39,10 @@
 
 #include <glib.h>
-#include "http_client.h"
-#include "oauth2.h"
-#include "oauth.h"
-#include "json.h"
-#include "json_util.h"
-#include "url.h"
+#include "lib/http_client.h"
+#include "lib/oauth2.h"
+#include "lib/oauth.h"
+#include "lib/json.h"
+#include "lib/json_util.h"
+#include "lib/url.h"
 
 char *oauth2_url(const struct oauth2_service *sp)
Index: lib/proxy.c
===================================================================
--- lib/proxy.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/proxy.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -33,7 +33,7 @@
 #include <fcntl.h>
 #include <errno.h>
-#include "nogaim.h"
-#include "proxy.h"
-#include "base64.h"
+#include "protocols/nogaim.h"
+#include "lib/proxy.h"
+#include "lib/base64.h"
 
 char proxyhost[128] = "";
Index: lib/proxy.h
===================================================================
--- lib/proxy.h	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/proxy.h	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -34,5 +34,5 @@
 #include <gmodule.h>
 
-#include "events.h"
+#include "lib/events.h"
 
 #define PROXY_NONE 0
Index: lib/sha1.c
===================================================================
--- lib/sha1.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/sha1.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -1,5 +1,6 @@
-#include "sha1.h"
+#include "lib/sha1.h"
 #include <string.h>
 #include <stdio.h>
+
 
 
Index: lib/ssl_client.h
===================================================================
--- lib/ssl_client.h	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/ssl_client.h	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -33,5 +33,5 @@
 
 #include <glib.h>
-#include "proxy.h"
+#include "lib/proxy.h"
 
 /* Some generic error codes. Especially SSL_AGAIN is important if you
Index: lib/ssl_gnutls.c
===================================================================
--- lib/ssl_gnutls.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/ssl_gnutls.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -29,6 +29,6 @@
 #include <fcntl.h>
 #include <unistd.h>
-#include "proxy.h"
-#include "ssl_client.h"
+#include "lib/proxy.h"
+#include "lib/ssl_client.h"
 #include "sock.h"
 #include "stdlib.h"
Index: lib/ssl_nss.c
===================================================================
--- lib/ssl_nss.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/ssl_nss.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -27,6 +27,6 @@
 
 #include "bitlbee.h"
-#include "proxy.h"
-#include "ssl_client.h"
+#include "lib/proxy.h"
+#include "lib/ssl_client.h"
 #include "sock.h"
 #include <nspr.h>
Index: lib/ssl_openssl.c
===================================================================
--- lib/ssl_openssl.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/ssl_openssl.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -32,6 +32,6 @@
 
 #include "bitlbee.h"
-#include "proxy.h"
-#include "ssl_client.h"
+#include "lib/proxy.h"
+#include "lib/ssl_client.h"
 #include "sock.h"
 
Index: lib/url.c
===================================================================
--- lib/url.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/url.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -24,5 +24,5 @@
 */
 
-#include "url.h"
+#include "lib/url.h"
 
 /* Convert an URL to a url_t structure */
Index: lib/xmltree.c
===================================================================
--- lib/xmltree.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ lib/xmltree.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -28,5 +28,5 @@
 #include <stdio.h>
 
-#include "xmltree.h"
+#include "lib/xmltree.h"
 
 #define g_strcasecmp g_ascii_strcasecmp
Index: protocols/account.c
===================================================================
--- protocols/account.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/account.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -26,5 +26,5 @@
 #define BITLBEE_CORE
 #include "bitlbee.h"
-#include "account.h"
+#include "protocols/account.h"
 
 static const char* account_protocols_local[] = {
Index: protocols/bee_ft.c
===================================================================
--- protocols/bee_ft.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/bee_ft.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -24,5 +24,5 @@
 #define BITLBEE_CORE
 #include "bitlbee.h"
-#include "ft.h"
+#include "protocols/ft.h"
 
 file_transfer_t *imcb_file_send_start(struct im_connection *ic, char *handle, char *file_name, size_t file_size)
Index: protocols/jabber/conference.c
===================================================================
--- protocols/jabber/conference.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/jabber/conference.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -23,5 +23,5 @@
 
 #include "jabber.h"
-#include "sha1.h"
+#include "lib/sha1.h"
 
 static xt_status jabber_chat_join_failed(struct im_connection *ic, struct xt_node *node, struct xt_node *orig);
Index: protocols/jabber/io.c
===================================================================
--- protocols/jabber/io.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/jabber/io.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -23,5 +23,5 @@
 
 #include "jabber.h"
-#include "ssl_client.h"
+#include "lib/ssl_client.h"
 
 static gboolean jabber_write_callback(gpointer data, gint fd, b_input_condition cond);
Index: protocols/jabber/iq.c
===================================================================
--- protocols/jabber/iq.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/jabber/iq.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -23,5 +23,5 @@
 
 #include "jabber.h"
-#include "sha1.h"
+#include "lib/sha1.h"
 
 static xt_status jabber_parse_roster(struct im_connection *ic, struct xt_node *node, struct xt_node *orig);
Index: protocols/jabber/jabber.c
===================================================================
--- protocols/jabber/jabber.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/jabber/jabber.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -28,10 +28,10 @@
 #include <stdio.h>
 
-#include "ssl_client.h"
-#include "xmltree.h"
+#include "lib/ssl_client.h"
+#include "lib/xmltree.h"
 #include "bitlbee.h"
 #include "jabber.h"
-#include "oauth.h"
-#include "md5.h"
+#include "lib/oauth.h"
+#include "lib/md5.h"
 
 GSList *jabber_connections;
Index: protocols/jabber/jabber.h
===================================================================
--- protocols/jabber/jabber.h	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/jabber/jabber.h	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -28,6 +28,6 @@
 
 #include "bitlbee.h"
-#include "md5.h"
-#include "xmltree.h"
+#include "lib/md5.h"
+#include "lib/xmltree.h"
 
 extern GSList *jabber_connections;
Index: protocols/jabber/jabber_util.c
===================================================================
--- protocols/jabber/jabber_util.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/jabber/jabber_util.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -23,6 +23,6 @@
 
 #include "jabber.h"
-#include "md5.h"
-#include "base64.h"
+#include "lib/md5.h"
+#include "lib/base64.h"
 
 static unsigned int next_id = 1;
Index: protocols/jabber/s5bytestream.c
===================================================================
--- protocols/jabber/s5bytestream.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/jabber/s5bytestream.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -23,5 +23,5 @@
 
 #include "jabber.h"
-#include "sha1.h"
+#include "lib/sha1.h"
 #include "lib/ftutil.h"
 #include <poll.h>
Index: protocols/jabber/sasl.c
===================================================================
--- protocols/jabber/sasl.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/jabber/sasl.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -25,7 +25,7 @@
 
 #include "jabber.h"
-#include "base64.h"
-#include "oauth2.h"
-#include "oauth.h"
+#include "lib/base64.h"
+#include "lib/oauth2.h"
+#include "lib/oauth.h"
 
 const struct oauth2_service oauth2_service_google =
Index: protocols/jabber/si.c
===================================================================
--- protocols/jabber/si.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/jabber/si.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -23,5 +23,5 @@
 
 #include "jabber.h"
-#include "sha1.h"
+#include "lib/sha1.h"
 
 void jabber_si_answer_request(file_transfer_t *ft);
Index: protocols/msn/msn.c
===================================================================
--- protocols/msn/msn.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/msn/msn.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -24,5 +24,5 @@
 */
 
-#include "nogaim.h"
+#include "protocols/nogaim.h"
 #include "soap.h"
 #include "msn.h"
Index: protocols/msn/msn_util.c
===================================================================
--- protocols/msn/msn_util.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/msn/msn_util.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -24,7 +24,7 @@
 */
 
-#include "nogaim.h"
+#include "protocols/nogaim.h"
 #include "msn.h"
-#include "md5.h"
+#include "lib/md5.h"
 #include "soap.h"
 #include <ctype.h>
Index: protocols/msn/ns.c
===================================================================
--- protocols/msn/ns.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/msn/ns.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -26,10 +26,10 @@
 #include <ctype.h>
 #include <sys/utsname.h>
-#include "nogaim.h"
+#include "protocols/nogaim.h"
 #include "msn.h"
-#include "md5.h"
-#include "sha1.h"
+#include "lib/md5.h"
+#include "lib/sha1.h"
 #include "soap.h"
-#include "xmltree.h"
+#include "lib/xmltree.h"
 
 static gboolean msn_ns_connected(gpointer data, gint source, b_input_condition cond);
Index: protocols/msn/sb.c
===================================================================
--- protocols/msn/sb.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/msn/sb.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -25,7 +25,7 @@
 
 #include <ctype.h>
-#include "nogaim.h"
+#include "protocols/nogaim.h"
 #include "msn.h"
-#include "md5.h"
+#include "lib/md5.h"
 #include "soap.h"
 #include "invitation.h"
Index: protocols/msn/soap.c
===================================================================
--- protocols/msn/soap.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/msn/soap.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -27,13 +27,13 @@
 */
 
-#include "http_client.h"
+#include "lib/http_client.h"
 #include "soap.h"
 #include "msn.h"
 #include "bitlbee.h"
-#include "url.h"
-#include "misc.h"
-#include "sha1.h"
-#include "base64.h"
-#include "xmltree.h"
+#include "lib/url.h"
+#include "lib/misc.h"
+#include "lib/sha1.h"
+#include "lib/base64.h"
+#include "lib/xmltree.h"
 #include <ctype.h>
 #include <errno.h>
Index: protocols/msn/soap.h
===================================================================
--- protocols/msn/soap.h	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/msn/soap.h	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -40,5 +40,5 @@
 #include <arpa/inet.h>
 #include <unistd.h>
-#include "nogaim.h"
+#include "protocols/nogaim.h"
 
 
Index: protocols/msn/tables.c
===================================================================
--- protocols/msn/tables.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/msn/tables.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -24,5 +24,5 @@
 */
 
-#include "nogaim.h"
+#include "protocols/nogaim.h"
 #include "msn.h"
 
Index: protocols/nogaim.c
===================================================================
--- protocols/nogaim.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/nogaim.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -35,5 +35,5 @@
 #include <ctype.h>
 
-#include "nogaim.h"
+#include "protocols/nogaim.h"
 
 GSList *connections;
Index: protocols/nogaim.h
===================================================================
--- protocols/nogaim.h	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/nogaim.h	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -46,9 +46,9 @@
 
 #include "bitlbee.h"
-#include "account.h"
-#include "proxy.h"
+#include "protocols/account.h"
+#include "lib/proxy.h"
 #include "query.h"
-#include "md5.h"
-#include "ft.h"
+#include "lib/md5.h"
+#include "protocols/ft.h"
 
 #define BUDDY_ALIAS_MAXLEN 388   /* because MSN names can be 387 characters */
Index: protocols/oscar/admin.c
===================================================================
--- protocols/oscar/admin.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/admin.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -1,3 +1,3 @@
-#include <aim.h>
+#include "aim.h"
 #include "admin.h"
 
Index: protocols/oscar/aim.h
===================================================================
--- protocols/oscar/aim.h	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/aim.h	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -792,5 +792,5 @@
 int aim_sncmp(const char *a, const char *b);
 
-#include <aim_internal.h>
+#include "aim_internal.h"
 
 /*
Index: protocols/oscar/auth.c
===================================================================
--- protocols/oscar/auth.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/auth.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -4,7 +4,7 @@
  */
 
-#include <aim.h>
-
-#include "md5.h"
+#include "aim.h"
+
+#include "lib/md5.h"
 
 static int aim_encode_password(const char *password, unsigned char *encoded);
Index: protocols/oscar/bos.c
===================================================================
--- protocols/oscar/bos.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/bos.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -1,3 +1,3 @@
-#include <aim.h>
+#include "aim.h"
 #include "bos.h"
 
Index: protocols/oscar/buddylist.c
===================================================================
--- protocols/oscar/buddylist.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/buddylist.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -1,3 +1,3 @@
-#include <aim.h>
+#include "aim.h"
 #include "buddylist.h"
 
Index: protocols/oscar/chat.c
===================================================================
--- protocols/oscar/chat.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/chat.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -6,5 +6,5 @@
  */
 
-#include <aim.h>
+#include "aim.h"
 #include <glib.h>
 #include "info.h"
Index: protocols/oscar/chatnav.c
===================================================================
--- protocols/oscar/chatnav.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/chatnav.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -8,5 +8,5 @@
  */
 
-#include <aim.h>
+#include "aim.h"
 #include "chatnav.h"
 
Index: protocols/oscar/conn.c
===================================================================
--- protocols/oscar/conn.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/conn.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -7,5 +7,5 @@
  */
 
-#include <aim.h>
+#include "aim.h"
 #include "sock.h"
 
Index: protocols/oscar/icq.c
===================================================================
--- protocols/oscar/icq.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/icq.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -4,5 +4,5 @@
  */
 
-#include <aim.h>
+#include "aim.h"
 #include "icq.h"
 
Index: protocols/oscar/im.c
===================================================================
--- protocols/oscar/im.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/im.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -20,5 +20,5 @@
  */
 
-#include <aim.h>
+#include "aim.h"
 #include "im.h"
 #include "info.h"
Index: protocols/oscar/info.c
===================================================================
--- protocols/oscar/info.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/info.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -7,5 +7,5 @@
  */
 
-#include <aim.h>
+#include "aim.h"
 #include "info.h"
 
Index: protocols/oscar/misc.c
===================================================================
--- protocols/oscar/misc.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/misc.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -12,5 +12,5 @@
  */
 
-#include <aim.h>
+#include "aim.h"
 
 /*
Index: protocols/oscar/msgcookie.c
===================================================================
--- protocols/oscar/msgcookie.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/msgcookie.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -12,5 +12,5 @@
  */
 
-#include <aim.h>
+#include "aim.h"
 #include "info.h"
 
Index: protocols/oscar/oscar.c
===================================================================
--- protocols/oscar/oscar.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/oscar.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -31,7 +31,7 @@
 #include <sys/stat.h>
 #include <glib.h>
-#include "nogaim.h"
+#include "protocols/nogaim.h"
 #include "bitlbee.h"
-#include "proxy.h"
+#include "lib/proxy.h"
 #include "sock.h"
 
Index: protocols/oscar/oscar_util.c
===================================================================
--- protocols/oscar/oscar_util.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/oscar_util.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -1,3 +1,3 @@
-#include <aim.h>
+#include "aim.h"
 #include <ctype.h>
 
Index: protocols/oscar/rxhandlers.c
===================================================================
--- protocols/oscar/rxhandlers.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/rxhandlers.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -8,5 +8,5 @@
  */
 
-#include <aim.h>
+#include "aim.h"
 
 struct aim_rxcblist_s {
Index: protocols/oscar/rxqueue.c
===================================================================
--- protocols/oscar/rxqueue.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/rxqueue.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -7,5 +7,5 @@
  */
 
-#include <aim.h>
+#include "aim.h"
 
 #include <sys/socket.h>
Index: protocols/oscar/search.c
===================================================================
--- protocols/oscar/search.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/search.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -7,5 +7,5 @@
  */
 
-#include <aim.h>
+#include "aim.h"
 
 /* XXX can this be integrated with the rest of the error handling? */
Index: protocols/oscar/service.c
===================================================================
--- protocols/oscar/service.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/service.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -4,7 +4,7 @@
  */
 
-#include <aim.h>
-
-#include "md5.h"
+#include "aim.h"
+
+#include "lib/md5.h"
 
 /* Client Online (group 1, subtype 2) */
Index: protocols/oscar/snac.c
===================================================================
--- protocols/oscar/snac.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/snac.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -13,5 +13,5 @@
  */
 
-#include <aim.h>
+#include "aim.h"
 
 static aim_snacid_t aim_newsnac(aim_session_t *sess, aim_snac_t *newsnac);
Index: protocols/oscar/ssi.c
===================================================================
--- protocols/oscar/ssi.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/ssi.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -23,5 +23,5 @@
  */
 
-#include <aim.h>
+#include "aim.h"
 #include "ssi.h"
 
Index: protocols/oscar/stats.c
===================================================================
--- protocols/oscar/stats.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/stats.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -1,4 +1,4 @@
 
-#include <aim.h>
+#include "aim.h"
 
 static int reportinterval(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac,
Index: protocols/oscar/tlv.c
===================================================================
--- protocols/oscar/tlv.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/tlv.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -1,3 +1,3 @@
-#include <aim.h>
+#include "aim.h"
 
 static void freetlv(aim_tlv_t **oldtlv)
Index: protocols/oscar/txqueue.c
===================================================================
--- protocols/oscar/txqueue.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/oscar/txqueue.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -6,5 +6,5 @@
  */
 
-#include <aim.h>
+#include "aim.h"
 #include "im.h"
 
Index: protocols/skype/skype.c
===================================================================
--- protocols/skype/skype.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/skype/skype.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -24,6 +24,6 @@
 #include <poll.h>
 #include <stdio.h>
-#include <bitlbee.h>
-#include <ssl_client.h>
+#include "bitlbee.h"
+#include "lib/ssl_client.h"
 
 #define SKYPE_DEFAULT_SERVER "localhost"
Index: protocols/twitter/twitter.c
===================================================================
--- protocols/twitter/twitter.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/twitter/twitter.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -23,10 +23,10 @@
 ****************************************************************************/
 
-#include "nogaim.h"
-#include "oauth.h"
+#include "protocols/nogaim.h"
+#include "lib/oauth.h"
 #include "twitter.h"
 #include "twitter_http.h"
 #include "twitter_lib.h"
-#include "url.h"
+#include "lib/url.h"
 
 GSList *twitter_connections = NULL;
Index: protocols/twitter/twitter.h
===================================================================
--- protocols/twitter/twitter.h	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/twitter/twitter.h	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -23,5 +23,5 @@
 ****************************************************************************/
 
-#include "nogaim.h"
+#include "protocols/nogaim.h"
 
 #ifndef _TWITTER_H
Index: protocols/twitter/twitter_http.c
===================================================================
--- protocols/twitter/twitter_http.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/twitter/twitter_http.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -31,8 +31,8 @@
 #include "twitter.h"
 #include "bitlbee.h"
-#include "url.h"
-#include "misc.h"
-#include "base64.h"
-#include "oauth.h"
+#include "lib/url.h"
+#include "lib/misc.h"
+#include "lib/base64.h"
+#include "lib/oauth.h"
 #include <ctype.h>
 #include <errno.h>
Index: protocols/twitter/twitter_http.h
===================================================================
--- protocols/twitter/twitter_http.h	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/twitter/twitter_http.h	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -25,6 +25,6 @@
 #define _TWITTER_HTTP_H
 
-#include "nogaim.h"
-#include "http_client.h"
+#include "protocols/nogaim.h"
+#include "lib/http_client.h"
 
 typedef enum {
Index: protocols/twitter/twitter_lib.c
===================================================================
--- protocols/twitter/twitter_lib.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/twitter/twitter_lib.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -32,9 +32,9 @@
 #include "twitter.h"
 #include "bitlbee.h"
-#include "url.h"
-#include "misc.h"
-#include "base64.h"
+#include "lib/url.h"
+#include "lib/misc.h"
+#include "lib/base64.h"
 #include "twitter_lib.h"
-#include "json_util.h"
+#include "lib/json_util.h"
 #include <ctype.h>
 #include <errno.h>
Index: protocols/twitter/twitter_lib.h
===================================================================
--- protocols/twitter/twitter_lib.h	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/twitter/twitter_lib.h	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -26,5 +26,5 @@
 #define _TWITTER_LIB_H
 
-#include "nogaim.h"
+#include "protocols/nogaim.h"
 #include "twitter_http.h"
 
Index: protocols/yahoo/libyahoo2.c
===================================================================
--- protocols/yahoo/libyahoo2.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/yahoo/libyahoo2.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -76,6 +76,6 @@
 #include <ctype.h>
 
-#include "sha1.h"
-#include "md5.h"
+#include "lib/sha1.h"
+#include "lib/md5.h"
 #include "yahoo2.h"
 #include "yahoo_httplib.h"
@@ -89,6 +89,6 @@
 #endif
 
-#include "base64.h"
-#include "http_client.h"
+#include "lib/base64.h"
+#include "lib/http_client.h"
 
 #ifdef USE_STRUCT_CALLBACKS
Index: protocols/yahoo/yahoo.c
===================================================================
--- protocols/yahoo/yahoo.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ protocols/yahoo/yahoo.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -28,5 +28,5 @@
 #include <sys/stat.h>
 #include <ctype.h>
-#include "nogaim.h"
+#include "protocols/nogaim.h"
 #include "yahoo2.h"
 #include "yahoo2_callbacks.h"
Index: storage_xml.c
===================================================================
--- storage_xml.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ storage_xml.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -26,8 +26,8 @@
 #define BITLBEE_CORE
 #include "bitlbee.h"
-#include "base64.h"
-#include "arc.h"
-#include "md5.h"
-#include "xmltree.h"
+#include "lib/base64.h"
+#include "lib/arc.h"
+#include "lib/md5.h"
+#include "lib/xmltree.h"
 
 #include <glib/gstdio.h>
Index: tests/check_arc.c
===================================================================
--- tests/check_arc.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ tests/check_arc.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -5,5 +5,5 @@
 #include <string.h>
 #include <stdio.h>
-#include "arc.h"
+#include "lib/arc.h"
 
 char *password = "ArcVier";
Index: tests/check_md5.c
===================================================================
--- tests/check_md5.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ tests/check_md5.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -5,5 +5,5 @@
 #include <string.h>
 #include <stdio.h>
-#include "md5.h"
+#include "lib/md5.h"
 
 /* From RFC 1321 */
Index: tests/check_nick.c
===================================================================
--- tests/check_nick.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ tests/check_nick.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -6,5 +6,5 @@
 #include "irc.h"
 #include "set.h"
-#include "misc.h"
+#include "lib/misc.h"
 #include "bitlbee.h"
 
Index: tests/check_util.c
===================================================================
--- tests/check_util.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ tests/check_util.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -6,6 +6,6 @@
 #include "irc.h"
 #include "set.h"
-#include "misc.h"
-#include "url.h"
+#include "lib/misc.h"
+#include "lib/url.h"
 
 START_TEST(test_strip_linefeed){
Index: unix.c
===================================================================
--- unix.c	(revision 5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11)
+++ unix.c	(revision 0b9daacddaaf45ad603cb681022da77b2d6c2407)
@@ -26,12 +26,12 @@
 #include "bitlbee.h"
 
-#include "arc.h"
-#include "base64.h"
+#include "lib/arc.h"
+#include "lib/base64.h"
 #include "commands.h"
 #include "protocols/nogaim.h"
 #include "help.h"
 #include "ipc.h"
-#include "md5.h"
-#include "misc.h"
+#include "lib/md5.h"
+#include "lib/misc.h"
 #include <signal.h>
 #include <unistd.h>
