source: configure @ bb5ce568

Last change on this file since bb5ce568 was 0153ba9, checked in by Wilmer van der Gaast <wilmer@…>, at 2012-06-04T11:01:50Z

Drop the LDAP stuff that was never even close to finished.

There was actually a branch where LDAP support was more or less in a usable
state, but there were still some unsolved problems including the fact that
every setting has its own LDAP schema entry, which would mean lots of
maintenance overhead for pretty much every BitlBee release. :-(

Instead, we'll just stick to the XML format everywhere and just store it
in different ways.

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