summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2021-03-20 14:45:51 -0400
committerJeffrey Walton <noloader@gmail.com>2021-03-20 14:45:51 -0400
commit44969f8e21eb5303cba9343a060146c73b1a32a2 (patch)
treed1cbc748061a8eeb5ee2789b0d077715fbaa4e6f
parent704a4073b85b8c8e8d61313874e6be5f39917546 (diff)
downloadcryptopp-git-44969f8e21eb5303cba9343a060146c73b1a32a2.tar.gz
Try to find Apple libtool on Darwin
A GNU libtool in /usr/local will break the build
-rw-r--r--GNUmakefile7
-rw-r--r--GNUmakefile-cross7
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