Add multithreaded test for spsc_queue
[libnbds.git] / configure.ac
blobe3bd6d16a8f40fcceb1a41e34f6a8912f8f1a167
1 # libnbds
3 # Copyright (C) 2013 PaweÅ‚ Dziepak
5 AC_PREREQ(2.5)
6 AC_INIT(nbds, [1.0], [pdziepak@quarnos.org])
8 AC_LANG([C])
10 AC_CONFIG_MACRO_DIR([m4])
12 AC_CONFIG_SRCDIR([src])
14 AM_INIT_AUTOMAKE
15 AC_CONFIG_HEADERS([config.h])
17 # Checks for programs.
18 AC_PROG_CC
19 AC_PROG_INSTALL
20 AC_PROG_LN_S
22 AC_PROG_LIBTOOL
24 # Checks for libraries.
25 AX_PTHREAD(, AC_MSG_ERROR([pthreads not found.]))
27 # Checks for header files.
28 AC_HEADER_STDC
29 AC_C_CONST
31 # Checks for typedefs, structures, and compiler characteristics.
33 # Checks for library functions.
34 AC_CHECK_FUNC([posix_memalign], ,
35         AC_MSG_ERROR([posix_memalign() not supported]))
37 AC_CACHE_CHECK([whether the target supports __sync_synchronize],
38                [cf_cv_have_sync_synchronize],
39                [
40                         AC_LINK_IFELSE([
41                                 AC_LANG_PROGRAM([[
42                                 ]],[[
43                                         __sync_synchronize();
44                                 ]])],
45                                 [cf_cv_have_sync_synchronize=yes],
46                                 [cf_cv_have_sync_synchronize=no])
47                 ])
48 if test "X${cf_cv_have_sync_synchronize}" != "Xyes"; then
49         AC_MSG_ERROR([__sync_synchronize() not supported])
52 AC_CONFIG_FILES([
53         Makefile
54         src/Makefile
55         test/Makefile
58 AC_OUTPUT