[librsvg/wip/chergert/fix-macos-link] build: use -framework Foundation on macOS
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/wip/chergert/fix-macos-link] build: use -framework Foundation on macOS
- Date: Sat, 28 Nov 2020 04:55:00 +0000 (UTC)
commit 474b4c21d1f24261627a93a636e9a36190bdca88
Author: Christian Hergert <chergert redhat com>
Date: Fri Nov 27 20:58:33 2020 -0800
build: use -framework Foundation on macOS
This fixes an issue where link symbols are not available for basic Obj-C
message passing and other release/retain operations.
Fixes #545
Makefile.am | 4 ++++
configure.ac | 16 ++++++++++++++++
2 files changed, 20 insertions(+)
---
diff --git a/Makefile.am b/Makefile.am
index 9013a95e..d9204fd5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -204,6 +204,10 @@ librsvg_@RSVG_API_MAJOR_VERSION@_la_LDFLAGS = \
-export-symbols-regex "^rsvg_.*" \
$(AM_LDFLAGS)
+if OS_DARWIN
+librsvg_@RSVG_API_MAJOR_VERSION@_la_LDFLAGS += -framework Foundation
+endif
+
librsvg_@RSVG_API_MAJOR_VERSION@_la_LIBADD = \
librsvg_c_api.la \
$(LIBRSVG_LIBS) \
diff --git a/configure.ac b/configure.ac
index 60394eec..428b7e73 100644
--- a/configure.ac
+++ b/configure.ac
@@ -157,6 +157,22 @@ AM_CONDITIONAL(OS_WIN32, test "$native_win32" = "yes")
dnl ===========================================================================
+#AC_CANONICAL_HOST
+
+AC_MSG_CHECKING([for darwin])
+case "$host" in
+ darwin*)
+ native_darwin=yes
+ ;;
+ *)
+ native_darwin=no
+ ;;
+esac
+AC_MSG_RESULT([$native_darwin])
+AM_CONDITIONAL(OS_DARWIN, test "$native_darwin" = "yes")
+
+dnl ===========================================================================
+
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
AC_SUBST(GLIB_MKENUMS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]