diff -ru cvxopt-1.1.5.orig/src/setup.py cvxopt-1.1.5/src/setup.py
--- cvxopt-1.1.5.orig/src/setup.py	2012-03-27 22:05:13.000000000 +0200
+++ cvxopt-1.1.5/src/setup.py	2012-08-30 14:22:49.026850345 +0200
@@ -1,12 +1,13 @@
+import os
 from distutils.core import setup, Extension
 from glob import glob
 
 # Modifiy this if BLAS and LAPACK libraries are not in /usr/lib.
-BLAS_LIB_DIR = '/usr/lib'
+BLAS_LIB_DIR = os.getenv('BLAS_LAPACK_LIB_DIR')
 
 # Default names of BLAS and LAPACK libraries
-BLAS_LIB = ['blas']
-LAPACK_LIB = ['lapack']
+BLAS_LIB = [libfile[3:-2] for libfile in os.getenv('BLAS_MT_STATIC_LIBS').split(',')]
+LAPACK_LIB = [libfile[3:-2] for libfile in os.getenv('LAPACK_MT_STATIC_LIBS').split(',')]
 BLAS_EXTRA_LINK_ARGS = []
 
 # Set environment variable BLAS_NOUNDERSCORES=1 if your BLAS/LAPACK do
