diff --git a/Makefile b/Makefile index a911133661f..5fb6394e947 100644 --- a/Makefile +++ b/Makefile @@ -354,8 +354,9 @@ else # OS X packages atlas as the vecLib framework LIBRARIES += cblas # 10.10 has accelerate while 10.9 has veclib - XCODE_CLT_VER := $(shell pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep -o 'version: 6') - ifneq (,$(findstring version: 6,$(XCODE_CLT_VER))) + XCODE_CLT_VER := $(shell pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep 'version' | sed 's/[^0-9]*\([0-9]\).*/\1/') + XCODE_CLT_GEQ_6 := $(shell [ $(XCODE_CLT_VER) -gt 5 ] && echo 1) + ifeq ($(XCODE_CLT_GEQ_6), 1) BLAS_INCLUDE ?= /System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/ LDFLAGS += -framework Accelerate else