Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    rceebeb1 r823de9d  
    3131gcov=0
    3232plugins=1
     33otr=auto
    3334
    3435events=glib
     
    7172--gcov=0/1      Disable/enable test coverage reporting  $gcov
    7273--plugins=0/1   Disable/enable plugins support          $plugins
     74--otr=0/1       Disable/enable OTR encryption support   $otr
    7375
    7476--events=...    Event handler (glib, libevent)          $events
     
    156158
    157159echo CFLAGS=$CFLAGS >> Makefile.settings
    158 echo CFLAGS+=-I`pwd` -iquote`pwd`/lib -iquote`pwd`/protocols -I. >> Makefile.settings
     160echo CFLAGS+=-I`pwd` -I`pwd`/lib -I`pwd`/protocols -I. >> Makefile.settings
    159161
    160162echo CFLAGS+=-DHAVE_CONFIG_H >> Makefile.settings
     
    267269detect_ldap()
    268270{
    269         TMPFILE=$(mktemp)
     271        TMPFILE=`mktemp`
    270272        if $CC -o $TMPFILE -shared -lldap 2>/dev/null >/dev/null; then
    271273                cat<<EOF>>Makefile.settings
     
    280282                ret=0
    281283        fi
    282 }
    283 
    284 RESOLV_TESTCODE='
    285 #include <arpa/nameser.h>
    286 #include <resolv.h>
    287 
    288 int main()
    289 {
    290         ns_initparse( NULL, 0, NULL );
    291         ns_parserr( NULL, ns_s_an, 0, NULL );
    292 }
    293 '
    294 
    295 detect_resolv_dynamic()
    296 {
    297         echo "$RESOLV_TESTCODE" | $CC -o /dev/null -x c - -lresolv >/dev/null 2>/dev/null
    298         if [ "$?" = "0" ]; then
    299                 echo 'EFLAGS+=-lresolv' >> Makefile.settings
    300                 return 0
    301         fi
    302 
    303         return 1
    304 }
    305 
    306 detect_resolv_static()
    307 {
    308         for i in $systemlibdirs; do
    309                 if [ -f $i/libresolv.a ]; then
    310                         echo "$RESOLV_TESTCODE" | $CC -o /dev/null -x c - -Wl,$i/libresolv.a >/dev/null 2>/dev/null
    311                         if [ "$?" = "0" ]; then
    312                                 echo 'EFLAGS+='$i'/libresolv.a' >> Makefile.settings
    313                                 return 0
    314                         fi
    315                 fi
    316         done
    317 
    318         return 1
    319284}
    320285
     
    360325       
    361326        ## Yes, you, at the console! How can you authenticate if you don't have any SSL!?
    362         if [ "$msn" = "1" -o "$yahoo" = "1" ]; then
     327        if [ "$msn" = "1" ]; then
    363328                echo
    364                 echo 'WARNING: The MSN and Yahoo! modules will not work without SSL. Disabling.'
     329                echo 'Real SSL support is necessary for MSN authentication, will build without'
     330                echo 'MSN protocol support.'
    365331                msn=0
    366                 yahoo=0
    367332        fi
    368333       
     
    386351echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings
    387352
    388 if detect_resolv_dynamic || detect_resolv_static; then
    389         echo '#define HAVE_RESOLV_A' >> config.h
    390 fi
     353for i in $systemlibdirs; do
     354        if [ -f $i/libresolv.a ]; then
     355                echo '#define HAVE_RESOLV_A' >> config.h
     356                echo 'EFLAGS+='$i'/libresolv.a' >> Makefile.settings
     357                break
     358        fi
     359done
    391360
    392361STORAGES="text xml"
     
    444413fi
    445414
    446 if [ ! -e doc/user-guide/help.txt ] && ! type xmlto > /dev/null 2> /dev/null; then
    447         echo
    448         echo 'WARNING: Building from an unreleased source tree without prebuilt helpfile.'
    449         echo 'Install xmlto if you want online help to work.'
     415otrprefix=""
     416for i in / /usr /usr/local; do
     417        if [ -f ${i}/lib/libotr.a ]; then
     418                otrprefix=${i}
     419                break
     420        fi
     421done
     422if [ "$otr" = "auto" ]; 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
     434        echo '#undef WITH_OTR' >> config.h
    450435fi
    451436
     
    535520;;
    536521Darwin )
    537         echo 'STRIP=\# skip strip' >> Makefile.settings
    538522;;
    539523IRIX )
     
    576560fi
    577561
     562if [ "$otr" = "1" ]; then
     563        echo '  Off-the-Record (OTR) Messaging enabled.'
     564else
     565        echo '  Off-the-Record (OTR) Messaging disabled.'
     566fi
     567
    578568echo '  Using event handler: '$events
    579569echo '  Using SSL library: '$ssl
Note: See TracChangeset for help on using the changeset viewer.