libaltos: Build Mac OSX libaltos.dylib for arm64 too
authorKeith Packard <keithp@keithp.com>
Wed, 9 Feb 2022 17:51:33 +0000 (09:51 -0800)
committerKeith Packard <keithp@keithp.com>
Wed, 9 Feb 2022 18:35:32 +0000 (10:35 -0800)
Make this work on the M1.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/install-macosx
libaltos/Makefile-standalone
libaltos/libaltos.dylib

index c39fb85e868c8e60a9dc546bad1afd71c46fc3a8..721a3d1cf79c7660d6a6f5eea089ff5c0e155ab6 100755 (executable)
@@ -20,8 +20,8 @@ case `id -u` in
 esac
 
 # Check for java
-if ls "$JVM" | grep -q adopt; then
-    echo "Adopt OpenJDK already present"
+if ls "$JVM" | grep -q temurin; then
+    echo "Adoptium already present"
 else
     open https://adoptium.net/
     osascript -e 'display dialog "Install Java from https://adoptium.net then click Continue" buttons {"Continue"} default button 1 with title "Install Java"' >/dev/null
index 77c7cca514f1e6196288eefbd5d6372821bc00a8..dce602a9e340bc8a3ba8eed4b56e576aba75343b 100644 (file)
@@ -34,11 +34,11 @@ OS_SRCS=libaltos_posix.c libaltos_darwin.c
 #      -iwithsysroot /System/Library/Frameworks/CoreFoundation.framework/Headers
 
 XCODE=/Applications/Xcode.app
-SDK=$(XCODE)/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
+SDK=$(XCODE)/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk
 MINVERSION=10.5
 
 OS_LIB_CFLAGS=\
-       -DDARWIN -DPOSIX_TTY -arch x86_64 -isysroot $(SDK) \
+       -DDARWIN -DPOSIX_TTY -arch x86_64 -arch arm64 -isysroot $(SDK) \
        -mmacosx-version-min=10.5 \
        -iwithsysroot /System/Library/Frameworks/JavaVM.framework/Headers \
        -iwithsysroot /System/Library/Frameworks/IOKit.framework/Headers \
index 0d5b9c46309e1ec164fbe924bb3921b099bb8013..fcc46efea5733327847446f80ed741da13e52711 100755 (executable)
Binary files a/libaltos/libaltos.dylib and b/libaltos/libaltos.dylib differ