2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

check for "int setnetent" vs "void setnetent"

This commit is contained in:
Mark Andrews
2000-01-20 04:20:22 +00:00
parent df11e74a70
commit 0e7e4562fd
2 changed files with 81 additions and 47 deletions

117
configure vendored
View File

@@ -1,6 +1,6 @@
#! /bin/sh
# From configure.in Revision: 1.74
# From configure.in Revision: 1.75
@@ -2224,13 +2224,36 @@ else
ISC_LWRES_NEEDADDRINFO="#define ISC_LWRES_NEEDADDRINFO 1"
fi
rm -f conftest*
echo $ac_n "checking for int setnetent""... $ac_c" 1>&6
echo "configure:2229: checking for int setnetent" >&5
cat > conftest.$ac_ext <<EOF
#line 2231 "configure"
#include "confdefs.h"
#include <netdb.h>
int main() {
int i = setnetent(0); return(0);
; return 0; }
EOF
if { (eval echo configure:2239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
echo "$ac_t""no" 1>&6
ISC_LWRES_SETNETENTINT="#undef ISC_LWRES_SETNETENTINT"
fi
rm -f conftest*
echo $ac_n "checking for getipnodebyname""... $ac_c" 1>&6
echo "configure:2229: checking for getipnodebyname" >&5
echo "configure:2252: checking for getipnodebyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_getipnodebyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2234 "configure"
#line 2257 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char getipnodebyname(); below. */
@@ -2253,7 +2276,7 @@ getipnodebyname();
; return 0; }
EOF
if { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_getipnodebyname=yes"
else
@@ -2274,12 +2297,12 @@ ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1"
fi
echo $ac_n "checking for getnameinfo""... $ac_c" 1>&6
echo "configure:2278: checking for getnameinfo" >&5
echo "configure:2301: checking for getnameinfo" >&5
if eval "test \"`echo '$''{'ac_cv_func_getnameinfo'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2283 "configure"
#line 2306 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char getnameinfo(); below. */
@@ -2302,7 +2325,7 @@ getnameinfo();
; return 0; }
EOF
if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_getnameinfo=yes"
else
@@ -2323,12 +2346,12 @@ ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1"
fi
echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6
echo "configure:2327: checking for getaddrinfo" >&5
echo "configure:2350: checking for getaddrinfo" >&5
if eval "test \"`echo '$''{'ac_cv_func_getaddrinfo'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2332 "configure"
#line 2355 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char getaddrinfo(); below. */
@@ -2351,7 +2374,7 @@ getaddrinfo();
; return 0; }
EOF
if { (eval echo configure:2355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_getaddrinfo=yes"
else
@@ -2377,10 +2400,11 @@ fi
echo $ac_n "checking for interface list sysctl""... $ac_c" 1>&6
echo "configure:2382: checking for interface list sysctl" >&5
echo "configure:2406: checking for interface list sysctl" >&5
cat > conftest.$ac_ext <<EOF
#line 2384 "configure"
#line 2408 "configure"
#include "confdefs.h"
#include <sys/param.h>
@@ -2487,7 +2511,7 @@ else
fi
echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:2491: checking build system type" >&5
echo "configure:2515: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -2516,7 +2540,7 @@ ac_prog=ld
if test "$ac_cv_prog_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
echo "configure:2520: checking for ld used by GCC" >&5
echo "configure:2544: checking for ld used by GCC" >&5
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
# Accept absolute paths.
@@ -2540,10 +2564,10 @@ echo "configure:2520: checking for ld used by GCC" >&5
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
echo "configure:2544: checking for GNU ld" >&5
echo "configure:2568: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
echo "configure:2547: checking for non-GNU ld" >&5
echo "configure:2571: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2579,7 +2603,7 @@ fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
echo "configure:2583: checking if the linker ($LD) is GNU ld" >&5
echo "configure:2607: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2595,7 +2619,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
echo "configure:2599: checking for BSD-compatible nm" >&5
echo "configure:2623: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2632,7 +2656,7 @@ echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:2636: checking whether ln -s works" >&5
echo "configure:2660: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2676,8 +2700,8 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
case "$host" in
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 2680 "configure"' > conftest.$ac_ext
if { (eval echo configure:2681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
echo '#line 2704 "configure"' > conftest.$ac_ext
if { (eval echo configure:2705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
@@ -2698,19 +2722,19 @@ case "$host" in
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
echo "configure:2702: checking whether the C compiler needs -belf" >&5
echo "configure:2726: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2707 "configure"
#line 2731 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:2714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@@ -2834,9 +2858,9 @@ fi
case "$enable_ipv6" in
yes|''|autodetect)
echo $ac_n "checking for IPv6 structures""... $ac_c" 1>&6
echo "configure:2838: checking for IPv6 structures" >&5
echo "configure:2862: checking for IPv6 structures" >&5
cat > conftest.$ac_ext <<EOF
#line 2840 "configure"
#line 2864 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -2846,7 +2870,7 @@ int main() {
struct sockaddr_in6 sin6; return (0);
; return 0; }
EOF
if { (eval echo configure:2850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
found_ipv6=yes
@@ -2884,7 +2908,7 @@ esac
echo $ac_n "checking for Kame IPv6 support""... $ac_c" 1>&6
echo "configure:2888: checking for Kame IPv6 support" >&5
echo "configure:2912: checking for Kame IPv6 support" >&5
# Check whether --with-kame or --without-kame was given.
if test "${with_kame+set}" = set; then
withval="$with_kame"
@@ -2926,12 +2950,12 @@ esac
echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6
echo "configure:2930: checking for inet_ntop" >&5
echo "configure:2954: checking for inet_ntop" >&5
if eval "test \"`echo '$''{'ac_cv_func_inet_ntop'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2935 "configure"
#line 2959 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char inet_ntop(); below. */
@@ -2954,7 +2978,7 @@ inet_ntop();
; return 0; }
EOF
if { (eval echo configure:2958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_inet_ntop=yes"
else
@@ -2978,12 +3002,12 @@ ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
fi
echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
echo "configure:2982: checking for inet_pton" >&5
echo "configure:3006: checking for inet_pton" >&5
if eval "test \"`echo '$''{'ac_cv_func_inet_pton'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2987 "configure"
#line 3011 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char inet_pton(); below. */
@@ -3006,7 +3030,7 @@ inet_pton();
; return 0; }
EOF
if { (eval echo configure:3010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_inet_pton=yes"
else
@@ -3030,12 +3054,12 @@ ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
fi
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
echo "configure:3034: checking for inet_aton" >&5
echo "configure:3058: checking for inet_aton" >&5
if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3039 "configure"
#line 3063 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char inet_aton(); below. */
@@ -3058,7 +3082,7 @@ inet_aton();
; return 0; }
EOF
if { (eval echo configure:3062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_inet_aton=yes"
else
@@ -3082,12 +3106,12 @@ ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.$O"
fi
echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6
echo "configure:3086: checking for vsnprintf" >&5
echo "configure:3110: checking for vsnprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3091 "configure"
#line 3115 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vsnprintf(); below. */
@@ -3110,7 +3134,7 @@ vsnprintf();
; return 0; }
EOF
if { (eval echo configure:3114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vsnprintf=yes"
else
@@ -3142,12 +3166,12 @@ fi
echo $ac_n "checking for chroot""... $ac_c" 1>&6
echo "configure:3146: checking for chroot" >&5
echo "configure:3170: checking for chroot" >&5
if eval "test \"`echo '$''{'ac_cv_func_chroot'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3151 "configure"
#line 3175 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char chroot(); below. */
@@ -3170,7 +3194,7 @@ chroot();
; return 0; }
EOF
if { (eval echo configure:3174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_chroot=yes"
else
@@ -3196,17 +3220,17 @@ for ac_hdr in linux/capability.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3200: checking for $ac_hdr" >&5
echo "configure:3224: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3205 "configure"
#line 3229 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3483,6 +3507,7 @@ s%@ISC_PLATFORM_HAVESALEN@%$ISC_PLATFORM_HAVESALEN%g
s%@ISC_PLATFORM_MSGHDRFLAVOR@%$ISC_PLATFORM_MSGHDRFLAVOR%g
s%@ISC_PLATFORM_NEEDPORTT@%$ISC_PLATFORM_NEEDPORTT%g
s%@ISC_LWRES_NEEDADDRINFO@%$ISC_LWRES_NEEDADDRINFO%g
s%@ISC_LWRES_SETNETENTINT@%$ISC_LWRES_SETNETENTINT%g
s%@ISC_LWRES_GETIPNODEPROTO@%$ISC_LWRES_GETIPNODEPROTO%g
s%@ISC_LWRES_GETADDRINFOPROTO@%$ISC_LWRES_GETADDRINFOPROTO%g
s%@ISC_LWRES_GETNAMEINFOPROTO@%$ISC_LWRES_GETNAMEINFOPROTO%g

View File

@@ -13,7 +13,7 @@ dnl PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
dnl ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
dnl SOFTWARE.
AC_REVISION($Revision: 1.75 $)
AC_REVISION($Revision: 1.76 $)
AC_PREREQ(2.13)
@@ -318,6 +318,14 @@ AC_TRY_COMPILE([
ISC_LWRES_NEEDADDRINFO="#undef ISC_LWRES_NEEDADDRINFO"],
[AC_MSG_RESULT(no)
ISC_LWRES_NEEDADDRINFO="#define ISC_LWRES_NEEDADDRINFO 1"])
AC_MSG_CHECKING(for int setnetent)
AC_TRY_COMPILE([
#include <netdb.h>],
[int i = setnetent(0); return(0);],
[AC_MSG_RESULT(yes)
ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1"],
[AC_MSG_RESULT(no)
ISC_LWRES_SETNETENTINT="#undef ISC_LWRES_SETNETENTINT"])
AC_CHECK_FUNC(getipnodebyname,
[ISC_LWRES_GETIPNODEPROTO="#undef ISC_LWRES_GETIPNODEPROTO"],
[ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1"])
@@ -328,6 +336,7 @@ AC_CHECK_FUNC(getaddrinfo,
[ISC_LWRES_GETADDRINFOPROTO="#undef ISC_LWRES_GETADDRINFOPROTO"],
[ISC_LWRES_GETADDRINFOPROTO="#define ISC_LWRES_GETADDRINFOPROTO 1"])
AC_SUBST(ISC_LWRES_NEEDADDRINFO)
AC_SUBST(ISC_LWRES_SETNETENTINT)
AC_SUBST(ISC_LWRES_GETIPNODEPROTO)
AC_SUBST(ISC_LWRES_GETADDRINFOPROTO)
AC_SUBST(ISC_LWRES_GETNAMEINFOPROTO)