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