unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* isinf is a macro on HP-UX
@ 2004-05-23 15:41 Andreas Vögele
  2004-05-28  0:48 ` Kevin Ryde
  2004-07-05  0:04 ` Kevin Ryde
  0 siblings, 2 replies; 3+ messages in thread
From: Andreas Vögele @ 2004-05-23 15:41 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

isinf is a macro on HP-UX. Currently, configure.in uses AC_CHECK_FUNCS, 
which checks for functions only, to check for isinf. I've attached a 
patch that replaces the current test with a test that includes math.h.

The HP-UX manual page says "The ISO/ANSI C committee has approved the 
isinf() macro for inclusion in the C9X draft standard. [...] The 
isinf() macro replaces the isinf() and isinff() functions, which are 
obsolete and are no longer supported."

It seems that C99 defines the following macros: fpclassify(), 
isfinite(), isinf(), isnan(), isnormal(), signbit().


[-- Attachment #2: configure.in.diff --]
[-- Type: application/octet-stream, Size: 1031 bytes --]

Index: configure.in
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/configure.in,v
retrieving revision 1.240
diff -u -r1.240 configure.in
--- configure.in	21 Apr 2004 23:37:22 -0000	1.240
+++ configure.in	23 May 2004 15:16:03 -0000
@@ -861,7 +861,17 @@
 #                                older systems
 #   sincos - GLIBC extension
 #
-AC_CHECK_FUNCS(asinh acosh atanh copysign finite isinf isnan sincos trunc)
+AC_CHECK_FUNCS(asinh acosh atanh copysign finite isnan sincos trunc)
+
+# On HP-UX 11, isinf() is a macro.  We must make sure that math.h is
+# included when checking for isinf().
+AC_MSG_CHECKING([for isinf])
+AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[#include <math.h>]],
+ [[isinf (0.0);]])],
+ [AC_MSG_RESULT([yes])
+  AC_DEFINE(HAVE_ISINF, 1, [Define to 1 if you have the `isinf' function/macro.])],
+ [AC_MSG_RESULT([no])])
 
 # When testing for the presence of alloca, we need to add alloca.o
 # explicitly to LIBOBJS to make sure that it is translated to

[-- Attachment #3: Type: text/plain, Size: 136 bytes --]

_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: isinf is a macro on HP-UX
  2004-05-23 15:41 isinf is a macro on HP-UX Andreas Vögele
@ 2004-05-28  0:48 ` Kevin Ryde
  2004-07-05  0:04 ` Kevin Ryde
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Ryde @ 2004-05-28  0:48 UTC (permalink / raw)


Andreas Vögele <voegelas@gmx.net> writes:
>
> isinf is a macro on HP-UX. Currently, configure.in uses
> AC_CHECK_FUNCS, which checks for functions only, to check for
> isinf.

It's tempting to look only for an isinf macro in the C file.  I wonder
if any systems have only a function version.

> I've attached a patch that replaces the current test with a
> test that includes math.h.

I guess the alternative is to leave configure alone and supplement the
result of the test with #ifdef isinf in the C file.  Though I suppose
it's a bit disconcerting to see "no" in configure when one's libc docs
say isinf exists.


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: isinf is a macro on HP-UX
  2004-05-23 15:41 isinf is a macro on HP-UX Andreas Vögele
  2004-05-28  0:48 ` Kevin Ryde
@ 2004-07-05  0:04 ` Kevin Ryde
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Ryde @ 2004-07-05  0:04 UTC (permalink / raw)
  Cc: bug-guile

Andreas Vögele <voegelas@gmx.net> writes:
>
> isinf is a macro on HP-UX. Currently, configure.in uses
> AC_CHECK_FUNCS, which checks for functions only, to check for
> isinf. I've attached a patch that replaces the current test with a
> test that includes math.h.

Thanks, I made some changes along these lines (at long last).


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-07-05  0:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-23 15:41 isinf is a macro on HP-UX Andreas Vögele
2004-05-28  0:48 ` Kevin Ryde
2004-07-05  0:04 ` Kevin Ryde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).