source: configure @ c5920df

Last change on this file since c5920df was c5920df, checked in by Wilmer van der Gaast <wilmer@…>, at 2010-12-16T12:09:58Z

Don't use NSS unless the user insists. It's known to not work so well (and
has been fully broken for a long time already anyway). Just use GnuTLS,
it's on every machine these days.

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