Fix macOS build: only use --export-dynamic on non-Darwin systems

- Conditionally add --export-dynamic linker flag based on host_os
- Skip the flag on macOS/Darwin where it causes linker errors
- Apply fix to both BasiliskII and SheepShaver configure.ac files
- This allows the build system to work on both Linux and macOS
This commit is contained in:
Matthias Melcher committed 2026-03-25 17:25:41 +01:00
1 parent e596e21583
commit 964e8127d6
1 file changed
+5 -1
+5 -1
View File
@@ -476,7 +476,11 @@ if [[ "$WANT_GTK" = "any" -o "$WANT_GTK" = "GTK3" ]]; then
WANT_GTK=GTK3
GUI_CFLAGS="$GTK3_CFLAGS"
GUI_LIBS="$GTK3_LIBS"
LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
# Only add --export-dynamic if not on macOS/Darwin
case $host_os in
darwin*) ;; # Skip on macOS
*) LDFLAGS="$LDFLAGS -Wl,--export-dynamic" ;;
esac
AC_CHECK_PROG([ac_cv_gcr], [glib-compile-resources], [yes])
if [[ "$ac_cv_gcr" = "yes" ]]; then
GCR="glib-compile-resources"