From f83e27d647b8bd2ca001212d3ddd6db7b4697267 Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Tue, 18 Jan 2022 15:23:48 +0100 Subject: [PATCH] Point towards arm libraries When compiling for macOS using `unix-generic` on Apple M1 processors, point sarchdirs towards the correct location in Homebrew for arm64. --- configure-system-libraries.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure-system-libraries.sh b/configure-system-libraries.sh index 61585df800..dd3eecaae3 100755 --- a/configure-system-libraries.sh +++ b/configure-system-libraries.sh @@ -56,7 +56,11 @@ patch_config() } if [ "$(uname -s)" = "Darwin" ]; then - SEARCHDIRS="/usr/local/lib /usr/local/opt/openal-soft/lib" + if [ "$(arch)" = "arm64" ]; then + SEARCHDIRS="/opt/homebrew/lib /opt/homebrew/opt/openal-soft/lib" + else + SEARCHDIRS="/usr/local/lib /usr/local/opt/openal-soft/lib" + fi patch_config "Lua 5.1" "${SEARCHDIRS}" bin/Eluant.dll.config lua51.dylib liblua5.1.dylib patch_config SDL2 "${SEARCHDIRS}" bin/SDL2-CS.dll.config SDL2.dylib libSDL2-2.0.0.dylib patch_config OpenAL "${SEARCHDIRS}" bin/OpenAL-CS.Core.dll.config soft_oal.dylib libopenal.1.dylib