# HG changeset patch # User diego # Date 1285537899 0 # Node ID 33d9f6230dffbc18ae048d4581903604fa65c9a9 # Parent f590821ec63395b8ae4fd5b77a08a384ce47dfd1 Simplify inet_pton/inet_aton checks with function_check(). diff -r f590821ec633 -r 33d9f6230dff configure --- a/configure Sun Sep 26 21:48:28 2010 +0000 +++ b/configure Sun Sep 26 21:51:39 2010 +0000 @@ -3254,14 +3254,8 @@ echocheck "inet_pton()" def_inet_pton='#define HAVE_INET_PTON 0' inet_pton=no -cat > $TMPC << EOF -#include -#include -#include -int main(void) { inet_pton(0, 0, 0); return 0; } -EOF for _ld_tmp in "$_ld_sock" "$_ld_sock -lresolv" ; do - cc_check $_ld_tmp && inet_pton=yes && break + function_check arpa/inet.h 'inet_pton(0, 0, 0)' $_ld_tmp && inet_pton=yes && break done if test $inet_pton = yes ; then test "$_ld_tmp" && res_comment="using $_ld_tmp" @@ -3273,14 +3267,8 @@ echocheck "inet_aton()" def_inet_aton='#define HAVE_INET_ATON 0' inet_aton=no -cat > $TMPC << EOF -#include -#include -#include -int main(void) { inet_aton(0, 0); return 0; } -EOF for _ld_tmp in "$_ld_sock" "$_ld_sock -lresolv" ; do - cc_check $_ld_tmp && inet_aton=yes && break + function_check arpa/inet.h 'inet_aton(0, 0)' $_ld_tmp && inet_aton=yes && break done if test $inet_aton = yes ; then test "$_ld_tmp" && res_comment="using $_ld_tmp"