* include/libwget.h.in: Export new function wget_thread_cancel to kill
an existing thread nicely.
* libwget/thread.c: Same
* src/bar.c: Use the cleaner wget_thread_cancel() method to kill the
progress bar instead of polling for a variable.
* include/libwget.h.in: Include <stdbool.h>.
Define wget_thread_support().
* libwget/thread.c: Change condition to check
for threading support.
(wget_thread_support): New function.
(wget_thread_start): [!USE_POSIX_THREADS && !USE_PTH_THREADS]
Invoke directly the function.
* src/wget.c (main): If no threads are supported then set the
number of max threads to 1. If the queue is not empty, call again the
downloader function. It will be used only in case no threads are
available.
(downloader_thread): Do not wait for new elements in the queue
when there are no threads.
* tests/libtest.c (wget_test_start_server): Skip the test if
there is no threads support.
* configure.ac: Remove check for libpthread
* include/libwget.h.in: Check HAVE_PTHREAD_H,
Do not undefine gettext
* libwget/thread.c: Check HAVE_PTHREAD_H
This check is done by gnulib 'pthread' module.