source: configure @ f60079b

Last change on this file since f60079b was f60079b, checked in by Wilmer van der Gaast <wilmer@…>, at 2010-05-25T22:26:54Z

Allow one to run the configure script from a different directory and put all
build files in there. I need this to properly make Debian package variants
(i.e. libpurple and native).

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