1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
[PATCH] reenable the ipv6 check
The patch racoon2-configure.in-remove-redundant-macros.patch made ipv6 off
for iked (RC_IF_IPV6_ENABLE is removed), since the autotools does not autocheck
--enable-ipv6, and copy ipv6 checking codes from lib/configure.in to
iked/configure.in to reenable it
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
iked/configure.in | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/iked/configure.in b/iked/configure.in
index 6b9352e..c155536 100644
--- a/iked/configure.in
+++ b/iked/configure.in
@@ -187,6 +187,43 @@ AC_TRY_COMPILE([],
AC_DEFINE(HAVE_FUNC_MACRO, 1, [define if __func__ macro is available])
], [AC_MSG_RESULT(no)])
+
+dnl check if ipv6 is available.
+AC_MSG_CHECKING(if ipv6 is available)
+AC_ARG_ENABLE(ipv6,
+[ --enable-ipv6 enable ipv6 (with ipv4) support
+ --disable-ipv6 disable ipv6 support],
+ [ case "$enableval" in
+ no)
+ AC_MSG_RESULT(no)
+ ipv6=no
+ ;;
+ *) AC_MSG_RESULT(yes)
+ AC_DEFINE(INET6, 1, [enable ipv6])
+ ipv6=yes
+ ;;
+ esac ],
+ AC_TRY_RUN([ /* AF_INET6 avalable check */
+#include <sys/types.h>
+#include <sys/socket.h>
+main()
+{
+ exit(0);
+ if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
+ exit(1);
+ else
+ exit(0);
+}
+],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(INET6, 1 , [enable ipv6])
+ ipv6=yes,
+ AC_MSG_RESULT(no)
+ ipv6=no,
+ AC_MSG_RESULT(no)
+ ipv6=no
+))
+
if test "$ipv6" = "yes"; then
AC_MSG_CHECKING(for advanced API support)
AC_CACHE_VAL(racoon_cv_advapi, [dnl
--
1.9.1
|