source: configure @ 7b05842

Last change on this file since 7b05842 was 489847f, checked in by dequis <dx@…>, at 2014-02-28T00:18:58Z

pkgconfig: Plugindir fix for bitlbee.pc (Ticket #1085)

  • 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=-lm
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        echo 'DEBUG=1' >> Makefile.settings
199        CFLAGS="$CFLAGS -g -DDEBUG"
200else
201        [ -z "$CFLAGS" ] && CFLAGS="-O2 -fno-strict-aliasing"
202fi
203
204if [ "$pie" = "1" ]; then
205        echo 'CFLAGS_BITLBEE=-fPIE' >> Makefile.settings
206        echo 'LDFLAGS_BITLBEE=-pie' >> Makefile.settings
207fi
208
209echo CFLAGS=$CFLAGS $CPPFLAGS >> Makefile.settings
210echo CFLAGS+=-I${srcdir} -I${srcdir}/lib -I${srcdir}/protocols -I. >> Makefile.settings
211
212echo CFLAGS+=-DHAVE_CONFIG_H -D_GNU_SOURCE >> Makefile.settings
213
214if [ -n "$CC" ]; then
215        CC=$CC
216elif type gcc > /dev/null 2> /dev/null; then
217        CC=gcc
218elif type cc > /dev/null 2> /dev/null; then
219        CC=cc
220else
221        echo 'Cannot find a C compiler, aborting.'
222        exit 1;
223fi
224
225echo "CC=$CC" >> Makefile.settings;
226if echo $CC | grep -qw gcc; then
227        # Apparently -Wall is gcc-specific?
228        echo CFLAGS+=-Wall >> Makefile.settings
229fi
230
231if [ -z "$LD" ]; then
232        if type ld > /dev/null 2> /dev/null; then
233                LD=ld
234        else
235                echo 'Cannot find ld, aborting.'
236                exit 1;
237        fi
238fi
239
240echo "LD=$LD" >> Makefile.settings
241
242if [ -z "$PKG_CONFIG" ]; then
243        PKG_CONFIG=pkg-config
244fi
245
246if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG glib-2.0; then
247        if $PKG_CONFIG glib-2.0 --atleast-version=$GLIB_MIN_VERSION; then
248                cat<<EOF>>Makefile.settings
249EFLAGS+=`$PKG_CONFIG --libs glib-2.0 gmodule-2.0`
250CFLAGS+=`$PKG_CONFIG --cflags glib-2.0 gmodule-2.0`
251EOF
252        else
253                echo
254                echo 'Found glib2 '`$PKG_CONFIG glib-2.0 --modversion`', but version '$GLIB_MIN_VERSION' or newer is required.'
255                exit 1
256        fi
257else
258        echo
259        echo 'Cannot find glib2 development libraries, aborting. (Install libglib2-dev?)'
260        exit 1
261fi
262
263if [ "$events" = "libevent" ]; then
264        if ! [ -f "${libevent}include/event.h" ]; then
265                echo
266                echo 'Warning: Could not find event.h, you might have to install it and/or specify'
267                echo 'its location using the --libevent= argument. (Example: If event.h is in'
268                echo '/usr/local/include and binaries are in /usr/local/lib: --libevent=/usr/local)'
269        fi
270       
271        echo '#define EVENTS_LIBEVENT' >> config.h
272        cat <<EOF>>Makefile.settings
273EFLAGS+=-levent -L${libevent}lib
274CFLAGS+=-I${libevent}include
275EOF
276elif [ "$events" = "glib" ]; then
277        ## We already use glib anyway, so this is all we need (and in fact not even this, but just to be sure...):
278        echo '#define EVENTS_GLIB' >> config.h
279else
280        echo
281        echo 'ERROR: Unknown event handler specified.'
282        exit 1
283fi
284echo 'EVENT_HANDLER=events_'$events'.o' >> Makefile.settings
285
286detect_gnutls()
287{
288        if $PKG_CONFIG --exists gnutls; then
289                cat <<EOF>>Makefile.settings
290EFLAGS+=`$PKG_CONFIG --libs gnutls` `libgcrypt-config --libs`
291CFLAGS+=`$PKG_CONFIG --cflags gnutls` `libgcrypt-config --cflags`
292EOF
293                ssl=gnutls
294                if ! pkg-config gnutls --atleast-version=2.8; then
295                        echo
296                        echo 'Warning: With GnuTLS versions <2.8, certificate expire dates are not verified.'
297                fi
298                ret=1
299        elif libgnutls-config --version > /dev/null 2> /dev/null; then
300                cat <<EOF>>Makefile.settings
301EFLAGS+=`libgnutls-config --libs` `libgcrypt-config --libs`
302CFLAGS+=`libgnutls-config --cflags` `libgcrypt-config --cflags`
303EOF
304               
305                ssl=gnutls
306                ret=1;
307        else
308                ret=0;
309        fi;
310}
311
312detect_nss()
313{
314        if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG nss; then
315                cat<<EOF>>Makefile.settings
316EFLAGS+=`$PKG_CONFIG --libs nss`
317CFLAGS+=`$PKG_CONFIG --cflags nss`
318EOF
319               
320                ssl=nss
321                ret=1;
322        else
323                ret=0;
324        fi;
325}
326
327RESOLV_TESTCODE='
328#include <sys/types.h>
329#include <netinet/in.h>
330#include <arpa/nameser.h>
331#include <resolv.h>
332
333int main()
334{
335        ns_initparse( NULL, 0, NULL );
336        ns_parserr( NULL, ns_s_an, 0, NULL );
337}
338'
339
340detect_resolv_dynamic()
341{
342        case "$arch" in
343        FreeBSD )
344                # In FreeBSD res_* routines are present in libc.so
345                LIBRESOLV=;;
346        * )
347                LIBRESOLV=-lresolv;;
348        esac
349        TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX)
350        ret=1
351        echo "$RESOLV_TESTCODE" | $CC -o $TMPFILE -x c - $LIBRESOLV >/dev/null 2>/dev/null
352        if [ "$?" = "0" ]; then
353                echo "EFLAGS+=$LIBRESOLV" >> Makefile.settings
354                ret=0
355        fi
356
357        rm -f $TMPFILE
358        return $ret
359}
360
361detect_resolv_static()
362{
363        TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX)
364        ret=1
365        for i in $systemlibdirs; do
366                if [ -f $i/libresolv.a ]; then
367                        echo "$RESOLV_TESTCODE" | $CC -o $TMPFILE -x c - -Wl,$i/libresolv.a >/dev/null 2>/dev/null
368                        if [ "$?" = "0" ]; then
369                                echo 'EFLAGS+='$i'/libresolv.a' >> Makefile.settings
370                                ret=0
371                        fi
372                fi
373        done
374
375        rm -f $TMPFILE
376        return $ret
377}
378
379if [ "$ssl" = "auto" ]; then
380        detect_gnutls
381        if [ "$ret" = "0" ]; then
382                # Disable NSS for now as it's known to not work very well ATM.
383                #detect_nss
384                :
385        fi
386elif [ "$ssl" = "gnutls" ]; then
387        detect_gnutls
388elif [ "$ssl" = "nss" ]; then
389        detect_nss
390elif [ "$ssl" = "sspi" ]; then
391        echo
392elif [ "$ssl" = "openssl" ]; then
393        echo
394        echo 'No detection code exists for OpenSSL. Make sure that you have a complete'
395        echo 'installation of OpenSSL (including devel/header files) before reporting'
396        echo 'compilation problems.'
397        echo
398        echo 'Also, keep in mind that the OpenSSL is, according to some people, not'
399        echo 'completely GPL-compatible. Using GnuTLS is recommended and better supported'
400        echo 'by us. However, on many BSD machines, OpenSSL can be considered part of the'
401        echo 'operating system, which makes it GPL-compatible.'
402        echo
403        echo 'For more info, see: http://www.openssl.org/support/faq.html#LEGAL2'
404        echo '                    http://www.gnome.org/~markmc/openssl-and-the-gpl.html'
405        echo
406        echo 'Please note that distributing a BitlBee binary which links to OpenSSL is'
407        echo 'probably illegal. If you want to create and distribute a binary BitlBee'
408        echo 'package, you really should use GnuTLS instead.'
409        echo
410        echo 'Also, the OpenSSL license requires us to say this:'
411        echo ' *    "This product includes software developed by the OpenSSL Project'
412        echo ' *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"'
413       
414        echo 'EFLAGS+=-lssl -lcrypto' >> Makefile.settings
415       
416        ret=1
417else
418        echo
419        echo 'ERROR: Unknown SSL library specified.'
420        exit 1
421fi
422
423if [ "$ret" = "0" ]; then
424        echo
425        echo 'ERROR: Could not find a suitable SSL library (GnuTLS, libnss or OpenSSL).'
426        echo '       Please note that this script doesn'\''t have detection code for OpenSSL,'
427        echo '       so if you want to use that, you have to select it by hand.'
428       
429        exit 1
430fi;
431
432echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings
433
434if detect_resolv_dynamic || detect_resolv_static; then
435        echo '#define HAVE_RESOLV_A' >> config.h
436fi
437
438STORAGES="xml"
439
440for i in $STORAGES; do
441        STORAGE_OBJS="$STORAGE_OBJS storage_$i.o"
442done
443echo "STORAGE_OBJS="$STORAGE_OBJS >> Makefile.settings
444
445if [ "$strip" = 0 ]; then
446        echo "STRIP=\# skip strip" >> Makefile.settings;
447else
448        if [ "$debug" = 1 ]; then
449                echo
450                echo 'Stripping binaries does not make sense when debugging. Stripping disabled.'
451                echo 'STRIP=\# skip strip' >> Makefile.settings
452                strip=0;
453        elif [ -n "$STRIP" ]; then
454                echo "STRIP=$STRIP" >> Makefile.settings;
455        elif type strip > /dev/null 2> /dev/null; then
456                echo "STRIP=strip" >> Makefile.settings;
457        else
458                echo
459                echo 'No strip utility found, cannot remove unnecessary parts from executable.'
460                echo 'STRIP=\# skip strip' >> Makefile.settings
461                strip=0;
462        fi;
463fi
464
465if [ -z "$systemdsystemunitdir" ]; then
466        if $PKG_CONFIG --exists systemd; then
467                systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd`
468        fi
469fi
470if [ -n "$systemdsystemunitdir" ]; then
471        if [ "$systemdsystemunitdir" != "no" ]; then
472                echo "SYSTEMDSYSTEMUNITDIR=$systemdsystemunitdir" >> Makefile.settings
473        fi
474fi
475
476if [ "$gcov" = "1" ]; then
477        echo "CFLAGS+=--coverage" >> Makefile.settings
478        echo "EFLAGS+=--coverage" >> Makefile.settings
479fi
480
481if [ "$plugins" = 0 ]; then
482        plugindir=""
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
574plugindir=$plugindir
575
576Name: bitlbee
577Description: IRC to IM gateway
578Requires: glib-2.0
579Version: $BITLBEE_VERSION
580Libs:
581Cflags: -I\${includedir}
582
583EOF
584
585protocols=''
586protoobjs=''
587
588if [ "$purple" = 0 ]; then
589        echo '#undef WITH_PURPLE' >> config.h
590else
591        if ! $PKG_CONFIG purple; then
592                echo
593                echo 'Cannot find libpurple development libraries, aborting. (Install libpurple-dev?)'
594                exit 1
595        fi
596        echo '#define WITH_PURPLE' >> config.h
597        cat<<EOF>>Makefile.settings
598EFLAGS += $($PKG_CONFIG purple --libs)
599PURPLE_CFLAGS += $($PKG_CONFIG purple --cflags)
600EOF
601        protocols=$protocols'purple '
602        protoobjs=$protoobjs'purple_mod.o '
603
604        # Having both libpurple and native IM modules in one binary may
605        # do strange things. Let's not do that.
606        msn=0
607        jabber=0
608        oscar=0
609        yahoo=0
610
611        echo '#undef PACKAGE' >> config.h
612        echo '#define PACKAGE "BitlBee-LIBPURPLE"' >> config.h
613       
614        if [ "$events" = "libevent" ]; then
615                echo 'Warning: Some libpurple modules (including msn-pecan) do their event handling'
616                echo 'outside libpurple, talking to GLib directly. At least for now the combination'
617                echo 'libpurple + libevent is *not* recommended!'
618                echo
619        fi
620fi
621
622case "$CC" in
623*gcc* )
624        echo CFLAGS+=-MMD -MF .depend/\$@.d >> Makefile.settings
625        for i in . lib tests protocols protocols/*/; do
626                mkdir -p $i/.depend
627        done
628esac
629
630if [ "$msn" = 0 ]; then
631        echo '#undef WITH_MSN' >> config.h
632else
633        echo '#define WITH_MSN' >> config.h
634        protocols=$protocols'msn '
635        protoobjs=$protoobjs'msn_mod.o '
636fi
637
638if [ "$jabber" = 0 ]; then
639        echo '#undef WITH_JABBER' >> config.h
640else
641        echo '#define WITH_JABBER' >> config.h
642        protocols=$protocols'jabber '
643        protoobjs=$protoobjs'jabber_mod.o '
644fi
645
646if [ "$oscar" = 0 ]; then
647        echo '#undef WITH_OSCAR' >> config.h
648else
649        echo '#define WITH_OSCAR' >> config.h
650        protocols=$protocols'oscar '
651        protoobjs=$protoobjs'oscar_mod.o '
652fi
653
654if [ "$yahoo" = 0 ]; then
655        echo '#undef WITH_YAHOO' >> config.h
656else
657        echo '#define WITH_YAHOO' >> config.h
658        protocols=$protocols'yahoo '
659        protoobjs=$protoobjs'yahoo_mod.o '
660fi
661
662if [ "$twitter" = 0 ]; then
663        echo '#undef WITH_TWITTER' >> config.h
664else
665        echo '#define WITH_TWITTER' >> config.h
666        protocols=$protocols'twitter '
667        protoobjs=$protoobjs'twitter_mod.o '
668fi
669
670if [ "$protocols" = "PROTOCOLS = " ]; then
671        echo "Warning: You haven't selected any communication protocol to compile!"
672        echo "         BitlBee will run, but you will be unable to connect to IM servers!"
673fi
674
675echo "PROTOCOLS = $protocols" >> Makefile.settings
676echo "PROTOOBJS = $protoobjs" >> Makefile.settings
677
678echo Architecture: $arch
679case "$arch" in
680Linux )
681;;
682GNU/* )
683;;
684*BSD )
685;;
686Darwin )
687        echo 'STRIP=\# skip strip' >> Makefile.settings
688;;
689IRIX )
690;;
691SunOS )
692        echo 'EFLAGS+=-lresolv -lnsl -lsocket' >> Makefile.settings
693        echo 'STRIP=\# skip strip' >> Makefile.settings
694        echo '#define NO_FD_PASSING' >> config.h
695;;
696AIX )
697        echo 'EFLAGS+=-Wl,-brtl' >> Makefile.settings
698;;
699CYGWIN* )
700        echo 'Cygwin is not officially supported.'
701;;
702Windows )
703;;
704* )
705        echo 'We haven'\''t tested BitlBee on many platforms yet, yours is untested. YMMV.'
706        echo 'Please report any problems at http://bugs.bitlbee.org/.'
707;;
708esac
709
710if [ -n "$target" ]; then
711        echo "Cross-compiling for: $target"
712fi
713
714echo
715echo 'Configuration done:'
716
717if [ "$debug" = "1" ]; then
718        echo '  Debugging enabled.'
719else
720        echo '  Debugging disabled.'
721fi
722
723if [ "$pie" = "1" ]; then
724        echo '  Building PIE executable'
725else
726        echo '  Building non-PIE executable'
727fi
728
729if [ "$strip" = "1" ]; then
730        echo '  Binary stripping enabled.'
731else
732        echo '  Binary stripping disabled.'
733fi
734
735if [ "$otr" = "1" ]; then
736        echo '  Off-the-Record (OTR) Messaging enabled.'
737elif [ "$otr" = "plugin" ]; then
738        echo '  Off-the-Record (OTR) Messaging enabled (as a plugin).'
739else
740        echo '  Off-the-Record (OTR) Messaging disabled.'
741fi
742
743if [ -n "$systemdsystemunitdir" ]; then
744        echo '  systemd enabled.'
745else
746        echo '  systemd disabled.'
747fi
748
749echo '  Using event handler: '$events
750echo '  Using SSL library: '$ssl
751#echo '  Building with these storage backends: '$STORAGES
752
753if [ -n "$protocols" ]; then
754        echo '  Building with these protocols:' $protocols$protocols_mods
755        case "$protocols" in
756        *purple*)
757                echo "    Note that BitlBee-libpurple is supported on a best-effort basis. It's"
758                echo "    not *fully* compatible with normal BitlBee. Don't use it unless you"
759                echo "    absolutely need it (i.e. support for a certain protocol or feature)."
760        esac
761else
762        echo '  Building without IM-protocol support. We wish you a lot of fun...'
763fi
Note: See TracBrowser for help on using the repository browser.