summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2001-01-23 22:21:11 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2001-01-23 22:21:11 (GMT)
commit5ddb25f36f676aa32b048a24261dcc8490b99c98 (patch)
tree6a5ed3e3f1c3c27f4ad5b13d7086310503a1dc7b /setup.py
parent9ac33509de0895595a825b7168abeacbb1d9984c (diff)
downloadcpython-5ddb25f36f676aa32b048a24261dcc8490b99c98.zip
cpython-5ddb25f36f676aa32b048a24261dcc8490b99c98.tar.gz
cpython-5ddb25f36f676aa32b048a24261dcc8490b99c98.tar.bz2
Fix for MacOS X/Darwin: it doesn't need -lm, ever. (Noted by Steven Majewski)
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index c32f4aa..4c3edc8 100644
--- a/setup.py
+++ b/setup.py
@@ -113,6 +113,11 @@ class PyBuildExt(build_ext):
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 @@ class PyBuildExt(build_ext):
# 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