diff options
author | Jeffrey Walton <noloader@gmail.com> | 2021-03-20 14:45:51 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2021-03-20 14:45:51 -0400 |
commit | 44969f8e21eb5303cba9343a060146c73b1a32a2 (patch) | |
tree | d1cbc748061a8eeb5ee2789b0d077715fbaa4e6f | |
parent | 704a4073b85b8c8e8d61313874e6be5f39917546 (diff) | |
download | cryptopp-git-44969f8e21eb5303cba9343a060146c73b1a32a2.tar.gz |
Try to find Apple libtool on Darwin
A GNU libtool in /usr/local will break the build
-rw-r--r-- | GNUmakefile | 7 | ||||
-rw-r--r-- | GNUmakefile-cross | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/GNUmakefile b/GNUmakefile index 182f45c9..f34fa54d 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -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 diff --git a/GNUmakefile-cross b/GNUmakefile-cross index 518917c4..aa1651cb 100644 --- a/GNUmakefile-cross +++ b/GNUmakefile-cross @@ -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 |