Changeset b3c467b for configure


Ignore:
Timestamp:
2006-06-28T09:59:33Z (18 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.