Changeset 69cb623 for configure


Ignore:
Timestamp:
2006-10-15T09:41:12Z (18 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
2529faf
Parents:
695e392 (diff), e97827b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging with storage-xml. It seems to be working pretty well, so maybe
this way more people will test it. :-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    r695e392 r69cb623  
    3131
    3232events=glib
     33ldap=auto
    3334ssl=auto
    3435
     
    6667
    6768--ipv6=0/1      IPv6 socket support                     $ipv6
     69
     70--ldap=0/1/auto LDAP support                            $ldap
    6871
    6972--events=...    Event handler (glib, libevent)          $events
     
    141144fi
    142145
    143 echo CFLAGS+=-I`pwd` -I`pwd`/protocols -I. >> Makefile.settings
     146echo CFLAGS+=-I`pwd` -I`pwd`/lib -I`pwd`/protocols -I. >> Makefile.settings
    144147
    145148echo CFLAGS+=-DHAVE_CONFIG_H >> Makefile.settings
    146149
    147150if [ -n "$CC" ]; then
    148         echo "CC=$CC" >> Makefile.settings;
     151        CC=$CC
    149152elif type gcc > /dev/null 2> /dev/null; then
    150         echo "CC=gcc" >> Makefile.settings;
     153        CC=gcc
    151154elif type cc > /dev/null 2> /dev/null; then
    152         echo "CC=cc" >> Makefile.settings;
     155        CC=cc
    153156else
    154157        echo 'Cannot find a C compiler, aborting.'
    155158        exit 1;
    156159fi
     160
     161echo "CC=$CC" >> Makefile.settings;
    157162
    158163if [ -n "$LD" ]; then
     
    232237}
    233238
    234 if [ "$msn" = 1 -o "$jabber" = 1 ]; then
    235         if [ "$ssl" = "auto" ]; then
    236                 detect_gnutls
    237                 if [ "$ret" = "0" ]; then
    238                         detect_nss
    239                 fi;
    240         elif [ "$ssl" = "gnutls" ]; then
    241                 detect_gnutls;
    242         elif [ "$ssl" = "nss" ]; then
    243                 detect_nss;
    244         elif [ "$ssl" = "openssl" ]; then
     239detect_ldap()
     240{
     241        TMPFILE=`mktemp`
     242        if $CC -o $TMPFILE -shared -lldap 2>/dev/null >/dev/null; then
     243                cat<<EOF>>Makefile.settings
     244EFLAGS+=-lldap
     245CFLAGS+=
     246EOF
     247                ldap=1
     248                rm -f $TMPFILE
     249                ret=1
     250        else
     251                ldap=0
     252                ret=0
     253        fi
     254}
     255
     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
    245296                echo
    246                 echo 'No detection code exists for OpenSSL. Make sure that you have a complete'
    247                 echo 'install of OpenSSL (including devel/header files) before reporting'
    248                 echo 'compilation problems.'
    249                 echo
    250                 echo 'Also, keep in mind that the OpenSSL is, according to some people, not'
    251                 echo 'completely GPL-compatible. Using GnuTLS or NSS is recommended and better'
    252                 echo 'supported by us. However, on many BSD machines, OpenSSL can be considered'
    253                 echo 'part of the operating system, which makes it GPL-compatible.'
    254                 echo
    255                 echo 'For more info, see: http://www.openssl.org/support/faq.html#LEGAL2'
    256                 echo '                    http://www.gnome.org/~markmc/openssl-and-the-gpl.html'
    257                 echo
    258                 echo 'Please note that distributing a BitlBee binary which links to OpenSSL is'
    259                 echo 'probably illegal. If you want to create and distribute a binary BitlBee'
    260                 echo 'package, you really should use GnuTLS or NSS instead.'
    261                 echo
    262                 echo 'Also, the OpenSSL license requires us to say this:'
    263                 echo ' *    "This product includes software developed by the OpenSSL Project'
    264                 echo ' *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"'
    265                
    266                 echo 'EFLAGS+=-lssl -lcrypto' >> Makefile.settings
    267                
    268                 ret=1;
    269         elif [ "$ssl" = "bogus" ]; then
    270                 echo
    271                 echo 'Using bogus SSL code. This will not make the MSN module work, but it will'
    272                 echo 'allow you to use the Jabber module - although without working SSL support.'
    273                
    274                 ret=1;
    275         else
    276                 echo
    277                 echo 'ERROR: Unknown SSL library specified.'
    278                 exit 1;
    279         fi
    280        
    281         if [ "$ret" = "0" ]; then
    282                 echo
    283                 echo 'ERROR: Could not find a suitable SSL library (GnuTLS, libnss or OpenSSL).'
    284                 echo '       This is necessary for MSN and full Jabber support. To continue,'
    285                 echo '       install a suitable SSL library or disable MSN support (--msn=0).'
    286                 echo '       If you want Jabber without SSL support you can try --ssl=bogus.'
    287                
    288                 exit 1;
    289         fi;
    290        
    291         echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings
    292 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"
     322
     323if [ "$ldap" = "auto" ]; then
     324        detect_ldap
     325fi
     326
     327if [ "$ldap" = 0 ]; then
     328        echo "#undef WITH_LDAP" >> config.h
     329elif [ "$ldap" = 1 ]; then
     330        echo "#define WITH_LDAP 1" >> config.h
     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
    293338
    294339if [ "$strip" = 0 ]; then
     
    304349        elif type strip > /dev/null 2> /dev/null; then
    305350                echo "STRIP=strip" >> Makefile.settings;
    306         elif /bin/test -x /usr/ccs/bin/strip; then
    307                 echo "STRIP=/usr/ccs/bin/strip" >> Makefile.settings;
    308351        else
    309352                echo
     
    384427if [ "$protocols" = "PROTOCOLS = " ]; then
    385428        echo "WARNING: You haven't selected any communication protocol to compile!"
    386         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!"
    387430fi
    388431
     
    419462
    420463if [ "$debug" = "1" ]; then
    421         echo '  Debugging enabled.';
    422 else
    423         echo '  Debugging disabled.';
     464        echo '  Debugging enabled.'
     465else
     466        echo '  Debugging disabled.'
    424467fi
    425468
    426469if [ "$strip" = "1" ]; then
    427         echo '  Binary stripping enabled.';
    428 else
    429         echo '  Binary stripping disabled.';
    430 fi
    431 
    432 echo '  Using event handler: '$events;
    433 echo '  Using SSL library: '$ssl;
    434 
    435 #if [ "$flood" = "0" ]; then
    436 #       echo '  Flood protection disabled.';
    437 #else
    438 #       echo '  Flood protection enabled.';
    439 #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
    440478
    441479if [ -n "$protocols" ]; then
    442         echo '  Building with these protocols:' $protocols;
    443 else
    444         echo '  Building without IM-protocol support. We wish you a lot of fun...';
    445 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.