Commit 3de460ea authored by Daniel Salzman's avatar Daniel Salzman

configure: remove fallback to libatomic

Still there are some problems with clang on 32-bit systems, so the atomic
functionality is no longer required for such systems (statistics or mod-cookies
might work slightly wrong).
parent d4b46302
......@@ -501,19 +501,11 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread_np.h>]], [[cpuset_t set; CPU
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sched.h>]], [[cpuset_t* set = cpuset_create(); cpuset_destroy(set);]])],
[AC_DEFINE(HAVE_CPUSET_NETBSD, 1, [Define if cpuset_t and cpuset(3) exists.])])
AC_COMPILE_IFELSE(
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include <stdint.h>]],
[[uint64_t val = 0; __atomic_add_fetch(&val, 1, __ATOMIC_RELAXED);]])],
[AC_DEFINE(HAVE_ATOMIC, 1, [Define to 1 if you have '__atomic' functions.])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include <stdint.h>]],
[[uint64_t val = 0; __atomic_add_fetch(&val, 1, __ATOMIC_RELAXED);]])],
[atomic_LIBS=""],
[atomic_LIBS="-latomic"]
)],
[atomic_LIBS=""]
[AC_DEFINE(HAVE_ATOMIC, 1, [Define to 1 if you have '__atomic' functions.])]
)
AC_SUBST([atomic_LIBS])
# Prepare CFLAG_VISIBILITY to be used where needed
gl_VISIBILITY()
......
......@@ -399,7 +399,7 @@ libknotd_la_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAG_VISIBILITY) $(systemd_CFLAGS) \
$(liburcu_CFLAGS) -DKNOTD_MOD_STATIC
libknotd_la_LDFLAGS = $(AM_LDFLAGS) -export-symbols-regex '^knotd_'
libknotd_la_LIBADD = libknot.la zscanner/libzscanner.la $(systemd_LIBS) \
$(liburcu_LIBS) $(atomic_LIBS)
$(liburcu_LIBS)
###################
# Knot DNS Daemon #
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment