From 68b38634de47f424a7f5df24fb6deb21c6b48fcf Mon Sep 17 00:00:00 2001 From: Masahide NAKAMURA Date: Sun, 29 Apr 2007 02:08:27 +0900 Subject: [PATCH] [BUGFIX]: Check RH2 by configure. Advanced Socket API for IPv6 (RFC3542) defines inet6_rth_XXX functions. It defines type 0 message only and type 2 one is defined by another RFC (RFC4584; Extension to Socket API for Mobile IPv6). It should be checked whether the functions support type 2 message at the building environment by configure script. --- config.h.in | 6 +++++- configure.ac | 38 +++++++++++++++++++++++++------------- 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/config.h.in b/config.h.in index a0044dd..cd05b93 100644 --- a/config.h.in +++ b/config.h.in @@ -10,6 +10,10 @@ #undef HAVE_ARPA_INET_H you don't. */ #undef HAVE_DECL_IFA_F_HOMEADDRESS +/* Define to 1 if you have the declaration of `IPV6_RTHDR_TYPE_2', and to 0 if + you don't. */ +#undef HAVE_DECL_IPV6_RTHDR_TYPE_2 + /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT @@ -250,7 +254,7 @@ #undef pid_t supported. Do not define if restrict is supported directly. */ #undef restrict -/* Define to `unsigned' if does not define. */ +/* Define to `unsigned int' if does not define. */ #undef size_t /* Define as `fork' if `vfork' does not work. */ diff --git a/configure.ac b/configure.ac index a241da9..889f470 100644 --- a/configure.ac +++ b/configure.ac @@ -130,22 +130,34 @@ AC_CACHE_CHECK([whether to enable debug [ac_cv_enable_vt], [ac_cv_enable_vt=no]) AM_CONDITIONAL(ENABLE_VT, test x$enable_vt = xyes) -dnl Check Advanced IPv6 Socket API function availability -AC_MSG_NOTICE([*** checking for RFC3542: Advanced IPv6 Socket API support]) +dnl Check Advanced IPv6 Socket API destination options header function availability +AC_MSG_NOTICE([*** checking inet6_opt for RFC3542: Advanced IPv6 Socket API support]) AC_REPLACE_FUNCS(inet6_opt_find) -AC_REPLACE_FUNCS(inet6_rth_space) -AC_REPLACE_FUNCS(inet6_rth_init) -AC_REPLACE_FUNCS(inet6_rth_add) -AC_REPLACE_FUNCS(inet6_rth_getaddr) -AC_REPLACE_FUNCS(inet6_rth_gettype) + +dnl Check Advanced IPv6 Socket API routing header function availability +AC_MSG_NOTICE([*** checking inet6_rth for RFC3542: Advanced IPv6 Socket API support]) +dnl Check Extension to Socket API for MIPv6 availability +AC_MSG_NOTICE([*** checking RH2 for RFC4584: Extension to Socket API for MIPv6]) +AC_CHECK_DECLS([IPV6_RTHDR_TYPE_2], + [AC_REPLACE_FUNCS(inet6_rth_space) + AC_REPLACE_FUNCS(inet6_rth_init) + AC_REPLACE_FUNCS(inet6_rth_add) + AC_REPLACE_FUNCS(inet6_rth_getaddr) + AC_REPLACE_FUNCS(inet6_rth_gettype)], + [AC_LIBOBJ(inet6_rth_space) + AC_LIBOBJ(inet6_rth_init) + AC_LIBOBJ(inet6_rth_add) + AC_LIBOBJ(inet6_rth_getaddr) + AC_LIBOBJ(inet6_rth_gettype)],) + dnl Check some functions are really missing so we don't build empty libmissing AM_CONDITIONAL(MISSING, - test x$ac_cv_func_inet6_opt_find = xno -o \ - x$ac_cv_func_inet6_rth_space = xno -o \ - x$ac_cv_func_inet6_rth_init = xno -o \ - x$ac_cv_func_inet6_rth_add = xno -o \ - x$ac_cv_func_inet6_rth_getaddr = xno -o \ - x$ac_cv_func_inet6_rth_gettype = xno) + test x$ac_cv_func_inet6_opt_find != xyes -o \ + x$ac_cv_func_inet6_rth_space != xyes -o \ + x$ac_cv_func_inet6_rth_init != xyes -o \ + x$ac_cv_func_inet6_rth_add != xyes -o \ + x$ac_cv_func_inet6_rth_getaddr != xyes -o \ + x$ac_cv_func_inet6_rth_gettype != xyes) AC_MSG_NOTICE([*** checking for Mobile IPv6 support in kernel headers]) AC_CHECK_DECLS([IFA_F_HOMEADDRESS],, -- 1.4.3.GIT