Try to find Apple libtool on Darwin

A GNU libtool in /usr/local will break the build
This commit is contained in:
Jeffrey Walton 2021-03-20 14:45:51 -04:00
parent 704a4073b8
commit 44969f8e21
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 12 additions and 2 deletions

View File

@ -155,7 +155,12 @@ endif
ifneq ($(IS_DARWIN),0)
CXX ?= c++
# CRYPTOPP_CXXFLAGS += -stdlib=libc++
AR = libtool
IS_APPLE_LIBTOOL=$(shell libtool -V 2>&1 | $(GREP) -i -c 'Apple')
ifeq ($(IS_APPLE_LIBTOOL),1)
AR = libtool
else
AR = /usr/bin/libtool
endif
ARFLAGS = -static -o
endif

View File

@ -92,7 +92,12 @@ endif
# See http://www.cryptopp.com/wiki/MacOS_(Command_Line).
ifeq ($(IS_MACOS),1)
# setenv-macos.sh sets CPPFLAGS, CXXFLAGS and LDFLAGS
AR = libtool
IS_APPLE_LIBTOOL=$(shell libtool -V 2>&1 | $(GREP) -i -c 'Apple')
ifeq ($(IS_APPLE_LIBTOOL),1)
AR = libtool
else
AR = /usr/bin/libtool
endif
ARFLAGS = -static -o
endif