source: configure @ c0f33f1

Last change on this file since c0f33f1 was 417002e, checked in by Wilmer van der Gaast <wilmer@…>, at 2011-03-18T00:57:14Z

systemd stuff (bug #738)

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