]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
configure.ac: fix substitution for libatomic
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Wed, 23 Jan 2019 22:57:13 +0000 (01:57 +0300)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 24 Jan 2019 05:36:26 +0000 (06:36 +0100)
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
configure.ac

index 52cb1d0f2a936a7da7de055320ca3fdbcedbb6c7..8cc4c26d60f14e7486d97621d4c3fb4b6bf3b236 100644 (file)
@@ -208,7 +208,10 @@ AC_CHECK_HEADERS([netinet/tcp.h])
 AC_CHECK_HEADERS([stdatomic.h])
 
 dnl This ensures that we link with the right library for atomic operations on Linux SPARC
-AC_SEARCH_LIBS([__atomic_load_4], [atomic], [AC_SUBST([LIBATOMIC_LIBS], [-latomic])])
+AC_SEARCH_LIBS([__atomic_load_4], [atomic], [], [AC_MSG_NOTICE([Could not detect libatomic])])
+AS_IF([test "$ac_cv_search___atomic_load_4" = "none required" || test "$ac_cv_search___atomic_load_4" = "no"],
+      [AC_SUBST([LIBATOMIC_LIBS], [])],
+      [AC_SUBST([LIBATOMIC_LIBS], [$ac_cv_search___atomic_load_4])])
 
 dnl We use its presence to detect C11 threads
 AC_CHECK_HEADERS([threads.h])