source: configure @ 2528cda

Last change on this file since 2528cda was daae10f, checked in by Wilmer van der Gaast <wilmer@…>, at 2010-08-07T16:33:02Z

OpenSolaris (non-gcc) fixes, patches from Dagobert Michelsen <dam@…>
with some changes.

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