summaryrefslogtreecommitdiff
path: root/src/lib/ecore_audio
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-08-02 11:23:34 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-08-02 11:23:34 +0900
commit879d93377b219dca00be63f8139fee79b7938147 (patch)
treed6464712113b82a5125e3287e082ea7426333f41 /src/lib/ecore_audio
parentdd1d3f0d2d8f7369f7461f54928eac2a4fce99fb (diff)
efl runtime dynamic lib loading - make errors consistent and useful
so drop trying to appease the openbsd packages and stick to "upstream so major versions" and let users fix their systems with symlinks. also report what we are looking for so they have a chance to symlink to make efl happy. at some point we should make a single simple runtime lib linker subsystem in efl so all these errors are reported in the same way, input libray names are listed in a simple consistent way etc. etc. for now we have 3 locations in efl that do this and they are roughly similar. we can unify it later.
Diffstat (limited to 'src/lib/ecore_audio')
-rw-r--r--src/lib/ecore_audio/ecore_audio.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/ecore_audio/ecore_audio.c b/src/lib/ecore_audio/ecore_audio.c
index d09d656008..fbb5ad0ee5 100644
--- a/src/lib/ecore_audio/ecore_audio.c
+++ b/src/lib/ecore_audio/ecore_audio.c
@@ -99,7 +99,7 @@ ecore_audio_pulse_lib_load(void)
99 { 99 {
100 if (!ecore_audio_pulse_lib->mod) 100 if (!ecore_audio_pulse_lib->mod)
101 { 101 {
102 ERR("Cannot find libpulse!"); 102 ERR("Cannot find libpulse at runtime!");
103 return EINA_FALSE; 103 return EINA_FALSE;
104 } 104 }
105 return EINA_TRUE; 105 return EINA_TRUE;
@@ -120,19 +120,25 @@ ecore_audio_pulse_lib_load(void)
120 LOAD("libpulse-0.dll"); 120 LOAD("libpulse-0.dll");
121 LOAD("libpulse.dll"); 121 LOAD("libpulse.dll");
122 LOAD("pulse.dll"); 122 LOAD("pulse.dll");
123 if (!ecore_audio_pulse_lib->mod)
124 ERR("Could not find libpulse-0.dll, libpulse.dll, pulse.dll");
123# elif defined(__APPLE__) && defined(__MACH__) 125# elif defined(__APPLE__) && defined(__MACH__)
124 LOAD("libpulse.0.dylib"); 126 LOAD("libpulse.0.dylib");
125 LOAD("libpulse.0.so"); 127 LOAD("libpulse.0.so");
126 LOAD("libpulse.so.0"); 128 LOAD("libpulse.so.0");
129 if (!ecore_audio_pulse_lib->mod)
130 ERR("Could not find libpulse.0.dylib, libpulse.0.so, libpulse.so.0");
127# else 131# else
128 LOAD("libpulse.so.0"); 132 LOAD("libpulse.so.0");
133 if (!ecore_audio_pulse_lib->mod)
134 ERR("Could not find libpulse.so.0");
129# endif 135# endif
130# undef LOAD 136# undef LOAD
131 if (!ecore_audio_pulse_lib->mod) return EINA_FALSE; 137 if (!ecore_audio_pulse_lib->mod) return EINA_FALSE;
132 138
133#define SYM(x) \ 139#define SYM(x) \
134 if (!(ecore_audio_pulse_lib->x = eina_module_symbol_get(ecore_audio_pulse_lib->mod, #x))) { \ 140 if (!(ecore_audio_pulse_lib->x = eina_module_symbol_get(ecore_audio_pulse_lib->mod, #x))) { \
135 ERR("libpulse - cannot find %s", #x); \ 141 ERR("Cannot find symbol '%s' in'%s", #x, eina_module_file_get(ecore_audio_pulse_lib->mod)); \
136 goto err; \ 142 goto err; \
137 } 143 }
138 SYM(pa_context_new); 144 SYM(pa_context_new);
@@ -186,7 +192,7 @@ ecore_audio_sndfile_lib_load(void)
186 { 192 {
187 if (!ecore_audio_sndfile_lib->mod) 193 if (!ecore_audio_sndfile_lib->mod)
188 { 194 {
189 ERR("Cannot find libsndfile!"); 195 ERR("Cannot find libsndfile at runtime!");
190 return EINA_FALSE; 196 return EINA_FALSE;
191 } 197 }
192 return EINA_TRUE; 198 return EINA_TRUE;
@@ -219,7 +225,7 @@ ecore_audio_sndfile_lib_load(void)
219 225
220#define SYM(x) \ 226#define SYM(x) \
221 if (!(ecore_audio_sndfile_lib->x = eina_module_symbol_get(ecore_audio_sndfile_lib->mod, #x))) { \ 227 if (!(ecore_audio_sndfile_lib->x = eina_module_symbol_get(ecore_audio_sndfile_lib->mod, #x))) { \
222 ERR("libsndfile - cannot find %s", #x); \ 228 ERR("Cannot find symbol '%s' in'%s", #x, eina_module_file_get(ecore_audio_pulse_lib->mod)); \
223 goto err; \ 229 goto err; \
224 } 230 }
225 SYM(sf_open); 231 SYM(sf_open);