source: configure @ eb54f56

Last change on this file since eb54f56 was 7fa5c19, checked in by Wilmer van der Gaast <wilmer@…>, at 2012-02-11T12:55:45Z

Rename SRCDIR directory to _SRCDIR_. I guess #907 was caused by SRCDIR
unexpectedly being set to something already.

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