From patchwork Sun Dec 19 16:18:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Build, libquadmath] PR 46520 Do not call AC_CHECK_LIB for gcc_no_link Date: Sun, 19 Dec 2010 06:18:50 -0000 From: Tobias Burnus X-Patchwork-Id: 76139 Message-Id: <4D0E306A.5090809@net-b.de> To: Ralf Wildenhues , gcc patches Hi Ralf, Ralf Wildenhues wrote: > Is the usage of the two HAVE_* defines for optimization only? Yes - it's just to speed up the calculation. > But you might still consider adding a case > statement in the gcc_no_link branch seeding the correct defines > or the respective configure cache variables (ac_cv_lib_m_cbrtl etc) > for targets where the functions are known to be available. I have now use the configure cache variables; one can still add a version with switch, when needed. OK? Tobias 2010-12-19 Tobias Burnus PR fortran/46520 * configure.ac: Do not call AC_CHECK_LIB for gcc_no_link. * configure: Regenerate diff --git a/libquadmath/configure.ac b/libquadmath/configure.ac index 56b1fcb..68b5cf8 100644 --- a/libquadmath/configure.ac +++ b/libquadmath/configure.ac @@ -109,8 +109,19 @@ esac AC_SUBST(toolexecdir) AC_SUBST(toolexeclibdir) -AC_CHECK_LIB([m],[sqrtl],[AC_DEFINE([HAVE_SQRTL],[1],[libm includes sqrtl])]) -AC_CHECK_LIB([m],[cbrtl],[AC_DEFINE([HAVE_CBRTL],[1],[libm includes cbrtl])]) +# If available, sqrtl and cbrtl speed up the calculation - +# but they are not required +if test x$gcc_no_link != xyes; then + AC_CHECK_LIB([m],[sqrtl],[AC_DEFINE([HAVE_SQRTL],[1],[libm includes sqrtl])]) + AC_CHECK_LIB([m],[cbrtl],[AC_DEFINE([HAVE_CBRTL],[1],[libm includes cbrtl])]) +else + if test "x$ac_cv_lib_m_sqrtl" = x""yes; then + AC_DEFINE([HAVE_SQRTL],[1],[libm includes sqrtl]) + fi + if test "x$ac_cv_lib_m_cbrtl" = x""yes; then + AC_DEFINE([HAVE_CBRTL],[1],[libm includes cbrtl]) + fi +fi # Check for symbol versioning (copied from libssp). AC_MSG_CHECKING([whether symbol versioning is supported])