Changes in configure [d203495:e252d8c]
Legend:
- Unmodified
- Added
- Removed
-
configure
rd203495 re252d8c 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 { 343 357 ns_initparse( NULL, 0, NULL ); 344 358 ns_parserr( NULL, ns_s_an, 0, NULL ); 345 359 } 346 360 ' 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 ' 347 377 348 378 detect_resolv_dynamic() 349 379 { 350 380 case "$arch" in 381 OpenBSD ) 382 # In FreeBSD res_*/dn_* routines are present in libc.so 383 LIBRESOLV=;; 351 384 FreeBSD ) 352 # In FreeBSD res_* routines are present in libc.so 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 353 389 LIBRESOLV=;; 354 390 * ) … … 385 421 } 386 422 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 387 475 if [ "$ssl" = "auto" ]; then 388 476 detect_gnutls … … 396 484 elif [ "$ssl" = "nss" ]; then 397 485 detect_nss 398 elif [ "$ssl" = "sspi" ]; then399 echo400 486 elif [ "$ssl" = "openssl" ]; then 401 487 echo … … 440 526 echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings 441 527 528 if detect_nameser_has_ns_types; then 529 echo '#define NAMESER_HAS_NS_TYPES' >> config.h 530 fi 442 531 if detect_resolv_dynamic || detect_resolv_static; then 443 532 echo '#define HAVE_RESOLV_A' >> config.h 444 fi 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 445 540 446 541 STORAGES="xml" … … 511 606 # BI == built-in 512 607 echo '#define OTR_BI' >> config.h 513 echo "EFLAGS+=-L${otrprefix}/lib -lotr " >> Makefile.settings608 echo "EFLAGS+=-L${otrprefix}/lib -lotr -lgcrypt" >> Makefile.settings 514 609 echo "CFLAGS+=-I${otrprefix}/include" >> Makefile.settings 515 610 echo 'OTR_BI=otr.o' >> Makefile.settings … … 709 804 ;; 710 805 CYGWIN* ) 711 echo 'Cygwin is not officially supported.'712 806 ;; 713 807 Windows ) 808 echo 'Native windows compilation is not supported anymore, use cygwin instead.' 714 809 ;; 715 810 * )
Note: See TracChangeset
for help on using the changeset viewer.