On 11/23/11 10:07, Ralf Schmitt wrote:
Oscar Benjamin<[email protected]>  writes:

Would it be slightly better to test just for the existence of the LIBM
configuration variable rather than its value? I don't know of an
example, but I guess a system could have libm but use a compiler with a
different linker argument format.

e.g.
if 'libm' in sysconfig.get_config_vars()
No, the following is from OS X:
,----
|>>>  from distutils import sysconfig
|>>>  sysconfig.get_config_var("LIBM")
| ''
`----



It may not matter.  On my Mac (Snow Leopard), it wants to use built-in 
functions provided by gcc for everything that I've tried that is in -lm on 
other machines.  There is a /usr/lib/libm.dylib, but a little searching (/bin, 
/usr/bin, my own custom python install) did not find anything on my machine 
that actually uses it.

"cc c.c" and "cc c.c -lm" produce identical a.out files.


_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to