This pull request enables compilation with macOS. It contains two changes.
1) First compilation fails with ld: unknown option: -R/usr/local/lib which was fixed by using -rpath instead.
2) After above change I got screenful of Undefined symbols for architecture x86_64: "_enif_alloc_binary", referenced from: .... This was fixed by adding -flat_namespace -undefined suppress to ERLANG_LFLAGS..
Everything is inside conditional so updated flags are used with macOS / Darwin only. Tested with macOS 10.12 Sierra.
This pull request enables compilation with macOS. It contains two changes.
1) First compilation fails with
ld: unknown option: -R/usr/local/lib
which was fixed by using-rpath
instead.2) After above change I got screenful of
Undefined symbols for architecture x86_64: "_enif_alloc_binary", referenced from: ...
. This was fixed by adding-flat_namespace -undefined suppress
toERLANG_LFLAGS
..Everything is inside conditional so updated flags are used with macOS / Darwin only. Tested with macOS 10.12 Sierra.