diff --git a/configure b/configure index abef5add4d..b6d12f6991 100755 --- a/configure +++ b/configure @@ -700,17 +700,20 @@ EOF check_func_headers(){ log check_func_headers "$@" headers=$1 - funcs=$2 + func=$2 shift 2 - { - for hdr in $headers; do - echo "#include <$hdr>" - done - for func in $funcs; do - echo "long check_$func(void) { return (long) $func; }" - done - echo "int main(void) { return 0; }" - } | check_ld "$@" && enable $funcs && enable_safe $headers + disable $func + incs="" + for hdr in $headers; do + incs="$incs +#include <$hdr>" + done + check_ld "$@" <