build: Fix the build with slibtool
When building wget2 with slibtool (https://dev.midipix.org/cross/slibtool) it will fail to build for two reasons.
- wget2 uses
-no-whole-archive
when GNU libtool and slibtool do not support this, but then works around this for the former by patching it directly in the build system. The more portable way is to pass it directly to the linker with-Wl,--no-whole-archive
. The second commit removescontrib/libtool.patch
which will no longer be needed with this change. - The build fails in two places with undefined references to pthread which GNU libtool silently hides which commonly occurs in many projects that use libtool. This can be fixed by using the
ax_pthread.m4
file from autoconf-archive.
Approver's checklist:
-
The author has submitted the FSF Copyright Assignment and is listed in AUTHORS -
There is a test suite reasonably covering new functionality or modifications -
Function naming, parameters, return values, types, etc., are consistent with existing code -
This feature/change has adequate documentation added (if appropriate) -
No obvious mistakes / misspelling in the code