Blob Blame History Raw
--- config.py.orig	2014-05-02 18:11:55.854524059 +0200
+++ config.py	2014-05-02 18:14:35.859058144 +0200
@@ -225,6 +225,48 @@
         extra_compile_args += ['-Wall', '-std=c99']
         libraries += ['mkl','mkl_lapack64']
 
+    elif platform.machine().startswith('arm'):
+        
+        extra_compile_args += ['-Wall', '-std=c99']
+
+        atlas = False
+        for dir in ['/usr/lib', '/usr/local/lib', '/usr/lib/atlas']:
+            if glob(join(dir, 'libatlas.so')) != []:
+                atlas = True
+                libdir = dir        
+                break
+        satlas = False
+        for dir in ['/usr/lib', '/usr/local/lib', '/usr/lib/atlas']:
+            if glob(join(dir, 'libsatlas.so')) != []:
+                satlas = True
+                libdir = dir        
+                break
+        openblas = False
+        for dir in ['/usr/lib', '/usr/local/lib']:
+            if glob(join(dir, 'libopenblas.so')) != []:
+                openblas = True
+                libdir = dir        
+                break
+        if openblas:  # prefer openblas
+            libraries += ['openblas']
+            library_dirs += [libdir]
+            msg +=  ['* Using OpenBLAS library']
+        else:
+            if atlas:  # then atlas
+                # http://math-atlas.sourceforge.net/errata.html#LINK
+                # atlas does not respect OMP_NUM_THREADS - build single-thread
+                # http://math-atlas.sourceforge.net/faq.html#tsafe
+                libraries += ['lapack', 'f77blas', 'cblas', 'atlas']
+                library_dirs += [libdir]
+                msg +=  ['* Using ATLAS library']
+            elif satlas:  # then atlas >= 3.10 Fedora/RHEL
+                libraries += ['satlas']
+                library_dirs += [libdir]
+                msg +=  ['* Using ATLAS library']
+            else:
+                libraries += ['blas', 'lapack']
+                msg +=  ['* Using standard lapack']
+
     elif machine == 'i686':
 
         #      _