This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[libgfortran,committed] Remove use of HAVE_MATH_H in acinclude.m4
- From: FX Coudert <fxcoudert at gmail dot com>
- To: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches list <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 24 Feb 2008 11:59:15 +0000
- Subject: [libgfortran,committed] Remove use of HAVE_MATH_H in acinclude.m4
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; bh=/FQLXbpVHJrSoauK582ezWtebjA6sNtPhfz1lwRAcn8=; b=WkKh7/oBv3b8YHXlH1q52Sy8qHp2d48Dk1GS3HTRjgY5fpH8XXUZkiQNoSJ6l1cmTdlG6o9WnmoJ1UFzCCeOW2qgMBrqqh8iaN9Xmgh+RerZLnJSJleXovPYA4cgW4C6MoDNE1hSXLlaOKiFv0bRd2VLkRwyOcYYCIaJo7j5NxA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=RD5n7/Lx6/yvmN5s25PoIqCiQGSh4eGUGv+vPCkjTVjxr0kCEkOq176Wban1qVH6X2F4wrBIaPyUG01DiftpUYbDioUMC9IeSAoK9XJ1XgaLB0+ofOf0aSW806KMBPhObziGqfXWzbYdJREGNPkjHw51NQzxBah5RI/XXb3F8mU=
Checks for broken isfinite(), isnan() and fpclassify() in libgfortran/
acinclude.m4 include <math.h> conditionaly on HAVE_MATH_H being
defined (original patch by Stevel Ellcey, http://gcc.gnu.org/ml/
fortran/2005-09/msg00443.html, okayed by yours truly). Unfortunately,
HAVE_MATH_H is never defined, ever. Thus, the tests are done without
including <math.h>, and can sometimes give wrong results (one example
being powerpc-apple-darwin9.2.0, see comment #28 in PR 32841).
The patch below, committed as rev. 132587 after bootstrap on powerpc-
apple-darwin9.2.0, fixes that issue. (And that's my first 2008
library patch!)
FX
2008-02-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR libfortran/32841
* acinclude.m4: Don't use HAVE_MATH_H.
* configure: Regenerate.
Index: acinclude.m4
===================================================================
--- acinclude.m4 (revision 132578)
+++ acinclude.m4 (working copy)
@@ -204,9 +204,7 @@
libgfor_check_for_broken_isfinite_save_LIBS=$LIBS
LIBS="$LIBS -lm"
AC_TRY_RUN([
-#ifdef HAVE_MATH_H
#include <math.h>
-#endif
#include <float.h>
int main ()
{
@@ -237,9 +235,7 @@
libgfor_check_for_broken_isnan_save_LIBS=$LIBS
LIBS="$LIBS -lm"
AC_TRY_RUN([
-#ifdef HAVE_MATH_H
#include <math.h>
-#endif
#include <float.h>
int main ()
{
@@ -288,9 +284,7 @@
libgfor_check_for_broken_fpclassify_save_LIBS=$LIBS
LIBS="$LIBS -lm"
AC_TRY_RUN([
-#ifdef HAVE_MATH_H
#include <math.h>
-#endif
#include <float.h>
int main ()
{
--
François-Xavier Coudert
http://www.homepages.ucl.ac.uk/~uccafco/