Changes in configure [e252d8c:d203495]
Legend:
- Unmodified
- Added
- Removed
-
configure
re252d8c rd203495 341 341 int main() 342 342 { 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 {357 343 ns_initparse( NULL, 0, NULL ); 358 344 ns_parserr( NULL, ns_s_an, 0, NULL ); 359 345 } 360 346 ' 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 have372 ns_* routines, so use this to make sure373 the compiler uses it.*/374 return (int)(sizeof(nsh) + sizeof(rr));375 }376 '377 347 378 348 detect_resolv_dynamic() 379 349 { 380 350 case "$arch" in 381 OpenBSD )382 # In FreeBSD res_*/dn_* routines are present in libc.so383 LIBRESOLV=;;384 351 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 389 353 LIBRESOLV=;; 390 354 * ) … … 421 385 } 422 386 423 detect_resolv_ns_dynamic()424 {425 case "$arch" in426 FreeBSD )427 # In FreeBSD ns_ routines are present in libc.so428 LIBRESOLV=;;429 * )430 LIBRESOLV=-lresolv;;431 esac432 TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX)433 ret=1434 echo "$RESOLV_NS_TESTCODE" | $CC -o $TMPFILE -x c - $LIBRESOLV >/dev/null 2>/dev/null435 if [ "$?" = "0" ]; then436 ret=0437 fi438 439 rm -f $TMPFILE440 return $ret441 }442 443 detect_resolv_ns_static()444 {445 TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX)446 ret=1447 for i in $systemlibdirs; do448 if [ -f $i/libresolv.a ]; then449 echo "$RESOLV_NS_TESTCODE" | $CC -o $TMPFILE -x c - -Wl,$i/libresolv.a >/dev/null 2>/dev/null450 if [ "$?" = "0" ]; then451 ret=0452 fi453 fi454 done455 456 rm -f $TMPFILE457 return $ret458 }459 460 detect_nameser_has_ns_types()461 {462 TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX)463 ret=1464 # since we aren't actually linking with ns_* routines465 # we can just compile the test code466 echo "$RESOLV_NS_TYPES_TESTCODE" | $CC -o $TMPFILE -x c - >/dev/null 2>/dev/null467 if [ "$?" = "0" ]; then468 ret=0469 fi470 471 rm -f $TMPFILE472 return $ret473 }474 475 387 if [ "$ssl" = "auto" ]; then 476 388 detect_gnutls … … 484 396 elif [ "$ssl" = "nss" ]; then 485 397 detect_nss 398 elif [ "$ssl" = "sspi" ]; then 399 echo 486 400 elif [ "$ssl" = "openssl" ]; then 487 401 echo … … 526 440 echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings 527 441 528 if detect_nameser_has_ns_types; then529 echo '#define NAMESER_HAS_NS_TYPES' >> config.h530 fi531 442 if detect_resolv_dynamic || detect_resolv_static; then 532 443 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 444 fi 540 445 541 446 STORAGES="xml" … … 606 511 # BI == built-in 607 512 echo '#define OTR_BI' >> config.h 608 echo "EFLAGS+=-L${otrprefix}/lib -lotr -lgcrypt" >> Makefile.settings513 echo "EFLAGS+=-L${otrprefix}/lib -lotr" >> Makefile.settings 609 514 echo "CFLAGS+=-I${otrprefix}/include" >> Makefile.settings 610 515 echo 'OTR_BI=otr.o' >> Makefile.settings … … 804 709 ;; 805 710 CYGWIN* ) 711 echo 'Cygwin is not officially supported.' 806 712 ;; 807 713 Windows ) 808 echo 'Native windows compilation is not supported anymore, use cygwin instead.'809 714 ;; 810 715 * )
Note: See TracChangeset
for help on using the changeset viewer.