[Mono-bugs] [Bug 51315][Nor] New - configure "detects" the nonexistent signbit function

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 23 Nov 2003 17:39:29 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by recht@netbsd.org.

http://bugzilla.ximian.com/show_bug.cgi?id=51315

--- shadow/51315	2003-11-23 17:39:29.000000000 -0500
+++ shadow/51315.tmp.3213	2003-11-23 17:39:29.000000000 -0500
@@ -0,0 +1,51 @@
+Bug#: 51315
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details: NetBSD-current
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: recht@netbsd.org               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: configure "detects" the nonexistent signbit function
+
+Description of Problem:
+(with the daily version of 23/Nov/2003)
+
+configure "detects" the nonexistent signbit function. gcc prints a
+"implicit declaration" warning, but since configure doesn't tries to link,
+it "thinks" the OS has the signbit function.
+
+Steps to reproduce the problem:
+Run configure on an OS that doesn't have signbit. (eg. NetBSD/current).
+
+Actual Results:
+Final linking fails, because signbit isn't in libc/libm.
+
+Expected Results:
+mono has it's own implementation. It should use it.
+
+How often does this happen? 
+Every time.
+
+Additional Information:
+This patch fixes the problem: (Tested on NetBSD/current)
+
+--- configure.in.orig   2003-11-23 13:01:06.000000000 +0100
++++ configure.in  2003-11-23 23:24:23.000000000 +0100
+@@ -652,7 +652,7 @@
+   dnl *** Check for signbit ***
+   dnl *************************
+   AC_MSG_CHECKING(for signbit)
+-  AC_TRY_COMPILE([#include <math.h>], [
++  AC_TRY_LINK([#include <math.h>], [
+      int s = signbit(1.0);
+   ], [
+      AC_MSG_RESULT(yes)