# CONFIG_SITE.darwinCommon.darwinCommon
#
# Site specific definitions for darwin builds
#-------------------------------------------------------

# These settings are designed for users of Homebrew.
# Users of other third-party package managers are welcome to
# provide patches appropriate for their manager.
ifneq (,$(wildcard /opt/homebrew))
  # Default location on aarch64
  HOMEBREW_DIR = /opt/homebrew
else ifneq (,$(wildcard /usr/local/Homebrew))
  # Default location on x86_64
  HOMEBREW_DIR = /usr/local
endif

# Look for Homebrew's readline
ifneq (,$(wildcard $(HOMEBREW_DIR)/opt/readline))
  READLINE_DIR = $(HOMEBREW_DIR)/opt/readline
endif

# Use GNU readline if it's avaiilable
ifneq (,$(wildcard $(READLINE_DIR)/include/readline/readline.h))
  INCLUDES_READLINE = -I$(READLINE_DIR)/include
  LDFLAGS_READLINE = -L$(READLINE_DIR)/lib
endif
