Wireshark-commits: [Wireshark-commits] master-2.0 503a589: Clean up check for getaddrinfo().
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 29 Apr 2016 01:43:58 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=503a589e0a1f9546df178355e452adb953b857da
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-2.0
Repository: wireshark

Commits:

503a589 by Guy Harris (guy@xxxxxxxxxxxx):

    Clean up check for getaddrinfo().
    
    Have AC_WIRESHARK_SOCKET_LIB_CHECK first check whether it can find
    connect() without -lsocket or -lnsl, and if that fails, check whether it
    can find connect() with -lsocket, and, if *that* fails, check whether it
    can find connect() with -lsocket and -lnsl, and give up if that fails,
    otherwise set SOCKET_LIBS and NSL_LIBS appropriately.
    
    Have AC_WIRESHARK_GETADDRINFO_LIB_CHECK check for getaddrinfo() in
    -lsocket, not -lnsl, as it's in -lsocket in Solaris 10 and 11, although
    it links with -lnsl as well if AC_WIRESHARK_SOCKET_LIB_CHECK found it
    was required.  If it's in -lsocket, and SOCKET_LIBS hasn't already been
    set, set SOCKET_LIBS.  Set $found_getaddrinfo if it finds it anywhere.
    
    Have AC_WIRESHARK_GETHOSTBY_LIB_CHECK check for gethostbyname() in
    -lnsl.  If it's in -lnsl, and NSL_LIBS hasn't already been set, set
    NSL_LIBS.  Set $found_gethostbyname if it finds it anywhere.
    
    If we didn't find C-ARES, and didn't find getaddrinfo() anywhere, and
    didn't find gethosbyname() anywhere, fail.  Use the $found_ variables,
    as there's no guarantee that the "find it in the system libraries" test
    will succeed and set $ac_cv_func_XXX.
    
    Bug: 12391
    Change-Id: I8a8973ab79175f56b717970ef916feca29a10288
    Reviewed-on: https://code.wireshark.org/review/15158
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  e2f06c1   Cleanups to issues found while investigating 12386.
    adds  503a589   Clean up check for getaddrinfo().


Summary of changes:
 acinclude.m4 |  118 +++++++++++++++++++++++++++++++++++-----------------------
 configure.ac |   12 +++---
 2 files changed, 77 insertions(+), 53 deletions(-)