summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-03-08 23:57:44 +0000
committerRoland McGrath <roland@gnu.org>1996-03-08 23:57:44 +0000
commit4b7a63b2df650c9fc56f27ff855a3bb22553d2c2 (patch)
treee40a5801f4d1f6394860f1ae1032cf496a5f0222 /configure.in
parentc46abe2b3e819b4534e937a7d7a910166bacd925 (diff)
downloademacs-4b7a63b2df650c9fc56f27ff855a3bb22553d2c2.tar.gz
(-lm check): If $GCC, append -fno-builtin to $CC for just this test.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 617fbe6a690..790ecec8f4e 100644
--- a/configure.in
+++ b/configure.in
@@ -1369,7 +1369,13 @@ AC_FUNC_ALLOCA
# 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)