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 |
|