Skip to content

Commit

Permalink
account for different M1 vs x86_64 brew prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dktapps committed Jan 5, 2024
1 parent 286dc65 commit 5ac7b38
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ if [ "$(uname -s)" == "Darwin" ]; then
type glibtool >> "$DIR/install.log" 2>&1 || { write_error "Please install 'libtool' using Homebrew."; ((ERRORS++)); }
export LIBTOOL=glibtool
export LIBTOOLIZE=glibtoolize
export PATH="/opt/homebrew/opt/bison/bin:/opt/homebrew/opt/llvm/bin:$PATH"
if [ "$(uname -m)" == "arm64" ]; then
brew_prefix="/opt/homebrew"
else
brew_prefix="/usr/local"
fi
export PATH="$brew_prefix/opt/bison/bin:$brew_prefix/opt/llvm/bin:$PATH"
[[ $(clang --version) == "Apple clang"* ]] && { write_error "MacOS bundled clang is broken. Install 'llvm' using Homebrew."; ((ERRORS++)); }
[[ $(bison --version) == "bison (GNU Bison) 3."* ]] || { write_error "MacOS bundled bison is too old. Install 'bison' using Homebrew."; ((ERRORS++)); }

Expand Down

0 comments on commit 5ac7b38

Please sign in to comment.