Don't link with -lm if the check using it failed.

It is useless and can, apparently, result in problems, see #15746.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2013-12-20 17:55:30 +00:00
parent 5c1f95bc71
commit 2e4dcc645d
2 changed files with 8 additions and 5 deletions

6
configure vendored
View File

@ -22180,9 +22180,9 @@ $as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
save_LIBS="$LIBS"
LIBS="$LIBS -lm"
# use different functions to avoid configure caching
have_sin=0
have_sin=0
have_ceil=0
for ac_func in sin
do :
@ -22214,7 +22214,7 @@ $as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
# not sure we should warn the user, crash, etc.
LIBS="$save_LIBS"
fi
fi

View File

@ -2316,8 +2316,9 @@ if test "$have_cos" = 1 -a "$have_floor" = 1; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
save_LIBS="$LIBS"
LIBS="$LIBS -lm"
# use different functions to avoid configure caching
dnl use different functions to avoid configure caching
have_sin=0
have_ceil=0
AC_CHECK_FUNCS(sin, have_sin=1)
@ -2327,7 +2328,9 @@ else
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
# not sure we should warn the user, crash, etc.
dnl not sure we should warn the user, crash, etc. but don't link with
dnl -lm it might result in failure of the subsequent tests too
LIBS="$save_LIBS"
fi
fi