Changeset 6738a67 for configure


Ignore:
Timestamp:
2008-07-16T23:22:52Z (16 years ago)
Author:
Sven Moritz Hallberg <pesco@…>
Branches:
master
Children:
9b55485
Parents:
9730d72 (diff), 6a78c0e (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:

merge in latest trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    r9730d72 r6738a67  
    2020ipcsocket='/var/run/bitlbee.sock'
    2121pcdir='$prefix/lib/pkgconfig'
     22systemlibdirs="/lib /usr/lib /usr/local/lib"
    2223
    2324msn=1
     
    7677--ssl=...       SSL library to use (gnutls, nss, openssl, bogus, auto)
    7778                                                        $ssl
     79
     80--target=...    Cross compilation target                same as host
    7881EOF
    7982                exit;
     
    109112PCDIR=$pcdir
    110113
     114TARGET=$target
    111115ARCH=$arch
    112116CPU=$cpu
    113 OUTFILE=bitlbee
    114117
    115118DESTDIR=
     
    134137EOF
    135138
     139
     140
     141if [ -n "$target" ]; then
     142        PKG_CONFIG_LIBDIR=/usr/$target/lib/pkgconfig
     143        export PKG_CONFIG_LIBDIR
     144        PATH=/usr/$target/bin:$PATH
     145        CC=$target-cc
     146        LD=$target-ld
     147        systemlibdirs="/usr/$target/lib"
     148fi
     149
     150
    136151if [ "$debug" = "1" ]; then
    137152        [ -z "$CFLAGS" ] && CFLAGS=-g
     
    160175echo "CC=$CC" >> Makefile.settings;
    161176
    162 if [ -n "$LD" ]; then
    163         echo "LD=$LD" >> Makefile.settings;
    164 elif type ld > /dev/null 2> /dev/null; then
    165         echo "LD=ld" >> Makefile.settings;
    166 else
    167         echo 'Cannot find ld, aborting.'
    168         exit 1;
    169 fi
     177if [ -z "$LD" ]; then
     178        if type ld > /dev/null 2> /dev/null; then
     179                LD=ld
     180        else
     181                echo 'Cannot find ld, aborting.'
     182                exit 1;
     183        fi
     184fi
     185
     186echo "LD=$LD" >> Makefile.settings
    170187
    171188if [ -z "$PKG_CONFIG" ]; then
     
    215232detect_gnutls()
    216233{
    217         if libgnutls-config --version > /dev/null 2> /dev/null; then
     234        if $PKG_CONFIG --exists gnutls; then
     235                cat <<EOF>>Makefile.settings
     236EFLAGS+=`$PKG_CONFIG --libs gnutls`
     237CFLAGS+=`$PKG_CONFIG --cflags gnutls`
     238EOF
     239                ssl=gnutls
     240                ret=1
     241        elif libgnutls-config --version > /dev/null 2> /dev/null; then
    218242                cat <<EOF>>Makefile.settings
    219243EFLAGS+=`libgnutls-config --libs`
     
    269293elif [ "$ssl" = "nss" ]; then
    270294        detect_nss
     295elif [ "$ssl" = "sspi" ]; then
     296        echo
    271297elif [ "$ssl" = "openssl" ]; then
    272298        echo
     
    325351echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings
    326352
    327 for i in /lib /usr/lib /usr/local/lib; do
     353for i in $systemlibdirs; do
    328354        if [ -f $i/libresolv.a ]; then
    329355                echo '#define HAVE_RESOLV_A' >> config.h
     
    377403
    378404if [ "$gcov" = "1" ]; then
    379         echo "CFLAGS+=-ftest-coverage -fprofile-arcs" >> Makefile.settings
    380         echo "EFLAGS+=-lgcov" >> Makefile.settings
     405        echo "CFLAGS+=--coverage" >> Makefile.settings
     406        echo "EFLAGS+=--coverage" >> Makefile.settings
    381407fi
    382408
     
    387413fi
    388414
     415otrprefix=""
     416for i in / /usr /usr/local; do
     417        if [ -f ${i}/lib/libotr.a ]; then
     418                otrprefix=${i}
     419                break
     420        fi
     421done
    389422if [ "$otr" = "auto" ]; then
    390         for i in /lib /usr/lib /usr/local/lib; do
    391                 if [ -f $i/libotr.a ]; then
    392                         otr=1
    393                         break
    394                 fi
    395         done
    396 fi
    397 if [ "$otr" = 0 ]; then
     423        if [ -n "$otrprefix" ]; then
     424                otr=1
     425        else
     426                otr=0
     427        fi
     428fi
     429if [ "$otr" = 1 ]; then
     430        echo '#define WITH_OTR' >> config.h
     431        echo "EFLAGS+=-L${otrprefix}/lib -lotr" >> Makefile.settings
     432        echo "CFLAGS+=-I${otrprefix}/include" >> Makefile.settings
     433else
    398434        echo '#undef WITH_OTR' >> config.h
    399 else
    400         echo '#define WITH_OTR' >> config.h
    401         echo "EFLAGS+=-lotr" >> Makefile.settings
    402435fi
    403436
     
    500533        echo 'Cygwin is not officially supported.'
    501534;;
     535Windows )
     536;;
    502537* )
    503538        echo 'We haven'\''t tested BitlBee on many platforms yet, yours is untested. YMMV.'
     
    506541esac
    507542
     543if [ -n "$target" ]; then
     544        echo "Cross-compiling for: $target"
     545fi
     546
    508547echo
    509548echo 'Configuration done:'
Note: See TracChangeset for help on using the changeset viewer.