configure: Use generic function to check for headers and functions

Signed-off-by: Valentin Ochs <a-monkey@0au.de>
Signed-off-by: Sonny Karlsson <ksonny@lotrax.org>
configure: Use tab for indentation consistently

Signed-off-by: Valentin Ochs <a-monkey@0au.de>
Signed-off-by: Sonny Karlsson <ksonny@lotrax.org>
configure: check_generic returns false on warnings, links against needed libraries, gets documentation.

configure: pthread test runs one function from pthread.h

Signed-off-by: Valentin Ochs <a-monkey@0au.de>
Signed-off-by: Sonny Karlsson <ksonny@lotrax.org>