configure: check for uuid python module
[cascardo/ovs.git] / m4 / openvswitch.m4
1 # -*- autoconf -*-
2
3 # Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at:
8 #
9 #     http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16
17 dnl Checks for --enable-coverage and updates CFLAGS and LDFLAGS appropriately.
18 AC_DEFUN([OVS_CHECK_COVERAGE],
19   [AC_REQUIRE([AC_PROG_CC])
20    AC_ARG_ENABLE(
21      [coverage],
22      [AC_HELP_STRING([--enable-coverage],
23                      [Enable gcov coverage tool.])],
24      [case "${enableval}" in
25         (yes) coverage=true ;;
26         (no)  coverage=false ;;
27         (*) AC_MSG_ERROR([bad value ${enableval} for --enable-coverage]) ;;
28       esac],
29      [coverage=false])
30    if $coverage; then
31      CFLAGS="$CFLAGS -O0 --coverage"
32      LDFLAGS="$LDFLAGS --coverage"
33    fi])
34
35 dnl Checks for --enable-ndebug and defines NDEBUG if it is specified.
36 AC_DEFUN([OVS_CHECK_NDEBUG],
37   [AC_ARG_ENABLE(
38      [ndebug],
39      [AC_HELP_STRING([--enable-ndebug],
40                      [Disable debugging features for max performance])],
41      [case "${enableval}" in
42         (yes) ndebug=true ;;
43         (no)  ndebug=false ;;
44         (*) AC_MSG_ERROR([bad value ${enableval} for --enable-ndebug]) ;;
45       esac],
46      [ndebug=false])
47    AM_CONDITIONAL([NDEBUG], [test x$ndebug = xtrue])])
48
49 dnl Checks for ESX.
50 AC_DEFUN([OVS_CHECK_ESX],
51   [AC_CHECK_HEADER([vmware.h],
52                    [ESX=yes],
53                    [ESX=no])
54    AM_CONDITIONAL([ESX], [test "$ESX" = yes])
55    if test "$ESX" = yes; then
56       AC_DEFINE([ESX], [1], [Define to 1 if building on ESX.])
57    fi])
58
59 dnl Checks for Netlink support.
60 AC_DEFUN([OVS_CHECK_NETLINK],
61   [AC_CHECK_HEADER([linux/netlink.h],
62                    [HAVE_NETLINK=yes],
63                    [HAVE_NETLINK=no],
64                    [#include <sys/socket.h>
65    #include <linux/types.h>
66    ])
67    AM_CONDITIONAL([HAVE_NETLINK], [test "$HAVE_NETLINK" = yes])
68    if test "$HAVE_NETLINK" = yes; then
69       AC_DEFINE([HAVE_NETLINK], [1],
70                 [Define to 1 if Netlink protocol is available.])
71    fi])
72
73 dnl Checks for OpenSSL.
74 AC_DEFUN([OVS_CHECK_OPENSSL],
75   [AC_ARG_ENABLE(
76      [ssl],
77      [AC_HELP_STRING([--disable-ssl], [Disable OpenSSL support])],
78      [case "${enableval}" in
79         (yes) ssl=true ;;
80         (no)  ssl=false ;;
81         (*) AC_MSG_ERROR([bad value ${enableval} for --enable-ssl]) ;;
82       esac],
83      [ssl=check])
84
85    if test "$ssl" != false; then
86        AX_CHECK_OPENSSL(
87          [HAVE_OPENSSL=yes],
88          [HAVE_OPENSSL=no
89           if test "$ssl" = check; then
90             AC_MSG_WARN([Cannot find openssl:
91
92 $SSL_PKG_ERRORS
93
94 OpenFlow connections over SSL will not be supported.
95 (You may use --disable-ssl to suppress this warning.)])
96           else
97             AC_MSG_ERROR([Cannot find openssl (use --disable-ssl to configure without SSL support)])
98           fi])
99    else
100        HAVE_OPENSSL=no
101    fi
102    AC_SUBST([HAVE_OPENSSL])
103    AM_CONDITIONAL([HAVE_OPENSSL], [test "$HAVE_OPENSSL" = yes])
104    if test "$HAVE_OPENSSL" = yes; then
105       AC_DEFINE([HAVE_OPENSSL], [1], [Define to 1 if OpenSSL is installed.])
106    fi])
107
108 dnl Checks for libraries needed by lib/socket-util.c.
109 AC_DEFUN([OVS_CHECK_SOCKET_LIBS],
110   [AC_CHECK_LIB([socket], [connect])
111    AC_SEARCH_LIBS([gethostbyname], [resolv], [RESOLVER_LIBS=-lresolv])])
112
113 dnl Checks for the directory in which to store the PKI.
114 AC_DEFUN([OVS_CHECK_PKIDIR],
115   [AC_ARG_WITH(
116      [pkidir],
117      AC_HELP_STRING([--with-pkidir=DIR],
118                     [PKI hierarchy directory [[LOCALSTATEDIR/lib/openvswitch/pki]]]),
119      [PKIDIR=$withval],
120      [PKIDIR='${localstatedir}/lib/openvswitch/pki'])
121    AC_SUBST([PKIDIR])])
122
123 dnl Checks for the directory in which to store pidfiles.
124 AC_DEFUN([OVS_CHECK_RUNDIR],
125   [AC_ARG_WITH(
126      [rundir],
127      AC_HELP_STRING([--with-rundir=DIR],
128                     [directory used for pidfiles
129                     [[LOCALSTATEDIR/run/openvswitch]]]),
130      [RUNDIR=$withval],
131      [RUNDIR='${localstatedir}/run/openvswitch'])
132    AC_SUBST([RUNDIR])])
133
134 dnl Checks for the directory in which to store logs.
135 AC_DEFUN([OVS_CHECK_LOGDIR],
136   [AC_ARG_WITH(
137      [logdir],
138      AC_HELP_STRING([--with-logdir=DIR],
139                     [directory used for logs [[LOCALSTATEDIR/log/PACKAGE]]]),
140      [LOGDIR=$withval],
141      [LOGDIR='${localstatedir}/log/${PACKAGE}'])
142    AC_SUBST([LOGDIR])])
143
144 dnl Checks for the directory in which to store the Open vSwitch database.
145 AC_DEFUN([OVS_CHECK_DBDIR],
146   [AC_ARG_WITH(
147      [dbdir],
148      AC_HELP_STRING([--with-dbdir=DIR],
149                     [directory used for conf.db [[SYSCONFDIR/PACKAGE]]]),
150      [DBDIR=$withval],
151      [DBDIR='${sysconfdir}/${PACKAGE}'])
152    AC_SUBST([DBDIR])])
153
154 dnl Defines HAVE_BACKTRACE if backtrace() is found.
155 AC_DEFUN([OVS_CHECK_BACKTRACE],
156   [AC_SEARCH_LIBS([backtrace], [execinfo ubacktrace],
157                   [AC_DEFINE([HAVE_BACKTRACE], [1],
158                              [Define to 1 if you have backtrace(3).])])])
159
160 dnl Checks for __malloc_hook, etc., supported by glibc.
161 AC_DEFUN([OVS_CHECK_MALLOC_HOOKS],
162   [AC_CACHE_CHECK(
163     [whether libc supports hooks for malloc and related functions],
164     [ovs_cv_malloc_hooks],
165     [AC_COMPILE_IFELSE(
166       [AC_LANG_PROGRAM(
167          [#include <malloc.h>
168          ],
169          [(void) __malloc_hook;
170           (void) __realloc_hook;
171           (void) __free_hook;])],
172       [ovs_cv_malloc_hooks=yes],
173       [ovs_cv_malloc_hooks=no])])
174    if test $ovs_cv_malloc_hooks = yes; then
175      AC_DEFINE([HAVE_MALLOC_HOOKS], [1],
176                [Define to 1 if you have __malloc_hook, __realloc_hook, and
177                 __free_hook in <malloc.h>.])
178    fi])
179
180 dnl Checks for valgrind/valgrind.h.
181 AC_DEFUN([OVS_CHECK_VALGRIND],
182   [AC_CHECK_HEADERS([valgrind/valgrind.h])])
183
184 dnl Checks for Python 2.x, x >= 4.
185 AC_DEFUN([OVS_CHECK_PYTHON],
186   [AC_CACHE_CHECK(
187      [for Python 2.x for x >= 4],
188      [ovs_cv_python],
189      [if test -n "$PYTHON"; then
190         ovs_cv_python=$PYTHON
191       else
192         ovs_cv_python=no
193         for binary in python python2.4 python2.5; do
194           ovs_save_IFS=$IFS; IFS=$PATH_SEPARATOR
195           for dir in $PATH; do
196             IFS=$ovs_save_IFS
197             test -z "$dir" && dir=.
198             if test -x $dir/$binary && $dir/$binary -c 'import sys
199 if sys.hexversion >= 0x02040000 and sys.hexversion < 0x03000000:
200     sys.exit(0)
201 else:
202     sys.exit(1)'; then
203               ovs_cv_python=$dir/$binary
204               break 2
205             fi
206           done
207         done
208       fi])
209    AC_SUBST([HAVE_PYTHON])
210    AM_MISSING_PROG([PYTHON], [python])
211    if test $ovs_cv_python != no; then
212      PYTHON=$ovs_cv_python
213      HAVE_PYTHON=yes
214    else
215      HAVE_PYTHON=no
216    fi
217    AM_CONDITIONAL([HAVE_PYTHON], [test "$HAVE_PYTHON" = yes])])
218
219 dnl Checks for dot.
220 AC_DEFUN([OVS_CHECK_DOT],
221   [AC_CACHE_CHECK(
222     [for dot],
223     [ovs_cv_dot],
224     [dnl "dot" writes -V output to stderr:
225      if (dot -V) 2>&1 | grep '^dot - [[gG]]raphviz version' >/dev/null 2>&1; then
226        ovs_cv_dot=yes
227      else
228        ovs_cv_dot=no
229      fi])
230    AM_CONDITIONAL([HAVE_DOT], [test "$ovs_cv_dot" = yes])])
231
232 dnl Checks for pyuic4.
233 AC_DEFUN([OVS_CHECK_PYUIC4],
234   [AC_CACHE_CHECK(
235     [for pyuic4],
236     [ovs_cv_pyuic4],
237     [if (pyuic4 --version) >/dev/null 2>&1; then
238        ovs_cv_pyuic4=pyuic4
239      else
240        ovs_cv_pyuic4=no
241      fi])
242    AM_MISSING_PROG([PYUIC4], [pyuic4])
243    if test $ovs_cv_pyuic4 != no; then
244      PYUIC4=$ovs_cv_pyuic4
245    fi])
246
247 dnl Checks whether $PYTHON supports the module given as $1
248 AC_DEFUN([OVS_CHECK_PYTHON_MODULE],
249   [AC_REQUIRE([OVS_CHECK_PYTHON])
250    AC_CACHE_CHECK(
251      [for $1 Python module],
252      [ovs_cv_py_[]AS_TR_SH([$1])],
253      [ovs_cv_py_[]AS_TR_SH([$1])=no
254       if test $HAVE_PYTHON = yes; then
255         AS_ECHO(["running $PYTHON -c 'import $1
256 import sys
257 sys.exit(0)'..."]) >&AS_MESSAGE_LOG_FD 2>&1
258         if $PYTHON -c 'import $1
259 import sys
260 sys.exit(0)' >&AS_MESSAGE_LOG_FD 2>&1; then
261           ovs_cv_py_[]AS_TR_SH([$1])=yes
262         fi
263       fi])])
264
265 dnl Checks for Python modules needed by ovsdbmonitor.
266 AC_DEFUN([OVS_CHECK_OVSDBMONITOR],
267   [OVS_CHECK_PYTHON_MODULE([PySide.QtCore])
268    OVS_CHECK_PYTHON_MODULE([PyQt4.QtCore])
269    OVS_CHECK_PYTHON_MODULE([twisted.conch.ssh])
270    OVS_CHECK_PYTHON_MODULE([twisted.internet])
271    OVS_CHECK_PYTHON_MODULE([twisted.application])
272    OVS_CHECK_PYTHON_MODULE([json])
273    OVS_CHECK_PYTHON_MODULE([zope.interface])
274    if (test $ovs_cv_py_PySide_QtCore = yes \
275        || test $ovs_cv_py_PyQt4_QtCore = yes) \
276       && test $ovs_cv_py_twisted_conch_ssh = yes \
277       && test $ovs_cv_py_twisted_internet = yes \
278       && test $ovs_cv_py_twisted_application = yes \
279       && test $ovs_cv_py_json = yes \
280       && test $ovs_cv_py_zope_interface = yes; then
281      BUILD_OVSDBMONITOR=yes
282    else
283      BUILD_OVSDBMONITOR=no
284    fi
285    AC_MSG_CHECKING([whether to build ovsdbmonitor])
286    AC_MSG_RESULT([$BUILD_OVSDBMONITOR])
287    AM_CONDITIONAL([BUILD_OVSDBMONITOR], [test $BUILD_OVSDBMONITOR = yes])])
288
289 dnl Checks for missing python modules at build time
290 AC_DEFUN([OVS_CHECK_PYTHON_COMPAT],
291   [OVS_CHECK_PYTHON_MODULE([uuid])
292    if test $ovs_cv_py_uuid = yes; then
293      INCLUDE_PYTHON_COMPAT=no
294    else
295      INCLUDE_PYTHON_COMPAT=yes
296    fi
297    AC_MSG_CHECKING([whether to add python/compat to PYTHONPATH])
298    AC_MSG_RESULT([$INCLUDE_PYTHON_COMPAT])
299    AM_CONDITIONAL([INCLUDE_PYTHON_COMPAT], [test $INCLUDE_PYTHON_COMPAT = yes])])
300
301 # OVS_LINK2_IFELSE(SOURCE1, SOURCE2, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
302 # -------------------------------------------------------------
303 # Based on AC_LINK_IFELSE, but tries to link both SOURCE1 and SOURCE2
304 # into a program.
305 #
306 # This macro is borrowed from acinclude.m4 in GNU PSPP, which has the
307 # following license:
308 #
309 #     Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
310 #     This file is free software; the Free Software Foundation
311 #     gives unlimited permission to copy and/or distribute it,
312 #     with or without modifications, as long as this notice is preserved.
313 #
314 m4_define([OVS_LINK2_IFELSE],
315 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
316 mv conftest.$ac_ext conftest1.$ac_ext
317 m4_ifvaln([$2], [AC_LANG_CONFTEST([$2])])dnl
318 mv conftest.$ac_ext conftest2.$ac_ext
319 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
320 ovs_link2='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest1.$ac_ext conftest2.$ac_ext $LIBS >&5'
321 AS_IF([_AC_DO_STDERR($ovs_link2) && {
322          test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
323          test ! -s conftest.err
324        } && test -s conftest$ac_exeext && {
325          test "$cross_compiling" = yes ||
326          AS_TEST_X([conftest$ac_exeext])
327        }],
328       [$3],
329       [echo "$as_me: failed source file 1 of 2 was:" >&5
330 sed 's/^/| /' conftest1.$ac_ext >&5
331 echo "$as_me: failed source file 2 of 2 was:" >&5
332 sed 's/^/| /' conftest2.$ac_ext >&5
333         $4])
334 dnl Delete also the IPA/IPO (Inter Procedural Analysis/Optimization)
335 dnl information created by the PGI compiler (conftest_ipa8_conftest.oo),
336 dnl as it would interfere with the next link command.
337 rm -rf conftest.dSYM conftest1.dSYM conftest2.dSYM
338 rm -f core conftest.err conftest1.err conftest2.err
339 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest*_ipa8_conftest*.oo
340 rm -f conftest$ac_exeext
341 rm -f m4_ifval([$1], [conftest1.$ac_ext]) m4_ifval([$2], [conftest1.$ac_ext])[]dnl
342 ])# OVS_LINK2_IFELSE
343
344 dnl Defines USE_LINKER_SECTIONS to 1 if the compiler supports putting
345 dnl variables in sections with user-defined names and the linker
346 dnl automatically defines __start_SECNAME and __stop_SECNAME symbols
347 dnl that designate the start and end of the sections.
348 AC_DEFUN([OVS_CHECK_LINKER_SECTIONS],
349   [AC_CACHE_CHECK(
350     [for user-defined linker section support],
351     [ovs_cv_use_linker_sections],
352     [OVS_LINK2_IFELSE(
353       [AC_LANG_SOURCE(
354         [int a __attribute__((__section__("mysection"))) = 1;
355          int b __attribute__((__section__("mysection"))) = 2;
356          int c __attribute__((__section__("mysection"))) = 3;])],
357       [AC_LANG_PROGRAM(
358         [#include <stdio.h>
359          extern int __start_mysection;
360          extern int __stop_mysection;],
361         [int n_ints = &__stop_mysection - &__start_mysection;
362          int *i;
363          for (i = &__start_mysection; i < &__start_mysection + n_ints; i++) {
364              printf("%d\n", *i);
365          }])],
366       [ovs_cv_use_linker_sections=yes],
367       [ovs_cv_use_linker_sections=no])])
368    if test $ovs_cv_use_linker_sections = yes; then
369      AC_DEFINE([USE_LINKER_SECTIONS], [1],
370                [Define to 1 if the compiler support putting variables
371                 into sections with user-defined names and the linker
372                 automatically defines __start_SECNAME and __stop_SECNAME
373                 symbols that designate the start and end of the section.])
374    fi
375    AM_CONDITIONAL(
376      [USE_LINKER_SECTIONS], [test $ovs_cv_use_linker_sections = yes])])
377
378 dnl Checks for groff.
379 AC_DEFUN([OVS_CHECK_GROFF],
380   [AC_CACHE_CHECK(
381     [for groff],
382     [ovs_cv_groff],
383     [if (groff -v) >/dev/null 2>&1; then
384        ovs_cv_groff=yes
385      else
386        ovs_cv_groff=no
387      fi])
388    AM_CONDITIONAL([HAVE_GROFF], [test "$ovs_cv_groff" = yes])])
389
390 dnl Checks for thread-local storage support.
391 dnl
392 dnl Checks whether the compiler and linker support the C11
393 dnl thread_local macro from <threads.h>, and if so defines
394 dnl HAVE_THREAD_LOCAL.  If not, checks whether the compiler and linker
395 dnl support the GCC __thread extension, and if so defines
396 dnl HAVE___THREAD.
397 AC_DEFUN([OVS_CHECK_TLS],
398   [AC_CACHE_CHECK(
399      [whether $CC has <threads.h> that supports thread_local],
400      [ovs_cv_thread_local],
401      [AC_LINK_IFELSE(
402         [AC_LANG_PROGRAM([#include <threads.h>
403 static thread_local int var;], [return var;])],
404         [ovs_cv_thread_local=yes],
405         [ovs_cv_thread_local=no])])
406    if test $ovs_cv_thread_local = yes; then
407      AC_DEFINE([HAVE_THREAD_LOCAL], [1],
408                [Define to 1 if the C compiler and linker supports the C11
409                 thread_local matcro defined in <threads.h>.])
410    else
411      AC_CACHE_CHECK(
412        [whether $CC supports __thread],
413        [ovs_cv___thread],
414        [AC_LINK_IFELSE(
415           [AC_LANG_PROGRAM([static __thread int var;], [return var;])],
416           [ovs_cv___thread=yes],
417           [ovs_cv___thread=no])])
418      if test $ovs_cv___thread = yes; then
419        AC_DEFINE([HAVE___THREAD], [1],
420                  [Define to 1 if the C compiler and linker supports the
421                   GCC __thread extenions.])
422      fi
423    fi])
424
425 dnl OVS_CHECK_GCC4_ATOMICS
426 dnl
427 dnl Checks whether the compiler and linker support GCC 4.0+ atomic built-ins.
428 dnl A compile-time only check is not enough because the compiler defers
429 dnl unimplemented built-ins to libgcc, which sometimes also lacks
430 dnl implementations.
431 AC_DEFUN([OVS_CHECK_GCC4_ATOMICS],
432   [AC_CACHE_CHECK(
433      [whether $CC supports GCC 4.0+ atomic built-ins],
434      [ovs_cv_gcc4_atomics],
435      [AC_LINK_IFELSE(
436         [AC_LANG_PROGRAM([[#include <stdlib.h>
437
438 #define ovs_assert(expr) if (!(expr)) abort();
439 #define TEST_ATOMIC_TYPE(TYPE)                  \
440     {                                           \
441         TYPE x = 1;                             \
442         TYPE orig;                              \
443                                                 \
444         __sync_synchronize();                   \
445         ovs_assert(x == 1);                     \
446                                                 \
447         __sync_synchronize();                   \
448         x = 3;                                  \
449         __sync_synchronize();                   \
450         ovs_assert(x == 3);                     \
451                                                 \
452         orig = __sync_fetch_and_add(&x, 1);     \
453         ovs_assert(orig == 3);                  \
454         __sync_synchronize();                   \
455         ovs_assert(x == 4);                     \
456                                                 \
457         orig = __sync_fetch_and_sub(&x, 2);     \
458         ovs_assert(orig == 4);                  \
459         __sync_synchronize();                   \
460         ovs_assert(x == 2);                     \
461                                                 \
462         orig = __sync_fetch_and_or(&x, 6);      \
463         ovs_assert(orig == 2);                  \
464         __sync_synchronize();                   \
465         ovs_assert(x == 6);                     \
466                                                 \
467         orig = __sync_fetch_and_and(&x, 10);    \
468         ovs_assert(orig == 6);                  \
469         __sync_synchronize();                   \
470         ovs_assert(x == 2);                     \
471                                                 \
472         orig = __sync_fetch_and_xor(&x, 10);    \
473         ovs_assert(orig == 2);                  \
474         __sync_synchronize();                   \
475         ovs_assert(x == 8);                     \
476     }]], [dnl
477 TEST_ATOMIC_TYPE(char);
478 TEST_ATOMIC_TYPE(unsigned char);
479 TEST_ATOMIC_TYPE(signed char);
480 TEST_ATOMIC_TYPE(short);
481 TEST_ATOMIC_TYPE(unsigned short);
482 TEST_ATOMIC_TYPE(int);
483 TEST_ATOMIC_TYPE(unsigned int);
484 TEST_ATOMIC_TYPE(long int);
485 TEST_ATOMIC_TYPE(unsigned long int);
486 TEST_ATOMIC_TYPE(long long int);
487 TEST_ATOMIC_TYPE(unsigned long long int);
488 ])],
489         [ovs_cv_gcc4_atomics=yes],
490         [ovs_cv_gcc4_atomics=no])])
491    if test $ovs_cv_gcc4_atomics = yes; then
492      AC_DEFINE([HAVE_GCC4_ATOMICS], [1],
493                [Define to 1 if the C compiler and linker supports the GCC 4.0+
494                 atomic built-ins.])
495    fi])
496
497 dnl OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(SIZE)
498 dnl
499 dnl Checks __atomic_always_lock_free(SIZE, 0)
500 AC_DEFUN([OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE], 
501   [AC_CACHE_CHECK(
502     [value of __atomic_always_lock_free($1)],
503     [ovs_cv_atomic_always_lock_free_$1],
504     [AC_COMPUTE_INT(
505         [ovs_cv_atomic_always_lock_free_$1],
506         [__atomic_always_lock_free($1, 0)],
507         [],
508         [ovs_cv_atomic_always_lock_free_$1=unsupported])])
509    if test ovs_cv_atomic_always_lock_free_$1 != unsupported; then
510      AC_DEFINE_UNQUOTED(
511        [ATOMIC_ALWAYS_LOCK_FREE_$1B],
512        [$ovs_cv_atomic_always_lock_free_$1],
513        [If the C compiler is GCC 4.7 or later, define to the return value of
514         __atomic_always_lock_free($1, 0).  If the C compiler is not GCC or is
515         an older version of GCC, the value does not matter.])
516    fi])
517
518 dnl OVS_CHECK_POSIX_AIO
519 AC_DEFUN([OVS_CHECK_POSIX_AIO],
520   [AC_SEARCH_LIBS([aio_write], [rt])
521    AM_CONDITIONAL([HAVE_POSIX_AIO], [test "$ac_cv_search_aio_write" != no])])