configure: removing "-c" from check_compile()

The C compiler argument "-c" in check_compile() prevents the linker
from running. As a result, due to C implicit function definition,
check_compile() will report false-positives even if a function does
not exist at all. This commit removes it.

Signed-off-by: Tom Li <tomli@tomli.me>
pull/274/head
Tom Li 2018-12-26 01:50:38 +08:00
parent 49bf4ba772
commit 0b79a1a9b8
No known key found for this signature in database
GPG Key ID: FAD3EB05E88E8D6D
1 changed files with 1 additions and 1 deletions

2
configure vendored
View File

@ -18,7 +18,7 @@ check_compile() {
printf "checking %s ... " "$1"
printf "$3" > "$tmpc"
local res=0
$CC $OUR_CPPFLAGS $CPPFLAGS $2 $CFLAGS -c "$tmpc" -o /dev/null >/dev/null 2>&1 \
$CC $OUR_CPPFLAGS $CPPFLAGS $2 $CFLAGS "$tmpc" -o /dev/null >/dev/null 2>&1 \
|| res=1
test x$res = x0 && \
{ printf "yes\n" ; test x"$2" = x || OUR_CPPFLAGS="$OUR_CPPFLAGS $2" ; } \