Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    re252d8c rd203495  
    341341int main()
    342342{
    343 
    344         res_query( NULL, 0, 0, NULL, 0);
    345         dn_expand( NULL, NULL, NULL, NULL, 0);
    346         dn_skipname( NULL, NULL);
    347 }
    348 '
    349 RESOLV_NS_TESTCODE='
    350 #include <sys/types.h>
    351 #include <netinet/in.h>
    352 #include <arpa/nameser.h>
    353 #include <resolv.h>
    354 
    355 int main()
    356 {
    357343        ns_initparse( NULL, 0, NULL );
    358344        ns_parserr( NULL, ns_s_an, 0, NULL );
    359345}
    360346'
    361 RESOLV_NS_TYPES_TESTCODE='
    362 #include <sys/types.h>
    363 #include <netinet/in.h>
    364 #include <arpa/nameser.h>
    365 
    366 int main()
    367 {
    368         ns_msg nsh;
    369         ns_rr rr;
    370 
    371         /* Not all platforms we want to work on have
    372          ns_* routines, so use this to make sure
    373          the compiler uses it.*/
    374         return (int)(sizeof(nsh) + sizeof(rr));
    375 }
    376 '
    377347
    378348detect_resolv_dynamic()
    379349{
    380350        case "$arch" in
    381         OpenBSD )
    382                 # In FreeBSD res_*/dn_* routines are present in libc.so
    383                 LIBRESOLV=;;
    384351        FreeBSD )
    385                 # In FreeBSD res_*/dn_* routines are present in libc.so
    386                 LIBRESOLV=;;
    387         CYGWIN* )
    388                 # In Cygwin res_*/dn_* routines are present in libc.so
     352                # In FreeBSD res_* routines are present in libc.so
    389353                LIBRESOLV=;;
    390354        * )
     
    421385}
    422386
    423 detect_resolv_ns_dynamic()
    424 {
    425         case "$arch" in
    426         FreeBSD )
    427                 # In FreeBSD ns_ routines are present in libc.so
    428                 LIBRESOLV=;;
    429         * )
    430                 LIBRESOLV=-lresolv;;
    431         esac
    432         TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX)
    433         ret=1
    434         echo "$RESOLV_NS_TESTCODE" | $CC -o $TMPFILE -x c - $LIBRESOLV >/dev/null 2>/dev/null
    435         if [ "$?" = "0" ]; then
    436                 ret=0
    437         fi
    438 
    439         rm -f $TMPFILE
    440         return $ret
    441 }
    442 
    443 detect_resolv_ns_static()
    444 {
    445         TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX)
    446         ret=1
    447         for i in $systemlibdirs; do
    448                 if [ -f $i/libresolv.a ]; then
    449                         echo "$RESOLV_NS_TESTCODE" | $CC -o $TMPFILE -x c - -Wl,$i/libresolv.a >/dev/null 2>/dev/null
    450                         if [ "$?" = "0" ]; then
    451                                 ret=0
    452                         fi
    453                 fi
    454         done
    455 
    456         rm -f $TMPFILE
    457         return $ret
    458 }
    459 
    460 detect_nameser_has_ns_types()
    461 {
    462     TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX)
    463     ret=1
    464     # since we aren't actually linking with ns_* routines
    465     # we can just compile the test code
    466     echo "$RESOLV_NS_TYPES_TESTCODE" | $CC -o $TMPFILE -x c -  >/dev/null 2>/dev/null
    467     if [ "$?" = "0" ]; then
    468         ret=0
    469     fi
    470 
    471     rm -f $TMPFILE
    472     return $ret
    473 }
    474 
    475387if [ "$ssl" = "auto" ]; then
    476388        detect_gnutls
     
    484396elif [ "$ssl" = "nss" ]; then
    485397        detect_nss
     398elif [ "$ssl" = "sspi" ]; then
     399        echo
    486400elif [ "$ssl" = "openssl" ]; then
    487401        echo
     
    526440echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings
    527441
    528 if detect_nameser_has_ns_types; then
    529         echo '#define NAMESER_HAS_NS_TYPES' >> config.h
    530 fi
    531442if detect_resolv_dynamic || detect_resolv_static; then
    532443        echo '#define HAVE_RESOLV_A' >> config.h
    533     if detect_resolv_ns_dynamic || detect_resolv_ns_static; then
    534             echo '#define HAVE_RESOLV_A_WITH_NS' >> config.h
    535     fi
    536 else
    537     echo 'Insufficient resolv routines. Jabber server must be set explicitly'
    538 fi
    539 
     444fi
    540445
    541446STORAGES="xml"
     
    606511        # BI == built-in
    607512        echo '#define OTR_BI' >> config.h
    608         echo "EFLAGS+=-L${otrprefix}/lib -lotr -lgcrypt" >> Makefile.settings
     513        echo "EFLAGS+=-L${otrprefix}/lib -lotr" >> Makefile.settings
    609514        echo "CFLAGS+=-I${otrprefix}/include" >> Makefile.settings
    610515        echo 'OTR_BI=otr.o' >> Makefile.settings
     
    804709;;
    805710CYGWIN* )
     711        echo 'Cygwin is not officially supported.'
    806712;;
    807713Windows )
    808         echo 'Native windows compilation is not supported anymore, use cygwin instead.'
    809714;;
    810715* )
Note: See TracChangeset for help on using the changeset viewer.