From 0a4a6b342e0d431e68d975e661e4a8fe143d8d4f Mon Sep 17 00:00:00 2001 From: Jaro Z Date: Thu, 21 Sep 2017 20:25:51 +0200 Subject: [PATCH] make Python compilation compatible for Arch Linux --- swig/Python/Makefile | 6 +++++- swig/Python3/Makefile | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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