source: configure @ 93302ef

Last change on this file since 93302ef was 0075527, checked in by Nick Murdoch <nick@…>, at 2013-03-17T13:38:14Z

Add existing git project files, and modify bitlbee's build script to build the plugin.

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