[Numpy-svn] r4290 - branches/numpy.scons/numpy/distutils/scons
numpy-svn at scipy.org
numpy-svn at scipy.org
Thu Oct 25 07:16:42 EDT 2007
Author: cdavid
Date: 2007-10-25 06:16:33 -0500 (Thu, 25 Oct 2007)
New Revision: 4290
Modified:
branches/numpy.scons/numpy/distutils/scons/custom_checkers.py
branches/numpy.scons/numpy/distutils/scons/testcode_snippets.py
Log:
Fix CheckCBLAS for accelerate framework on mac os X
Modified: branches/numpy.scons/numpy/distutils/scons/custom_checkers.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/custom_checkers.py 2007-10-25 08:00:54 UTC (rev 4289)
+++ branches/numpy.scons/numpy/distutils/scons/custom_checkers.py 2007-10-25 11:16:33 UTC (rev 4290)
@@ -66,7 +66,9 @@
# HACK: we add libpath and libs at the end of the source as a comment, to
# add dependency of the check on those.
- src = '\n'.join([run_src, '#if 0', '%s' % libpath, '%s' % libs, '#endif'])
+ src = '\n'.join(['#include <%s>' % h for h in headers] +\
+ [run_src, '#if 0', '%s' % libpath,
+ '%s' % headers, '%s' % libs, '#endif'])
ret = context.TryLink(src, '.c')
if not ret:
env.Replace(LIBS = oldLIBS)
@@ -95,12 +97,13 @@
libs = ['atlas', 'f77blas', 'cblas']
libpath = atl_dir
- return _check_include_and_run(context, 'ATLAS', None, ['atlas_enum.h'],
+ return _check_include_and_run(context, 'ATLAS', None, ['atlas_enum.h', 'cblas.h'],
cblas_src, libs, libpath, [], [])
def CheckCBLAS(context):
cflags = []
libs = []
+ headers = []
if sys.platform == 'darwin':
# According to
# http://developer.apple.com/hardwaredrivers/ve/vector_libraries.html:
@@ -120,8 +123,10 @@
# XXX: This double append is not good, any other way ?
cflags.append('-framework')
cflags.append('Accelerate')
+ headers.append('Accelerate/Accelerate.h')
else:
+ headers.append('cblas.h')
libs.append('cblas')
- return _check_include_and_run(context, 'CBLAS', [], [], cblas_src,
+ return _check_include_and_run(context, 'CBLAS', [], headers, cblas_src,
libs, [], [], cflags)
Modified: branches/numpy.scons/numpy/distutils/scons/testcode_snippets.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/testcode_snippets.py 2007-10-25 08:00:54 UTC (rev 4289)
+++ branches/numpy.scons/numpy/distutils/scons/testcode_snippets.py 2007-10-25 11:16:33 UTC (rev 4290)
@@ -7,7 +7,6 @@
# Check whether CBLAS sgemm works
cblas_sgemm = """
-#include <cblas.h>
int
main (void)
More information about the Numpy-svn
mailing list