Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    r823de9d rceebeb1  
    3131gcov=0
    3232plugins=1
    33 otr=auto
    3433
    3534events=glib
     
    7271--gcov=0/1      Disable/enable test coverage reporting  $gcov
    7372--plugins=0/1   Disable/enable plugins support          $plugins
    74 --otr=0/1       Disable/enable OTR encryption support   $otr
    7573
    7674--events=...    Event handler (glib, libevent)          $events
     
    158156
    159157echo CFLAGS=$CFLAGS >> Makefile.settings
    160 echo CFLAGS+=-I`pwd` -I`pwd`/lib -I`pwd`/protocols -I. >> Makefile.settings
     158echo CFLAGS+=-I`pwd` -iquote`pwd`/lib -iquote`pwd`/protocols -I. >> Makefile.settings
    161159
    162160echo CFLAGS+=-DHAVE_CONFIG_H >> Makefile.settings
     
    269267detect_ldap()
    270268{
    271         TMPFILE=`mktemp`
     269        TMPFILE=$(mktemp)
    272270        if $CC -o $TMPFILE -shared -lldap 2>/dev/null >/dev/null; then
    273271                cat<<EOF>>Makefile.settings
     
    282280                ret=0
    283281        fi
     282}
     283
     284RESOLV_TESTCODE='
     285#include <arpa/nameser.h>
     286#include <resolv.h>
     287
     288int main()
     289{
     290        ns_initparse( NULL, 0, NULL );
     291        ns_parserr( NULL, ns_s_an, 0, NULL );
     292}
     293'
     294
     295detect_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
     306detect_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
    284319}
    285320
     
    325360       
    326361        ## Yes, you, at the console! How can you authenticate if you don't have any SSL!?
    327         if [ "$msn" = "1" ]; then
     362        if [ "$msn" = "1" -o "$yahoo" = "1" ]; then
    328363                echo
    329                 echo 'Real SSL support is necessary for MSN authentication, will build without'
    330                 echo 'MSN protocol support.'
     364                echo 'WARNING: The MSN and Yahoo! modules will not work without SSL. Disabling.'
    331365                msn=0
     366                yahoo=0
    332367        fi
    333368       
     
    351386echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings
    352387
    353 for 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
    359 done
     388if detect_resolv_dynamic || detect_resolv_static; then
     389        echo '#define HAVE_RESOLV_A' >> config.h
     390fi
    360391
    361392STORAGES="text xml"
     
    413444fi
    414445
    415 otrprefix=""
    416 for i in / /usr /usr/local; do
    417         if [ -f ${i}/lib/libotr.a ]; then
    418                 otrprefix=${i}
    419                 break
    420         fi
    421 done
    422 if [ "$otr" = "auto" ]; then
    423         if [ -n "$otrprefix" ]; then
    424                 otr=1
    425         else
    426                 otr=0
    427         fi
    428 fi
    429 if [ "$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
    433 else
    434         echo '#undef WITH_OTR' >> config.h
     446if [ ! -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.'
    435450fi
    436451
     
    520535;;
    521536Darwin )
     537        echo 'STRIP=\# skip strip' >> Makefile.settings
    522538;;
    523539IRIX )
     
    560576fi
    561577
    562 if [ "$otr" = "1" ]; then
    563         echo '  Off-the-Record (OTR) Messaging enabled.'
    564 else
    565         echo '  Off-the-Record (OTR) Messaging disabled.'
    566 fi
    567 
    568578echo '  Using event handler: '$events
    569579echo '  Using SSL library: '$ssl
Note: See TracChangeset for help on using the changeset viewer.