From 2e4dcc645df9b9c6779976381d7561adfcc0cbc0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 20 Dec 2013 17:55:30 +0000 Subject: [PATCH] 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 --- configure | 6 +++--- configure.in | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/configure b/configure index a11a471076..cc7b12ce9c 100755 --- a/configure +++ b/configure @@ -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 diff --git a/configure.in b/configure.in index c691665d1b..126a461c42 100644 --- a/configure.in +++ b/configure.in @@ -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