source: configure @ 6f6b6c7

3.2.2
Last change on this file since 6f6b6c7 was f287f04, checked in by dequis <dx@…>, at 2014-06-26T08:07:11Z

Fix version in pkg-config file, also change bzr version format slightly

Old bzr version format: bzr-1234
New bzr version format: 3.2.1-bzr-1234

Version spoofing with the BITLBEE_VERSION also changed slightly - it
does not need quotes around the version number anymore for it to compile
correctly.

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