NetworkManager/m4
orbea 3affccf29b
tests: fix undefined references to pthread
When building NetworkManger with --enable-tests or using 'make check'
and slibtool the build will fail in many places with undefined references
to pthreads.

This is because -lpthread is never explicitly added to the appropriate
variable, src_core_libNetworkManagerTest_la_LIBADD. When analyzing the
build log with GNU libtool it can be seen that it silently adds -pthread
on its own which hides the issue.

To solve this ax_pthread.m4 from the autoconf-archives project can be
used which provides the $(PTHREAD_LIBS) linker flag.

Source: https://github.com/autoconf-archive/autoconf-archive/blob/master/m4/ax_pthread.m4
See-also: https://www.gnu.org/software/autoconf-archive/ax_pthread.html

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/804
2021-04-07 08:29:50 +02:00
..
attributes.m4 build: import attributes.m4 from systemd 2016-06-03 22:19:37 +02:00
ax_lib_readline.m4 build: correct help message about missing readline + termcap libraries 2015-05-11 10:33:21 -05:00
ax_pthread.m4 tests: fix undefined references to pthread 2021-04-07 08:29:50 +02:00
compiler_options.m4 build: add comment for disabling "-Wmaybe-uninitialized" with LTO 2021-01-08 12:36:55 +01:00
git-sha-record.m4 build: move detection of NM_GIT_SHA to separate "m4/git-sha-record.m4" 2016-09-14 14:11:07 +02:00
gnome-code-coverage.m4 build: disable lcov version check 2017-10-20 17:16:22 +02:00
introspection.m4 build: remove subshells and fix invalid test syntax 2020-04-20 08:54:38 +02:00
vapigen.m4 build: document defaults consistently 2019-04-16 15:57:20 +02:00