Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    r4fca1db r04dc563  
    2727yahoo=1
    2828twitter=1
     29purple=0
    2930
    3031debug=0
     
    6869--yahoo=0/1     Disable/enable Yahoo part               $yahoo
    6970--twitter=0/1 Disable/enable Twitter part               $twitter
     71
     72--purple=0/1    Disable/enable libpurple support        $purple
    7073
    7174--debug=0/1     Disable/enable debugging                $debug
     
    121124EOF
    122125
     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                COPYDIRS="doc lib protocols tests utils"
     132                mkdir -p $(cd "$srcdir"; find $COPYDIRS -type d)
     133                find . -name Makefile -type l -print0 | xargs -0 rm 2> /dev/null
     134                dst="$PWD"
     135                cd "$srcdir"
     136                for i in $(find . -name Makefile -type f); do
     137                        ln -s "$PWD${i#.}" "$dst/$i";
     138                done
     139                cd "$dst"
     140                rm -rf .bzr
     141        fi
     142       
     143        echo "SRCDIR=$srcdir/" >> Makefile.settings
     144        CFLAGS="$CFLAGS -I${dst}"
     145else
     146        srcdir=$PWD
     147fi
     148
    123149cat<<EOF>config.h
    124150/* BitlBee settings, generated by configure
     
    158184
    159185echo CFLAGS=$CFLAGS >> Makefile.settings
    160 echo CFLAGS+=-I`pwd` -I`pwd`/lib -I`pwd`/protocols -I. >> Makefile.settings
     186echo CFLAGS+=-I${srcdir} -I${srcdir}/lib -I${srcdir}/protocols -I. >> Makefile.settings
    161187
    162188echo CFLAGS+=-DHAVE_CONFIG_H >> Makefile.settings
     
    398424fi
    399425
    400 STORAGES="text xml"
     426STORAGES="xml"
    401427
    402428if [ "$ldap" = "auto" ]; then
     
    508534protoobjs=''
    509535
     536if [ "$purple" = 0 ]; then
     537        echo '#undef WITH_PURPLE' >> config.h
     538else
     539        if ! $PKG_CONFIG purple; then
     540                echo
     541                echo 'Cannot find libpurple development libraries, aborting. (Install libpurple-dev?)'
     542                exit 1
     543        fi
     544        echo '#define WITH_PURPLE' >> config.h
     545        cat<<EOF>>Makefile.settings
     546EFLAGS += $($PKG_CONFIG purple --libs)
     547PURPLE_CFLAGS += $($PKG_CONFIG purple --cflags)
     548EOF
     549        protocols=$protocols'purple '
     550        protoobjs=$protoobjs'purple_mod.o '
     551
     552        # Having both libpurple and native IM modules in one binary may
     553        # do strange things. Let's not do that.
     554        msn=0
     555        jabber=0
     556        oscar=0
     557        yahoo=0
     558        twitter=0
     559       
     560        if [ "$events" = "libevent" ]; then
     561                echo
     562                echo 'Warning: Some libpurple modules (including msn-pecan) do their event handling'
     563                echo 'outside libpurple, talking to GLib directly. At least for now the combination'
     564                echo 'libpurple + libevent is *not* recommended!'
     565        fi
     566fi
     567
    510568if [ "$msn" = 0 ]; then
    511569        echo '#undef WITH_MSN' >> config.h
Note: See TracChangeset for help on using the changeset viewer.