From f665dabdff831743ea35e755b6ec1e2fe2551d9c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 12 Feb 2006 21:02:03 +1300 Subject: Initial work on new LDB-based storage backend --- configure | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 2731d5b1..f0f2adcc 100755 --- a/configure +++ b/configure @@ -24,6 +24,7 @@ yahoo=1 debug=0 strip=1 ipv6=1 +ldb=auto ssl=auto arch=`uname -s` @@ -59,6 +60,8 @@ Option Description Default --ipv6=0/1 IPv6 socket support $ipv6 +--ldb=0/1/auto LDB support $ldb + --ssl=... SSL library to use (gnutls, nss, openssl, bogus, auto) $ssl EOF @@ -210,6 +213,20 @@ EOF fi; } +detect_ldb() +{ + if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG ldb; then + cat<>Makefile.settings +EFLAGS+=`$PKG_CONFIG --libs ldb` +CFLAGS+=`$PKG_CONFIG --cflags ldb` +EOF + ldb=1 + ret=1 + else + ret=0 + fi +} + if [ "$msn" = 1 -o "$jabber" = 1 ]; then if [ "$ssl" = "auto" ]; then detect_gnutls @@ -270,6 +287,18 @@ if [ "$msn" = 1 -o "$jabber" = 1 ]; then echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings fi +if [ "$ldb" = "auto" ]; then + detect_ldb +fi + +if [ "$ldb" = 0 ]; then + echo "LDB_OBJ=\# no ldb" >> Makefile.settings + echo "#undef LDB" >> config.h +elif [ "$ldb" = 1 ]; then + echo "#define LDB 1" >> config.h + echo "LDB_OBJ=storage_ldb.o" >> Makefile.settings +fi + if [ "$strip" = 0 ]; then echo "STRIP=\# skip strip" >> Makefile.settings; else @@ -407,3 +436,9 @@ if [ -n "$protocols" ]; then else echo ' Building without IM-protocol support. We wish you a lot of fun...'; fi + +if [ "$ldb" = "0" ]; then + echo " LDB storage backend disabled." +else + echo " LDB storage backend enabled." +fi -- cgit v1.2.3 From f32d5578d7039f1e61e99b2e1f7bfd0a47828c8c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 24 Mar 2006 16:53:29 +0100 Subject: Switch from LDB to LDAP (LDB's authentication subsystem is not mature enough yet) --- configure | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 60d27b2e..6426a789 100755 --- a/configure +++ b/configure @@ -27,7 +27,7 @@ yahoo=1 debug=0 strip=1 ipv6=1 -ldb=auto +ldap=auto ssl=auto arch=`uname -s` @@ -64,7 +64,7 @@ Option Description Default --ipv6=0/1 IPv6 socket support $ipv6 ---ldb=0/1/auto LDB support $ldb +--ldap=0/1/auto LDAP support $ldap --ssl=... SSL library to use (gnutls, nss, openssl, bogus, auto) $ssl @@ -223,14 +223,14 @@ EOF fi; } -detect_ldb() +detect_ldap() { if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG ldb; then cat<>Makefile.settings EFLAGS+=`$PKG_CONFIG --libs ldb` CFLAGS+=`$PKG_CONFIG --cflags ldb` EOF - ldb=1 + ldap=1 ret=1 else ret=0 @@ -297,16 +297,16 @@ if [ "$msn" = 1 -o "$jabber" = 1 ]; then echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings fi -if [ "$ldb" = "auto" ]; then - detect_ldb +if [ "$ldap" = "auto" ]; then + detect_ldap fi -if [ "$ldb" = 0 ]; then - echo "LDB_OBJ=\# no ldb" >> Makefile.settings - echo "#undef LDB" >> config.h -elif [ "$ldb" = 1 ]; then - echo "#define LDB 1" >> config.h - echo "LDB_OBJ=storage_ldb.o" >> Makefile.settings +if [ "$ldap" = 0 ]; then + echo "LDAP_OBJ=\# no ldap" >> Makefile.settings + echo "#undef LDAP" >> config.h +elif [ "$ldap" = 1 ]; then + echo "#define LDAP 1" >> config.h + echo "LDAP_OBJ=storage_ldap.o" >> Makefile.settings fi if [ "$strip" = 0 ]; then @@ -460,8 +460,8 @@ else echo ' Building without IM-protocol support. We wish you a lot of fun...'; fi -if [ "$ldb" = "0" ]; then - echo " LDB storage backend disabled." +if [ "$ldap" = "0" ]; then + echo " LDAP storage backend disabled." else - echo " LDB storage backend enabled." + echo " LDAP storage backend enabled." fi -- cgit v1.2.3 From 5973412f44269f6cb796c9d6d38c151290c7367a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 3 Jun 2006 22:52:40 +0200 Subject: Try to detect -lldap --- configure | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 97df1e27..c8a4c49f 100755 --- a/configure +++ b/configure @@ -142,16 +142,18 @@ echo CFLAGS+=-I`pwd` -I`pwd`/protocols -I. >> Makefile.settings echo CFLAGS+=-DHAVE_CONFIG_H >> Makefile.settings if [ -n "$CC" ]; then - echo "CC=$CC" >> Makefile.settings; + CC=$CC elif type gcc > /dev/null 2> /dev/null; then - echo "CC=gcc" >> Makefile.settings; + CC=gcc elif type cc > /dev/null 2> /dev/null; then - echo "CC=cc" >> Makefile.settings; + CC=cc else echo 'Cannot find a C compiler, aborting.' exit 1; fi +echo "CC=$CC" >> Makefile.settings; + if [ -n "$LD" ]; then echo "LD=$LD" >> Makefile.settings; elif type ld > /dev/null 2> /dev/null; then @@ -207,14 +209,17 @@ EOF detect_ldap() { - if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG ldb; then + TMPFILE=`mktemp` + if $CC -o $TMPFILE -shared -lldap 2>/dev/null >/dev/null; then cat<>Makefile.settings -EFLAGS+=`$PKG_CONFIG --libs ldb` -CFLAGS+=`$PKG_CONFIG --cflags ldb` +EFLAGS+=-lldap +CFLAGS+= EOF ldap=1 + rm -f $TMPFILE ret=1 else + ldap=0 ret=0 fi } @@ -285,9 +290,9 @@ fi if [ "$ldap" = 0 ]; then echo "LDAP_OBJ=\# no ldap" >> Makefile.settings - echo "#undef LDAP" >> config.h + echo "#undef WITH_LDAP" >> config.h elif [ "$ldap" = 1 ]; then - echo "#define LDAP 1" >> config.h + echo "#define WITH_LDAP 1" >> config.h echo "LDAP_OBJ=storage_ldap.o" >> Makefile.settings fi -- cgit v1.2.3 From 10efa911cbf0d3761d42cc3e57973c8cd1a92821 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 17 Jun 2006 13:39:17 +0200 Subject: Fixed bug in LDAP Makefile generation. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index b05aa155..05fb7cb4 100755 --- a/configure +++ b/configure @@ -318,7 +318,7 @@ if [ "$ldap" = "auto" ]; then fi if [ "$ldap" = 0 ]; then - echo "LDAP_OBJ=\# no ldap" >> Makefile.settings + echo "LDAP_OBJ=" >> Makefile.settings echo "#undef WITH_LDAP" >> config.h elif [ "$ldap" = 1 ]; then echo "#define WITH_LDAP 1" >> config.h -- cgit v1.2.3 From df1694b9559d4abec748b0506b5f44e684d022a8 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 25 Jun 2006 14:15:42 +0200 Subject: Moving all generic files to lib/ instead of having some in / and some in protocols/, and adding RC4 code. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 05fb7cb4..3a333029 100755 --- a/configure +++ b/configure @@ -143,7 +143,7 @@ else echo 'CFLAGS=-O3' >> Makefile.settings fi -echo CFLAGS+=-I`pwd` -I`pwd`/protocols -I. >> Makefile.settings +echo CFLAGS+=-I`pwd` -I`pwd`/lib -I`pwd`/protocols -I. >> Makefile.settings echo CFLAGS+=-DHAVE_CONFIG_H >> Makefile.settings -- cgit v1.2.3 From b3c467bc312114eb7cdd45e6bc36a3d87bee6064 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 28 Jun 2006 11:59:33 +0200 Subject: Cleaned up Makefiles + configure: Cleaning up bitlbee.pc, removed the second piece of libevent probing code that mysteriously appeared (?), better handling of storage backends, an SSL module is now always included (so BitlBee can be compiled again when building without MSN- and Jabber-support (http_client also depends on SSL libs and can't be disabled)), oh, and fixed a compiler warning. --- configure | 179 +++++++++++++++++++++++++++----------------------------------- 1 file changed, 77 insertions(+), 102 deletions(-) (limited to 'configure') diff --git a/configure b/configure index fc9caffe..7cc99b41 100755 --- a/configure +++ b/configure @@ -206,29 +206,6 @@ else fi 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 <>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() { if libgnutls-config --version > /dev/null 2> /dev/null; then @@ -276,78 +253,89 @@ EOF fi } -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 - 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; +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/)"' - if [ "$ret" = "0" ]; then + 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 '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 'Real SSL support is necessary for MSN authentication, will build without' + echo 'MSN protocol support.' + msn=0 + fi - echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings + 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 detect_ldap fi 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 + 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 echo "STRIP=\# skip strip" >> Makefile.settings; else @@ -360,8 +348,6 @@ else echo "STRIP=$STRIP" >> Makefile.settings; 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 echo 'No strip utility found, cannot remove unnecessary parts from executable.' @@ -440,7 +426,7 @@ fi 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 echo "PROTOCOLS = $protocols" >> Makefile.settings @@ -475,34 +461,23 @@ echo echo 'Configuration done:' if [ "$debug" = "1" ]; then - echo ' Debugging enabled.'; + echo ' Debugging enabled.' else - echo ' Debugging disabled.'; + echo ' Debugging disabled.' fi if [ "$strip" = "1" ]; then - echo ' Binary stripping enabled.'; + echo ' Binary stripping enabled.' else - echo ' Binary stripping disabled.'; + 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 ' 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." + echo ' Building with these protocols:' $protocols else - echo " LDAP storage backend enabled." + echo ' Building without IM-protocol support. We wish you a lot of fun...' fi -- cgit v1.2.3