source: configure @ 6a45181

Last change on this file since 6a45181 was 4c225f0, checked in by Wilmer van der Gaast <wilmer@…>, at 2011-10-20T03:18:23Z

Drop the on-disk IPC socket by default. Nothing uses it. If one really wants
it, it can be restored using the --ipcsocket= configure option.

  • 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/sbin/'
12etcdir='$prefix/etc/bitlbee/'
13mandir='$prefix/share/man/'
14datadir='$prefix/share/bitlbee/'
15config='/var/lib/bitlbee/'
16plugindir='$prefix/lib/bitlbee/'
17includedir='$prefix/include/bitlbee/'
18systemdsystemunitdir=''
19libevent='/usr/'
20pidfile='/var/run/bitlbee.pid'
21ipcsocket=''
22pcdir='$prefix/lib/pkgconfig'
23systemlibdirs="/lib /lib64 /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64"
24
25msn=1
26jabber=1
27oscar=1
28yahoo=1
29twitter=1
30twitter=1
31purple=0
32
33debug=0
34strip=1
35gcov=0
36plugins=1
37otr=0
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--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'`
102etcdir=`eval echo "$etcdir/" | sed 's/\/\{1,\}/\//g'`
103mandir=`eval echo "$mandir/" | sed 's/\/\{1,\}/\//g'`
104datadir=`eval echo "$datadir/" | sed 's/\/\{1,\}/\//g'`
105config=`eval echo "$config/" | sed 's/\/\{1,\}/\//g'`
106plugindir=`eval echo "$plugindir/" | sed 's/\/\{1,\}/\//g'`
107includedir=`eval echo "$includedir"/ | sed 's/\/\{1,\}/\//g'`
108libevent=`eval echo "$libevent"/ | sed 's/\/\{1,\}/\//g'`
109
110pidfile=`eval echo "$pidfile" | sed 's/\/\{1,\}/\//g'`
111ipcsocket=`eval echo "$ipcsocket" | sed 's/\/\{1,\}/\//g'`
112pcdir=`eval echo "$pcdir" | sed 's/\/\{1,\}/\//g'`
113
114protocols_mods=""
115
116cat<<EOF>Makefile.settings
117## BitlBee settings, generated by configure
118PREFIX=$prefix
119BINDIR=$bindir
120ETCDIR=$etcdir
121MANDIR=$mandir
122DATADIR=$datadir
123PLUGINDIR=$plugindir
124CONFIG=$config
125INCLUDEDIR=$includedir
126PCDIR=$pcdir
127
128TARGET=$target
129ARCH=$arch
130CPU=$cpu
131
132DESTDIR=
133LFLAGS=
134EFLAGS=
135EOF
136
137srcdir=$(cd $(dirname $0);pwd)
138currdir=$(pwd)
139if [ "$srcdir" != "$currdir" ]; then 
140        echo
141        echo "configure script run from a different directory. Will create some symlinks..."
142        if [ ! -e Makefile -o -L Makefile ]; then
143                COPYDIRS="doc lib protocols tests utils"
144                mkdir -p $(cd "$srcdir"; find $COPYDIRS -type d)
145                find . -name Makefile -type l -print0 | xargs -0 rm 2> /dev/null
146                dst="$PWD"
147                cd "$srcdir"
148                for i in $(find . -name Makefile -type f); do
149                        ln -s "$PWD${i#.}" "$dst/$i";
150                done
151                cd "$dst"
152                rm -rf .bzr
153        fi
154       
155        echo "SRCDIR=$srcdir/" >> Makefile.settings
156        CFLAGS="$CFLAGS -I${dst}"
157else
158        srcdir=$PWD
159fi
160
161cat<<EOF>config.h
162/* BitlBee settings, generated by configure
163   
164   Do *NOT* use any of these defines in your code without thinking twice, most
165   of them can/will be overridden at run-time */
166
167#define CONFIG "$config"
168#define ETCDIR "$etcdir"
169#define VARDIR "$datadir"
170#define PLUGINDIR "$plugindir"
171#define PIDFILE "$pidfile"
172#define IPCSOCKET "$ipcsocket"
173#define ARCH "$arch"
174#define CPU "$cpu"
175EOF
176
177
178
179if [ -n "$target" ]; then
180        PKG_CONFIG_LIBDIR=/usr/$target/lib/pkgconfig
181        export PKG_CONFIG_LIBDIR
182        PATH=/usr/$target/bin:$PATH
183        CC=$target-cc
184        LD=$target-ld
185        systemlibdirs="/usr/$target/lib"
186fi
187
188
189if [ "$debug" = "1" ]; then
190        [ -z "$CFLAGS" ] && CFLAGS=-g
191        echo 'DEBUG=1' >> Makefile.settings
192        CFLAGS="$CFLAGS -DDEBUG"
193else
194        [ -z "$CFLAGS" ] && CFLAGS="-O2 -fno-strict-aliasing"
195fi
196
197echo CFLAGS=$CFLAGS $CPPFLAGS >> Makefile.settings
198echo CFLAGS+=-I${srcdir} -I${srcdir}/lib -I${srcdir}/protocols -I. >> Makefile.settings
199
200echo CFLAGS+=-DHAVE_CONFIG_H >> Makefile.settings
201
202if [ -n "$CC" ]; then
203        CC=$CC
204elif type gcc > /dev/null 2> /dev/null; then
205        CC=gcc
206elif type cc > /dev/null 2> /dev/null; then
207        CC=cc
208else
209        echo 'Cannot find a C compiler, aborting.'
210        exit 1;
211fi
212
213echo "CC=$CC" >> Makefile.settings;
214if echo $CC | grep -qw gcc; then
215        # Apparently -Wall is gcc-specific?
216        echo CFLAGS+=-Wall >> Makefile.settings
217fi
218
219if [ -z "$LD" ]; then
220        if type ld > /dev/null 2> /dev/null; then
221                LD=ld
222        else
223                echo 'Cannot find ld, aborting.'
224                exit 1;
225        fi
226fi
227
228echo "LD=$LD" >> Makefile.settings
229
230if [ -z "$PKG_CONFIG" ]; then
231        PKG_CONFIG=pkg-config
232fi
233
234if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG glib-2.0; then
235        if $PKG_CONFIG glib-2.0 --atleast-version=$GLIB_MIN_VERSION; then
236                cat<<EOF>>Makefile.settings
237EFLAGS+=`$PKG_CONFIG --libs glib-2.0 gmodule-2.0`
238CFLAGS+=`$PKG_CONFIG --cflags glib-2.0 gmodule-2.0`
239EOF
240        else
241                echo
242                echo 'Found glib2 '`$PKG_CONFIG glib-2.0 --modversion`', but version '$GLIB_MIN_VERSION' or newer is required.'
243                exit 1
244        fi
245else
246        echo
247        echo 'Cannot find glib2 development libraries, aborting. (Install libglib2-dev?)'
248        exit 1
249fi
250
251if [ "$events" = "libevent" ]; then
252        if ! [ -f "${libevent}include/event.h" ]; then
253                echo
254                echo 'Warning: Could not find event.h, you might have to install it and/or specify'
255                echo 'its location using the --libevent= argument. (Example: If event.h is in'
256                echo '/usr/local/include and binaries are in /usr/local/lib: --libevent=/usr/local)'
257        fi
258       
259        echo '#define EVENTS_LIBEVENT' >> config.h
260        cat <<EOF>>Makefile.settings
261EFLAGS+=-levent -L${libevent}lib
262CFLAGS+=-I${libevent}include
263EOF
264elif [ "$events" = "glib" ]; then
265        ## We already use glib anyway, so this is all we need (and in fact not even this, but just to be sure...):
266        echo '#define EVENTS_GLIB' >> config.h
267else
268        echo
269        echo 'ERROR: Unknown event handler specified.'
270        exit 1
271fi
272echo 'EVENT_HANDLER=events_'$events'.o' >> Makefile.settings
273
274detect_gnutls()
275{
276        if $PKG_CONFIG --exists gnutls; then
277                cat <<EOF>>Makefile.settings
278EFLAGS+=`$PKG_CONFIG --libs gnutls` `libgcrypt-config --libs`
279CFLAGS+=`$PKG_CONFIG --cflags gnutls` `libgcrypt-config --cflags`
280EOF
281                ssl=gnutls
282                ret=1
283        elif libgnutls-config --version > /dev/null 2> /dev/null; then
284                cat <<EOF>>Makefile.settings
285EFLAGS+=`libgnutls-config --libs` `libgcrypt-config --libs`
286CFLAGS+=`libgnutls-config --cflags` `libgcrypt-config --cflags`
287EOF
288               
289                ssl=gnutls
290                ret=1;
291        else
292                ret=0;
293        fi;
294}
295
296detect_nss()
297{
298        if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG nss; then
299                cat<<EOF>>Makefile.settings
300EFLAGS+=`$PKG_CONFIG --libs nss`
301CFLAGS+=`$PKG_CONFIG --cflags nss`
302EOF
303               
304                ssl=nss
305                ret=1;
306        else
307                ret=0;
308        fi;
309}
310
311detect_ldap()
312{
313        TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX)
314        if $CC -o $TMPFILE -shared -lldap 2>/dev/null >/dev/null; then
315                cat<<EOF>>Makefile.settings
316EFLAGS+=-lldap
317CFLAGS+=
318EOF
319                ldap=1
320                rm -f $TMPFILE
321                ret=1
322        else
323                ldap=0
324                ret=0
325        fi
326}
327
328RESOLV_TESTCODE='
329#include <arpa/nameser.h>
330#include <resolv.h>
331
332int main()
333{
334        ns_initparse( NULL, 0, NULL );
335        ns_parserr( NULL, ns_s_an, 0, NULL );
336}
337'
338
339detect_resolv_dynamic()
340{
341        TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX)
342        ret=1
343        echo "$RESOLV_TESTCODE" | $CC -o $TMPFILE -x c - -lresolv >/dev/null 2>/dev/null
344        if [ "$?" = "0" ]; then
345                echo 'EFLAGS+=-lresolv' >> 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
454if [ "$ldap" = "auto" ]; then
455        detect_ldap
456fi
457
458if [ "$ldap" = 0 ]; then
459        echo "#undef WITH_LDAP" >> config.h
460elif [ "$ldap" = 1 ]; then
461        echo
462        echo 'LDAP support is a work in progress and does NOT work AT ALL right now.'
463        echo
464        exit 1
465       
466        echo "#define WITH_LDAP 1" >> config.h
467        STORAGES="$STORAGES ldap"
468fi
469
470for i in $STORAGES; do
471        STORAGE_OBJS="$STORAGE_OBJS storage_$i.o"
472done
473echo "STORAGE_OBJS="$STORAGE_OBJS >> Makefile.settings
474
475if [ "$strip" = 0 ]; then
476        echo "STRIP=\# skip strip" >> Makefile.settings;
477else
478        if [ "$debug" = 1 ]; then
479                echo
480                echo 'Stripping binaries does not make sense when debugging. Stripping disabled.'
481                echo 'STRIP=\# skip strip' >> Makefile.settings
482                strip=0;
483        elif [ -n "$STRIP" ]; then
484                echo "STRIP=$STRIP" >> Makefile.settings;
485        elif type strip > /dev/null 2> /dev/null; then
486                echo "STRIP=strip" >> Makefile.settings;
487        else
488                echo
489                echo 'No strip utility found, cannot remove unnecessary parts from executable.'
490                echo 'STRIP=\# skip strip' >> Makefile.settings
491                strip=0;
492        fi;
493fi
494
495if [ -z "$systemdsystemunitdir" ]; then
496        if $PKG_CONFIG --exists systemd; then
497                systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd`
498        fi
499fi
500if [ -n "$systemdsystemunitdir" ]; then
501        if [ "$systemdsystemunitdir" != "no" ]; then
502                echo "SYSTEMDSYSTEMUNITDIR=$systemdsystemunitdir" >> Makefile.settings
503        fi
504fi
505
506if [ "$gcov" = "1" ]; then
507        echo "CFLAGS+=--coverage" >> Makefile.settings
508        echo "EFLAGS+=--coverage" >> Makefile.settings
509fi
510
511if [ "$plugins" = 0 ]; then
512        echo '#undef WITH_PLUGINS' >> config.h
513else
514        echo '#define WITH_PLUGINS' >> config.h
515fi
516
517otrprefix=""
518for i in / /usr /usr/local; do
519        if [ -f ${i}/lib/libotr.a ]; then
520                otrprefix=${i}
521                break
522        fi
523done
524if [ "$otr" = "auto" ]; then
525        if [ -n "$otrprefix" ]; then
526                otr=1
527        else
528                otr=0
529        fi
530fi
531if [ "$otr" = 1 ]; then
532        # BI == built-in
533        echo '#define OTR_BI' >> config.h
534        echo "EFLAGS+=-L${otrprefix}/lib -lotr" >> Makefile.settings
535        echo "CFLAGS+=-I${otrprefix}/include" >> Makefile.settings
536        echo 'OTR_BI=otr.o' >> Makefile.settings
537elif [ "$otr" = "plugin" ]; then
538        echo '#define OTR_PI' >> config.h
539        echo "OTRFLAGS=-L${otrprefix}/lib -lotr" >> Makefile.settings
540        echo "CFLAGS+=-I${otrprefix}/include" >> Makefile.settings
541        echo 'OTR_PI=otr.so' >> Makefile.settings
542fi
543
544if [ "$skype" = "1" -o "$skype" = "plugin" ]; then
545        echo 'SKYPE_PI=skype.so' >> Makefile.settings
546        protocols_mods="$protocol_mods skype(plugin)"
547fi
548
549if [ ! -e doc/user-guide/help.txt ] && ! type xmlto > /dev/null 2> /dev/null; then
550        echo
551        echo 'WARNING: Building from an unreleased source tree without prebuilt helpfile.'
552        echo 'Install xmlto if you want online help to work.'
553fi
554
555echo
556if [ -z "$BITLBEE_VERSION" -a -d .bzr ] && type bzr > /dev/null 2> /dev/null; then
557        nick=`bzr nick`
558        if [ -n "$nick" -a "$nick" != "bitlbee" ]; then
559                nick="-$nick"
560        else
561                nick=""
562        fi
563        rev=`bzr revno`
564        echo 'Using bzr revision #'$rev' as version number'
565        BITLBEE_VERSION=\"bzr$nick-$rev\"
566fi
567
568if [ -n "$BITLBEE_VERSION" ]; then
569        echo 'Spoofing version number: '$BITLBEE_VERSION
570        echo '#undef BITLBEE_VERSION' >> config.h
571        echo '#define BITLBEE_VERSION '$BITLBEE_VERSION >> config.h
572        echo
573fi
574
575if ! make helloworld > /dev/null 2>&1; then
576        echo "WARNING: Your version of make (BSD make?) does not support BitlBee's makefiles."
577        echo "BitlBee needs GNU make to build properly. On most systems GNU make is available"
578        echo "under the name 'gmake'."
579        echo
580        if gmake helloworld > /dev/null 2>&1; then
581                echo "gmake seems to be available on your machine, great."
582                echo
583        else
584                echo "gmake is not installed (or not working). Please try to install it."
585                echo
586        fi
587fi
588
589cat <<EOF>bitlbee.pc
590prefix=$prefix
591includedir=$includedir
592
593Name: bitlbee
594Description: IRC to IM gateway
595Requires: glib-2.0
596Version: $BITLBEE_VERSION
597Libs:
598Cflags: -I\${includedir}
599
600EOF
601
602protocols=''
603protoobjs=''
604
605if [ "$purple" = 0 ]; then
606        echo '#undef WITH_PURPLE' >> config.h
607else
608        if ! $PKG_CONFIG purple; then
609                echo
610                echo 'Cannot find libpurple development libraries, aborting. (Install libpurple-dev?)'
611                exit 1
612        fi
613        echo '#define WITH_PURPLE' >> config.h
614        cat<<EOF>>Makefile.settings
615EFLAGS += $($PKG_CONFIG purple --libs)
616PURPLE_CFLAGS += $($PKG_CONFIG purple --cflags)
617EOF
618        protocols=$protocols'purple '
619        protoobjs=$protoobjs'purple_mod.o '
620
621        # Having both libpurple and native IM modules in one binary may
622        # do strange things. Let's not do that.
623        msn=0
624        jabber=0
625        oscar=0
626        yahoo=0
627       
628        if [ "$events" = "libevent" ]; then
629                echo 'Warning: Some libpurple modules (including msn-pecan) do their event handling'
630                echo 'outside libpurple, talking to GLib directly. At least for now the combination'
631                echo 'libpurple + libevent is *not* recommended!'
632                echo
633        fi
634fi
635
636case "$CC" in
637*gcc* )
638        echo CFLAGS+=-MD -MF .depend/\$@.d >> Makefile.settings
639        for i in . lib protocols protocols/*/; do
640                mkdir -p $i/.depend
641        done
642esac
643
644if [ "$msn" = 0 ]; then
645        echo '#undef WITH_MSN' >> config.h
646else
647        echo '#define WITH_MSN' >> config.h
648        protocols=$protocols'msn '
649        protoobjs=$protoobjs'msn_mod.o '
650fi
651
652if [ "$jabber" = 0 ]; then
653        echo '#undef WITH_JABBER' >> config.h
654else
655        echo '#define WITH_JABBER' >> config.h
656        protocols=$protocols'jabber '
657        protoobjs=$protoobjs'jabber_mod.o '
658fi
659
660if [ "$oscar" = 0 ]; then
661        echo '#undef WITH_OSCAR' >> config.h
662else
663        echo '#define WITH_OSCAR' >> config.h
664        protocols=$protocols'oscar '
665        protoobjs=$protoobjs'oscar_mod.o '
666fi
667
668if [ "$yahoo" = 0 ]; then
669        echo '#undef WITH_YAHOO' >> config.h
670else
671        echo '#define WITH_YAHOO' >> config.h
672        protocols=$protocols'yahoo '
673        protoobjs=$protoobjs'yahoo_mod.o '
674fi
675
676if [ "$twitter" = 0 ]; then
677        echo '#undef WITH_TWITTER' >> config.h
678else
679        echo '#define WITH_TWITTER' >> config.h
680        protocols=$protocols'twitter '
681        protoobjs=$protoobjs'twitter_mod.o '
682fi
683
684if [ "$protocols" = "PROTOCOLS = " ]; then
685        echo "Warning: You haven't selected any communication protocol to compile!"
686        echo "         BitlBee will run, but you will be unable to connect to IM servers!"
687fi
688
689echo "PROTOCOLS = $protocols" >> Makefile.settings
690echo "PROTOOBJS = $protoobjs" >> Makefile.settings
691
692echo Architecture: $arch
693case "$arch" in
694Linux )
695;;
696GNU/* )
697;;
698*BSD )
699;;
700Darwin )
701        echo 'STRIP=\# skip strip' >> Makefile.settings
702;;
703IRIX )
704;;
705SunOS )
706        echo 'EFLAGS+=-lresolv -lnsl -lsocket' >> Makefile.settings
707        echo 'STRIP=\# skip strip' >> Makefile.settings
708        echo '#define NO_FD_PASSING' >> config.h
709;;
710AIX )
711        echo 'EFLAGS+=-Wl,-brtl' >> Makefile.settings
712;;
713CYGWIN* )
714        echo 'Cygwin is not officially supported.'
715;;
716Windows )
717;;
718* )
719        echo 'We haven'\''t tested BitlBee on many platforms yet, yours is untested. YMMV.'
720        echo 'Please report any problems at http://bugs.bitlbee.org/.'
721;;
722esac
723
724if [ -n "$target" ]; then
725        echo "Cross-compiling for: $target"
726fi
727
728echo
729echo 'Configuration done:'
730
731if [ "$debug" = "1" ]; then
732        echo '  Debugging enabled.'
733else
734        echo '  Debugging disabled.'
735fi
736
737if [ "$strip" = "1" ]; then
738        echo '  Binary stripping enabled.'
739else
740        echo '  Binary stripping disabled.'
741fi
742
743if [ "$otr" = "1" ]; then
744        echo '  Off-the-Record (OTR) Messaging enabled.'
745elif [ "$otr" = "plugin" ]; then
746        echo '  Off-the-Record (OTR) Messaging enabled (as a plugin).'
747else
748        echo '  Off-the-Record (OTR) Messaging disabled.'
749fi
750
751if [ -n "$systemdsystemunitdir" ]; then
752        echo '  systemd enabled.'
753else
754        echo '  systemd disabled.'
755fi
756
757echo '  Using event handler: '$events
758echo '  Using SSL library: '$ssl
759#echo '  Building with these storage backends: '$STORAGES
760
761if [ -n "$protocols" ]; then
762        echo '  Building with these protocols:' $protocols$protocols_mods
763        case "$protocols" in
764        *purple*)
765                echo "    Note that BitlBee-libpurple is supported on a best-effort basis. It's"
766                echo "    not *fully* compatible with normal BitlBee. Don't use it unless you"
767                echo "    absolutely need it (i.e. support for a certain protocol or feature)."
768        esac
769else
770        echo '  Building without IM-protocol support. We wish you a lot of fun...'
771fi
Note: See TracBrowser for help on using the repository browser.