Changeset d8d63a2 for configure


Ignore:
Timestamp:
2006-12-05T20:40:17Z (17 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
7740c4c
Parents:
f4aa393 (diff), 55078f5 (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:

[merge] wilmer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    rf4aa393 rd8d63a2  
    3232
    3333events=glib
     34ldap=0
    3435ssl=auto
    3536
    3637arch=`uname -s`
    3738cpu=`uname -m`
     39
     40GLIB_MIN_VERSION=2.4
    3841
    3942echo BitlBee configure
     
    6871
    6972--ipv6=0/1      IPv6 socket support                     $ipv6
     73
     74--ldap=0/1/auto LDAP support                            $ldap
    7075
    7176--events=...    Event handler (glib, libevent)          $events
     
    143148fi
    144149
    145 echo CFLAGS+=-I`pwd` -I`pwd`/protocols -I. >> Makefile.settings
     150echo CFLAGS+=-I`pwd` -I`pwd`/lib -I`pwd`/protocols -I. >> Makefile.settings
    146151
    147152echo CFLAGS+=-DHAVE_CONFIG_H >> Makefile.settings
    148153
    149154if [ -n "$CC" ]; then
    150         echo "CC=$CC" >> Makefile.settings;
     155        CC=$CC
    151156elif type gcc > /dev/null 2> /dev/null; then
    152         echo "CC=gcc" >> Makefile.settings;
     157        CC=gcc
    153158elif type cc > /dev/null 2> /dev/null; then
    154         echo "CC=cc" >> Makefile.settings;
     159        CC=cc
    155160else
    156161        echo 'Cannot find a C compiler, aborting.'
    157162        exit 1;
    158163fi
     164
     165echo "CC=$CC" >> Makefile.settings;
    159166
    160167if [ -n "$LD" ]; then
     
    172179
    173180if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG glib-2.0; then
    174         cat<<EOF>>Makefile.settings
     181        if $PKG_CONFIG glib-2.0 --atleast-version=$GLIB_MIN_VERSION; then
     182                cat<<EOF>>Makefile.settings
    175183EFLAGS+=`$PKG_CONFIG --libs glib-2.0 gmodule-2.0`
    176184CFLAGS+=`$PKG_CONFIG --cflags glib-2.0 gmodule-2.0`
    177185EOF
    178 else
     186        else
     187                echo
     188                echo 'Found glib2 '`$PKG_CONFIG glib-2.0 --modversion`', but version '$GLIB_MIN_VERSION' or newer is required.'
     189                exit 1
     190        fi
     191else
     192        echo
    179193        echo 'Cannot find glib2 development libraries, aborting. (Install libglib2-dev?)'
    180         exit 1;
     194        exit 1
    181195fi
    182196
     
    234248}
    235249
    236 if [ "$msn" = 1 -o "$jabber" = 1 ]; then
    237         if [ "$ssl" = "auto" ]; then
    238                 detect_gnutls
    239                 if [ "$ret" = "0" ]; then
    240                         detect_nss
    241                 fi;
    242         elif [ "$ssl" = "gnutls" ]; then
    243                 detect_gnutls;
    244         elif [ "$ssl" = "nss" ]; then
    245                 detect_nss;
    246         elif [ "$ssl" = "openssl" ]; then
     250detect_ldap()
     251{
     252        TMPFILE=`mktemp`
     253        if $CC -o $TMPFILE -shared -lldap 2>/dev/null >/dev/null; then
     254                cat<<EOF>>Makefile.settings
     255EFLAGS+=-lldap
     256CFLAGS+=
     257EOF
     258                ldap=1
     259                rm -f $TMPFILE
     260                ret=1
     261        else
     262                ldap=0
     263                ret=0
     264        fi
     265}
     266
     267if [ "$ssl" = "auto" ]; then
     268        detect_gnutls
     269        if [ "$ret" = "0" ]; then
     270                detect_nss
     271        fi
     272elif [ "$ssl" = "gnutls" ]; then
     273        detect_gnutls
     274elif [ "$ssl" = "nss" ]; then
     275        detect_nss
     276elif [ "$ssl" = "openssl" ]; then
     277        echo
     278        echo 'No detection code exists for OpenSSL. Make sure that you have a complete'
     279        echo 'install of OpenSSL (including devel/header files) before reporting'
     280        echo 'compilation problems.'
     281        echo
     282        echo 'Also, keep in mind that the OpenSSL is, according to some people, not'
     283        echo 'completely GPL-compatible. Using GnuTLS or NSS is recommended and better'
     284        echo 'supported by us. However, on many BSD machines, OpenSSL can be considered'
     285        echo 'part of the operating system, which makes it GPL-compatible.'
     286        echo
     287        echo 'For more info, see: http://www.openssl.org/support/faq.html#LEGAL2'
     288        echo '                    http://www.gnome.org/~markmc/openssl-and-the-gpl.html'
     289        echo
     290        echo 'Please note that distributing a BitlBee binary which links to OpenSSL is'
     291        echo 'probably illegal. If you want to create and distribute a binary BitlBee'
     292        echo 'package, you really should use GnuTLS or NSS instead.'
     293        echo
     294        echo 'Also, the OpenSSL license requires us to say this:'
     295        echo ' *    "This product includes software developed by the OpenSSL Project'
     296        echo ' *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"'
     297       
     298        echo 'EFLAGS+=-lssl -lcrypto' >> Makefile.settings
     299       
     300        ret=1
     301elif [ "$ssl" = "bogus" ]; then
     302        echo
     303        echo 'Using bogus SSL code. This means some features will not work properly.'
     304       
     305        ## Yes, you, at the console! How can you authenticate if you don't have any SSL!?
     306        if [ "$msn" = "1" ]; then
    247307                echo
    248                 echo 'No detection code exists for OpenSSL. Make sure that you have a complete'
    249                 echo 'install of OpenSSL (including devel/header files) before reporting'
    250                 echo 'compilation problems.'
    251                 echo
    252                 echo 'Also, keep in mind that the OpenSSL is, according to some people, not'
    253                 echo 'completely GPL-compatible. Using GnuTLS or NSS is recommended and better'
    254                 echo 'supported by us. However, on many BSD machines, OpenSSL can be considered'
    255                 echo 'part of the operating system, which makes it GPL-compatible.'
    256                 echo
    257                 echo 'For more info, see: http://www.openssl.org/support/faq.html#LEGAL2'
    258                 echo '                    http://www.gnome.org/~markmc/openssl-and-the-gpl.html'
    259                 echo
    260                 echo 'Please note that distributing a BitlBee binary which links to OpenSSL is'
    261                 echo 'probably illegal. If you want to create and distribute a binary BitlBee'
    262                 echo 'package, you really should use GnuTLS or NSS instead.'
    263                 echo
    264                 echo 'Also, the OpenSSL license requires us to say this:'
    265                 echo ' *    "This product includes software developed by the OpenSSL Project'
    266                 echo ' *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"'
    267                
    268                 echo 'EFLAGS+=-lssl -lcrypto' >> Makefile.settings
    269                
    270                 ret=1;
    271         elif [ "$ssl" = "bogus" ]; then
    272                 echo
    273                 echo 'Using bogus SSL code. This will not make the MSN module work, but it will'
    274                 echo 'allow you to use the Jabber module - although without working SSL support.'
    275                
    276                 ret=1;
    277         else
    278                 echo
    279                 echo 'ERROR: Unknown SSL library specified.'
    280                 exit 1;
    281         fi
    282        
    283         if [ "$ret" = "0" ]; then
    284                 echo
    285                 echo 'ERROR: Could not find a suitable SSL library (GnuTLS, libnss or OpenSSL).'
    286                 echo '       This is necessary for MSN and full Jabber support. To continue,'
    287                 echo '       install a suitable SSL library or disable MSN support (--msn=0).'
    288                 echo '       If you want Jabber without SSL support you can try --ssl=bogus.'
    289                
    290                 exit 1;
    291         fi;
    292        
    293         echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings
    294 fi
     308                echo 'Real SSL support is necessary for MSN authentication, will build without'
     309                echo 'MSN protocol support.'
     310                msn=0
     311        fi
     312       
     313        ret=1
     314else
     315        echo
     316        echo 'ERROR: Unknown SSL library specified.'
     317        exit 1
     318fi
     319
     320if [ "$ret" = "0" ]; then
     321        echo
     322        echo 'ERROR: Could not find a suitable SSL library (GnuTLS, libnss or OpenSSL).'
     323        echo '       Please note that this script doesn'\''t have detection code for OpenSSL,'
     324        echo '       so if you want to use that, you have to select it by hand. If you don'\''t'
     325        echo '       need SSL support, you can select the "bogus" SSL library. (--ssl=bogus)'
     326       
     327        exit 1
     328fi;
     329
     330echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings
     331
     332STORAGES="text xml"
     333
     334if [ "$ldap" = "auto" ]; then
     335        detect_ldap
     336fi
     337
     338if [ "$ldap" = 0 ]; then
     339        echo "#undef WITH_LDAP" >> config.h
     340elif [ "$ldap" = 1 ]; then
     341        echo "#define WITH_LDAP 1" >> config.h
     342        STORAGES="$STORAGES ldap"
     343fi
     344
     345for i in $STORAGES; do
     346        STORAGE_OBJS="$STORAGE_OBJS storage_$i.o"
     347done
     348echo "STORAGE_OBJS="$STORAGE_OBJS >> Makefile.settings
    295349
    296350if [ "$strip" = 0 ]; then
     
    306360        elif type strip > /dev/null 2> /dev/null; then
    307361                echo "STRIP=strip" >> Makefile.settings;
    308         elif /bin/test -x /usr/ccs/bin/strip; then
    309                 echo "STRIP=/usr/ccs/bin/strip" >> Makefile.settings;
    310362        else
    311363                echo
     
    391443if [ "$protocols" = "PROTOCOLS = " ]; then
    392444        echo "WARNING: You haven't selected any communication protocol to compile!"
    393         echo "         Bitlbee will run, but you will be unable to connect to IM servers!"
     445        echo "         BitlBee will run, but you will be unable to connect to IM servers!"
    394446fi
    395447
     
    426478
    427479if [ "$debug" = "1" ]; then
    428         echo '  Debugging enabled.';
    429 else
    430         echo '  Debugging disabled.';
     480        echo '  Debugging enabled.'
     481else
     482        echo '  Debugging disabled.'
    431483fi
    432484
    433485if [ "$strip" = "1" ]; then
    434         echo '  Binary stripping enabled.';
    435 else
    436         echo '  Binary stripping disabled.';
    437 fi
    438 
    439 echo '  Using event handler: '$events;
    440 echo '  Using SSL library: '$ssl;
    441 
    442 #if [ "$flood" = "0" ]; then
    443 #       echo '  Flood protection disabled.';
    444 #else
    445 #       echo '  Flood protection enabled.';
    446 #fi
     486        echo '  Binary stripping enabled.'
     487else
     488        echo '  Binary stripping disabled.'
     489fi
     490
     491echo '  Using event handler: '$events
     492echo '  Using SSL library: '$ssl
     493echo '  Building with these storage backends: '$STORAGES
    447494
    448495if [ -n "$protocols" ]; then
    449         echo '  Building with these protocols:' $protocols;
    450 else
    451         echo '  Building without IM-protocol support. We wish you a lot of fun...';
    452 fi
     496        echo '  Building with these protocols:' $protocols
     497else
     498        echo '  Building without IM-protocol support. We wish you a lot of fun...'
     499fi
Note: See TracChangeset for help on using the changeset viewer.