| | 3512 | # Check if we need the network services library |
|---|
| | 3513 | echo "$as_me:$LINENO: checking for inet_aton" >&5 |
|---|
| | 3514 | echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6 |
|---|
| | 3515 | if test "${ac_cv_func_inet_aton+set}" = set; then |
|---|
| | 3516 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
|---|
| | 3517 | else |
|---|
| | 3518 | cat >conftest.$ac_ext <<_ACEOF |
|---|
| | 3519 | #line $LINENO "configure" |
|---|
| | 3520 | /* confdefs.h. */ |
|---|
| | 3521 | _ACEOF |
|---|
| | 3522 | cat confdefs.h >>conftest.$ac_ext |
|---|
| | 3523 | cat >>conftest.$ac_ext <<_ACEOF |
|---|
| | 3524 | /* end confdefs.h. */ |
|---|
| | 3525 | /* System header to define __stub macros and hopefully few prototypes, |
|---|
| | 3526 | which can conflict with char inet_aton (); below. |
|---|
| | 3527 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
|---|
| | 3528 | <limits.h> exists even on freestanding compilers. */ |
|---|
| | 3529 | #ifdef __STDC__ |
|---|
| | 3530 | # include <limits.h> |
|---|
| | 3531 | #else |
|---|
| | 3532 | # include <assert.h> |
|---|
| | 3533 | #endif |
|---|
| | 3534 | /* Override any gcc2 internal prototype to avoid an error. */ |
|---|
| | 3535 | #ifdef __cplusplus |
|---|
| | 3536 | extern "C" |
|---|
| | 3537 | { |
|---|
| | 3538 | #endif |
|---|
| | 3539 | /* We use char because int might match the return type of a gcc2 |
|---|
| | 3540 | builtin and then its argument prototype would still apply. */ |
|---|
| | 3541 | char inet_aton (); |
|---|
| | 3542 | /* The GNU C library defines this for functions which it implements |
|---|
| | 3543 | to always fail with ENOSYS. Some functions are actually named |
|---|
| | 3544 | something starting with __ and the normal name is an alias. */ |
|---|
| | 3545 | #if defined (__stub_inet_aton) || defined (__stub___inet_aton) |
|---|
| | 3546 | choke me |
|---|
| | 3547 | #else |
|---|
| | 3548 | char (*f) () = inet_aton; |
|---|
| | 3549 | #endif |
|---|
| | 3550 | #ifdef __cplusplus |
|---|
| | 3551 | } |
|---|
| | 3552 | #endif |
|---|
| | 3553 | |
|---|
| | 3554 | int |
|---|
| | 3555 | main () |
|---|
| | 3556 | { |
|---|
| | 3557 | return f != inet_aton; |
|---|
| | 3558 | ; |
|---|
| | 3559 | return 0; |
|---|
| | 3560 | } |
|---|
| | 3561 | _ACEOF |
|---|
| | 3562 | rm -f conftest.$ac_objext conftest$ac_exeext |
|---|
| | 3563 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
|---|
| | 3564 | (eval $ac_link) 2>&5 |
|---|
| | 3565 | ac_status=$? |
|---|
| | 3566 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| | 3567 | (exit $ac_status); } && |
|---|
| | 3568 | { ac_try='test -s conftest$ac_exeext' |
|---|
| | 3569 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|---|
| | 3570 | (eval $ac_try) 2>&5 |
|---|
| | 3571 | ac_status=$? |
|---|
| | 3572 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| | 3573 | (exit $ac_status); }; }; then |
|---|
| | 3574 | ac_cv_func_inet_aton=yes |
|---|
| | 3575 | else |
|---|
| | 3576 | echo "$as_me: failed program was:" >&5 |
|---|
| | 3577 | sed 's/^/| /' conftest.$ac_ext >&5 |
|---|
| | 3578 | |
|---|
| | 3579 | ac_cv_func_inet_aton=no |
|---|
| | 3580 | fi |
|---|
| | 3581 | rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext |
|---|
| | 3582 | fi |
|---|
| | 3583 | echo "$as_me:$LINENO: result: $ac_cv_func_inet_aton" >&5 |
|---|
| | 3584 | echo "${ECHO_T}$ac_cv_func_inet_aton" >&6 |
|---|
| | 3585 | if test $ac_cv_func_inet_aton = yes; then |
|---|
| | 3586 | : |
|---|
| | 3587 | else |
|---|
| | 3588 | |
|---|
| | 3589 | echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5 |
|---|
| | 3590 | echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6 |
|---|
| | 3591 | if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then |
|---|
| | 3592 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
|---|
| | 3593 | else |
|---|
| | 3594 | ac_check_lib_save_LIBS=$LIBS |
|---|
| | 3595 | LIBS="-lresolv $LIBS" |
|---|
| | 3596 | cat >conftest.$ac_ext <<_ACEOF |
|---|
| | 3597 | #line $LINENO "configure" |
|---|
| | 3598 | /* confdefs.h. */ |
|---|
| | 3599 | _ACEOF |
|---|
| | 3600 | cat confdefs.h >>conftest.$ac_ext |
|---|
| | 3601 | cat >>conftest.$ac_ext <<_ACEOF |
|---|
| | 3602 | /* end confdefs.h. */ |
|---|
| | 3603 | |
|---|
| | 3604 | /* Override any gcc2 internal prototype to avoid an error. */ |
|---|
| | 3605 | #ifdef __cplusplus |
|---|
| | 3606 | extern "C" |
|---|
| | 3607 | #endif |
|---|
| | 3608 | /* We use char because int might match the return type of a gcc2 |
|---|
| | 3609 | builtin and then its argument prototype would still apply. */ |
|---|
| | 3610 | char inet_aton (); |
|---|
| | 3611 | int |
|---|
| | 3612 | main () |
|---|
| | 3613 | { |
|---|
| | 3614 | inet_aton (); |
|---|
| | 3615 | ; |
|---|
| | 3616 | return 0; |
|---|
| | 3617 | } |
|---|
| | 3618 | _ACEOF |
|---|
| | 3619 | rm -f conftest.$ac_objext conftest$ac_exeext |
|---|
| | 3620 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
|---|
| | 3621 | (eval $ac_link) 2>&5 |
|---|
| | 3622 | ac_status=$? |
|---|
| | 3623 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| | 3624 | (exit $ac_status); } && |
|---|
| | 3625 | { ac_try='test -s conftest$ac_exeext' |
|---|
| | 3626 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|---|
| | 3627 | (eval $ac_try) 2>&5 |
|---|
| | 3628 | ac_status=$? |
|---|
| | 3629 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|---|
| | 3630 | (exit $ac_status); }; }; then |
|---|
| | 3631 | ac_cv_lib_resolv_inet_aton=yes |
|---|
| | 3632 | else |
|---|
| | 3633 | echo "$as_me: failed program was:" >&5 |
|---|
| | 3634 | sed 's/^/| /' conftest.$ac_ext >&5 |
|---|
| | 3635 | |
|---|
| | 3636 | ac_cv_lib_resolv_inet_aton=no |
|---|
| | 3637 | fi |
|---|
| | 3638 | rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext |
|---|
| | 3639 | LIBS=$ac_check_lib_save_LIBS |
|---|
| | 3640 | fi |
|---|
| | 3641 | echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5 |
|---|
| | 3642 | echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6 |
|---|
| | 3643 | if test $ac_cv_lib_resolv_inet_aton = yes; then |
|---|
| | 3644 | |
|---|
| | 3645 | LIBS="$LIBS -lresolv" |
|---|
| | 3646 | |
|---|
| | 3647 | fi |
|---|
| | 3648 | |
|---|
| | 3649 | |
|---|
| | 3650 | fi |
|---|
| | 3651 | |
|---|
| | 3652 | |
|---|
| | 3653 | |
|---|