The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / zeromq / 0002-acinclude.m4-make-kernel-specific-flags-cacheable.patch
1 commit 9daf6dd7c4947ce74ca729de5c3cfe8cbc304702
2 Author: Lionel Orry <lionel.orry@gmail.com>
3 Date:   Fri Feb 6 15:11:07 2015 +0100
4
5     acinclude.m4: make kernel-specific flags cacheable
6     
7     Specifically when cross-compiling, one can be willing to force these
8     variable values using the environment of a config.cache file. This
9     commit makes this possible.
10     
11     The affected variables are:
12     
13     * libzmq_cv_sock_cloexec
14     * libzmq_cv_so_keepalive
15     * libzmq_cv_tcp_keepcnt
16     * libzmq_cv_tcp_keepidle
17     * libzmq_cv_tcp_keepintvl
18     * libzmq_cv_tcp_keepalive
19     
20     Signed-off-by: Lionel Orry <lionel.orry@gmail.com>
21
22 diff --git a/acinclude.m4 b/acinclude.m4
23 index 4bbd19e..456740d 100644
24 --- a/acinclude.m4
25 +++ b/acinclude.m4
26 @@ -586,8 +586,8 @@ dnl # LIBZMQ_CHECK_SOCK_CLOEXEC([action-if-found], [action-if-not-found])
27  dnl # Check if SOCK_CLOEXEC is supported                                           #
28  dnl ################################################################################
29  AC_DEFUN([LIBZMQ_CHECK_SOCK_CLOEXEC], [{
30 -    AC_MSG_CHECKING(whether SOCK_CLOEXEC is supported)
31 -    AC_TRY_RUN([/* SOCK_CLOEXEC test */
32 +    AC_CACHE_CHECK([whether SOCK_CLOEXEC is supported], [libzmq_cv_sock_cloexec],
33 +        [AC_TRY_RUN([/* SOCK_CLOEXEC test */
34  #include <sys/types.h>
35  #include <sys/socket.h>
36  
37 @@ -596,11 +596,13 @@ int main (int argc, char *argv [])
38      int s = socket (PF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0);
39      return (s == -1);
40  }
41 -    ],
42 -    [AC_MSG_RESULT(yes) ; libzmq_cv_sock_cloexec="yes" ; $1],
43 -    [AC_MSG_RESULT(no)  ; libzmq_cv_sock_cloexec="no"  ; $2],
44 -    [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_sock_cloexec="no"]
45 +        ],
46 +        [libzmq_cv_sock_cloexec="yes"],
47 +        [libzmq_cv_sock_cloexec="no"],
48 +        [libzmq_cv_sock_cloexec="not during cross-compile"]
49 +        )]
50      )
51 +    AS_IF([test "x$libzmq_cv_sock_cloexec" = "xyes"], [$1], [$2])
52  }])
53  
54  dnl ################################################################################
55 @@ -628,8 +630,8 @@ dnl # LIBZMQ_CHECK_SO_KEEPALIVE([action-if-found], [action-if-not-found])
56  dnl # Check if SO_KEEPALIVE is supported                                           #
57  dnl ################################################################################
58  AC_DEFUN([LIBZMQ_CHECK_SO_KEEPALIVE], [{
59 -    AC_MSG_CHECKING(whether SO_KEEPALIVE is supported)
60 -    AC_TRY_RUN([/* SO_KEEPALIVE test */
61 +    AC_CACHE_CHECK([whether SO_KEEPALIVE is supported], [libzmq_cv_so_keepalive],
62 +        [AC_TRY_RUN([/* SO_KEEPALIVE test */
63  #include <sys/types.h>
64  #include <sys/socket.h>
65  
66 @@ -641,11 +643,13 @@ int main (int argc, char *argv [])
67          ((rc = setsockopt (s, SOL_SOCKET, SO_KEEPALIVE, (char*) &opt, sizeof (int))) == -1)
68      );
69  }
70 -    ],
71 -    [AC_MSG_RESULT(yes) ; libzmq_cv_so_keepalive="yes" ; $1],
72 -    [AC_MSG_RESULT(no)  ; libzmq_cv_so_keepalive="no"  ; $2],
73 -    [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_so_keepalive="no"]
74 +        ],
75 +        [libzmq_cv_so_keepalive="yes"],
76 +        [libzmq_cv_so_keepalive="no"],
77 +        [libzmq_cv_so_keepalive="not during cross-compile"]
78 +        )]
79      )
80 +    AS_IF([test "x$libzmq_cv_so_keepalive" = "xyes"], [$1], [$2])
81  }])
82  
83  dnl ################################################################################
84 @@ -653,8 +657,8 @@ dnl # LIBZMQ_CHECK_TCP_KEEPCNT([action-if-found], [action-if-not-found])
85  dnl # Check if TCP_KEEPCNT is supported                                            #
86  dnl ################################################################################
87  AC_DEFUN([LIBZMQ_CHECK_TCP_KEEPCNT], [{
88 -    AC_MSG_CHECKING(whether TCP_KEEPCNT is supported)
89 -    AC_TRY_RUN([/* TCP_KEEPCNT test */
90 +    AC_CACHE_CHECK([whether TCP_KEEPCNT is supported], [libzmq_cv_tcp_keepcnt],
91 +        [AC_TRY_RUN([/* TCP_KEEPCNT test */
92  #include <sys/types.h>
93  #include <sys/socket.h>
94  #include <netinet/in.h>
95 @@ -669,11 +673,13 @@ int main (int argc, char *argv [])
96          ((rc = setsockopt (s, IPPROTO_TCP, TCP_KEEPCNT, (char*) &opt, sizeof (int))) == -1)
97      );
98  }
99 -    ],
100 -    [AC_MSG_RESULT(yes) ; libzmq_cv_tcp_keepcnt="yes" ; $1],
101 -    [AC_MSG_RESULT(no)  ; libzmq_cv_tcp_keepcnt="no"  ; $2],
102 -    [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_tcp_keepcnt="no"]
103 +        ],
104 +        [libzmq_cv_tcp_keepcnt="yes"],
105 +        [libzmq_cv_tcp_keepcnt="no"],
106 +        [libzmq_cv_tcp_keepcnt="not during cross-compile"]
107 +        )]
108      )
109 +    AS_IF([test "x$libzmq_cv_tcp_keepcnt" = "xyes"], [$1], [$2])
110  }])
111  
112  dnl ################################################################################
113 @@ -681,8 +687,8 @@ dnl # LIBZMQ_CHECK_TCP_KEEPIDLE([action-if-found], [action-if-not-found])
114  dnl # Check if TCP_KEEPIDLE is supported                                           #
115  dnl ################################################################################
116  AC_DEFUN([LIBZMQ_CHECK_TCP_KEEPIDLE], [{
117 -    AC_MSG_CHECKING(whether TCP_KEEPIDLE is supported)
118 -    AC_TRY_RUN([/* TCP_KEEPIDLE test */
119 +    AC_CACHE_CHECK([whether TCP_KEEPIDLE is supported], [libzmq_cv_tcp_keepidle],
120 +        [AC_TRY_RUN([/* TCP_KEEPIDLE test */
121  #include <sys/types.h>
122  #include <sys/socket.h>
123  #include <netinet/in.h>
124 @@ -697,11 +703,13 @@ int main (int argc, char *argv [])
125          ((rc = setsockopt (s, IPPROTO_TCP, TCP_KEEPIDLE, (char*) &opt, sizeof (int))) == -1)
126      );
127  }
128 -    ],
129 -    [AC_MSG_RESULT(yes) ; libzmq_cv_tcp_keepidle="yes" ; $1],
130 -    [AC_MSG_RESULT(no)  ; libzmq_cv_tcp_keepidle="no"  ; $2],
131 -    [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_tcp_keepidle="no"]
132 +        ],
133 +        [libzmq_cv_tcp_keepidle="yes"],
134 +        [libzmq_cv_tcp_keepidle="no"],
135 +        [libzmq_cv_tcp_keepidle="not during cross-compile"]
136 +        )]
137      )
138 +    AS_IF([test "x$libzmq_cv_tcp_keepidle" = "xyes"], [$1], [$2])
139  }])
140  
141  dnl ################################################################################
142 @@ -709,8 +717,8 @@ dnl # LIBZMQ_CHECK_TCP_KEEPINTVL([action-if-found], [action-if-not-found])
143  dnl # Check if TCP_KEEPINTVL is supported                                           #
144  dnl ################################################################################
145  AC_DEFUN([LIBZMQ_CHECK_TCP_KEEPINTVL], [{
146 -    AC_MSG_CHECKING(whether TCP_KEEPINTVL is supported)
147 -    AC_TRY_RUN([/* TCP_KEEPINTVL test */
148 +    AC_CACHE_CHECK([whether TCP_KEEPINTVL is supported], [libzmq_cv_tcp_keepintvl],
149 +        [AC_TRY_RUN([/* TCP_KEEPINTVL test */
150  #include <sys/types.h>
151  #include <sys/socket.h>
152  #include <netinet/in.h>
153 @@ -725,11 +733,13 @@ int main (int argc, char *argv [])
154          ((rc = setsockopt (s, IPPROTO_TCP, TCP_KEEPINTVL, (char*) &opt, sizeof (int))) == -1)
155      );
156  }
157 -    ],
158 -    [AC_MSG_RESULT(yes) ; libzmq_cv_tcp_keepintvl="yes" ; $1],
159 -    [AC_MSG_RESULT(no)  ; libzmq_cv_tcp_keepintvl="no"  ; $2],
160 -    [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_tcp_keepintvl="no"]
161 +        ],
162 +        [libzmq_cv_tcp_keepintvl="yes"],
163 +        [libzmq_cv_tcp_keepintvl="no"],
164 +        [libzmq_cv_tcp_keepintvl="not during cross-compile"]
165 +        )]
166      )
167 +    AS_IF([test "x$libzmq_cv_tcp_keepintvl" = "xyes"], [$1], [$2])
168  }])
169  
170  dnl ################################################################################
171 @@ -737,8 +747,8 @@ dnl # LIBZMQ_CHECK_TCP_KEEPALIVE([action-if-found], [action-if-not-found])
172  dnl # Check if TCP_KEEPALIVE is supported                                          #
173  dnl ################################################################################
174  AC_DEFUN([LIBZMQ_CHECK_TCP_KEEPALIVE], [{
175 -    AC_MSG_CHECKING(whether TCP_KEEPALIVE is supported)
176 -    AC_TRY_RUN([/* TCP_KEEPALIVE test */
177 +    AC_CACHE_CHECK([whether TCP_KEEPALIVE is supported], [libzmq_cv_tcp_keepalive],
178 +        [AC_TRY_RUN([/* TCP_KEEPALIVE test */
179  #include <sys/types.h>
180  #include <sys/socket.h>
181  #include <netinet/in.h>
182 @@ -753,11 +763,13 @@ int main (int argc, char *argv [])
183          ((rc = setsockopt (s, IPPROTO_TCP, TCP_KEEPALIVE, (char*) &opt, sizeof (int))) == -1)
184      );
185  }
186 -    ],
187 -    [AC_MSG_RESULT(yes) ; libzmq_cv_tcp_keepalive="yes" ; $1],
188 -    [AC_MSG_RESULT(no)  ; libzmq_cv_tcp_keepalive="no"  ; $2],
189 -    [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_tcp_keepalive="no"]
190 +        ],
191 +        [libzmq_cv_tcp_keepalive="yes"],
192 +        [libzmq_cv_tcp_keepalive="no"],
193 +        [libzmq_cv_tcp_keepalive="not during cross-compile"]
194 +        )]
195      )
196 +    AS_IF([test "x$libzmq_cv_tcp_keepalive" = "xyes"], [$1], [$2])
197  }])
198  
199  dnl ################################################################################