configure problem: libieee with Linux/glibc2 ?

Gregor Hoffleit flight at mathi.uni-heidelberg.de
Sat Mar 4 14:45:20 EST 2000


I think Python 1.5.2's configure script is to fast with including -lieee in LIBS.


I would suggest the following change to configure.in:

@@ -850,7 +856,10 @@
 # (none yet)
 
 # Linux requires this for correct f.p. operations
-AC_CHECK_LIB(ieee, __fpu_control)
+AC_CHECK_FUNC(__fpu_control,
+  [],
+  [AC_CHECK_LIB(ieee, __fpu_control)
+])
 
 # Check for --with-fpectl
 AC_MSG_CHECKING(for --with-fpectl)


This mean, libieee will only by tried if __fpu_control isn't found elsewhere
(i.e. in libc). 
 

With glibc 2.x, Linux doesn't need libieee anymore (it's still there for
compilation of legacy applications, but it's an empty static library), since
__fpu_control() is already defined in the libc library.



Furthermore, __fpu_control() is only used in fpectlmodule which currently
doesn't build with glibc 2.1 anyway due to the absence of __setfpucw (see
manpage below).

Does anybody know how to fix fpectlmodule for glibc 2.1 ? How does
__setfpucw(0x1372) translate into the _FPU_SETCW language ?

    Gregor
    


NAME
       __setfpucw  -  set  fpu  control word on i386 architecture
       (obsolete)

SYNOPSIS
       #include <i386/fpu_control.h>

       void __setfpucw((unsigned short) control_word);

DESCRIPTION
       __setfpucw transfer control_word to the registers  of  the
       fpu  (floating  point unit) on i386 architecture. This was
       used to control floating  point  precision,  rounding  and
       floating point exceptions.

AVAILABILITY
       As  of  glibc 2.1 (libc6 2.1) this function does not exist
       anymore. There are new functions from ISO C 9x to  control
       fpu  rounding  modes. These functions don't have manpages,
       but are documented in the info docs.

       If direct acces to the FPU control word is  still  needed,
       the     _FPU_GETCW     and    _FPU_SETCW    macros    from
       /usr/include/fpu_control.h can be used.
       
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20000304/3aa51df0/attachment.sig>


More information about the Python-list mailing list