source: configure @ 2ceed44

3.2.1+otr4-1.1
Last change on this file since 2ceed44 was a8aa823, checked in by Wilmer van der Gaast <wilmer@…>, at 2013-12-07T12:49:28Z

Ugly: Bogus dependency on libotr2-dev, but adding a warning to the configure
script that this actually won't work.

This because I can't figure out how to make a source dependency conditional
on whether a certain binary packages is going to be built. It's kind of okay
since libotr2-dev is unavailable on new systems anyway.

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