3 # Copyright (C) 2013 Paweł Dziepak
6 AC_INIT(nbds, [1.0], [pdziepak@quarnos.org])
10 AC_CONFIG_MACRO_DIR([m4])
12 AC_CONFIG_SRCDIR([src])
15 AC_CONFIG_HEADERS([config.h])
17 # Checks for programs.
24 # Checks for libraries.
25 AX_PTHREAD(, AC_MSG_ERROR([pthreads not found.]))
27 # Checks for header files.
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],
45 [cf_cv_have_sync_synchronize=yes],
46 [cf_cv_have_sync_synchronize=no])
48 if test "X${cf_cv_have_sync_synchronize}" != "Xyes"; then
49 AC_MSG_ERROR([__sync_synchronize() not supported])
52 AC_CACHE_CHECK([whether the target supports __sync_bool_compare_and_swap],
53 [cf_cv_have_sync_bool_compare_and_swap],
59 __sync_bool_compare_and_swap(&val, 0, 1);
61 [cf_cv_have_sync_bool_compare_and_swap=yes],
62 [cf_cv_have_sync_bool_compare_and_swap=no])
64 if test "X${cf_cv_have_sync_bool_compare_and_swap}" != "Xyes"; then
65 AC_MSG_ERROR([__sync_bool_compare_and_swap() not supported])