aboutsummaryrefslogtreecommitdiffstats
path: root/acinclude.m4
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2015-02-25 21:29:10 -0500
committerJeff Morriss <jeff.morriss.ws@gmail.com>2015-02-26 03:36:15 +0000
commit3336f71753a71f78e93559a4b4d33b4e6815935a (patch)
tree3ce9da9cd2152c752c206572633f425433ac4306 /acinclude.m4
parent4e12b598ebaead8947ed593ae41b3cddbbf68f9c (diff)
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>
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m424
1 files changed, 7 insertions, 17 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index dba599c2ce..6db1b966eb 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -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)
])