Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    r670204f r66b9e86e  
    2828debug=0
    2929strip=1
     30gcov=0
    3031ipv6=1
    3132
    3233events=glib
    33 ldap=0
    3434ssl=auto
    3535
    3636arch=`uname -s`
    3737cpu=`uname -m`
    38 
    39 GLIB_MIN_VERSION=2.4
    4038
    4139echo BitlBee configure
     
    6765--debug=0/1     Disable/enable debugging                $debug
    6866--strip=0/1     Disable/enable binary stripping         $strip
     67--gcov=0/1      Disable/enable test coverage reporting  $gcov
    6968
    7069--ipv6=0/1      IPv6 socket support                     $ipv6
    71 
    72 --ldap=0/1/auto LDAP support                            $ldap
    7370
    7471--events=...    Event handler (glib, libevent)          $events
     
    146143fi
    147144
    148 echo CFLAGS+=-I`pwd` -I`pwd`/lib -I`pwd`/protocols -I. >> Makefile.settings
     145echo CFLAGS+=-I`pwd` -I`pwd`/protocols -I. >> Makefile.settings
    149146
    150147echo CFLAGS+=-DHAVE_CONFIG_H >> Makefile.settings
    151148
    152149if [ -n "$CC" ]; then
    153         CC=$CC
     150        echo "CC=$CC" >> Makefile.settings;
    154151elif type gcc > /dev/null 2> /dev/null; then
    155         CC=gcc
     152        echo "CC=gcc" >> Makefile.settings;
    156153elif type cc > /dev/null 2> /dev/null; then
    157         CC=cc
     154        echo "CC=cc" >> Makefile.settings;
    158155else
    159156        echo 'Cannot find a C compiler, aborting.'
    160157        exit 1;
    161158fi
    162 
    163 echo "CC=$CC" >> Makefile.settings;
    164159
    165160if [ -n "$LD" ]; then
     
    177172
    178173if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG glib-2.0; then
    179         if $PKG_CONFIG glib-2.0 --atleast-version=$GLIB_MIN_VERSION; then
    180                 cat<<EOF>>Makefile.settings
     174        cat<<EOF>>Makefile.settings
    181175EFLAGS+=`$PKG_CONFIG --libs glib-2.0 gmodule-2.0`
    182176CFLAGS+=`$PKG_CONFIG --cflags glib-2.0 gmodule-2.0`
    183177EOF
    184         else
    185                 echo
    186                 echo 'Found glib2 '`$PKG_CONFIG glib-2.0 --modversion`', but version '$GLIB_MIN_VERSION' or newer is required.'
    187                 exit 1
    188         fi
    189 else
    190         echo
     178else
    191179        echo 'Cannot find glib2 development libraries, aborting. (Install libglib2-dev?)'
    192         exit 1
     180        exit 1;
    193181fi
    194182
     
    246234}
    247235
    248 detect_ldap()
    249 {
    250         TMPFILE=`mktemp`
    251         if $CC -o $TMPFILE -shared -lldap 2>/dev/null >/dev/null; then
    252                 cat<<EOF>>Makefile.settings
    253 EFLAGS+=-lldap
    254 CFLAGS+=
    255 EOF
    256                 ldap=1
    257                 rm -f $TMPFILE
    258                 ret=1
     236if [ "$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
     247                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;
    259277        else
    260                 ldap=0
    261                 ret=0
    262         fi
    263 }
    264 
    265 if [ "$ssl" = "auto" ]; then
    266         detect_gnutls
    267         if [ "$ret" = "0" ]; then
    268                 detect_nss
    269         fi
    270 elif [ "$ssl" = "gnutls" ]; then
    271         detect_gnutls
    272 elif [ "$ssl" = "nss" ]; then
    273         detect_nss
    274 elif [ "$ssl" = "openssl" ]; then
    275         echo
    276         echo 'No detection code exists for OpenSSL. Make sure that you have a complete'
    277         echo 'install of OpenSSL (including devel/header files) before reporting'
    278         echo 'compilation problems.'
    279         echo
    280         echo 'Also, keep in mind that the OpenSSL is, according to some people, not'
    281         echo 'completely GPL-compatible. Using GnuTLS or NSS is recommended and better'
    282         echo 'supported by us. However, on many BSD machines, OpenSSL can be considered'
    283         echo 'part of the operating system, which makes it GPL-compatible.'
    284         echo
    285         echo 'For more info, see: http://www.openssl.org/support/faq.html#LEGAL2'
    286         echo '                    http://www.gnome.org/~markmc/openssl-and-the-gpl.html'
    287         echo
    288         echo 'Please note that distributing a BitlBee binary which links to OpenSSL is'
    289         echo 'probably illegal. If you want to create and distribute a binary BitlBee'
    290         echo 'package, you really should use GnuTLS or NSS instead.'
    291         echo
    292         echo 'Also, the OpenSSL license requires us to say this:'
    293         echo ' *    "This product includes software developed by the OpenSSL Project'
    294         echo ' *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"'
    295        
    296         echo 'EFLAGS+=-lssl -lcrypto' >> Makefile.settings
    297        
    298         ret=1
    299 elif [ "$ssl" = "bogus" ]; then
    300         echo
    301         echo 'Using bogus SSL code. This means some features will not work properly.'
    302        
    303         ## Yes, you, at the console! How can you authenticate if you don't have any SSL!?
    304         if [ "$msn" = "1" ]; then
    305                 echo
    306                 echo 'Real SSL support is necessary for MSN authentication, will build without'
    307                 echo 'MSN protocol support.'
    308                 msn=0
     278                echo
     279                echo 'ERROR: Unknown SSL library specified.'
     280                exit 1;
    309281        fi
    310282       
    311         ret=1
    312 else
    313         echo
    314         echo 'ERROR: Unknown SSL library specified.'
    315         exit 1
    316 fi
    317 
    318 if [ "$ret" = "0" ]; then
    319         echo
    320         echo 'ERROR: Could not find a suitable SSL library (GnuTLS, libnss or OpenSSL).'
    321         echo '       Please note that this script doesn'\''t have detection code for OpenSSL,'
    322         echo '       so if you want to use that, you have to select it by hand. If you don'\''t'
    323         echo '       need SSL support, you can select the "bogus" SSL library. (--ssl=bogus)'
     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;
    324292       
    325         exit 1
    326 fi;
    327 
    328 echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings
    329 
    330 STORAGES="text xml"
    331 
    332 if [ "$ldap" = "auto" ]; then
    333         detect_ldap
    334 fi
    335 
    336 if [ "$ldap" = 0 ]; then
    337         echo "#undef WITH_LDAP" >> config.h
    338 elif [ "$ldap" = 1 ]; then
    339         echo "#define WITH_LDAP 1" >> config.h
    340         STORAGES="$STORAGES ldap"
    341 fi
    342 
    343 for i in $STORAGES; do
    344         STORAGE_OBJS="$STORAGE_OBJS storage_$i.o"
    345 done
    346 echo "STORAGE_OBJS="$STORAGE_OBJS >> Makefile.settings
     293        echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings
     294fi
    347295
    348296if [ "$strip" = 0 ]; then
     
    358306        elif type strip > /dev/null 2> /dev/null; then
    359307                echo "STRIP=strip" >> Makefile.settings;
     308        elif /bin/test -x /usr/ccs/bin/strip; then
     309                echo "STRIP=/usr/ccs/bin/strip" >> Makefile.settings;
    360310        else
    361311                echo
     
    364314                strip=0;
    365315        fi;
     316fi
     317
     318if [ "$gcov" = "1" ]; then
     319        echo "CFLAGS+=-ftest-coverage -fprofile-arcs" >> Makefile.settings
     320        echo "EFLAGS+=-lgcov" >> Makefile.settings
    366321fi
    367322
     
    436391if [ "$protocols" = "PROTOCOLS = " ]; then
    437392        echo "WARNING: You haven't selected any communication protocol to compile!"
    438         echo "         BitlBee will run, but you will be unable to connect to IM servers!"
     393        echo "         Bitlbee will run, but you will be unable to connect to IM servers!"
    439394fi
    440395
     
    471426
    472427if [ "$debug" = "1" ]; then
    473         echo '  Debugging enabled.'
    474 else
    475         echo '  Debugging disabled.'
     428        echo '  Debugging enabled.';
     429else
     430        echo '  Debugging disabled.';
    476431fi
    477432
    478433if [ "$strip" = "1" ]; then
    479         echo '  Binary stripping enabled.'
    480 else
    481         echo '  Binary stripping disabled.'
    482 fi
    483 
    484 echo '  Using event handler: '$events
    485 echo '  Using SSL library: '$ssl
    486 echo '  Building with these storage backends: '$STORAGES
     434        echo '  Binary stripping enabled.';
     435else
     436        echo '  Binary stripping disabled.';
     437fi
     438
     439echo '  Using event handler: '$events;
     440echo '  Using SSL library: '$ssl;
     441
     442#if [ "$flood" = "0" ]; then
     443#       echo '  Flood protection disabled.';
     444#else
     445#       echo '  Flood protection enabled.';
     446#fi
    487447
    488448if [ -n "$protocols" ]; then
    489         echo '  Building with these protocols:' $protocols
    490 else
    491         echo '  Building without IM-protocol support. We wish you a lot of fun...'
    492 fi
     449        echo '  Building with these protocols:' $protocols;
     450else
     451        echo '  Building without IM-protocol support. We wish you a lot of fun...';
     452fi
Note: See TracChangeset for help on using the changeset viewer.