Index: configure
===================================================================
--- configure	(revision fd037705664ea03d7a0574c44161ae03b000fb2c)
+++ configure	(revision 3dc9d46cc20d287c266fed97f92d298ed721f7b3)
@@ -207,27 +207,4 @@
 echo 'EVENT_HANDLER=events_'$events'.o' >> Makefile.settings
 
-if [ "$events" = "libevent" ]; then
-	if ! [ -e "${libevent}include/event.h" ]; then
-		echo
-		echo 'Warning: Could not find event.h, you might have to install it and/or specify'
-		echo 'its location using the --libevent= argument. (Example: If event.h is in'
-		echo '/usr/local/include and binaries are in /usr/local/lib: --libevent=/usr/local)'
-	fi
-	
-	echo '#define EVENTS_LIBEVENT' >> config.h
-	cat <<EOF>>Makefile.settings
-EFLAGS+=-levent -L${libevent}lib
-CFLAGS+=-I${libevent}include
-EOF
-elif [ "$events" = "glib" ]; then
-	## We already use glib anyway, so this is all we need (and in fact not even this, but just to be sure...):
-	echo '#define EVENTS_GLIB' >> config.h
-else
-	echo
-	echo 'ERROR: Unknown event handler specified.'
-	exit 1
-fi
-echo 'EVENT_HANDLER=events_'$events'.o' >> Makefile.settings
-
 detect_gnutls()
 {
@@ -277,63 +254,70 @@
 }
 
-if [ "$msn" = 1 -o "$jabber" = 1 ]; then
-	if [ "$ssl" = "auto" ]; then
-		detect_gnutls
-		if [ "$ret" = "0" ]; then
-			detect_nss
-		fi;
-	elif [ "$ssl" = "gnutls" ]; then
-		detect_gnutls;
-	elif [ "$ssl" = "nss" ]; then
-		detect_nss;
-	elif [ "$ssl" = "openssl" ]; then
+if [ "$ssl" = "auto" ]; then
+	detect_gnutls
+	if [ "$ret" = "0" ]; then
+		detect_nss
+	fi
+elif [ "$ssl" = "gnutls" ]; then
+	detect_gnutls
+elif [ "$ssl" = "nss" ]; then
+	detect_nss
+elif [ "$ssl" = "openssl" ]; then
+	echo
+	echo 'No detection code exists for OpenSSL. Make sure that you have a complete'
+	echo 'install of OpenSSL (including devel/header files) before reporting'
+	echo 'compilation problems.'
+	echo
+	echo 'Also, keep in mind that the OpenSSL is, according to some people, not'
+	echo 'completely GPL-compatible. Using GnuTLS or NSS is recommended and better'
+	echo 'supported by us. However, on many BSD machines, OpenSSL can be considered'
+	echo 'part of the operating system, which makes it GPL-compatible.'
+	echo
+	echo 'For more info, see: http://www.openssl.org/support/faq.html#LEGAL2'
+	echo '                    http://www.gnome.org/~markmc/openssl-and-the-gpl.html'
+	echo
+	echo 'Please note that distributing a BitlBee binary which links to OpenSSL is'
+	echo 'probably illegal. If you want to create and distribute a binary BitlBee'
+	echo 'package, you really should use GnuTLS or NSS instead.'
+	echo
+	echo 'Also, the OpenSSL license requires us to say this:'
+	echo ' *    "This product includes software developed by the OpenSSL Project'
+	echo ' *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"'
+	
+	echo 'EFLAGS+=-lssl -lcrypto' >> Makefile.settings
+	
+	ret=1
+elif [ "$ssl" = "bogus" ]; then
+	echo
+	echo 'Using bogus SSL code. This means some features have to be disabled.'
+	
+	## Yes, you, at the console! How can you authenticate if you don't have any SSL!?
+	if [ "$msn" = "1" ]; then
 		echo
