build: libpthread inclusion in pkgconfig files
Current ns-3-dev builds will generate pkgconfig files with an incorrect specifier for libpthread, which causes a compilation error for users of the pkgconfig files. For example:
Libs: -L"${libdir}" -lns3-dev-olsr-default -lns3-dev-internet-default -l-lpthread
In the above, it should simply be -lpthread
.
However, in debugging this, I could not figure out how this is generated, and whether it is even needed in ns-3 libraries anymore. I thought libpthread was included by this statement in src/core/CMakeLists.txt
:
set(libraries_to_link
${CMAKE_THREAD_LIBS_INIT}
)
If I comment out the above, I noticed that nothing changed in the build; it is still including and linking libpthread.
In summary, at the very least, the pkgconfig generation needs to be fixed if libpthread linkage is retained, but I'm questioning whether it still needs to be included.