autotools: Add support for atomic helper library

On some platforms like Raspbian Buster, loolwsd need to be linked to the atomic helper library.

Change-Id: I0a8b921d85d499040b2e65d480116cbcb14b5089
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91102
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
distro/collabora/co-4-2-2
Corentin Noël 2020-03-26 14:47:21 +01:00 committed by Michael Meeks
parent 5bb2840854
commit dbaf32c627
1 changed files with 14 additions and 0 deletions

View File

@ -82,6 +82,20 @@ for MODULE in lxml polib; do
fi
done
# On some platforms, std::atomic needs a helper library
AC_MSG_CHECKING([for the need of -latomic])
AC_LINK_IFELSE([AC_LANG_SOURCE([
#include <atomic>
#include <cstdint>
std::atomic<std::int64_t> v;
int main() {
return v;
}
])],
[AC_MSG_RESULT([No])],
[AC_MSG_RESULT([Yes])
LIBS="$LIBS -latomic"])
# Declare options
AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug],