Changeset b308cf9 for configure


Ignore:
Timestamp:
2010-06-05T23:21:02Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
1fdb0a4
Parents:
3ab1d31 (diff), e774815 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging libpurple branch into killerbee. It's fairly usable already, and
Debian packaging is now properly separated. This also picks up a load of
stuff from mainline it seems.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    r3ab1d31 rb308cf9  
    2626oscar=1
    2727yahoo=1
     28twitter=1
     29purple=0
    2830
    2931debug=0
     
    6668--oscar=0/1     Disable/enable Oscar part (ICQ, AIM)    $oscar
    6769--yahoo=0/1     Disable/enable Yahoo part               $yahoo
     70--twitter=0/1 Disable/enable Twitter part               $twitter
     71
     72--purple=0/1    Disable/enable libpurple support        $purple
    6873
    6974--debug=0/1     Disable/enable debugging                $debug
     
    119124EOF
    120125
     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
    121149cat<<EOF>config.h
    122150/* BitlBee settings, generated by configure
     
    156184
    157185echo CFLAGS=$CFLAGS >> Makefile.settings
    158 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
    159187
    160188echo CFLAGS+=-DHAVE_CONFIG_H >> Makefile.settings
     
    267295detect_ldap()
    268296{
    269         TMPFILE=$(mktemp)
     297        TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX)
    270298        if $CC -o $TMPFILE -shared -lldap 2>/dev/null >/dev/null; then
    271299                cat<<EOF>>Makefile.settings
     
    295323detect_resolv_dynamic()
    296324{
    297         TMPFILE=$(mktemp)
     325        TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX)
    298326        ret=1
    299327        echo "$RESOLV_TESTCODE" | $CC -o $TMPFILE -x c - -lresolv >/dev/null 2>/dev/null
     
    309337detect_resolv_static()
    310338{
    311         TMPFILE=$(mktemp)
     339        TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX)
    312340        ret=1
    313341        for i in $systemlibdirs; do
     
    476504fi
    477505
     506if ! make helloworld > /dev/null 2>&1; then
     507        echo "WARNING: Your version of make (BSD make?) does not support BitlBee's makefiles."
     508        echo "BitlBee needs GNU make to build properly. On most systems GNU make is available"
     509        echo "under the name 'gmake'."
     510        echo
     511        if gmake helloworld > /dev/null 2>&1; then
     512                echo "gmake seems to be available on your machine, great."
     513                echo
     514        else
     515                echo "gmake is not installed (or not working). Please try to install it."
     516                echo
     517        fi
     518fi
     519
    478520cat <<EOF>bitlbee.pc
    479521prefix=$prefix
     
    492534protoobjs=''
    493535
     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
    494568if [ "$msn" = 0 ]; then
    495569        echo '#undef WITH_MSN' >> config.h
     
    524598fi
    525599
     600if [ "$twitter" = 0 ]; then
     601        echo '#undef WITH_TWITTER' >> config.h
     602else
     603        echo '#define WITH_TWITTER' >> config.h
     604        protocols=$protocols'twitter '
     605        protoobjs=$protoobjs'twitter_mod.o '
     606fi
     607
    526608if [ "$protocols" = "PROTOCOLS = " ]; then
    527609        echo "Warning: You haven't selected any communication protocol to compile!"
Note: See TracChangeset for help on using the changeset viewer.