diff configure.in @ 14797:a790ae4a71ba

(-lm check): If $GCC, append -fno-builtin to $CC for just this test.
author Roland McGrath <roland@gnu.org>
date Fri, 08 Mar 1996 23:57:44 +0000
parents a668c56171b2
children ad186ff7f21b
line wrap: on
line diff
--- a/configure.in	Fri Mar 08 21:51:22 1996 +0000
+++ b/configure.in	Fri Mar 08 23:57:44 1996 +0000
@@ -1369,7 +1369,13 @@
 
 # fmod, logb, and frexp are found in -lm on most systems.
 # On HPUX 9.01, -lm does not contain logb, so check for sqrt.
-AC_CHECK_LIB(m, sqrt(0.0) + t)
+old_CC="$CC"
+# GCC's implicit prototype for its built-in `sqrt' function conflicts
+# with autoconf's call, so disable the built-in function.
+test x$GCC = xyes && CC="$CC -fno-builtin"
+AC_CHECK_LIB(m, sqrt)
+CC="$old_CC"
+
 AC_CHECK_FUNCS(gettimeofday gethostname dup2 rename closedir mkdir rmdir \
 random lrand48 bcopy bcmp logb frexp fmod ftime res_init setsid \
 strerror fpathconf select mktime eaccess getpagesize tzset)