source: configure @ aa2f575

Last change on this file since aa2f575 was 17f6079, checked in by Wilmer van der Gaast <wilmer@…>, at 2011-07-24T12:50:21Z

Small changes to --skype= flag behaviour in configure script.

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