diff --git a/src/bindings/mono/efl_mono/efl_libs.cs.in b/src/bindings/mono/efl_mono/efl_libs.cs.in
index fcf5b18183..af811d494a 100644
--- a/src/bindings/mono/efl_mono/efl_libs.cs.in
+++ b/src/bindings/mono/efl_mono/efl_libs.cs.in
@@ -33,7 +33,7 @@ internal class Libs {
internal const string CustomExports = "@CUSTOM_EXPORTS_MONO_DL_MONO@";
- internal const string Libdl = "libdl.so";
+ internal const string Libdl = "@LIBDL_DL_MONO@";
internal const string Kernel32 = "kernel32.dll";
internal static readonly Efl.Eo.NativeModule EflModule = new Efl.Eo.NativeModule(Efl);
diff --git a/src/bindings/mono/efl_mono/meson.build b/src/bindings/mono/efl_mono/meson.build
index 165b6d55bd..5ca6f116d6 100644
--- a/src/bindings/mono/efl_mono/meson.build
+++ b/src/bindings/mono/efl_mono/meson.build
@@ -16,6 +16,11 @@ efl_libs = configuration_data()
efl_libs.set('EFL_MONO_LIBRARY_MAP', map)
efl_libs.set('CUSTOM_EXPORTS_MONO_DL_MONO', 'eflcustomexportsmono')
efl_libs.set('EVIL_DL_MONO', 'dl')
+if sys_osx
+ efl_libs.set('LIBDL_DL_MONO', 'dl.dylib')
+else
+ efl_libs.set('LIBDL_DL_MONO', 'libdl.so')
+endif
foreach mono_libs : mono_sublibs
key = mono_libs[0].to_upper()+'_DL_MONO'
diff --git a/src/bindings/mono/eo_mono/NativeModule_Unix.cs b/src/bindings/mono/eo_mono/NativeModule_Unix.cs
index 67409e02d1..b4dfeb8aea 100644
--- a/src/bindings/mono/eo_mono/NativeModule_Unix.cs
+++ b/src/bindings/mono/eo_mono/NativeModule_Unix.cs
@@ -56,6 +56,12 @@ internal partial class NativeModule
///-
///libfilename.so
///
+ ///-
+ ///filename.dylib
+ ///
+ ///-
+ ///libfilename.dylib
+ ///
///
///
///The name to search for.
@@ -73,6 +79,16 @@ internal partial class NativeModule
if (r == IntPtr.Zero)
{
r = dlopen("lib" + filename + ".so", RTLD_NOW | RTLD_GLOBAL);
+ if (r == IntPtr.Zero)
+ {
+ r = dlopen(filename + ".dylib", RTLD_NOW | RTLD_GLOBAL);
+ if (r == IntPtr.Zero)
+ {
+ r = dlopen("lib" + filename + ".dylib", RTLD_NOW | RTLD_GLOBAL);
+ }
+ }
+
+
}
}
}