source: configure @ 68709f5

Last change on this file since 68709f5 was 68709f5, checked in by Wilmer van der Gaast <wilmer@…>, at 2012-08-19T15:33:55Z

NSS module fixes from mcepl in #714. This removes des.c since it's no
longer necessary.

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