Actually define HAVE_GETADDRINFO if we find it.

AC_CHECK_FUNC() doesn't define HAVE_XXX but AC_CHECK_FUNCS() does.  And
AC_CHECK_LIBS() certainly doesn't define HAVE_<function>.

Also remove some ancient comments.

Change-Id: I49d701bb96d3bd3c55c4beb99d532e397ec554ad
Reviewed-on: https://code.wireshark.org/review/7400
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
This commit is contained in:
Jeff Morriss 2015-02-25 21:29:10 -05:00
parent 4e12b598eb
commit 3336f71753
1 changed files with 7 additions and 17 deletions

View File

@ -270,25 +270,15 @@ yes
#
# AC_WIRESHARK_GETADDRINFO_LIB_CHECK
#
# Checks whether we need "-lnsl" to get "getaddrinfo()", which we use
# in "addr_resolv.c".
#
# Adapted from stuff in the AC_PATH_XTRA macro in "acspecific.m4" in
# GNU Autoconf 2.13; the comment came from there.
# Done by Guy Harris <guy@alum.mit.edu> on 2000-01-14.
#
# Checks whether we have "getaddrinfo()" and whether we need "-lnsl" to get it.
AC_DEFUN([AC_WIRESHARK_GETADDRINFO_LIB_CHECK],
[
# Comments below apply to gethostbyname(), from which this was
# migrated:
# msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
# to get the SysV transport functions.
# chad@anasazi.com says the Pyramid MIS-ES running DC/OSx (SVR4)
# needs -lnsl.
# The nsl library prevents programs from opening the X display
# on Irix 5.2, according to dickey@clark.net.
AC_CHECK_FUNC(getaddrinfo, ,
AC_CHECK_LIB(nsl, getaddrinfo, NSL_LIBS="-lnsl"))
AC_CHECK_FUNCS(getaddrinfo, ,
AC_CHECK_LIB(nsl, getaddrinfo,
[
NSL_LIBS="-lnsl"
AC_DEFINE(HAVE_GETADDRINFO, 1, [Defined if we have getaddrinfo])
]))
AC_SUBST(NSL_LIBS)
])