source: configure @ d18db32f

Last change on this file since d18db32f was 693ff09, checked in by Wilmer van der Gaast <wilmer@…>, at 2011-11-25T07:46:44Z

Removing duplicate twitter=1 line. Bug #804.

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