configure.in revision f620c5e527746a2ec3d90a11d21abd8a114746df
5dee04703805e9453ff4d8d77884391e3a185977Bob Halley# Copyright (C) 2000, 2001 Nominum, Inc.
1633838b8255282d10af15c5c84cee5a51466712Bob Halley# Permission to use, copy, modify, and distribute this software for any
1633838b8255282d10af15c5c84cee5a51466712Bob Halley# purpose with or without fee is hereby granted, provided that the above
1633838b8255282d10af15c5c84cee5a51466712Bob Halley# copyright notice and this permission notice appear in all copies.
1633838b8255282d10af15c5c84cee5a51466712Bob Halley# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
1633838b8255282d10af15c5c84cee5a51466712Bob Halley# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
1633838b8255282d10af15c5c84cee5a51466712Bob Halley# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
1633838b8255282d10af15c5c84cee5a51466712Bob Halley# INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
1633838b8255282d10af15c5c84cee5a51466712Bob Halley# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
1633838b8255282d10af15c5c84cee5a51466712Bob Halley# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
1633838b8255282d10af15c5c84cee5a51466712Bob Halley# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
1633838b8255282d10af15c5c84cee5a51466712Bob Halley# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
e4e071ae12aee942fefc2c0a3280e402938669deBob HalleyAC_PREREQ(2.13)
e4e071ae12aee942fefc2c0a3280e402938669deBob HalleyAC_DEFUN(AC_TYPE_SOCKLEN_T,
96754ed7b400ce080279de2f92111ad868105290Bob Halley[AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
96754ed7b400ce080279de2f92111ad868105290Bob Halley AC_TRY_COMPILE(
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington [socklen_t len = 42; return len;],
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington ac_cv_type_socklen_t=yes,
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington ac_cv_type_socklen_t=no)
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington if test $ac_cv_type_socklen_t != yes; then
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington AC_DEFINE(socklen_t, int)
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian WellingtonAC_DEFUN(AC_SA_LEN,
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington[AC_CACHE_CHECK([for sa_len], ac_cv_sa_len,
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington AC_TRY_COMPILE(
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington [struct sockaddr sa; sa.sa_len = 0;],
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington ac_cv_sa_len=yes,
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington ac_cv_sa_len=no)
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington if test $ac_cv_sa_len = yes; then
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington AC_DEFINE(HAVE_SA_LEN)
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian WellingtonAC_SEARCH_LIBS(res_mkquery, resolv bind)
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian WellingtonAC_CHECK_LIB(socket, socket)
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian WellingtonAC_CHECK_LIB(nsl, inet_ntoa)
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian WellingtonAC_CHECK_FUNCS(gethostbyname2)
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian WellingtonAC_CHECK_FUNC(getaddrinfo,
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington AC_DEFINE(HAVE_GETADDRINFO), AC_LIBOBJ(getaddrinfo))
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian WellingtonAC_CHECK_FUNC(getnameinfo,
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington AC_DEFINE(HAVE_GETNAMEINFO), AC_LIBOBJ(getnameinfo))
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob HalleyAC_TYPE_SOCKLEN_T
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob HalleyAC_OUTPUT(Makefile)