Patch for macOS >= 11.x
Hi
Here is a patch we are using in Homebrew (the package manager for macOS and Linux) to build libshout. The current build is broken and causes the library to be linked with a flat namespace, which might cause issues when dynamically loading the library with dlopen under some modes:
diff -u libshout-2.4.5-old/configure libshout-2.4.5/configure
--- libshout-2.4.5-old/configure 2021-10-21 12:28:29.000000000 +0200
+++ libshout-2.4.5/configure 2021-10-21 12:31:31.000000000 +0200
@@ -7582,17 +7582,12 @@
_lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
darwin1.*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- darwin*) # darwin 5.x on
- # if running on 10.5 or later, the deployment target defaults
- # to the OS version, if on x86, and 10.4, the deployment
- # target defaults to 10.4. Don't you love it?
- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
- 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- 10.*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ darwin*)
+ case ${MACOSX_DEPLOYMENT_TARGET},$host in
+ 10.[[012]],*|,*powerpc*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ *)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
esac
;;
esac
This is a patch for the configure file, but it should be applied to the the libtool.m4 file. I am not an expert on how you have setup the m4 folder in your project, so I'll let you handle the addition of that patch.
For reference: https://github.com/Homebrew/homebrew-core/pull/87694