Changeset b3c467b


Ignore:
Timestamp:
2006-06-28T09:59:33Z (13 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
1719464
Parents:
90bbb0e
Message:

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.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r90bbb0e rb3c467b  
    1010
    1111# Program variables
    12 objects = account.o bitlbee.o conf.o crypting.o help.o ipc.o irc.o irc_commands.o log.o nick.o query.o root_commands.o set.o storage.o storage_text.o storage_xml.o unix.o user.o
     12objects = account.o bitlbee.o conf.o crypting.o help.o ipc.o irc.o irc_commands.o log.o nick.o query.o root_commands.o set.o storage.o $(STORAGE_OBJS) unix.o user.o
    1313headers = account.h bitlbee.h commands.h conf.h config.h crypting.h help.h ini.h ipc.h irc.h log.h nick.h query.h set.h sock.h storage.h url.h user.h protocols/http_client.h protocols/md5.h protocols/nogaim.h protocols/proxy.h protocols/sha.h protocols/ssl_client.h
    1414subdirs = protocols lib
    15 
    16 objects += $(LDAP_OBJ)
    1715
    1816# Expansion of variables
     
    4442
    4543distclean: clean $(subdirs)
    46         rm -f Makefile.settings config.h
     44        rm -f Makefile.settings config.h bitlbee.pc
    4745        find . -name 'DEADJOE' -o -name '*.orig' -o -name '*.rej' -o -name '*~' -exec rm -f {} \;
    4846
  • configure

    r90bbb0e rb3c467b  
    207207echo 'EVENT_HANDLER=events_'$events'.o' >> Makefile.settings
    208208
    209 if [ "$events" = "libevent" ]; then
    210         if ! [ -e "${libevent}include/event.h" ]; then
    211                 echo
    212                 echo 'Warning: Could not find event.h, you might have to install it and/or specify'
    213                 echo 'its location using the --libevent= argument. (Example: If event.h is in'
    214                 echo '/usr/local/include and binaries are in /usr/local/lib: --libevent=/usr/local)'
    215         fi
    216        
    217         echo '#define EVENTS_LIBEVENT' >> config.h
    218         cat <<EOF>>Makefile.settings
    219 EFLAGS+=-levent -L${libevent}lib
    220 CFLAGS+=-I${libevent}include
    221 EOF
    222 elif [ "$events" = "glib" ]; then
    223         ## We already use glib anyway, so this is all we need (and in fact not even this, but just to be sure...):
    224         echo '#define EVENTS_GLIB' >> config.h
    225 else
    226         echo
    227         echo 'ERROR: Unknown event handler specified.'
    228         exit 1
    229 fi
    230 echo 'EVENT_HANDLER=events_'$events'.o' >> Makefile.settings
    231 
    232209detect_gnutls()
    233210{
     
    277254}
    278255
    279 if [ "$msn" = 1 -o "$jabber" = 1 ]; then
    280         if [ "$ssl" = "auto" ]; then
    281                 detect_gnutls
    282                 if [ "$ret" = "0" ]; then
    283                         detect_nss
    284                 fi;
    285         elif [ "$ssl" = "gnutls" ]; then
    286                 detect_gnutls;
    287         elif [ "$ssl" = "nss" ]; then
    288                 detect_nss;
    289         elif [ "$ssl" = "openssl" ]; then
     256if [ "$ssl" = "auto" ]; then
     257        detect_gnutls
     258        if [ "$ret" = "0" ]; then
     259                detect_nss
     260        fi
     261elif [ "$ssl" = "gnutls" ]; then
     262        detect_gnutls
     263elif [ "$ssl" = "nss" ]; then
     264        detect_nss
     265elif [ "$ssl" = "openssl" ]; then
     266        echo
     267        echo 'No detection code exists for OpenSSL. Make sure that you have a complete'
     268        echo 'install of OpenSSL (including devel/header files) before reporting'
     269        echo 'compilation problems.'
     270        echo
     271        echo 'Also, keep in mind that the OpenSSL is, according to some people, not'
     272        echo 'completely GPL-compatible. Using GnuTLS or NSS is recommended and better'
     273        echo 'supported by us. However, on many BSD machines, OpenSSL can be considered'
     274        echo 'part of the operating system, which makes it GPL-compatible.'
     275        echo
     276        echo 'For more info, see: http://www.openssl.org/support/faq.html#LEGAL2'
     277        echo '                    http://www.gnome.org/~markmc/openssl-and-the-gpl.html'
     278        echo
     279        echo 'Please note that distributing a BitlBee binary which links to OpenSSL is'
     280        echo 'probably illegal. If you want to create and distribute a binary BitlBee'
     281        echo 'package, you really should use GnuTLS or NSS instead.'
     282        echo
     283        echo 'Also, the OpenSSL license requires us to say this:'
     284        echo ' *    "This product includes software developed by the OpenSSL Project'
     285        echo ' *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"'
     286       
     287        echo 'EFLAGS+=-lssl -lcrypto' >> Makefile.settings
     288       
     289        ret=1
     290elif [ "$ssl" = "bogus" ]; then
     291        echo
     292        echo 'Using bogus SSL code. This means some features have to be disabled.'
     293       
     294        ## Yes, you, at the console! How can you authenticate if you don't have any SSL!?
     295        if [ "$msn" = "1" ]; then
    290296                echo
    291                 echo 'No detection code exists for OpenSSL. Make sure that you have a complete'
    292                 echo 'install of OpenSSL (including devel/header files) before reporting'
    293                 echo 'compilation problems.'
    294                 echo
    295                 echo 'Also, keep in mind that the OpenSSL is, according to some people, not'
    296                 echo 'completely GPL-compatible. Using GnuTLS or NSS is recommended and better'
    297                 echo 'supported by us. However, on many BSD machines, OpenSSL can be considered'
    298                 echo 'part of the operating system, which makes it GPL-compatible.'
    299                 echo
    300                 echo 'For more info, see: http://www.openssl.org/support/faq.html#LEGAL2'
    301                 echo '                    http://www.gnome.org/~markmc/openssl-and-the-gpl.html'
    302                 echo
    303                 echo 'Please note that distributing a BitlBee binary which links to OpenSSL is'
    304                 echo 'probably illegal. If you want to create and distribute a binary BitlBee'
    305                 echo 'package, you really should use GnuTLS or NSS instead.'
    306                 echo
    307                 echo 'Also, the OpenSSL license requires us to say this:'
    308                 echo ' *    "This product includes software developed by the OpenSSL Project'
    309                 echo ' *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"'
    310                
    311                 echo 'EFLAGS+=-lssl -lcrypto' >> Makefile.settings
    312                
    313                 ret=1;
    314         elif [ "$ssl" = "bogus" ]; then
    315                 echo
    316                 echo 'Using bogus SSL code. This will not make the MSN module work, but it will'
    317                 echo 'allow you to use the Jabber module - although without working SSL support.'
    318                
    319                 ret=1;
    320         else
    321                 echo
    322                 echo 'ERROR: Unknown SSL library specified.'
    323                 exit 1;
    324         fi
    325        
    326         if [ "$ret" = "0" ]; then
    327                 echo
    328                 echo 'ERROR: Could not find a suitable SSL library (GnuTLS, libnss or OpenSSL).'
    329                 echo '       This is necessary for MSN and full Jabber support. To continue,'
    330                 echo '       install a suitable SSL library or disable MSN support (--msn=0).'
    331                 echo '       If you want Jabber without SSL support you can try --ssl=bogus.'
    332                
    333                 exit 1;
    334         fi;
    335        
    336         echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings
    337 fi
     297                echo 'Real SSL support is necessary for MSN authentication, will build without'
     298                echo 'MSN protocol support.'
     299                msn=0
     300        fi
     301       
     302        ret=1
     303else
     304        echo
     305        echo 'ERROR: Unknown SSL library specified.'
     306        exit 1
     307fi
     308
     309if [ "$ret" = "0" ]; then
     310        echo
     311        echo 'ERROR: Could not find a suitable SSL library (GnuTLS, libnss or OpenSSL).'
     312        echo '       Please note that this script doesn'\''t have detection code for OpenSSL,'
     313        echo '       so if you want to use that, you have to select it by hand. If you don'\''t'
     314        echo '       need SSL support, you can select the "bogus" SSL library. (--ssl=bogus)'
     315       
     316        exit 1
     317fi;
     318
     319echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings
     320
     321STORAGES="text xml"
    338322
    339323if [ "$ldap" = "auto" ]; then
     
    342326
    343327if [ "$ldap" = 0 ]; then
    344         echo "LDAP_OBJ=" >> Makefile.settings
    345328        echo "#undef WITH_LDAP" >> config.h
    346329elif [ "$ldap" = 1 ]; then
    347330        echo "#define WITH_LDAP 1" >> config.h
    348         echo "LDAP_OBJ=storage_ldap.o" >> Makefile.settings
    349 fi
     331        STORAGES="$STORAGES ldap"
     332fi
     333
     334for i in $STORAGES; do
     335        STORAGE_OBJS="$STORAGE_OBJS storage_$i.o"
     336done
     337echo "STORAGE_OBJS="$STORAGE_OBJS >> Makefile.settings
    350338
    351339if [ "$strip" = 0 ]; then
     
    361349        elif type strip > /dev/null 2> /dev/null; then
    362350                echo "STRIP=strip" >> Makefile.settings;
    363         elif /bin/test -x /usr/ccs/bin/strip; then
    364                 echo "STRIP=/usr/ccs/bin/strip" >> Makefile.settings;
    365351        else
    366352                echo
     
    441427if [ "$protocols" = "PROTOCOLS = " ]; then
    442428        echo "WARNING: You haven't selected any communication protocol to compile!"
    443         echo "         Bitlbee will run, but you will be unable to connect to IM servers!"
     429        echo "         BitlBee will run, but you will be unable to connect to IM servers!"
    444430fi
    445431
     
    476462
    477463if [ "$debug" = "1" ]; then
    478         echo '  Debugging enabled.';
    479 else
    480         echo '  Debugging disabled.';
     464        echo '  Debugging enabled.'
     465else
     466        echo '  Debugging disabled.'
    481467fi
    482468
    483469if [ "$strip" = "1" ]; then
    484         echo '  Binary stripping enabled.';
    485 else
    486         echo '  Binary stripping disabled.';
    487 fi
    488 
    489 echo '  Using event handler: '$events;
    490 echo '  Using SSL library: '$ssl;
    491 
    492 #if [ "$flood" = "0" ]; then
    493 #       echo '  Flood protection disabled.';
    494 #else
    495 #       echo '  Flood protection enabled.';
    496 #fi
     470        echo '  Binary stripping enabled.'
     471else
     472        echo '  Binary stripping disabled.'
     473fi
     474
     475echo '  Using event handler: '$events
     476echo '  Using SSL library: '$ssl
     477echo '  Building with these storage backends: '$STORAGES
    497478
    498479if [ -n "$protocols" ]; then
    499         echo '  Building with these protocols:' $protocols;
    500 else
    501         echo '  Building without IM-protocol support. We wish you a lot of fun...';
    502 fi
    503 
    504 if [ "$ldap" = "0" ]; then
    505         echo "  LDAP storage backend disabled."
    506 else
    507         echo "  LDAP storage backend enabled."
    508 fi
     480        echo '  Building with these protocols:' $protocols
     481else
     482        echo '  Building without IM-protocol support. We wish you a lot of fun...'
     483fi
  • storage.c

    r90bbb0e rb3c467b  
    4343{
    4444        GList *gl;
    45         storage_t *st;
     45        storage_t *st = NULL;
    4646
    4747        for (gl = storage_backends; gl; gl = gl->next) {
Note: See TracChangeset for help on using the changeset viewer.