-		echo 'No detection code exists for OpenSSL. Make sure that you have a complete'
-		echo 'install of OpenSSL (including devel/header files) before reporting'
-		echo 'compilation problems.'
-		echo
-		echo 'Also, keep in mind that the OpenSSL is, according to some people, not'
-		echo 'completely GPL-compatible. Using GnuTLS or NSS is recommended and better'
-		echo 'supported by us. However, on many BSD machines, OpenSSL can be considered'
-		echo 'part of the operating system, which makes it GPL-compatible.'
-		echo
-		echo 'For more info, see: http://www.openssl.org/support/faq.html#LEGAL2'
-		echo '                    http://www.gnome.org/~markmc/openssl-and-the-gpl.html'
-		echo
-		echo 'Please note that distributing a BitlBee binary which links to OpenSSL is'
-		echo 'probably illegal. If you want to create and distribute a binary BitlBee'
-		echo 'package, you really should use GnuTLS or NSS instead.'
-		echo
-		echo 'Also, the OpenSSL license requires us to say this:'
-		echo ' *    "This product includes software developed by the OpenSSL Project'
-		echo ' *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"'
-		
-		echo 'EFLAGS+=-lssl -lcrypto' >> Makefile.settings
-		
-		ret=1;
-	elif [ "$ssl" = "bogus" ]; then
-		echo
-		echo 'Using bogus SSL code. This will not make the MSN module work, but it will'
-		echo 'allow you to use the Jabber module - although without working SSL support.'
-		
-		ret=1;
-	else
-		echo
-		echo 'ERROR: Unknown SSL library specified.'
-		exit 1;
-	fi
-	
-	if [ "$ret" = "0" ]; then
-		echo
-		echo 'ERROR: Could not find a suitable SSL library (GnuTLS, libnss or OpenSSL).'
-		echo '       This is necessary for MSN and full Jabber support. To continue,'
-		echo '       install a suitable SSL library or disable MSN support (--msn=0).'
-		echo '       If you want Jabber without SSL support you can try --ssl=bogus.'
-		
-		exit 1;
-	fi;
-	
-	echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings
-fi
+		echo 'Real SSL support is necessary for MSN authentication, will build without'
+		echo 'MSN protocol support.'
+		msn=0
+	fi
+	
+	ret=1
+else
+	echo
+	echo 'ERROR: Unknown SSL library specified.'
+	exit 1
+fi
+
+if [ "$ret" = "0" ]; then
+	echo
+	echo 'ERROR: Could not find a suitable SSL library (GnuTLS, libnss or OpenSSL).'
+	echo '       Please note that this script doesn'\''t have detection code for OpenSSL,'
+	echo '       so if you want to use that, you have to select it by hand. If you don'\''t'
+	echo '       need SSL support, you can select the "bogus" SSL library. (--ssl=bogus)'
+	
+	exit 1
+fi;
+
+echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings
+
+STORAGES="text xml"
 
 if [ "$ldap" = "auto" ]; then
@@ -342,10 +326,14 @@
 
 if [ "$ldap" = 0 ]; then
-	echo "LDAP_OBJ=" >> Makefile.settings
 	echo "#undef WITH_LDAP" >> config.h
 elif [ "$ldap" = 1 ]; then
 	echo "#define WITH_LDAP 1" >> config.h
-	echo "LDAP_OBJ=storage_ldap.o" >> Makefile.settings
-fi
+	STORAGES="$STORAGES ldap"
+fi
+
+for i in $STORAGES; do
+	STORAGE_OBJS="$STORAGE_OBJS storage_$i.o"
+done
+echo "STORAGE_OBJS="$STORAGE_OBJS >> Makefile.settings
 
 if [ "$strip" = 0 ]; then
@@ -361,6 +349,4 @@
 	elif type strip > /dev/null 2> /dev/null; then
 		echo "STRIP=strip" >> Makefile.settings;
-	elif /bin/test -x /usr/ccs/bin/strip; then
-		echo "STRIP=/usr/ccs/bin/strip" >> Makefile.settings;
 	else
 		echo
@@ -441,5 +427,5 @@
 if [ "$protocols" = "PROTOCOLS = " ]; then
 	echo "WARNING: You haven't selected any communication protocol to compile!"
-	echo "         Bitlbee will run, but you will be unable to connect to IM servers!"
+	echo "         BitlBee will run, but you will be unable to connect to IM servers!"
 fi
 
@@ -476,33 +462,22 @@
 
 if [ "$debug" = "1" ]; then
-	echo '  Debugging enabled.';
-else
-	echo '  Debugging disabled.';
+	echo '  Debugging enabled.'
+else
+	echo '  Debugging disabled.'
 fi
 
 if [ "$strip" = "1" ]; then
-	echo '  Binary stripping enabled.';
-else
-	echo '  Binary stripping disabled.';
-fi
-
-echo '  Using event handler: '$events;
-echo '  Using SSL library: '$ssl;
-
-#if [ "$flood" = "0" ]; then
-#	echo '  Flood protection disabled.';
-#else
-#	echo '  Flood protection enabled.';
-#fi
+	echo '  Binary stripping enabled.'
+else
+	echo '  Binary stripping disabled.'
+fi
+
+echo '  Using event handler: '$events
+echo '  Using SSL library: '$ssl
+echo '  Building with these storage backends: '$STORAGES
 
 if [ -n "$protocols" ]; then
-	echo '  Building with these protocols:' $protocols;
-else
-	echo '  Building without IM-protocol support. We wish you a lot of fun...';
-fi
-
-if [ "$ldap" = "0" ]; then
-	echo "  LDAP storage backend disabled."
-else
-	echo "  LDAP storage backend enabled."
-fi
+	echo '  Building with these protocols:' $protocols
+else
+	echo '  Building without IM-protocol support. We wish you a lot of fun...'
+fi
