diff --git a/swig/Python/Makefile b/swig/Python/Makefile index 72abaa98..c4aa5cbc 100644 --- a/swig/Python/Makefile +++ b/swig/Python/Makefile @@ -39,7 +39,11 @@ else CXXFLAGS += -std=c++0x # Make sure you have Atlas installed. You can statically link Atlas if you # would like to be able to move the library to a machine without Atlas. - LDLIBS := -lm -ldl -lf77blas -lcblas -llapack_atlas -latlas + ifneq ("$(ldconfig -p | grep lapack_atlas)","") + LDLIBS := -lm -ldl -lf77blas -lcblas -llapack_atlas -latlas + else + LDLIBS := -lm -ldl -lf77blas -lcblas -llapack -latlas + endif SNOWBOYDETECTLIBFILE = $(TOPDIR)/lib/ubuntu64/libsnowboy-detect.a ifneq (,$(findstring arm,$(shell uname -m))) SNOWBOYDETECTLIBFILE = $(TOPDIR)/lib/rpi/libsnowboy-detect.a diff --git a/swig/Python3/Makefile b/swig/Python3/Makefile index e25e1b4a..5bf8b15d 100644 --- a/swig/Python3/Makefile +++ b/swig/Python3/Makefile @@ -43,7 +43,11 @@ else CXXFLAGS += -std=c++0x # Make sure you have Atlas installed. You can statically link Atlas if you # would like to be able to move the library to a machine without Atlas. - LDLIBS := -lm -ldl -lf77blas -lcblas -llapack_atlas -latlas + ifneq ("$(ldconfig -p | grep lapack_atlas)","") + LDLIBS := -lm -ldl -lf77blas -lcblas -llapack_atlas -latlas + else + LDLIBS := -lm -ldl -lf77blas -lcblas -llapack -latlas + endif SNOWBOYDETECTLIBFILE = $(TOPDIR)/lib/ubuntu64/libsnowboy-detect.a ifneq (,$(findstring arm,$(shell uname -m))) SNOWBOYDETECTLIBFILE = $(TOPDIR)/lib/rpi/libsnowboy-detect.a