diff setup.py @ 16176:2dcbc1dfca9c legacy-trunk

Fix for MacOS X/Darwin: it doesn't need -lm, ever. (Noted by Steven Majewski)
author Andrew M. Kuchling <amk@amk.ca>
date Tue, 23 Jan 2001 22:21:11 +0000
parents ae296229f426
children 4fe69a9f8b30
line wrap: on
line diff
--- a/setup.py	Tue Jan 23 21:46:57 2001 +0000
+++ b/setup.py	Tue Jan 23 22:21:11 2001 +0000
@@ -113,6 +113,11 @@
         inc_dirs = ['/usr/include'] + self.compiler.include_dirs
         exts = []
 
+ 	# Check for MacOS X, which doesn't need libm.a at all
+ 	math_libs = ['m']
+ 	if sys.platform == 'Darwin1.2':
+ 	    math_libs = []
+
         # XXX Omitted modules: gl, pure, dl, SGI-specific modules
 
         #
@@ -129,13 +134,17 @@
         # array objects
         exts.append( Extension('array', ['arraymodule.c']) )
         # complex math library functions
-        exts.append( Extension('cmath', ['cmathmodule.c'], libraries=['m']) )
+        exts.append( Extension('cmath', ['cmathmodule.c'],
+                               libraries=math_libs) )
+        
         # math library functions, e.g. sin()
-        exts.append( Extension('math',  ['mathmodule.c'], libraries=['m']) )
+        exts.append( Extension('math',  ['mathmodule.c'],
+                               libraries=math_libs) )
         # fast string operations implemented in C
         exts.append( Extension('strop', ['stropmodule.c']) )
         # time operations and variables
-        exts.append( Extension('time', ['timemodule.c'], libraries=['m']) )
+        exts.append( Extension('time', ['timemodule.c'],
+                               libraries=math_libs) )
         # operator.add() and similar goodies
         exts.append( Extension('operator', ['operator.c']) )
         # access to the builtin codecs and codec registry