Permalink
Browse files

make IPv6-only functions optional (only when --enable-inet6).

add ifaddrs.h.
  • Loading branch information...
1 parent 3df344e commit 616f286db8798716dc944c1b761628bb201c20d0 itojun committed Mar 27, 2000
Showing with 190 additions and 101 deletions.
  1. +2 −9 kame/kame/libinet6/Makefile.in
  2. +128 −90 kame/kame/libinet6/configure
  3. +6 −2 kame/kame/libinet6/configure.in
  4. +54 −0 kame/kame/libinet6/missing/ifaddrs.h
View
11 kame/kame/libinet6/Makefile.in
@@ -17,16 +17,9 @@ CFLAGS= @DEFS@ @CFLAGS@ $(CPPFLAGS)
CPPFLAGS=@CPPFLAGS@
LDFLAGS=@LDFLAGS@
-OBJS= getaddrinfo.o getnameinfo.o ifname.o vars.o rresvport_af.o rcmd.o
-OBJS+= rthdr.o ip6opt.o
-OBJS+= name6.o
-OBJS+= base64.o herror.o nsap_addr.o
-OBJS+= res_comp.o res_data.o res_debug.o
-OBJS+= res_init.o res_mkquery.o res_query.o
-OBJS+= res_send.o
-OBJS+= inet_pton.o inet_addr.o
-OBJS+= bindresvport.o
+OBJS= getaddrinfo.o getnameinfo.o ifname.o
OBJS+= getifaddrs.o
+OBJS+= @V6OBJS@
MAN3= getaddrinfo.3 getnameinfo.3 gethostbyname.3 resolver.3 \
rresvport_af.3 if_indextoname.3 getipnodebyname.3 inet6_option_space.3 \
View
218 kame/kame/libinet6/configure
@@ -1081,14 +1081,48 @@ else
fi
done
+ac_safe=`echo "ifaddrs.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for ifaddrs.h""... $ac_c" 1>&6
+echo "configure:1087: checking for ifaddrs.h" >&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 1092 "configure"
+#include "confdefs.h"
+#include <ifaddrs.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1097: \"$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*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+missing_includes=yes
+fi
+
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1087: checking for working const" >&5
+echo "configure:1121: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1092 "configure"
+#line 1126 "configure"
#include "confdefs.h"
int main() {
@@ -1137,7 +1171,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:1141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1158,21 +1192,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1162: checking for inline" >&5
+echo "configure:1196: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 1169 "configure"
+#line 1203 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -1198,12 +1232,12 @@ EOF
esac
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:1202: checking for pid_t" >&5
+echo "configure:1236: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1207 "configure"
+#line 1241 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1231,12 +1265,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1235: checking for size_t" >&5
+echo "configure:1269: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1240 "configure"
+#line 1274 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1264,12 +1298,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1268: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1302: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1273 "configure"
+#line 1307 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -1278,7 +1312,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:1282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -1299,20 +1333,20 @@ EOF
fi
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:1303: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:1337: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1308 "configure"
+#line 1342 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:1316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
@@ -1333,12 +1367,12 @@ EOF
fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:1337: checking for uid_t in sys/types.h" >&5
+echo "configure:1371: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1342 "configure"
+#line 1376 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -1371,10 +1405,6 @@ cat >> confdefs.h <<\EOF
#define DNS 1
EOF
-cat >> confdefs.h <<\EOF
-#define USE_GETIPNODEBY 1
-EOF
-
# Check whether --enable-inet6 or --disable-inet6 was given.
if test "${enable_inet6+set}" = set; then
@@ -1383,23 +1413,30 @@ if test "${enable_inet6+set}" = set; then
yes) cat >> confdefs.h <<\EOF
#define INET6 1
EOF
- ;;
+
+ cat >> confdefs.h <<\EOF
+#define USE_GETIPNODEBY 1
+EOF
+
+ V6OBJS='rresvport_af.o rcmd.o rthdr.o ip6opt.o name6.o base64.o herror.o nsap_addr.o res_comp.o res_data.o res_debug.o res_init.o res_mkquery.o res_query.o res_send.o inet_pton.o inet_addr.o bindresvport.o vars.o'
+
+ ;;
no) ;;
*) { echo "configure: error: bad value ${enableval} for --enable-inet6 option" 1>&2; exit 1; } ;;
esac
fi
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:1395: checking for 8-bit clean memcmp" >&5
+echo "configure:1432: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 1403 "configure"
+#line 1440 "configure"
#include "confdefs.h"
main()
@@ -1409,7 +1446,7 @@ main()
}
EOF
-if { (eval echo configure:1413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
@@ -1429,12 +1466,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
for ac_func in gethostname gettimeofday select socket strdup strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1433: checking for $ac_func" >&5
+echo "configure:1470: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1438 "configure"
+#line 1475 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1457,7 +1494,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1484,12 +1521,12 @@ done
echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
-echo "configure:1488: checking if sockaddr struct has sa_len member" >&5
+echo "configure:1525: checking if sockaddr struct has sa_len member" >&5
if eval "test \"`echo '$''{'ac_cv_sockaddr_has_sa_len'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1493 "configure"
+#line 1530 "configure"
#include "confdefs.h"
# include <sys/types.h>
@@ -1498,7 +1535,7 @@ int main() {
u_int i = sizeof(((struct sockaddr *)0)->sa_len)
; return 0; }
EOF
-if { (eval echo configure:1502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sockaddr_has_sa_len=yes
else
@@ -1524,20 +1561,20 @@ fi
echo $ac_n "checking for __P""... $ac_c" 1>&6
-echo "configure:1528: checking for __P" >&5
+echo "configure:1565: checking for __P" >&5
if eval "test \"`echo '$''{'ac_cv_portable_proto'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1533 "configure"
+#line 1570 "configure"
#include "confdefs.h"
# include <unistd.h>
int main() {
int f __P(())
; return 0; }
EOF
-if { (eval echo configure:1541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_portable_proto=yes
else
@@ -1562,15 +1599,15 @@ if test "$ac_cv_portable_proto" = no; then
fi
echo $ac_n "checking size of char""... $ac_c" 1>&6
-echo "configure:1566: checking size of char" >&5
+echo "configure:1603: checking size of char" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1574 "configure"
+#line 1611 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1581,7 +1618,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_char=`cat conftestval`
else
@@ -1601,15 +1638,15 @@ EOF
echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:1605: checking size of short" >&5
+echo "configure:1642: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1613 "configure"
+#line 1650 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1620,7 +1657,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_short=`cat conftestval`
else
@@ -1640,15 +1677,15 @@ EOF
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:1644: checking size of int" >&5
+echo "configure:1681: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1652 "configure"
+#line 1689 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1659,7 +1696,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int=`cat conftestval`
else
@@ -1679,15 +1716,15 @@ EOF
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:1683: checking size of long" >&5
+echo "configure:1720: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1691 "configure"
+#line 1728 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1698,7 +1735,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
@@ -1721,20 +1758,20 @@ EOF
ac_cv_bittypes=yes
echo $ac_n "checking for u_int8_t""... $ac_c" 1>&6
-echo "configure:1725: checking for u_int8_t" >&5
+echo "configure:1762: checking for u_int8_t" >&5
if eval "test \"`echo '$''{'ac_cv_u_int8_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1730 "configure"
+#line 1767 "configure"
#include "confdefs.h"
# include <sys/types.h>
int main() {
u_int8_t i
; return 0; }
EOF
-if { (eval echo configure:1738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_u_int8_t=yes
else
@@ -1756,20 +1793,20 @@ EOF
ac_cv_bittypes=no
fi
echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6
-echo "configure:1760: checking for u_int16_t" >&5
+echo "configure:1797: checking for u_int16_t" >&5
if eval "test \"`echo '$''{'ac_cv_u_int16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1765 "configure"
+#line 1802 "configure"
#include "confdefs.h"
# include <sys/types.h>
int main() {
u_int16_t i
; return 0; }
EOF
-if { (eval echo configure:1773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_u_int16_t=yes
else
@@ -1791,20 +1828,20 @@ EOF
ac_cv_bittypes=no
fi
echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
-echo "configure:1795: checking for u_int32_t" >&5
+echo "configure:1832: checking for u_int32_t" >&5
if eval "test \"`echo '$''{'ac_cv_u_int32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1800 "configure"
+#line 1837 "configure"
#include "confdefs.h"
# include <sys/types.h>
int main() {
u_int32_t i
; return 0; }
EOF
-if { (eval echo configure:1808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_u_int32_t=yes
else
@@ -1832,20 +1869,20 @@ fi
echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
-echo "configure:1836: checking for addrinfo" >&5
+echo "configure:1873: checking for addrinfo" >&5
if eval "test \"`echo '$''{'ac_cv_addrinfo'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1841 "configure"
+#line 1878 "configure"
#include "confdefs.h"
# include <netdb.h>
int main() {
struct addrinfo a
; return 0; }
EOF
-if { (eval echo configure:1849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_addrinfo=yes
else
@@ -1876,12 +1913,12 @@ fi
echo $ac_n "checking for NI_MAXSERV""... $ac_c" 1>&6
-echo "configure:1880: checking for NI_MAXSERV" >&5
+echo "configure:1917: checking for NI_MAXSERV" >&5
if eval "test \"`echo '$''{'ac_cv_maxserv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1885 "configure"
+#line 1922 "configure"
#include "confdefs.h"
#include <netdb.h>
#ifdef NI_MAXSERV
@@ -1914,12 +1951,12 @@ fi
echo $ac_n "checking for NI_NAMEREQD""... $ac_c" 1>&6
-echo "configure:1918: checking for NI_NAMEREQD" >&5
+echo "configure:1955: checking for NI_NAMEREQD" >&5
if eval "test \"`echo '$''{'ac_cv_namereqd'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1923 "configure"
+#line 1960 "configure"
#include "confdefs.h"
#include <netdb.h>
#ifdef NI_NOFQDN
@@ -1952,12 +1989,12 @@ fi
echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
-echo "configure:1956: checking for sockaddr_storage" >&5
+echo "configure:1993: checking for sockaddr_storage" >&5
if eval "test \"`echo '$''{'ac_cv_sa_storage'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1961 "configure"
+#line 1998 "configure"
#include "confdefs.h"
# include <sys/types.h>
@@ -1966,7 +2003,7 @@ int main() {
struct sockaddr_storage s
; return 0; }
EOF
-if { (eval echo configure:1970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sa_storage=yes
else
@@ -1993,20 +2030,20 @@ fi
ac_cv_addrsz=yes
echo $ac_n "checking for INADDRSZ""... $ac_c" 1>&6
-echo "configure:1997: checking for INADDRSZ" >&5
+echo "configure:2034: checking for INADDRSZ" >&5
if eval "test \"`echo '$''{'ac_cv_inaddrsz'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2002 "configure"
+#line 2039 "configure"
#include "confdefs.h"
# include <arpa/nameser.h>
int main() {
int a = INADDRSZ
; return 0; }
EOF
-if { (eval echo configure:2010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_inaddrsz=yes
else
@@ -2028,20 +2065,20 @@ EOF
ac_cv_addrsz=no
fi
echo $ac_n "checking for IN6ADDRSZ""... $ac_c" 1>&6
-echo "configure:2032: checking for IN6ADDRSZ" >&5
+echo "configure:2069: checking for IN6ADDRSZ" >&5
if eval "test \"`echo '$''{'ac_cv_in6addrsz'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2037 "configure"
+#line 2074 "configure"
#include "confdefs.h"
# include <arpa/nameser.h>
int main() {
int a = IN6ADDRSZ
; return 0; }
EOF
-if { (eval echo configure:2045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_in6addrsz=yes
else
@@ -2069,12 +2106,12 @@ fi
echo $ac_n "checking for RES_USE_INET6""... $ac_c" 1>&6
-echo "configure:2073: checking for RES_USE_INET6" >&5
+echo "configure:2110: checking for RES_USE_INET6" >&5
if eval "test \"`echo '$''{'ac_cv_res_inet6'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2078 "configure"
+#line 2115 "configure"
#include "confdefs.h"
# include <sys/types.h>
@@ -2084,7 +2121,7 @@ int main() {
int a = RES_USE_INET6
; return 0; }
EOF
-if { (eval echo configure:2088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_res_inet6=yes
else
@@ -2110,20 +2147,20 @@ fi
echo $ac_n "checking for AAAA""... $ac_c" 1>&6
-echo "configure:2114: checking for AAAA" >&5
+echo "configure:2151: checking for AAAA" >&5
if eval "test \"`echo '$''{'ac_cv_aaaa'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2119 "configure"
+#line 2156 "configure"
#include "confdefs.h"
# include <arpa/nameser.h>
int main() {
int a = T_AAAA
; return 0; }
EOF
-if { (eval echo configure:2127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_aaaa=yes
else
@@ -2152,12 +2189,12 @@ fi
echo $ac_n "checking for res_state_ext""... $ac_c" 1>&6
-echo "configure:2156: checking for res_state_ext" >&5
+echo "configure:2193: checking for res_state_ext" >&5
if eval "test \"`echo '$''{'ac_cv_res_state_ext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2161 "configure"
+#line 2198 "configure"
#include "confdefs.h"
# include <sys/types.h>
@@ -2167,7 +2204,7 @@ int main() {
struct __res_state_ext e
; return 0; }
EOF
-if { (eval echo configure:2171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_res_state_ext=yes
else
@@ -2193,12 +2230,12 @@ fi
echo $ac_n "checking for nsort in res_state""... $ac_c" 1>&6
-echo "configure:2197: checking for nsort in res_state" >&5
+echo "configure:2234: checking for nsort in res_state" >&5
if eval "test \"`echo '$''{'ac_cv_res_state'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2202 "configure"
+#line 2239 "configure"
#include "confdefs.h"
# include <sys/types.h>
@@ -2208,7 +2245,7 @@ int main() {
struct __res_state e; e.nsort = 0
; return 0; }
EOF
-if { (eval echo configure:2212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_res_state=yes
else
@@ -2231,12 +2268,12 @@ EOF
echo $ac_n "checking for if_nameindex""... $ac_c" 1>&6
-echo "configure:2235: checking for if_nameindex" >&5
+echo "configure:2272: checking for if_nameindex" >&5
if eval "test \"`echo '$''{'ac_cv_if_nameindex'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2240 "configure"
+#line 2277 "configure"
#include "confdefs.h"
# include <sys/types.h>
@@ -2246,7 +2283,7 @@ int main() {
struct if_nameindex e; e.if_index = 0
; return 0; }
EOF
-if { (eval echo configure:2250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_if_nameindex=yes
else
@@ -2276,12 +2313,12 @@ fi
echo $ac_n "checking for h_errno""... $ac_c" 1>&6
-echo "configure:2280: checking for h_errno" >&5
+echo "configure:2317: checking for h_errno" >&5
if eval "test \"`echo '$''{'ac_cv_var_h_errno'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2285 "configure"
+#line 2322 "configure"
#include "confdefs.h"
# include <sys/types.h>
@@ -2290,7 +2327,7 @@ int main() {
int foo = h_errno;
; return 0; }
EOF
-if { (eval echo configure:2294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_var_h_errno=yes
else
@@ -2473,6 +2510,7 @@ s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@LN_S@%$LN_S%g
+s%@V6OBJS@%$V6OBJS%g
s%@LIBOBJS@%$LIBOBJS%g
CEOF
View
8 kame/kame/libinet6/configure.in
@@ -14,6 +14,7 @@ dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h)
+AC_CHECK_HEADER(ifaddrs.h, [], [missing_includes=yes])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -26,12 +27,15 @@ AC_TYPE_UID_T
dnl default defs
AC_DEFINE(DNS)
-AC_DEFINE(USE_GETIPNODEBY)
AC_ARG_ENABLE(inet6,
[ --enable-inet6 enable IPv6 support (-DINET6)],
[case "${enableval}" in
- yes) AC_DEFINE(INET6) ;;
+ yes) AC_DEFINE(INET6)
+ AC_DEFINE(USE_GETIPNODEBY)
+ V6OBJS='rresvport_af.o rcmd.o rthdr.o ip6opt.o name6.o base64.o herror.o nsap_addr.o res_comp.o res_data.o res_debug.o res_init.o res_mkquery.o res_query.o res_send.o inet_pton.o inet_addr.o bindresvport.o vars.o'
+ AC_SUBST(V6OBJS)
+ ;;
no) ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-inet6 option) ;;
esac], [])
View
54 kame/kame/libinet6/missing/ifaddrs.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 1995, 1999
+ * Berkeley Software Design, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
+ */
+
+#ifndef _IFADDRS_H_
+#define _IFADDRS_H_
+
+struct ifaddrs {
+ struct ifaddrs *ifa_next;
+ char *ifa_name;
+ u_int ifa_flags;
+ struct sockaddr *ifa_addr;
+ struct sockaddr *ifa_netmask;
+ struct sockaddr *ifa_dstaddr;
+ void *ifa_data;
+};
+
+/*
+ * This may have been defined in <net/if.h>. Note that if <net/if.h> is
+ * to be included it must be included before this header file.
+ */
+#ifndef ifa_broadaddr
+#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
+#endif
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+extern int getifaddrs __P((struct ifaddrs **));
+extern void freeifaddrs __P((struct ifaddrs *));
+__END_DECLS
+
+#endif

0 comments on commit 616f286

Please sign in to comment.