source: configure @ bc49ec2

Last change on this file since bc49ec2 was 04dc563, checked in by Wilmer van der Gaast <wilmer@…>, at 2010-06-05T10:32:02Z

A few more configure script tweaks: Don't enable libpurple by default
anymore (in preparation for a merge), and limit the directory replication
stuff.

  • Property mode set to 100755
File size: 16.0 KB
RevLine 
[b7d3cc34]1#!/bin/sh
2
3##############################
4##  Configurer for BitlBee  ##
5##                          ##
6##  Copyright 2004 Lintux   ##
7##  Copyright 2002 Lucumo   ##
8##############################
9
10prefix='/usr/local/'
11bindir='$prefix/sbin/'
12etcdir='$prefix/etc/bitlbee/'
13mandir='$prefix/share/man/'
14datadir='$prefix/share/bitlbee/'
15config='/var/lib/bitlbee/'
[85cf37f]16plugindir='$prefix/lib/bitlbee/'
17includedir='$prefix/include/bitlbee/'
18libevent='/usr/'
[34b17d9]19pidfile='/var/run/bitlbee.pid'
[5c5a586]20ipcsocket='/var/run/bitlbee.sock'
[e506d6c]21pcdir='$prefix/lib/pkgconfig'
[8462239]22systemlibdirs="/lib /lib64 /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64"
[b7d3cc34]23
24msn=1
25jabber=1
26oscar=1
27yahoo=1
[1b221e0]28twitter=1
[04dc563]29purple=0
[b7d3cc34]30
31debug=0
32strip=1
[66b9e86e]33gcov=0
[2abfbc5]34plugins=1
[85cf37f]35
36events=glib
[670204f]37ldap=0
[b7d3cc34]38ssl=auto
39
40arch=`uname -s`
41cpu=`uname -m`
42
[670204f]43GLIB_MIN_VERSION=2.4
44
[b7d3cc34]45echo BitlBee configure
46
47while [ -n "$1" ]; do
48        e="`expr "X$1" : 'X--\(.*=.*\)'`"
49        if [ -z "$e" ]; then
50                cat<<EOF
51
52Usage: $0 [OPTIONS]
53
54Option          Description                             Default
55
56--prefix=...    Directories to put files in             $prefix
57--bindir=...                                            $bindir
58--etcdir=...                                            $etcdir
59--mandir=...                                            $mandir
60--datadir=...                                           $datadir
[7b23afd]61--plugindir=...                                         $plugindir
[34b17d9]62--pidfile=...                                           $pidfile
[b7d3cc34]63--config=...                                            $config
[6dff9d4]64--ipcsocket=...                                         $ipcsocket
[b7d3cc34]65
66--msn=0/1       Disable/enable MSN part                 $msn
67--jabber=0/1    Disable/enable Jabber part              $jabber
68--oscar=0/1     Disable/enable Oscar part (ICQ, AIM)    $oscar
69--yahoo=0/1     Disable/enable Yahoo part               $yahoo
[1b221e0]70--twitter=0/1 Disable/enable Twitter part               $twitter
[b7d3cc34]71
[796da03]72--purple=0/1    Disable/enable libpurple support        $purple
73
[b7d3cc34]74--debug=0/1     Disable/enable debugging                $debug
75--strip=0/1     Disable/enable binary stripping         $strip
[66b9e86e]76--gcov=0/1      Disable/enable test coverage reporting  $gcov
[2abfbc5]77--plugins=0/1   Disable/enable plugins support          $plugins
[b7d3cc34]78
[85cf37f]79--events=...    Event handler (glib, libevent)          $events
[b7d3cc34]80--ssl=...       SSL library to use (gnutls, nss, openssl, bogus, auto)
81                                                        $ssl
[aec56b0]82
[f1e7407]83--target=...    Cross compilation target                same as host
[b7d3cc34]84EOF
85                exit;
86        fi
87        eval "$e"
88        shift;
89done
90
91# Expand $prefix and get rid of double slashes
92bindir=`eval echo "$bindir/" | sed 's/\/\{1,\}/\//g'`
93etcdir=`eval echo "$etcdir/" | sed 's/\/\{1,\}/\//g'`
94mandir=`eval echo "$mandir/" | sed 's/\/\{1,\}/\//g'`
95datadir=`eval echo "$datadir/" | sed 's/\/\{1,\}/\//g'`
96config=`eval echo "$config/" | sed 's/\/\{1,\}/\//g'`
[7b23afd]97plugindir=`eval echo "$plugindir/" | sed 's/\/\{1,\}/\//g'`
[85cf37f]98includedir=`eval echo "$includedir"/ | sed 's/\/\{1,\}/\//g'`
99libevent=`eval echo "$libevent"/ | sed 's/\/\{1,\}/\//g'`
100
[6dff9d4]101pidfile=`eval echo "$pidfile" | sed 's/\/\{1,\}/\//g'`
102ipcsocket=`eval echo "$ipcsocket" | sed 's/\/\{1,\}/\//g'`
[e506d6c]103pcdir=`eval echo "$pcdir" | sed 's/\/\{1,\}/\//g'`
[b7d3cc34]104
105cat<<EOF>Makefile.settings
106## BitlBee settings, generated by configure
107PREFIX=$prefix
108BINDIR=$bindir
109ETCDIR=$etcdir
110MANDIR=$mandir
111DATADIR=$datadir
[7b23afd]112PLUGINDIR=$plugindir
[b7d3cc34]113CONFIG=$config
[e506d6c]114INCLUDEDIR=$includedir
115PCDIR=$pcdir
[b7d3cc34]116
[1bf9492]117TARGET=$target
[b7d3cc34]118ARCH=$arch
119CPU=$cpu
120
121DESTDIR=
122LFLAGS=
123EFLAGS=
124EOF
125
[f60079b]126srcdir="$(dirname $0)"
127if [ "$srcdir" != "." ]; then
128        echo
129        echo "configure script run from a different directory. Will create some symlinks..."
130        if [ ! -e Makefile -o -L Makefile ]; then
[04dc563]131                COPYDIRS="doc lib protocols tests utils"
132                mkdir -p $(cd "$srcdir"; find $COPYDIRS -type d)
[f60079b]133                find . -name Makefile -type l -print0 | xargs -0 rm 2> /dev/null
134                dst="$PWD"
135                cd "$srcdir"
[04dc563]136                for i in $(find . -name Makefile -type f); do
[f60079b]137                        ln -s "$PWD${i#.}" "$dst/$i";
138                done
139                cd "$dst"
140                rm -rf .bzr
141        fi
142       
143        echo "SRCDIR=$srcdir/" >> Makefile.settings
144        CFLAGS="$CFLAGS -I${dst}"
145else
146        srcdir=$PWD
147fi
148
[b7d3cc34]149cat<<EOF>config.h
150/* BitlBee settings, generated by configure
151   
152   Do *NOT* use any of these defines in your code without thinking twice, most
153   of them can/will be overridden at run-time */
154
155#define CONFIG "$config"
156#define ETCDIR "$etcdir"
157#define VARDIR "$datadir"
[7b23afd]158#define PLUGINDIR "$plugindir"
[34b17d9]159#define PIDFILE "$pidfile"
[6dff9d4]160#define IPCSOCKET "$ipcsocket"
[b7d3cc34]161#define ARCH "$arch"
162#define CPU "$cpu"
163EOF
164
[1bf9492]165
166
[f1e7407]167if [ -n "$target" ]; then
[1bf9492]168        PKG_CONFIG_LIBDIR=/usr/$target/lib/pkgconfig
169        export PKG_CONFIG_LIBDIR
[f1e7407]170        PATH=/usr/$target/bin:$PATH
171        CC=$target-cc
172        LD=$target-ld
[1bf9492]173        systemlibdirs="/usr/$target/lib"
[f1e7407]174fi
175
[1bf9492]176
[b7d3cc34]177if [ "$debug" = "1" ]; then
[285b55d]178        [ -z "$CFLAGS" ] && CFLAGS=-g
[b7d3cc34]179        echo 'DEBUG=1' >> Makefile.settings
[911cc4f]180        CFLAGS="$CFLAGS -DDEBUG"
[b7d3cc34]181else
[56f260a]182        [ -z "$CFLAGS" ] && CFLAGS="-O2 -fno-strict-aliasing"
[b7d3cc34]183fi
184
[285b55d]185echo CFLAGS=$CFLAGS >> Makefile.settings
[f60079b]186echo CFLAGS+=-I${srcdir} -I${srcdir}/lib -I${srcdir}/protocols -I. >> Makefile.settings
[b7d3cc34]187
[f712188]188echo CFLAGS+=-DHAVE_CONFIG_H >> Makefile.settings
189
[b7d3cc34]190if [ -n "$CC" ]; then
[5973412]191        CC=$CC
[b7d3cc34]192elif type gcc > /dev/null 2> /dev/null; then
[5973412]193        CC=gcc
[b7d3cc34]194elif type cc > /dev/null 2> /dev/null; then
[5973412]195        CC=cc
[b7d3cc34]196else
197        echo 'Cannot find a C compiler, aborting.'
198        exit 1;
199fi
200
[5973412]201echo "CC=$CC" >> Makefile.settings;
202
[f1e7407]203if [ -z "$LD" ]; then
204        if type ld > /dev/null 2> /dev/null; then
205                LD=ld
206        else
207                echo 'Cannot find ld, aborting.'
208                exit 1;
209        fi
[b7d3cc34]210fi
211
[f1e7407]212echo "LD=$LD" >> Makefile.settings
213
[32c632f]214if [ -z "$PKG_CONFIG" ]; then
215        PKG_CONFIG=pkg-config
216fi
217
218if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG glib-2.0; then
[670204f]219        if $PKG_CONFIG glib-2.0 --atleast-version=$GLIB_MIN_VERSION; then
220                cat<<EOF>>Makefile.settings
[32c632f]221EFLAGS+=`$PKG_CONFIG --libs glib-2.0 gmodule-2.0`
222CFLAGS+=`$PKG_CONFIG --cflags glib-2.0 gmodule-2.0`
[b7d3cc34]223EOF
[670204f]224        else
225                echo
226                echo 'Found glib2 '`$PKG_CONFIG glib-2.0 --modversion`', but version '$GLIB_MIN_VERSION' or newer is required.'
227                exit 1
228        fi
[b7d3cc34]229else
[670204f]230        echo
[574af7e]231        echo 'Cannot find glib2 development libraries, aborting. (Install libglib2-dev?)'
[670204f]232        exit 1
[b7d3cc34]233fi
234
[85cf37f]235if [ "$events" = "libevent" ]; then
[003553b]236        if ! [ -f "${libevent}include/event.h" ]; then
[85cf37f]237                echo
238                echo 'Warning: Could not find event.h, you might have to install it and/or specify'
239                echo 'its location using the --libevent= argument. (Example: If event.h is in'
240                echo '/usr/local/include and binaries are in /usr/local/lib: --libevent=/usr/local)'
241        fi
242       
243        echo '#define EVENTS_LIBEVENT' >> config.h
244        cat <<EOF>>Makefile.settings
245EFLAGS+=-levent -L${libevent}lib
246CFLAGS+=-I${libevent}include
247EOF
248elif [ "$events" = "glib" ]; then
249        ## We already use glib anyway, so this is all we need (and in fact not even this, but just to be sure...):
250        echo '#define EVENTS_GLIB' >> config.h
[b7d3cc34]251else
252        echo
[85cf37f]253        echo 'ERROR: Unknown event handler specified.'
254        exit 1
[b7d3cc34]255fi
[85cf37f]256echo 'EVENT_HANDLER=events_'$events'.o' >> Makefile.settings
[b7d3cc34]257
258detect_gnutls()
259{
[4af7b4f]260        if $PKG_CONFIG --exists gnutls; then
261                cat <<EOF>>Makefile.settings
262EFLAGS+=`$PKG_CONFIG --libs gnutls`
263CFLAGS+=`$PKG_CONFIG --cflags gnutls`
264EOF
265                ssl=gnutls
266                ret=1
267        elif libgnutls-config --version > /dev/null 2> /dev/null; then
[b7d3cc34]268                cat <<EOF>>Makefile.settings
269EFLAGS+=`libgnutls-config --libs`
270CFLAGS+=`libgnutls-config --cflags`
271EOF
272               
273                ssl=gnutls
274                ret=1;
275        else
276                ret=0;
277        fi;
278}
279
280detect_nss()
281{
[32c632f]282        if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG mozilla-nss; then
[b7d3cc34]283                cat<<EOF>>Makefile.settings
[32c632f]284EFLAGS+=`$PKG_CONFIG --libs mozilla-nss`
285CFLAGS+=`$PKG_CONFIG --cflags mozilla-nss`
[b7d3cc34]286EOF
287               
288                ssl=nss
289                ret=1;
290        else
291                ret=0;
292        fi;
293}
294
[f32d557]295detect_ldap()
[f665dab]296{
[4fca1db]297        TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX)
[5973412]298        if $CC -o $TMPFILE -shared -lldap 2>/dev/null >/dev/null; then
[f665dab]299                cat<<EOF>>Makefile.settings
[5973412]300EFLAGS+=-lldap
301CFLAGS+=
[f665dab]302EOF
[f32d557]303                ldap=1
[5973412]304                rm -f $TMPFILE
[f665dab]305                ret=1
[b7d3cc34]306        else
[5973412]307                ldap=0
[f665dab]308                ret=0
[b7d3cc34]309        fi
[f665dab]310}
311
[36cf9fd]312RESOLV_TESTCODE='
313#include <arpa/nameser.h>
314#include <resolv.h>
315
316int main()
317{
318        ns_initparse( NULL, 0, NULL );
319        ns_parserr( NULL, ns_s_an, 0, NULL );
320}
321'
322
323detect_resolv_dynamic()
324{
[4fca1db]325        TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX)
[8462239]326        ret=1
327        echo "$RESOLV_TESTCODE" | $CC -o $TMPFILE -x c - -lresolv >/dev/null 2>/dev/null
[36cf9fd]328        if [ "$?" = "0" ]; then
329                echo 'EFLAGS+=-lresolv' >> Makefile.settings
[8462239]330                ret=0
[36cf9fd]331        fi
332
[8462239]333        rm -f $TMPFILE
334        return $ret
[36cf9fd]335}
336
337detect_resolv_static()
338{
[4fca1db]339        TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX)
[8462239]340        ret=1
[36cf9fd]341        for i in $systemlibdirs; do
342                if [ -f $i/libresolv.a ]; then
[8462239]343                        echo "$RESOLV_TESTCODE" | $CC -o $TMPFILE -x c - -Wl,$i/libresolv.a >/dev/null 2>/dev/null
[36cf9fd]344                        if [ "$?" = "0" ]; then
345                                echo 'EFLAGS+='$i'/libresolv.a' >> Makefile.settings
[8462239]346                                ret=0
[36cf9fd]347                        fi
348                fi
349        done
350
[8462239]351        rm -f $TMPFILE
352        return $ret
[36cf9fd]353}
354
[b3c467b]355if [ "$ssl" = "auto" ]; then
356        detect_gnutls
[b7d3cc34]357        if [ "$ret" = "0" ]; then
[b3c467b]358                detect_nss
[b7d3cc34]359        fi
[b3c467b]360elif [ "$ssl" = "gnutls" ]; then
361        detect_gnutls
362elif [ "$ssl" = "nss" ]; then
363        detect_nss
[85d7b85]364elif [ "$ssl" = "sspi" ]; then
365        echo
[b3c467b]366elif [ "$ssl" = "openssl" ]; then
367        echo
368        echo 'No detection code exists for OpenSSL. Make sure that you have a complete'
369        echo 'install of OpenSSL (including devel/header files) before reporting'
370        echo 'compilation problems.'
371        echo
372        echo 'Also, keep in mind that the OpenSSL is, according to some people, not'
373        echo 'completely GPL-compatible. Using GnuTLS or NSS is recommended and better'
374        echo 'supported by us. However, on many BSD machines, OpenSSL can be considered'
375        echo 'part of the operating system, which makes it GPL-compatible.'
376        echo
377        echo 'For more info, see: http://www.openssl.org/support/faq.html#LEGAL2'
378        echo '                    http://www.gnome.org/~markmc/openssl-and-the-gpl.html'
379        echo
380        echo 'Please note that distributing a BitlBee binary which links to OpenSSL is'
381        echo 'probably illegal. If you want to create and distribute a binary BitlBee'
382        echo 'package, you really should use GnuTLS or NSS instead.'
383        echo
384        echo 'Also, the OpenSSL license requires us to say this:'
385        echo ' *    "This product includes software developed by the OpenSSL Project'
386        echo ' *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"'
[b7d3cc34]387       
[b3c467b]388        echo 'EFLAGS+=-lssl -lcrypto' >> Makefile.settings
389       
390        ret=1
391elif [ "$ssl" = "bogus" ]; then
392        echo
[670204f]393        echo 'Using bogus SSL code. This means some features will not work properly.'
[b3c467b]394       
395        ## Yes, you, at the console! How can you authenticate if you don't have any SSL!?
[1c2eaa3]396        if [ "$msn" = "1" -o "$yahoo" = "1" ]; then
[b7d3cc34]397                echo
[1c2eaa3]398                echo 'WARNING: The MSN and Yahoo! modules will not work without SSL. Disabling.'
[b3c467b]399                msn=0
[1c2eaa3]400                yahoo=0
[b3c467b]401        fi
[b7d3cc34]402       
[b3c467b]403        ret=1
404else
405        echo
406        echo 'ERROR: Unknown SSL library specified.'
407        exit 1
[b7d3cc34]408fi
409
[b3c467b]410if [ "$ret" = "0" ]; then
411        echo
412        echo 'ERROR: Could not find a suitable SSL library (GnuTLS, libnss or OpenSSL).'
413        echo '       Please note that this script doesn'\''t have detection code for OpenSSL,'
414        echo '       so if you want to use that, you have to select it by hand. If you don'\''t'
415        echo '       need SSL support, you can select the "bogus" SSL library. (--ssl=bogus)'
[b7d3cc34]416       
[b3c467b]417        exit 1
418fi;
419
420echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings
421
[36cf9fd]422if detect_resolv_dynamic || detect_resolv_static; then
423        echo '#define HAVE_RESOLV_A' >> config.h
424fi
[36e9f62]425
[ba7d16f]426STORAGES="xml"
[b3c467b]427
[f32d557]428if [ "$ldap" = "auto" ]; then
429        detect_ldap
[b7d3cc34]430fi
431
[f32d557]432if [ "$ldap" = 0 ]; then
[5973412]433        echo "#undef WITH_LDAP" >> config.h
[f32d557]434elif [ "$ldap" = 1 ]; then
[5c5a586]435        echo
436        echo 'LDAP support is a work in progress and does NOT work AT ALL right now.'
437        echo
438        exit 1
439       
[5973412]440        echo "#define WITH_LDAP 1" >> config.h
[b3c467b]441        STORAGES="$STORAGES ldap"
[b7d3cc34]442fi
443
[b3c467b]444for i in $STORAGES; do
445        STORAGE_OBJS="$STORAGE_OBJS storage_$i.o"
446done
447echo "STORAGE_OBJS="$STORAGE_OBJS >> Makefile.settings
448
[b7d3cc34]449if [ "$strip" = 0 ]; then
450        echo "STRIP=\# skip strip" >> Makefile.settings;
451else
452        if [ "$debug" = 1 ]; then
453                echo
454                echo 'Stripping binaries does not make sense when debugging. Stripping disabled.'
455                echo 'STRIP=\# skip strip' >> Makefile.settings
456                strip=0;
457        elif [ -n "$STRIP" ]; then
458                echo "STRIP=$STRIP" >> Makefile.settings;
459        elif type strip > /dev/null 2> /dev/null; then
460                echo "STRIP=strip" >> Makefile.settings;
461        else
462                echo
463                echo 'No strip utility found, cannot remove unnecessary parts from executable.'
464                echo 'STRIP=\# skip strip' >> Makefile.settings
465                strip=0;
466        fi;
467fi
468
[66b9e86e]469if [ "$gcov" = "1" ]; then
[31fc3970]470        echo "CFLAGS+=--coverage" >> Makefile.settings
471        echo "EFLAGS+=--coverage" >> Makefile.settings
[66b9e86e]472fi
473
[2abfbc5]474if [ "$plugins" = 0 ]; then
475        echo '#undef WITH_PLUGINS' >> config.h
476else
477        echo '#define WITH_PLUGINS' >> config.h
478fi
479
[ceebeb1]480if [ ! -e doc/user-guide/help.txt ] && ! type xmlto > /dev/null 2> /dev/null; then
481        echo
482        echo 'WARNING: Building from an unreleased source tree without prebuilt helpfile.'
483        echo 'Install xmlto if you want online help to work.'
484fi
485
[ffea9b9]486echo
[a014331]487if [ -z "$BITLBEE_VERSION" -a -d .bzr ] && type bzr > /dev/null 2> /dev/null; then
488        nick=`bzr nick`
489        if [ -n "$nick" -a "$nick" != "bitlbee" ]; then
490                nick="-$nick"
491        else
492                nick=""
493        fi
[ffea9b9]494        rev=`bzr revno`
495        echo 'Using bzr revision #'$rev' as version number'
[a014331]496        BITLBEE_VERSION=\"bzr$nick-$rev\"
[b7d3cc34]497fi
498
499if [ -n "$BITLBEE_VERSION" ]; then
500        echo 'Spoofing version number: '$BITLBEE_VERSION
501        echo '#undef BITLBEE_VERSION' >> config.h
[ffea9b9]502        echo '#define BITLBEE_VERSION '$BITLBEE_VERSION >> config.h
503        echo
[b7d3cc34]504fi
505
[4fca1db]506if ! make helloworld > /dev/null 2>&1; then
507        echo "WARNING: Your version of make (BSD make?) does not support BitlBee's makefiles."
508        echo "BitlBee needs GNU make to build properly. On most systems GNU make is available"
509        echo "under the name 'gmake'."
510        echo
511        if gmake helloworld > /dev/null 2>&1; then
512                echo "gmake seems to be available on your machine, great."
513                echo
514        else
515                echo "gmake is not installed (or not working). Please try to install it."
516                echo
517        fi
518fi
519
[e506d6c]520cat <<EOF>bitlbee.pc
521prefix=$prefix
522includedir=$includedir
523
524Name: bitlbee
525Description: IRC to IM gateway
526Requires: glib-2.0
527Version: $BITLBEE_VERSION
528Libs:
529Cflags: -I\${includedir}
530
531EOF
532
[b7d3cc34]533protocols=''
534protoobjs=''
535
[e248c7f]536if [ "$purple" = 0 ]; then
537        echo '#undef WITH_PURPLE' >> config.h
538else
[e08e53c]539        if ! $PKG_CONFIG purple; then
540                echo
541                echo 'Cannot find libpurple development libraries, aborting. (Install libpurple-dev?)'
542                exit 1
543        fi
[e248c7f]544        echo '#define WITH_PURPLE' >> config.h
[e08e53c]545        cat<<EOF>>Makefile.settings
546EFLAGS += $($PKG_CONFIG purple --libs)
547PURPLE_CFLAGS += $($PKG_CONFIG purple --cflags)
548EOF
[e248c7f]549        protocols=$protocols'purple '
550        protoobjs=$protoobjs'purple_mod.o '
551
552        # Having both libpurple and native IM modules in one binary may
553        # do strange things. Let's not do that.
554        msn=0
555        jabber=0
556        oscar=0
557        yahoo=0
[a348d00]558        twitter=0
[bda2975]559       
560        if [ "$events" = "libevent" ]; then
561                echo
562                echo 'Warning: Some libpurple modules (including msn-pecan) do their event handling'
563                echo 'outside libpurple, talking to GLib directly. At least for now the combination'
564                echo 'libpurple + libevent is *not* recommended!'
565        fi
[e248c7f]566fi
567
[b7d3cc34]568if [ "$msn" = 0 ]; then
569        echo '#undef WITH_MSN' >> config.h
570else
571        echo '#define WITH_MSN' >> config.h
572        protocols=$protocols'msn '
[b5a22e3]573        protoobjs=$protoobjs'msn_mod.o '
[b7d3cc34]574fi
575
576if [ "$jabber" = 0 ]; then
577        echo '#undef WITH_JABBER' >> config.h
578else
579        echo '#define WITH_JABBER' >> config.h
580        protocols=$protocols'jabber '
[b5a22e3]581        protoobjs=$protoobjs'jabber_mod.o '
[b7d3cc34]582fi
583
584if [ "$oscar" = 0 ]; then
585        echo '#undef WITH_OSCAR' >> config.h
586else
587        echo '#define WITH_OSCAR' >> config.h
588        protocols=$protocols'oscar '
[b5a22e3]589        protoobjs=$protoobjs'oscar_mod.o '
[b7d3cc34]590fi
591
592if [ "$yahoo" = 0 ]; then
593        echo '#undef WITH_YAHOO' >> config.h
594else
595        echo '#define WITH_YAHOO' >> config.h
596        protocols=$protocols'yahoo '
[b5a22e3]597        protoobjs=$protoobjs'yahoo_mod.o '
[b7d3cc34]598fi
599
[1b221e0]600if [ "$twitter" = 0 ]; then
601        echo '#undef WITH_TWITTER' >> config.h
602else
603        echo '#define WITH_TWITTER' >> config.h
604        protocols=$protocols'twitter '
605        protoobjs=$protoobjs'twitter_mod.o '
606fi
607
[b7d3cc34]608if [ "$protocols" = "PROTOCOLS = " ]; then
[43462708]609        echo "Warning: You haven't selected any communication protocol to compile!"
[b3c467b]610        echo "         BitlBee will run, but you will be unable to connect to IM servers!"
[b7d3cc34]611fi
612
613echo "PROTOCOLS = $protocols" >> Makefile.settings
614echo "PROTOOBJS = $protoobjs" >> Makefile.settings
615
616echo Architecture: $arch
617case "$arch" in
618Linux )
619;;
620GNU/* )
621;;
622*BSD )
623;;
624Darwin )
[caceb06]625        echo 'STRIP=\# skip strip' >> Makefile.settings
[b7d3cc34]626;;
627IRIX )
628;;
629SunOS )
630        echo 'EFLAGS+=-lresolv -lnsl -lsocket' >> Makefile.settings
631        echo 'STRIP=\# skip strip' >> Makefile.settings
632;;
[8de63c3]633AIX )
634        echo 'EFLAGS+=-Wl,-brtl' >> Makefile.settings
[b7d3cc34]635;;
636CYGWIN* )
637        echo 'Cygwin is not officially supported.'
638;;
[aec56b0]639Windows )
640;;
[b7d3cc34]641* )
[8d6c4b1]642        echo 'We haven'\''t tested BitlBee on many platforms yet, yours is untested. YMMV.'
643        echo 'Please report any problems at http://bugs.bitlbee.org/.'
[b7d3cc34]644;;
645esac
646
[f1e7407]647if [ -n "$target" ]; then
648        echo "Cross-compiling for: $target"
649fi
650
[b7d3cc34]651echo
652echo 'Configuration done:'
653
654if [ "$debug" = "1" ]; then
[b3c467b]655        echo '  Debugging enabled.'
[b7d3cc34]656else
[b3c467b]657        echo '  Debugging disabled.'
[b7d3cc34]658fi
659
660if [ "$strip" = "1" ]; then
[b3c467b]661        echo '  Binary stripping enabled.'
[b7d3cc34]662else
[b3c467b]663        echo '  Binary stripping disabled.'
[b7d3cc34]664fi
665
[b3c467b]666echo '  Using event handler: '$events
667echo '  Using SSL library: '$ssl
668echo '  Building with these storage backends: '$STORAGES
[b7d3cc34]669
670if [ -n "$protocols" ]; then
[b3c467b]671        echo '  Building with these protocols:' $protocols
[b7d3cc34]672else
[b3c467b]673        echo '  Building without IM-protocol support. We wish you a lot of fun...'
[b7d3cc34]674fi
Note: See TracBrowser for help on using the repository browser.